npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

ibc-domains-sdk

v1.1.0

Published

* [Convert address](#convert-cosmos-address) * [Resolve IBC Domain to addresses](#resolve-domain) * [Resolve IBC Domain details](#resolve-ibc-domain-details) * [Resolve address into primary IBC Domain](#resolve-address-into-primary-domain)

Downloads

4,783

Readme

IBC Domains SDK

Example usage

import {
  convertAddress,
  resolveDomainDetails,
  resolveDomainIntoAddresses,
  resolvePrimaryDomainByAddress,
  resolveDomainIntoChainAddress
} from "ibc-domains-sdk";

const result = convertAddress("cosmos1elwrkcazwacy3gyj6jg2g4yp243zkzs62mpsd7", "osmo");

if (result.isOk()) {
  console.log(result.value);
} else {
  console.log("error:", result.error);
}

resolveDomainIntoAddresses("jacky").then(result => {
  if (result.isOk()) {
    console.log("f", result.value)
  } else {
    console.log("error:", result.error);
  }
});

resolveDomainIntoChainAddress("jacky.cosmos", "kujira").then(result => {
  if (result.isOk()) {
    console.log(result.value)
  } else {
    console.log("error:", result.error);
  }
});

resolvePrimaryDomainByAddress("osmo1elwrkcazwacy3gyj6jg2g4yp243zkzs6zqjqmv").then(result => {
  if (result.isOk()) {
    console.log(result.value)
  } else {
    console.log("error:", result.error);
  }
});

resolveDomainDetails("jacky").then(result => {
  if (result.isOk()) {
    console.log(result.value)
  } else {
    console.log("error:", result.error);
  }
});

Convert Cosmos address

Example

import {
  convertAddress
} from "ibc-domains-sdk";

const result = convertAddress("cosmos1elwrkcazwacy3gyj6jg2g4yp243zkzs62mpsd7", "osmo");

if (result.isOk()) {
  console.log(result.value);
} else {
  console.log("error:", result.error);
}

API

convertAddress

Input

  • Valid bech32 address, for instance "cosmos1elwrkcazwacy3gyj6jg2g4yp243zkzs62mpsd7"
  • Bech32 prefix of the destination chain, for instance "kujira" or "osmo"

Output

| Property | Type | Explanation | | ------------- | ------------------ | ------------- | | value | String or null | Converted address or null if conversion failed | | error | null or String | String explaining why conversion failed or null if conversion was successful | | isOk | function | Helper function that can be called to see if resolution was successful |

Relevant bech32 prefixes

| | | bech32 prefixes | | | | :---: | :---: | :---: | :---: |:---: | | agoric | chihuahua | gravity | lum | sent | | akash | comdex | iaa | micro | sif | | axelar | cosmos | inj | osmo | somm | | bcna | cro | ixo | panacea | star | | bitsong | desmos | juno | persistence | stars | | bostrom | dig | ki | regen | terra | | certik | emoney | kujira | rebus | umee | | cheqd | evmos | like | secret | vdl |

Resolve domain

Example

import {
  resolveDomainIntoAddresses,
  resolveDomainIntoChainAddress
} from "ibc-domains-sdk";

resolveDomainIntoAddresses("jacky.cosmos").then(result => {
  if (result.isOk()) {
    console.log(result.value)
  } else {
    console.log("error:", result.error);
  }
});

resolveDomainIntoChainAddress("jacky.cosmos", "kujira").then(result => {
  if (result.isOk()) {
    console.log(result.value)
  } else {
    console.log("error:", result.error);
  }
});

API

resolveDomainIntoAddresses

Input

  • IBC domain, with or without .cosmos extension, for instance "jacky.cosmos"

Output

| Property | Type | Explanation | | ------------- | ------------------ | ------------- | | value | String [] or null | Array of associated addresses or null if resolution failed / no association was found | | error | null or String | String explaining why resolution failed or null if resolution was successful | | isOk | function | Helper function that can be called to see if resolution was successful |

import {
  resolveDomainIntoAddresses
} from "ibc-domains-sdk";

resolveDomainIntoAddresses("jacky.cosmos").then(result => {
  if (result.isOk()) {
    console.log(result.value)
  } else {
    console.log("error:", result.error);
  }
});

resolveDomainIntoChainAddress

Input

  • IBC domain, with or without .cosmos extension, for instance "jacky.cosmos"
  • bech32 prefix of the destination chain, for instance "kujira" or "osmo"

Output

| Property | Type | Explanation | | ------------- | ------------------ | ------------- | | value | String or null | Associated addresses on the specified chain or null if resolution failed / no association was found | | error | null or String | String explaining why resolution failed or null if resolution was successful | | isOk | function | Helper function that can be called to see if resolution was successful |

import {
  resolveDomainIntoChainAddress
} from "ibc-domains-sdk";

resolveDomainIntoChainAddress("jacky.cosmos", "kujira").then(result => {
  if (result.isOk()) {
    console.log(result.value)
  } else {
    console.log("error:", result.error);
  }
});

Resolve address into primary domain

Example

import {
  resolvePrimaryDomainByAddress
} from "ibc-domains-sdk";

resolvePrimaryDomainByAddress("osmo1elwrkcazwacy3gyj6jg2g4yp243zkzs6zqjqmv").then(result => {
  if (result.isOk()) {
    console.log(result.value)
  } else {
    console.log("error:", result.error);
  }
});

API

resolvePrimaryDomainByAddress

Input

  • Cosmos address, for instance "osmo1elwrkcazwacy3gyj6jg2g4yp243zkzs6zqjqmv"

Output

| Property | Type | Explanation | | ------------- | ------------------ | ------------- | | value | { domain: String, domain_full: String } or null | Array of associated addresses or null if resolution failed / no association was found | | error | null or String | String explaining why resolution failed or null if resolution was successful | | isOk | function | Helper function that can be called to see if resolution was successful |

Resolve IBC domain details

Example

import {
  resolveDomainDetails
} from "ibc-domains-sdk";

resolveDomainDetails("jacky").then(result => {
  if (result.isOk()) {
    console.log(result.value)
  } else {
    console.log("error:", result.error);
  }
});

API

resolveDomainDetails

Input

  • IBC domain, with or without .cosmos extension, for instance "jacky.cosmos"

Output

| Property | Type | Explanation | | ------------- | ------------------ | ------------- | | value | Metadata or null | Metadata or null if resolution failed / no association was found | | error | null or String | String explaining why resolution failed or null if resolution was successful | | isOk | function | Helper function that can be called to see if resolution was successful |

Where Metadata is defined as follows:

| Property | Type | Explanation | | ------------- | ------------------ | ------------- | | expiration | String | ISO date format, for instance "2023-11-04T19:24:14.000Z" or "Never"| | imageData | String or null | User provided information if any | | twitterId | String or null | User provided information if any | | discordId | String or null | User provided information if any | | telegramId | String or null | User provided information if any | | keybaseId | String or null | User provided information if any | | pgpPublicKey | String or null | User provided information if any |