JSPM

@base-tree/js

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q16033F
  • License MIT

Base Tree javascript library for contract interaction ( ENSjs Compatible )

Package Exports

  • @base-tree/js
  • @base-tree/js/contracts
  • @base-tree/js/dns
  • @base-tree/js/package.json
  • @base-tree/js/public
  • @base-tree/js/subgraph
  • @base-tree/js/utils
  • @base-tree/js/wallet

Readme

BaseTree JS SDK

The ultimate Base Tree javascript library, with viem under the hood.

Features

  • Super fast response times
  • Easy call batchability
  • Written in TypeScript
  • Supports the most cutting edge ENS features
  • Full tree-shaking support

Installation

Install @base-tree/js, alongside viem.

npm install @base-tree/js viem

or

yarn add @base-tree/js viem

Getting Started

The most simple way to get started is to create a public ENS client, with a supported chain and transport imported from viem. The public client has all the read functions available on it, as well as all subgraph functions.

// Import viem transport, viem chain, and @base-tree/js
import { http } from 'viem'
import { baseSepolia } from 'viem/chains'
import { createEnsPublicClient } from '@base-tree/js'

// Create the client
const client = createEnsPublicClient({
  chain: baseSepolia,
  transport: http(),
})

// Use the client
const ethAddress = client.getAddressRecord({ name: 'sam.bst' })

JS Docs

Full Docs

Full docs site coming soon.