@bonfida/sns-warp-injective
v0.2.5
Published
Injective resolution of Solana Name Service domain names
Downloads
156
Readme
With Yarn:
yarn add @bonfida/sns-warp-injective
With NPM:
npm i @bonfida/sns-warp-injective
This package can be used to resolve .sol
domains on Injective.
The JS client currently support the following chains:
- Injective Testnet (deployed at
inj1mrc7uhhwfw7m3mgmqvtypw9qp09d5gsasvmup9
) - Injective Mainnet (deployed at ``)
Resolving a .sol domain
The following code can be used to resolve .sol
domains
// The domain name to resolve
const domain = "mock3.sol";
// The network on which to resolve the domain
const network = Network.Mainnet;
const resolved = await resolveName(domain, network);
console.log(resolved); // <- inj1r4ce6tdhv0ustvvjfar22xz7qqwan95xn9vfmx
Reverse look up
The following code can be used to resolve a name address
// The network on which to perform the reverse lookup
const network = Network.Mainnet;
const address = "...";
const resolved = await resolveReverse(address, network);
console.log(resolved); // <- mock3