SmartContract

export interface SmartContractCreatePayload {
    /**
     * Name of the collection.
     */
    name: string;
    /**
     * Blockchain in which the collection will be deployed.
     * Note that the BLOKCHAIN enum is exported in this module and can be used.
     *
     * Values allowed:
     * GANACHE = 0
     * ETHEREUM = 1
     * RINKEBY = 2
     * POLYGON = 3
     * MUMBAI = 4
     * BSC = 5
     * BSC_TESNET = 6
     */
    blockchain: BLOCKCHAIN;
    /**
     * The symbol abreviation for the collection.
     * Example: Amazing art collection -> AAC
     */
    symbol: string;
    /**
     * Max number of NFTs on this collection.
     *
     * This will be an static maximum number of NFTs that can be created.
     * If you want to mutate this value, set configuration.dynamicSupply to true.
     */
    maxNFTs: number;
    /**
     * The SmartContract standard used for this collection.
     */
    standard: MinteandomeStandard;
    configuration: Configuration;
    description?: string;
    /**
     * Key-value custom pairs for storing extra data in the collection.
     */
    attributes?: Attribute[];
}
export interface SmartContractData extends SmartContractCreatePayload {
    /**
     * MTM unique id of the SmartContract
     */
    _id: string;
    /**
     * Wallet of the owner of the SmartContract
     */
    walletOwner: string;
    /**
     * Number of NFTs that has been signed. Initially 0.
     */
    nftsSigned: number;
    /**
     * Number of NFTs that has been generated. Initially 0.
     */
    nftsGenerated: number;
    /**
     * Number of NFTs that has been minted. Initially 0.
     */
    nftsMinted: number;
    /**
     * The standard used for this collection
     * MTM_721 = 0
     * MTM_1155 = 1
     */
    smartContractType: SMART_CONTRACT_TYPE;
    /**
     * Hex value of the compiled SmartContract
     */
    smartContractCompiled: string;
    /**
     * PENDING = 0 Initial value
     * SIGNED = 1 Collection is signed
     * MINTED = 2 Accepted and confirmed in the blockchain
     * REJECTED = 3 Collection had an error while signing
     * FAILED = 4 TODO
     */
    status: STATUS_IN_BC;
    /**
     * Address where it's deployed. If the collection has not been deployed yet (SIGNED) this field will be not informed.
     */
    smartContractAddress?: string;
    createdAt: Date;
    updatedAt: Date;
    blockchainId: string;
    version?: number;
    nfts: NFT[];
}
export interface SmartContractInfo {
    smartContract: SmartContractData;
    nfts: any[];
}
export interface Attribute {
    key: string;
    value: string;
}
export interface Configuration {
    /**
     * Percent number of fees for transactions
     */
    percentFees?: number;
    /**
     * Flag which indicates if the NFTs on this collection can be evolved.
     */
    dynamicNFTs?: boolean;
    /**
     * Flag which indicates if the supply number of NFTs on this collection can be modified.
     */
    dynamicSupply?: boolean;
    /**
     * Price set for the minting of each NFT. The value is in tokens of the current blockchain.
     */
    mintPrice?: number;
    /**
     * URL of an image which will be shared for all the future NFTs of the collection.
     *
     * This value can be useful if all the NFTs share the same image and you do not want to repeat it.
     */
    uniqueImage?: string;
    /**
     * Flag which indicates if the NFTs can be minted or not
     */
    mintPausable?: boolean;
    /**
     * Flag which indicates if the NFTs can be reselled or not.
     */
    marketBlocked?: boolean;
    /**
     * Flag which indicates if the NFTs can be burned or not.
     */
    burnNFTs?: boolean;
    /**
     * Royalties for this collection
     */
    royaltyRecipients?: Royalty[];
}
interface Royalty {
    /**
     * Destination wallet for the royalty
     */
    wallet: string;
    /**
     * Percent fee for the royalty
     */
    royalties: number;
}
export type MinteandomeStandard = 'ERC-721' | 'ERC-1155';
export declare enum STATUS_IN_BC {
    PENDING = 0,
    SIGNED = 1,
    MINTED = 2,
    REJECTED = 3,
    FAILED = 4
}
export declare enum SMART_CONTRACT_TYPE {
    MTM_721 = 0,
    MTM_1155 = 1,
    MTM_78 = 2
}

Last updated