Skip to content

Ethers extension for a ProviderPlugin that enables all supported ENS coinTypes in the EnsRsolver.

License

Notifications You must be signed in to change notification settings

X-oss-byte/ext-provider-plugin-multicoin

 
 

Repository files navigation

Ethers: ENS Multicoin Provider Plug-in

The MulticoinProviderPlugin extends a Provider's ENS Resolver with access to the necessary coding libraries required to decode all supported ENSIP-9 coinTypes returned by the getAddr(bytes32, uint) resolver method.

Installing

/home/ricmoo/my_project> npm install @ethers-ext/provider-plugin-multicoin

Usage

import { plugin } from "@ethers-ext/provider-plugin-multicoin";

// However you get your provider
const provider = ethers.getDefaultProvider();

// Attach a plugin instance
provider.attchPlugin(plugin);

// Test it out!
(async function() {
    const resolver = await provider.getResolver("ricmoo.eth");

    // Get the Bitcoin address (coinType 0)
    console.log(await resolver.getAddress(0));
})();

License

MIT License.

About

Ethers extension for a ProviderPlugin that enables all supported ENS coinTypes in the EnsRsolver.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%