This is a lightweight SDK, providing utility classes and functions for applications to interact with on-chain .mina
names registered at Mina Name Service.
The SDK is published in npm registry. To use it in your project, run:
$ npm i mina-names
You can also use yarn or pnpm.
Create an instance of MinansClient:
import { MinansClient } from "mina-names";
const client = new MinansClient({ network: "devnet" });
Fetch the default name and avatar of a Mina Address
:
const defaultName = await client.getName({
address: "B62qk1sJumHSS1hPKS2fSAbxkkwGcCiieb1PcM4PB182pa1MKE9H9AV",
});
Fetch a list of domains associated with a Mina Address
:
const domains = await client.getDomains({
address: "B62qk1sJumHSS1hPKS2fSAbxkkwGcCiieb1PcM4PB182pa1MKE9H9AV",
options: {
page: 0,
limit: 50,
},
});
Soon