@basename/core
v0.0.2
Published
Base Name Service SDK.
Downloads
7
Readme
Base Name Service SDK
Installation
npm install @basename/core
Usage
Importing the Package
To use the BNS, import the package and create an instance of the BNS
class:
import { BNS } from '@basename/core';
// Create an instance of BNS
const bns = new BNS({
rpcEndpoint: 'https://mainnet.base.org'
});
Resolve .base name to address:
const address = await bns.getAddress('hello.base');
Resolve address to .base name:
const name = await bns.getName('0x4fb3f133951bF1B2d52fF6CEab2c703fbB6E98cC');