Hierarchy (view full)

Constructors

  • Creates a new instance of the NftMinter class, which is used to interact with the factory generated smart contract.

    Parameters

    • env: string

      'devnet' | 'mainnet' | 'testnet'

    • contractAddress: IAddress

      The address of the factory generated smart contract

    • timeout: number = 10000

      Timeout for the network provider (DEFAULT = 10000ms)

    Returns NftMinter

Properties

chainID: string
contract: SmartContract
env: string
imageServiceUrl: string
networkProvider: ApiNetworkProvider

Methods

  • Creates a burn transaction

    Parameters

    • senderAddress: IAddress

      the address of the user

    • dataNftNonce: number

      the nonce of the DataNFT-FT

    • quantityToBurn: Value

      the quantity to burn

    • dataNftIdentifier: string = ...

      the DataNFT-FT token identifier (default = DATA-NFT-FT token identifier based on the EnvironmentsEnum)

    Returns Transaction

  • Creates a claim royalties transaction for the contract

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    • tokenIdentifier: string

      The token identifier of the token to claim royalties

    • nonce: number = 0

      The nonce of the token to claim royalties (default: 0 for ESDT)

    Returns Transaction

  • Freeze transaction

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin or owner of the contract

    • freezeAddress: IAddress

    Returns Transaction

  • Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin or owner of the contract

    • nonce: number

      The nonce of the token to freeze for freezeAddress

    • freezeAddress: IAddress

      The address to freeze

    Returns Transaction

  • Retrieves the address of the minter smart contract based on the environment

    Returns IAddress

  • Creates an initialize contract transaction for the contract

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    • collectionName: string

      The name of the NFT collection

    • tokenTicker: string

      The ticker of the NFT collection

    • mintLimit: number
    • requireMintTax: boolean

      A boolean value to set if the mint tax is required or not

    • claimsAddress: IAddress
    • Optional options: {
          taxTokenAmount: Value;
          taxTokenIdentifier: string;
      }

      If requireMintTax is true, the options object must contain the taxTokenIdentifier and taxTokenAmount

      • taxTokenAmount: Value
      • taxTokenIdentifier: string

    Returns Transaction

  • Creates a mint transaction

    NOTE: The dataStreamUrl is being encrypted and the media and metadata urls are build and uploaded to IPFS

    NOTE: The options.nftStorageToken is required when not using custom image and traits, when using custom image and traits the traits should be compliant with the Traits structure

    For more information, see the README documentation.

    Parameters

    • senderAddress: IAddress

      the address of the user

    • tokenName: string

      the name of the DataNFT-FT. Between 3 and 20 alphanumeric characters, no spaces.

    • dataMarshalUrl: string

      the url of the data marshal. A live HTTPS URL that returns a 200 OK HTTP code.

    • dataStreamUrl: string

      the url of the data stream to be encrypted. A live HTTPS URL that returns a 200 OK HTTP code.

    • dataPreviewUrl: string

      the url of the data preview. A live HTTPS URL that returns a 200 OK HTTP code.

    • royalties: number

      the royalties to be set for the Data NFT-FT. A number between 0 and 50. This equates to a % value. e.g. 10%

    • datasetTitle: string

      the title of the dataset. Between 10 and 60 alphanumeric characters.

    • datasetDescription: string

      the description of the dataset. Between 10 and 400 alphanumeric characters.

    • Optional options: {
          antiSpamTax?: Value;
          antiSpamTokenIdentifier?: string;
          extraAssets?: string[];
          imageUrl?: string;
          nftStorageToken?: string;
          traitsUrl?: string;
      }

      [optional] below parameters are optional or required based on use case - imageUrl: the URL of the image for the Data NFT - traitsUrl: the URL of the traits for the Data NFT - nftStorageToken: the nft storage token to be used to upload the image and metadata to IPFS - antiSpamTokenIdentifier: the anti spam token identifier to be used for the minting - antiSpamTax: the anti spam tax to be set for the Data NFT-FT with decimals. Needs to be greater than 0 and should be obtained in real time via viewMinterRequirements prior to calling mint. - extraAssets [optional] extra URIs to attached to the NFT. Can be media files, documents, etc. These URIs are public

      • Optional antiSpamTax?: Value
      • Optional antiSpamTokenIdentifier?: string
      • Optional extraAssets?: string[]
      • Optional imageUrl?: string
      • Optional nftStorageToken?: string
      • Optional traitsUrl?: string

    Returns Promise<Transaction>

  • Pause collection transaction

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin or owner of the contract

    Returns Transaction

  • Creates a pause transaction for the contract

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    Returns Transaction

  • Creates a remove whitelist transaction for the contract

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    • addresses: string[]

      The addresses to remove from the whitelist

    • extraGas: number = 0

      The extra gas to add to the transaction

    Returns Transaction

  • Sets a new administrator for the contract

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    • newAdministrator: IAddress

      The address of the new administrator

    Returns Transaction

  • Sets the claim address for the contract

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    • claimsAddress: IAddress

      The claims address

    Returns Transaction

  • Creates a setLocalRoles transaction for the contract

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    Returns Transaction

  • Creates a set mint tax transaction for the contract

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    • is_required: boolean

      A boolean value to set if the mint tax is required or not

    Returns Transaction

  • Creates a set mint time limit transaction for the contract

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    • timeLimit: number

    Returns Transaction

  • Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    • minRoyalties: Value

      The minimum royalties to set for minting

    • maxRoyalties: Value

      The maximum royalties to set for minting

      Remarks: The royalties are set in percentage (e.g. 100% = 10000)

    Returns Transaction

  • Creates a setTransferRoles transaction for the contract

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    • address: IAddress

      The address to set the transfer roles

    Returns Transaction

  • Creates a set mint tax transaction for the contract

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    • is_enabled: boolean

      A boolean value to set if whitelist is enabled or not

    Returns Transaction

  • Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin or owner of the contract

    • nonce: number

      The nonce of the token to unfreeze for unfreezeAddress

    • unfreezeAddress: IAddress

      The address to unfreeze

    Returns Transaction

  • Unfreeze transaction

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin or owner of the contract

    • unfreezeAddress: IAddress

    Returns Transaction

  • Unpause collection transaction

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin or owner of the contract

    Returns Transaction

  • Creates a unpause transaction for the contract

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    Returns Transaction

  • Creates an unsetTransferRoles transaction for the contract

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    • address: IAddress

      The address to unset the transfer roles

    Returns Transaction

  • Creates a updateAttributes transaction for the contract

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    • tokenIdentifier: string

      The token identifier of the data nft to update attributes

    • nonce: number

      The nonce of the token to update attributes

    • attributes: {
          creator: IAddress;
          dataMarshalUrl: string;
          dataPreviewUrl: string;
          dataStreamUrl: string;
          description: string;
          title: string;
      }

      The new attributes to update

      • creator: IAddress
      • dataMarshalUrl: string
      • dataPreviewUrl: string
      • dataStreamUrl: string
      • description: string
      • title: string
    • quantity: number = 1

      The quantity of the token to update attributes (default: 1)

    Returns Transaction

  • Retrieves a list of nonces that are frozen

    Returns Promise<number[]>

  • Retrieves the minter smart contract requirements for the given user

    Parameters

    • address: IAddress

      the address of the user

    • taxToken: string = ...

      the tax token to be used for the minting (default = ITHEUM token identifier based on the EnvironmentsEnum)

    Returns Promise<NftMinterRequirements>

  • Retrieves the addresses with transfer roles for contract collection

    Returns Promise<string[]>

  • Retrieves the address with update attributes roles for contract collection

    Returns Promise<string[]>

  • Creates a whitelist transaction for the contract

    Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin of the contract

    • addresses: string[]

      The addresses to whitelist

    • extraGas: number = 0

      The extra gas to add to the transaction

    Returns Transaction

  • Parameters

    • senderAddress: IAddress

      The address of the sender, must be the admin or owner of the contract

    • nonce: number

      The nonce of the token to wipe for wipeAddress

    • wipeAddress: IAddress

      The address to wipe from Important: This will wipe all NFTs from the address Note: The nonce must be freezed before wiping

    Returns Transaction

Generated using TypeDoc