Skip to main content

NftClient

Methods

  • createNFTCollection
  • getMintFeeToken
  • getMintFee
  • setTokenURI
  • getTokenURI

createNFTCollection

Creates a new SPG NFT Collection. Parameters:
  • request.name: The name of the collection.
  • request.symbol: The symbol of the collection.
  • request.isPublicMinting: If true, anyone can mint from the collection. If false, only the addresses with the minter role can mint.
  • request.mintOpen: Whether the collection is open for minting on creation.
  • request.mintFeeRecipient: The address to receive mint fees.
  • request.contractURI: The contract URI for the collection. Follows ERC-7572 standard. See here.
  • request.baseURI: [Optional] The base URI for the collection. If baseURI is not empty, tokenURI will be either baseURI + token ID (if nftMetadataURI is empty) or baseURI + nftMetadataURI.
  • request.maxSupply: [Optional] The maximum supply of the collection.
  • request.mintFee: [Optional] The cost to mint a token.
  • request.mintFeeToken: [Optional] The token to mint.
  • request.owner: [Optional] The owner of the collection.

getMintFeeToken

Returns the current mint token of the collection. Parameters:
  • spgNftContract: The address of the NFT contract.

getMintFee

Returns the current mint fee of the collection. Parameters:
  • spgNftContract: The address of the NFT contract.

setTokenURI

Sets the token URI for a given token. Parameters:
  • request.spgNftContract: The address of the NFT contract.
  • request.tokenId: The ID of the token.
  • request.tokenURI: The URI to set.

getTokenURI

Returns the token URI for a given token. Parameters:
  • request.spgNftContract: The address of the SPG NFT contract.
  • request.tokenId: The ID of the token.
Request Type