@bako-id/sdk
v0.0.16
Published
SDK to interact with domains in Bako.
Downloads
290
Readme
📦 Bako ID SDK
Bako ID SDK enable to register a @
handler domain in Fuel Network.
Installation
Pnpm
pnpm install fuels @bako-id/sdk
Npm
npm install fuels @bako-id/sdk
Yarn
yarn install fuels @bako-id/sdk
Getting Started
Resolving a domain address
import { OffChainSync } from '@bako-id/sdk';
import { Provider } from 'fuels';
const provider = await Provider.create('https://testnet.fuel.network/v1/graphql');
const sync = await OffChainSync.create(provider);
const resolverAddress = sync.getResolver('bakoid');
console.log(resolverAddress); // 0x000000...
Resolving a domain name
import { OffChainSync } from '@bako-id/sdk';
import { Provider } from 'fuels';
const provider = await Provider.create('https://testnet.fuel.network/v1/graphql');
const sync = await OffChainSync.create(provider);
const name = sync.getDomain('0x000000...');
console.log(name); // @bakoid
📜 License
This repo is licensed under the Apache-2.0
license. See LICENSE
for more information.