🥷
Namespace
  • [ Introduction ]
    • ENS
    • Namespace
  • Official Links
  • [ Dapps ]
    • Overview
    • Onchain Subs (App)
      • Search & Register
      • Wizard
        • Listing an ENS Name
        • Features List
      • ENS Widget
      • Farcaster Frames
        • Default Frame
        • Custom Frame
    • Offchain Subs (DevPortal)
      • Subname create/manage
      • Resolver set
      • API keys
  • How-to Guides and Demos
  • [ Dev Docs ]
    • SDK
      • Offchain Manager
        • Installation
        • Generate API key
        • Create or Update Subname
        • DeleteSubname
        • IsSubnameAvailable
        • GetFilteredSubnames
        • AddressRecords
          • ChainName
        • TextRecords
        • DataRecords
      • Indexer Manager
        • Installation
        • Methods
        • GetL2Subname
        • GetL2Subnames
      • Mint Manager
        • Installation
        • GetMintDetails
        • GetMintTransactionParameters
        • IsSubnameAvailable
        • How To Mint L1 & L2 subname via mint-manager
      • Namespace Client (deprecated)
        • Installation
        • GetListedName
        • GetMintDetails
        • GetMintTransactionParameters
        • IsSubnameAvailable
        • GenerateAuthToken
    • APIs
      • Offchain Manager
      • Mint Manager
    • Infrastructure
      • Namespace L2 Subnames
  • [ ecosystem ]
    • Use Cases
  • [ Jobs ]
    • 🧑‍💻 Full-Stack Dev
    • 🥷 Dev-Rel Lead
    • 💼 BD Lead
Powered by GitBook
On this page
  • Usage
  • MintTransactionRequest
  • MintTransactionResponse
  1. [ Dev Docs ]
  2. SDK
  3. Mint Manager

GetMintTransactionParameters

GetMintTransactionParameters is a function which generates all the required parameters needed to send a successfull transaction and mint a subname on a given chain

Usage

index.ts
import { MintTransactionRequest, MintTransactionResponse } from "@namespacesdk/mint-manager";

const request: MintTransactionRequest = {
  parentName: "namespace.eth";
  label: "superman";
  owner?: "0x1D84ad46F1ec91b4Bb3208F645aD2fA7aBEc19f8";
  minterAddress: "0x1D84ad46F1ec91b4Bb3208F645aD2fA7aBEc19f8";
  expiryInYears?: number;
  records?: {
      texts: {
         name: "Superman",
         avatar: "https://my-avatar-uri",
         description: "I am superman"
       },
      addresses: {
        60: 0x1D84ad46F1ec91b4Bb3208F645aD2fA7aBEc19f8
      }
  } ;
}

const response = await mintClient.getMintTransactipnParameters(request);

MintTransactionRequest

Parameter
Description
Required

parentName

name of listed ENS name

Yes

label

Self explanatory. 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 Addresse records to be set in the same transaction

No

MintTransactionResponse

The response object contains all the needed information that can be used to send a transaction and mint a subname

export interface MintTransactionResponse {
  contractAddress: Address;
  args: any[];
  account: string;
  abi: any;
  functionName: string;
  value: bigint;
}

PreviousGetMintDetailsNextIsSubnameAvailable

Last updated 11 days ago