@bonfida/sns-warp-injective
TypeScript icon, indicating that this package has built-in type declarations

0.2.5 • Public • Published

@bonfida/sns-warp-injective



Resolve .sol domain names Injective


Table of contents


  1. Installation
  2. Introduction
  3. Supported chains
  4. Examples

Installation


With Yarn:

yarn add @bonfida/sns-warp-injective

With NPM:

npm i @bonfida/sns-warp-injective

Introduction


This package can be used to resolve .sol domains on Injective.


Supported chains


The JS client currently support the following chains:

  • Injective Testnet (deployed at inj1mrc7uhhwfw7m3mgmqvtypw9qp09d5gsasvmup9)
  • Injective Mainnet (deployed at ``)

Examples


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

Readme

Keywords

none

Package Sidebar

Install

npm i @bonfida/sns-warp-injective

Weekly Downloads

0

Version

0.2.5

License

MIT

Unpacked Size

2.65 MB

Total Files

16

Last publish

Collaborators

  • bonfida