πDomains
Register and find your domain
Calculate fees
sonst domainName = 'supercool.mpc'
const { fees, symbol, feesLabel } = await config.sdk.domainRepository.calculateMintFees(domainName, 'ETH')
console.log(`Fees amount ${feesLabel} for ${symbol} with raw fees as ${fees}`)Approve fees
const domainName = 'supercool.mpc'
const { transactionHash, fetchResult } = await config.sdk.domainRepository.approveMintFees(domainName, 'ETH')
const result = await fetchResult
console.log(`Fees approval submitted: ${result}`);Register a Domain
Register a new domain without a parent:
const { transactionHash, fetchResult } = await metaNamesSdk.domainRepository.register({
domain: 'randomName',
to: 'recipientAddress',
});
console.log(`Transaction hash: ${transactionHash}`);
const result = await fetchResult;
console.log(`Domain registration submitted: ${result}`);Register a new domain with a parent domain:
Finding Domain Information
Last updated