SpaceID

安装

yarn add @siddomains/sidjs

使用方法

import SIDfunctions from '@siddomains/sidjs';
const SID = SIDfunctions.default;

const provider = new ethers.providers.JsonRpcProvider(rpcUrls);
try {
	const sid = new SID({ provider, sidAddress: SIDfunctions.getSidAddress('56') });
	const sname = await sid.getName(Address).catch(err => console.log(err));
	this.spaceName = sname?.name ? `${sname?.name}` : Address;
  } catch (error) {
	// console.log('sid...', error);
 }

PS:

dotbit

安装

yarn add dotbit

使用方法

import { createInstance } from 'dotbit';

const dotbit = createInstance();
try {
	const account = await dotbit.reverse({
	  key: Address
	});
	this.spaceName = account?.account ? account?.account : Address;
  } catch (error) {
	// console.log('dot...', error);
 }
Last Updated: