getMintTransactionParameters to generate the contract address, ABI, arguments, and value required to mint a subname.
Usage
index.ts
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Contract parameters for an onchain subname mint.
getMintTransactionParameters to generate the contract address, ABI, arguments, and value required to mint a subname.
import type {
MintTransactionRequest,
MintTransactionResponse,
} from '@thenamespace/mint-manager';
import { ChainName } from '@thenamespace/mint-manager';
const request: MintTransactionRequest = {
parentName: 'example.eth',
label: 'alice',
owner: '0x1D84ad46F1ec91b4Bb3208F645aD2fA7aBEc19f8', // optional
minterAddress: '0x1D84ad46F1ec91b4Bb3208F645aD2fA7aBEc19f8',
expiryInYears: 1, // optional
records: {
texts: [
{ key: 'name', value: 'Alice' },
{ key: 'description', value: 'Namespace community member' },
],
addresses: [
{
chain: ChainName.Ethereum,
value: '0x1D84ad46F1ec91b4Bb3208F645aD2fA7aBEc19f8',
},
],
},
};
const response: MintTransactionResponse =
await mintClient.getMintTransactionParameters(request);
| Parameter | Description | Required |
|---|---|---|
| parentName | Name of listed ENS name | Yes |
| label | The full subname will be ${label}.${parentName} | Yes |
| owner | The owner of minted subname NFT | No, defaults to minter address |
| minterAddress | Address of a wallet which is going to perform mint transaction | Yes |
| expiryInYears | For subnames which are expirable, this is where the expiry in years is set. | No, defaults to 1 year |
| records | Text and Address records to be set in the same transaction | No |
export interface MintTransactionResponse {
contractAddress: Address;
args: any[];
account: string;
abi: any;
functionName: string;
value: bigint;
}
Was this page helpful?
