Hierarchy (view full)

Constructors

  • Creates a new instance of the SftMinter class, which can be used to interact with the Data NFT-FT minter smart contract

    Parameters

    • env: string

      'devnet' | 'mainnet' | 'testnet'

    • timeout: number = 10000

      Timeout for the network provider (DEFAULT = 10000ms)

    Returns SftMinter

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

  • 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

    • antiSpamTaxTokenIdentifier: string

      The token identifier of the anti spam token

    • antiSpamTaxTokenAmount: Value

      The amount of anti spam token to be used for minting as tax

    • mintLimit: number
    • treasury_address: IAddress

      The address of the treasury to collect the anti spam tax

    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%

    • supply: number

      the supply of the Data NFT-FT. A number between 1 and 1000.

    • 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.

    • amountToSend: number

      the amount of the bond + anti spam tax (if anti spam tax > 0) to be sent

    • Optional lockPeriod: number

      the lock period for the bond in days

    • donationPercentage: number = 0
    • Optional options: {
          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 - extraAssets: [optional] extra URIs to attached to the NFT. Can be media files, documents, etc. These URIs are public - donationPercentage: [optional] the donation percentage to be set for the Data NFT-FT supply to be sent to the donation

      • 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

  • Creates a setDonationTreasuryAddress transaction

    Parameters

    • senderAddress: IAddress

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

    • donationTreasuryAddress: IAddress

      The address of the donation treasury to collect the donation tax

    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 setMaxDonationPercentage transaction

    Parameters

    • senderAddress: IAddress

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

    • maxDonationPercentage: Value

      The maximum donation percentage that can be set

    Returns Transaction

  • Creates a setAntiSpamTax transaction

    Parameters

    • senderAddress: IAddress

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

    • maxSupply: Value

      The maximum supply that can be minted

    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 setTreasuryAddress transaction

    Parameters

    • senderAddress: IAddress

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

    • treasuryAddress: IAddress

      The address of the treasury to collect the anti spam tax

    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

  • Retrieves a list of nonces that are frozen for address

    Parameters

    • address: IAddress

      The address to check

    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<SftMinterRequirements>

  • 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