@storkdomains/js

1.0.8 • Public • Published

@storkdomains/js

Client library to interact with the Stork Domains smart contract.

Install with npm:

$ npm install @storkdomains/js

Install with yarn:

$ yarn add @storkdomains/js

Examples

Below are some of our available query methods.

Resolve a Domain to its addresses

This is the core query of Stork Domains and resolves a domain to its configured address.

import {ClientApi, ChainType} from '@storkdomains/js';

const api = new ClientApi();

// Resolve domain to its Sui Address
const sui_address = await api.domains.resolveAddress(
    "anthony.stork", ChainType.SUI
);

// Resolve domain to its ETH Address
const eth_address = await api.domains.resolveAddress(
    "anthony.stork", ChainType.ETH
);

Fetch a Domain Object

const domain = await api.domains.getDomainObject("anthony.stork");

Get the owner of the Domain Object

This will return a Sui Address because Stork Domains are natively stored on the Sui blockchain.

const owner: SuiAddress = await api.domains.getOwner("anthony.stork");

Open Source

This package is open source and available at github.com/storkdomains/js.

Support

If you have integrated with Stork Domains or require assistance with integration, please ping us on our discord at discord.gg/stork, or email us at anthony@stork.domains.

Readme

Keywords

none

Package Sidebar

Install

npm i @storkdomains/js

Weekly Downloads

0

Version

1.0.8

License

MIT

Unpacked Size

30.1 kB

Total Files

20

Last publish

Collaborators

  • mrtoucan