Create a collection of one-of-one NFTs.

Example

import { ThirdwebSDK } from "@thirdweb-dev/sdk";

const sdk = new ThirdwebSDK("{{chainName}}");
const contract = await sdk.getContract("{{contract_address}}", "nft-collection");

Hierarchy

Constructors

  • Parameters

    • network: NetworkInput
    • address: string
    • storage: ThirdwebStorage<IpfsUploadBatchOptions>
    • options: undefined | {
          clientId?: string;
          gasSettings?: { maxPriceInGwei?: number | undefined; speed?: "standard" | "fast" | "fastest" | undefined; };
          gasless?: ({ openzeppelin: { relayerUrl: string; relayerForwarderAddress?: string | undefined; useEOAForwarder?: boolean | undefined; domainName?: string | undefined; domainVersion?: string | undefined; }; experimentalChainlessSupport?: boolean | undefined; }) | ({ biconomy: { apiId: string; apiKey: string; deadlineSeconds?: number | undefined; }; }) | ({ engine: { relayerUrl: string; }; });
          gatewayUrls?: string[];
          readonlySettings?: { rpcUrl: string; chainId?: number | undefined; };
          secretKey?: string;
          supportedChains?: ({ rpc: string[]; chainId: number; nativeCurrency: { symbol: string; name: string; decimals: number; }; slug: string; })[];
      } = {}
    • abi: objectInputType<{
          inputs: ZodDefault<ZodArray<ZodObject<{
              components: ZodOptional<ZodArray<ZodObject<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, "strip", ZodAny, objectOutputType<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, ZodAny, "strip">, objectInputType<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, ZodAny, "strip">>, "many">>;
              name: ZodDefault<ZodString>;
              stateMutability: ZodOptional<ZodString>;
              type: ZodString;
          }, "strip", ZodAny, objectOutputType<{
              components: ZodOptional<ZodArray<ZodObject<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, "strip", ZodAny, objectOutputType<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, ZodAny, "strip">, objectInputType<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, ZodAny, "strip">>, "many">>;
              name: ZodDefault<ZodString>;
              stateMutability: ZodOptional<ZodString>;
              type: ZodString;
          }, ZodAny, "strip">, objectInputType<{
              components: ZodOptional<ZodArray<ZodObject<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, "strip", ZodAny, objectOutputType<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, ZodAny, "strip">, objectInputType<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, ZodAny, "strip">>, "many">>;
              name: ZodDefault<ZodString>;
              stateMutability: ZodOptional<ZodString>;
              type: ZodString;
          }, ZodAny, "strip">>, "many">>;
          name: ZodDefault<ZodString>;
          outputs: ZodDefault<ZodArray<ZodObject<{
              components: ZodOptional<ZodArray<ZodObject<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, "strip", ZodAny, objectOutputType<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, ZodAny, "strip">, objectInputType<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, ZodAny, "strip">>, "many">>;
              name: ZodDefault<ZodString>;
              stateMutability: ZodOptional<ZodString>;
              type: ZodString;
          }, "strip", ZodAny, objectOutputType<{
              components: ZodOptional<ZodArray<ZodObject<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, "strip", ZodAny, objectOutputType<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, ZodAny, "strip">, objectInputType<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, ZodAny, "strip">>, "many">>;
              name: ZodDefault<ZodString>;
              stateMutability: ZodOptional<ZodString>;
              type: ZodString;
          }, ZodAny, "strip">, objectInputType<{
              components: ZodOptional<ZodArray<ZodObject<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, "strip", ZodAny, objectOutputType<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, ZodAny, "strip">, objectInputType<{
                  name: ZodDefault<ZodString>;
                  type: ZodString;
              }, ZodAny, "strip">>, "many">>;
              name: ZodDefault<ZodString>;
              stateMutability: ZodOptional<ZodString>;
              type: ZodString;
          }, ZodAny, "strip">>, "many">>;
          type: ZodString;
      }, ZodAny, "strip">[]
    • chainId: number
    • contractWrapper: ContractWrapper<TokenERC721> = ...

    Returns NFTCollection

Properties

abi: objectOutputType<{
    inputs: ZodDefault<ZodArray<ZodObject<{
        components: ZodOptional<ZodArray<ZodObject<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, "strip", ZodAny, objectOutputType<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, ZodAny, "strip">, objectInputType<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, ZodAny, "strip">>, "many">>;
        name: ZodDefault<ZodString>;
        stateMutability: ZodOptional<ZodString>;
        type: ZodString;
    }, "strip", ZodAny, objectOutputType<{
        components: ZodOptional<ZodArray<ZodObject<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, "strip", ZodAny, objectOutputType<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, ZodAny, "strip">, objectInputType<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, ZodAny, "strip">>, "many">>;
        name: ZodDefault<ZodString>;
        stateMutability: ZodOptional<ZodString>;
        type: ZodString;
    }, ZodAny, "strip">, objectInputType<{
        components: ZodOptional<ZodArray<ZodObject<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, "strip", ZodAny, objectOutputType<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, ZodAny, "strip">, objectInputType<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, ZodAny, "strip">>, "many">>;
        name: ZodDefault<ZodString>;
        stateMutability: ZodOptional<ZodString>;
        type: ZodString;
    }, ZodAny, "strip">>, "many">>;
    name: ZodDefault<ZodString>;
    outputs: ZodDefault<ZodArray<ZodObject<{
        components: ZodOptional<ZodArray<ZodObject<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, "strip", ZodAny, objectOutputType<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, ZodAny, "strip">, objectInputType<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, ZodAny, "strip">>, "many">>;
        name: ZodDefault<ZodString>;
        stateMutability: ZodOptional<ZodString>;
        type: ZodString;
    }, "strip", ZodAny, objectOutputType<{
        components: ZodOptional<ZodArray<ZodObject<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, "strip", ZodAny, objectOutputType<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, ZodAny, "strip">, objectInputType<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, ZodAny, "strip">>, "many">>;
        name: ZodDefault<ZodString>;
        stateMutability: ZodOptional<ZodString>;
        type: ZodString;
    }, ZodAny, "strip">, objectInputType<{
        components: ZodOptional<ZodArray<ZodObject<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, "strip", ZodAny, objectOutputType<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, ZodAny, "strip">, objectInputType<{
            name: ZodDefault<ZodString>;
            type: ZodString;
        }, ZodAny, "strip">>, "many">>;
        name: ZodDefault<ZodString>;
        stateMutability: ZodOptional<ZodString>;
        type: ZodString;
    }, ZodAny, "strip">>, "many">>;
    type: ZodString;
}, ZodAny, "strip">[]
app: ContractAppURI<TokenERC721>
burn: {
    prepare: ((...args) => Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>);
    (...args): Promise<TResult>;
} = ...

Type declaration

    • (...args): Promise<TResult>
    • Burn a single NFT

      Parameters

      • Rest ...args: [tokenId: BigNumberish]

      Returns Promise<TResult>

      Example

      const result = await contract.burnToken(tokenId);
      
  • prepare: ((...args) => Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>)
      • (...args): Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>
      • Parameters

        • Rest ...args: [tokenId: BigNumberish]

        Returns Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>

contractWrapper: ContractWrapper<TokenERC721>
encoder: ContractEncoder<TokenERC721>
erc721: Erc721<TokenERC721>
estimator: GasCostEstimator<TokenERC721>
events: ContractEvents<TokenERC721>
metadata: ContractMetadata<TokenERC721, {
    deploy: ZodObject<{
        app_uri: ZodOptional<ZodString>;
        description: ZodOptional<ZodString>;
        external_link: ZodOptional<ZodString>;
        fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        image: ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
            data: ZodUnion<[ZodTypeAny, ZodString]>;
            name: ZodString;
        }, "strip", ZodTypeAny, {
            data?: any;
            name: string;
        }, {
            data?: any;
            name: string;
        }>]>, ZodString]>>;
        name: ZodString;
        platform_fee_basis_points: ZodDefault<ZodNumber>;
        platform_fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        primary_sale_recipient: ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>;
        seller_fee_basis_points: ZodDefault<ZodNumber>;
        social_urls: ZodOptional<ZodRecord<ZodString, ZodString>>;
        symbol: ZodDefault<ZodString>;
        trusted_forwarders: ZodDefault<ZodArray<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>, "many">>;
    }, "strip", ZodTypeAny, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient: string;
        image?: any;
        name: string;
        platform_fee_basis_points: number;
        platform_fee_recipient: string;
        primary_sale_recipient: string;
        seller_fee_basis_points: number;
        social_urls?: Record<string, string>;
        symbol: string;
        trusted_forwarders: string[];
    }, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient?: string;
        image?: any;
        name: string;
        platform_fee_basis_points?: number;
        platform_fee_recipient?: string;
        primary_sale_recipient: string;
        seller_fee_basis_points?: number;
        social_urls?: Record<string, string>;
        symbol?: string;
        trusted_forwarders?: string[];
    }>;
    input: ZodObject<{
        app_uri: ZodOptional<ZodString>;
        description: ZodOptional<ZodString>;
        external_link: ZodOptional<ZodString>;
        fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        image: ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
            data: ZodUnion<[ZodTypeAny, ZodString]>;
            name: ZodString;
        }, "strip", ZodTypeAny, {
            data?: any;
            name: string;
        }, {
            data?: any;
            name: string;
        }>]>, ZodString]>>;
        name: ZodString;
        seller_fee_basis_points: ZodDefault<ZodNumber>;
        social_urls: ZodOptional<ZodRecord<ZodString, ZodString>>;
        symbol: ZodDefault<ZodString>;
    }, "strip", ZodTypeAny, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient: string;
        image?: any;
        name: string;
        seller_fee_basis_points: number;
        social_urls?: Record<string, string>;
        symbol: string;
    }, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient?: string;
        image?: any;
        name: string;
        seller_fee_basis_points?: number;
        social_urls?: Record<string, string>;
        symbol?: string;
    }>;
    output: ZodObject<{
        app_uri: ZodOptional<ZodString>;
        description: ZodOptional<ZodString>;
        external_link: ZodOptional<ZodString>;
        fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        image: ZodOptional<ZodString>;
        name: ZodString;
        seller_fee_basis_points: ZodDefault<ZodNumber>;
        social_urls: ZodOptional<ZodRecord<ZodString, ZodString>>;
        symbol: ZodDefault<ZodString>;
    }, "strip", ZodTypeAny, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient: string;
        image?: string;
        name: string;
        seller_fee_basis_points: number;
        social_urls?: Record<string, string>;
        symbol: string;
    }, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient?: string;
        image?: string;
        name: string;
        seller_fee_basis_points?: number;
        social_urls?: Record<string, string>;
        symbol?: string;
    }>;
}>

Type declaration

  • deploy: ZodObject<{
        app_uri: ZodOptional<ZodString>;
        description: ZodOptional<ZodString>;
        external_link: ZodOptional<ZodString>;
        fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        image: ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
            data: ZodUnion<[ZodTypeAny, ZodString]>;
            name: ZodString;
        }, "strip", ZodTypeAny, {
            data?: any;
            name: string;
        }, {
            data?: any;
            name: string;
        }>]>, ZodString]>>;
        name: ZodString;
        platform_fee_basis_points: ZodDefault<ZodNumber>;
        platform_fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        primary_sale_recipient: ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>;
        seller_fee_basis_points: ZodDefault<ZodNumber>;
        social_urls: ZodOptional<ZodRecord<ZodString, ZodString>>;
        symbol: ZodDefault<ZodString>;
        trusted_forwarders: ZodDefault<ZodArray<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>, "many">>;
    }, "strip", ZodTypeAny, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient: string;
        image?: any;
        name: string;
        platform_fee_basis_points: number;
        platform_fee_recipient: string;
        primary_sale_recipient: string;
        seller_fee_basis_points: number;
        social_urls?: Record<string, string>;
        symbol: string;
        trusted_forwarders: string[];
    }, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient?: string;
        image?: any;
        name: string;
        platform_fee_basis_points?: number;
        platform_fee_recipient?: string;
        primary_sale_recipient: string;
        seller_fee_basis_points?: number;
        social_urls?: Record<string, string>;
        symbol?: string;
        trusted_forwarders?: string[];
    }>
  • input: ZodObject<{
        app_uri: ZodOptional<ZodString>;
        description: ZodOptional<ZodString>;
        external_link: ZodOptional<ZodString>;
        fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        image: ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
            data: ZodUnion<[ZodTypeAny, ZodString]>;
            name: ZodString;
        }, "strip", ZodTypeAny, {
            data?: any;
            name: string;
        }, {
            data?: any;
            name: string;
        }>]>, ZodString]>>;
        name: ZodString;
        seller_fee_basis_points: ZodDefault<ZodNumber>;
        social_urls: ZodOptional<ZodRecord<ZodString, ZodString>>;
        symbol: ZodDefault<ZodString>;
    }, "strip", ZodTypeAny, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient: string;
        image?: any;
        name: string;
        seller_fee_basis_points: number;
        social_urls?: Record<string, string>;
        symbol: string;
    }, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient?: string;
        image?: any;
        name: string;
        seller_fee_basis_points?: number;
        social_urls?: Record<string, string>;
        symbol?: string;
    }>
  • output: ZodObject<{
        app_uri: ZodOptional<ZodString>;
        description: ZodOptional<ZodString>;
        external_link: ZodOptional<ZodString>;
        fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        image: ZodOptional<ZodString>;
        name: ZodString;
        seller_fee_basis_points: ZodDefault<ZodNumber>;
        social_urls: ZodOptional<ZodRecord<ZodString, ZodString>>;
        symbol: ZodDefault<ZodString>;
    }, "strip", ZodTypeAny, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient: string;
        image?: string;
        name: string;
        seller_fee_basis_points: number;
        social_urls?: Record<string, string>;
        symbol: string;
    }, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient?: string;
        image?: string;
        name: string;
        seller_fee_basis_points?: number;
        social_urls?: Record<string, string>;
        symbol?: string;
    }>
mint: {
    prepare: ((...args) => Promise<Transaction<TransactionResultWithId<NFT>>>);
    (...args): Promise<TResult>;
} = ...

Type declaration

    • (...args): Promise<TResult>
    • Mint a unique NFT

      Parameters

      • Rest ...args: [metadata: string | objectInputType<{
            animation_url: ZodNullable<ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                data: ZodUnion<[ZodTypeAny, ZodString]>;
                name: ZodString;
            }, "strip", ZodTypeAny, {
                data?: any;
                name: string;
            }, {
                data?: any;
                name: string;
            }>]>, ZodString]>>>;
            attributes: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
            background_color: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodEffects<ZodString, string, string>, ZodString]>>>;
            description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>;
            external_url: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                data: ZodUnion<[ZodTypeAny, ZodString]>;
                name: ZodString;
            }, "strip", ZodTypeAny, {
                data?: any;
                name: string;
            }, {
                data?: any;
                name: string;
            }>]>, ZodString]>>>;
            image: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                data: ZodUnion<[ZodTypeAny, ZodString]>;
                name: ZodString;
            }, "strip", ZodTypeAny, {
                data?: any;
                name: string;
            }, {
                data?: any;
                name: string;
            }>]>, ZodString]>>>;
            name: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodNumber]>>>;
            properties: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
        }, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">]

      Returns Promise<TResult>

      Remarks

      Mint a unique NFT to a specified wallet.

      Example

      // Custom metadata of the NFT, note that you can fully customize this metadata with other properties.
      const metadata = {
      name: "Cool NFT",
      description: "This is a cool NFT",
      image: fs.readFileSync("path/to/image.png"), // This can be an image url or file
      };

      const tx = await contract.mint(metadata);
      const receipt = tx.receipt; // the transaction receipt
      const tokenId = tx.id; // the id of the NFT minted
      const nft = await tx.data(); // (optional) fetch details of minted NFT
  • prepare: ((...args) => Promise<Transaction<TransactionResultWithId<NFT>>>)
      • (...args): Promise<Transaction<TransactionResultWithId<NFT>>>
      • Parameters

        • Rest ...args: [metadata: string | objectInputType<{
              animation_url: ZodNullable<ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                  data: ZodUnion<[ZodTypeAny, ZodString]>;
                  name: ZodString;
              }, "strip", ZodTypeAny, {
                  data?: any;
                  name: string;
              }, {
                  data?: any;
                  name: string;
              }>]>, ZodString]>>>;
              attributes: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
              background_color: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodEffects<ZodString, string, string>, ZodString]>>>;
              description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>;
              external_url: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                  data: ZodUnion<[ZodTypeAny, ZodString]>;
                  name: ZodString;
              }, "strip", ZodTypeAny, {
                  data?: any;
                  name: string;
              }, {
                  data?: any;
                  name: string;
              }>]>, ZodString]>>>;
              image: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                  data: ZodUnion<[ZodTypeAny, ZodString]>;
                  name: ZodString;
              }, "strip", ZodTypeAny, {
                  data?: any;
                  name: string;
              }, {
                  data?: any;
                  name: string;
              }>]>, ZodString]>>>;
              name: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodNumber]>>>;
              properties: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
          }, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">]

        Returns Promise<Transaction<TransactionResultWithId<NFT>>>

mintBatch: {
    prepare: ((...args) => Promise<Transaction<TransactionResultWithId<NFT>[]>>);
    (...args): Promise<TResult>;
} = ...

Type declaration

    • (...args): Promise<TResult>
    • Mint Many unique NFTs

      Parameters

      • Rest ...args: [metadata: (string | objectInputType<{
            animation_url: ZodNullable<ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                data: ZodUnion<[ZodTypeAny, ZodString]>;
                name: ZodString;
            }, "strip", ZodTypeAny, {
                data?: any;
                name: string;
            }, {
                data?: any;
                name: string;
            }>]>, ZodString]>>>;
            attributes: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
            background_color: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodEffects<ZodString, string, string>, ZodString]>>>;
            description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>;
            external_url: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                data: ZodUnion<[ZodTypeAny, ZodString]>;
                name: ZodString;
            }, "strip", ZodTypeAny, {
                data?: any;
                name: string;
            }, {
                data?: any;
                name: string;
            }>]>, ZodString]>>>;
            image: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                data: ZodUnion<[ZodTypeAny, ZodString]>;
                name: ZodString;
            }, "strip", ZodTypeAny, {
                data?: any;
                name: string;
            }, {
                data?: any;
                name: string;
            }>]>, ZodString]>>>;
            name: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodNumber]>>>;
            properties: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
        }, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">)[]]

      Returns Promise<TResult>

      Remarks

      Mint many unique NFTs at once to the connected wallet

      Example

      // Custom metadata of the NFTs you want to mint.
      const metadatas = [{
      name: "Cool NFT #1",
      description: "This is a cool NFT",
      image: fs.readFileSync("path/to/image.png"), // This can be an image url or file
      }, {
      name: "Cool NFT #2",
      description: "This is a cool NFT",
      image: fs.readFileSync("path/to/other/image.png"),
      }];

      const tx = await contract.mintBatch(metadatas);
      const receipt = tx[0].receipt; // same transaction receipt for all minted NFTs
      const firstTokenId = tx[0].id; // token id of the first minted NFT
      const firstNFT = await tx[0].data(); // (optional) fetch details of the first minted NFT
  • prepare: ((...args) => Promise<Transaction<TransactionResultWithId<NFT>[]>>)
      • (...args): Promise<Transaction<TransactionResultWithId<NFT>[]>>
      • Parameters

        • Rest ...args: [metadata: (string | objectInputType<{
              animation_url: ZodNullable<ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                  data: ZodUnion<[ZodTypeAny, ZodString]>;
                  name: ZodString;
              }, "strip", ZodTypeAny, {
                  data?: any;
                  name: string;
              }, {
                  data?: any;
                  name: string;
              }>]>, ZodString]>>>;
              attributes: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
              background_color: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodEffects<ZodString, string, string>, ZodString]>>>;
              description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>;
              external_url: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                  data: ZodUnion<[ZodTypeAny, ZodString]>;
                  name: ZodString;
              }, "strip", ZodTypeAny, {
                  data?: any;
                  name: string;
              }, {
                  data?: any;
                  name: string;
              }>]>, ZodString]>>>;
              image: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                  data: ZodUnion<[ZodTypeAny, ZodString]>;
                  name: ZodString;
              }, "strip", ZodTypeAny, {
                  data?: any;
                  name: string;
              }, {
                  data?: any;
                  name: string;
              }>]>, ZodString]>>>;
              name: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodNumber]>>>;
              properties: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
          }, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">)[]]

        Returns Promise<Transaction<TransactionResultWithId<NFT>[]>>

mintBatchTo: {
    prepare: ((...args) => Promise<Transaction<TransactionResultWithId<NFT>[]>>);
    (...args): Promise<TResult>;
} = ...

Type declaration

    • (...args): Promise<TResult>
    • Mint Many unique NFTs

      Parameters

      • Rest ...args: [walletAddress: string, metadata: (string | objectInputType<{
            animation_url: ZodNullable<ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                data: ZodUnion<[ZodTypeAny, ZodString]>;
                name: ZodString;
            }, "strip", ZodTypeAny, {
                data?: any;
                name: string;
            }, {
                data?: any;
                name: string;
            }>]>, ZodString]>>>;
            attributes: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
            background_color: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodEffects<ZodString, string, string>, ZodString]>>>;
            description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>;
            external_url: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                data: ZodUnion<[ZodTypeAny, ZodString]>;
                name: ZodString;
            }, "strip", ZodTypeAny, {
                data?: any;
                name: string;
            }, {
                data?: any;
                name: string;
            }>]>, ZodString]>>>;
            image: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                data: ZodUnion<[ZodTypeAny, ZodString]>;
                name: ZodString;
            }, "strip", ZodTypeAny, {
                data?: any;
                name: string;
            }, {
                data?: any;
                name: string;
            }>]>, ZodString]>>>;
            name: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodNumber]>>>;
            properties: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
        }, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">)[]]

      Returns Promise<TResult>

      Remarks

      Mint many unique NFTs at once to a specified wallet.

      Example

      // Address of the wallet you want to mint the NFT to
      const walletAddress = "{{wallet_address}}";

      // Custom metadata of the NFTs you want to mint.
      const metadatas = [{
      name: "Cool NFT #1",
      description: "This is a cool NFT",
      image: fs.readFileSync("path/to/image.png"), // This can be an image url or file
      }, {
      name: "Cool NFT #2",
      description: "This is a cool NFT",
      image: fs.readFileSync("path/to/other/image.png"),
      }];

      const tx = await contract.mintBatchTo(walletAddress, metadatas);
      const receipt = tx[0].receipt; // same transaction receipt for all minted NFTs
      const firstTokenId = tx[0].id; // token id of the first minted NFT
      const firstNFT = await tx[0].data(); // (optional) fetch details of the first minted NFT
  • prepare: ((...args) => Promise<Transaction<TransactionResultWithId<NFT>[]>>)
      • (...args): Promise<Transaction<TransactionResultWithId<NFT>[]>>
      • Parameters

        • Rest ...args: [walletAddress: string, metadata: (string | objectInputType<{
              animation_url: ZodNullable<ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                  data: ZodUnion<[ZodTypeAny, ZodString]>;
                  name: ZodString;
              }, "strip", ZodTypeAny, {
                  data?: any;
                  name: string;
              }, {
                  data?: any;
                  name: string;
              }>]>, ZodString]>>>;
              attributes: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
              background_color: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodEffects<ZodString, string, string>, ZodString]>>>;
              description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>;
              external_url: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                  data: ZodUnion<[ZodTypeAny, ZodString]>;
                  name: ZodString;
              }, "strip", ZodTypeAny, {
                  data?: any;
                  name: string;
              }, {
                  data?: any;
                  name: string;
              }>]>, ZodString]>>>;
              image: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                  data: ZodUnion<[ZodTypeAny, ZodString]>;
                  name: ZodString;
              }, "strip", ZodTypeAny, {
                  data?: any;
                  name: string;
              }, {
                  data?: any;
                  name: string;
              }>]>, ZodString]>>>;
              name: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodNumber]>>>;
              properties: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
          }, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">)[]]

        Returns Promise<Transaction<TransactionResultWithId<NFT>[]>>

mintTo: {
    prepare: ((...args) => Promise<Transaction<TransactionResultWithId<NFT>>>);
    (...args): Promise<TResult>;
} = ...

Type declaration

    • (...args): Promise<TResult>
    • Mint a unique NFT

      Parameters

      • Rest ...args: [walletAddress: string, metadata: string | objectInputType<{
            animation_url: ZodNullable<ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                data: ZodUnion<[ZodTypeAny, ZodString]>;
                name: ZodString;
            }, "strip", ZodTypeAny, {
                data?: any;
                name: string;
            }, {
                data?: any;
                name: string;
            }>]>, ZodString]>>>;
            attributes: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
            background_color: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodEffects<ZodString, string, string>, ZodString]>>>;
            description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>;
            external_url: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                data: ZodUnion<[ZodTypeAny, ZodString]>;
                name: ZodString;
            }, "strip", ZodTypeAny, {
                data?: any;
                name: string;
            }, {
                data?: any;
                name: string;
            }>]>, ZodString]>>>;
            image: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                data: ZodUnion<[ZodTypeAny, ZodString]>;
                name: ZodString;
            }, "strip", ZodTypeAny, {
                data?: any;
                name: string;
            }, {
                data?: any;
                name: string;
            }>]>, ZodString]>>>;
            name: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodNumber]>>>;
            properties: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
        }, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">]

      Returns Promise<TResult>

      Remarks

      Mint a unique NFT to a specified wallet.

      Example

      // Address of the wallet you want to mint the NFT to
      const walletAddress = "{{wallet_address}}";

      // Custom metadata of the NFT, note that you can fully customize this metadata with other properties.
      const metadata = {
      name: "Cool NFT",
      description: "This is a cool NFT",
      image: fs.readFileSync("path/to/image.png"), // This can be an image url or file
      };

      const tx = await contract.mintTo(walletAddress, metadata);
      const receipt = tx.receipt; // the transaction receipt
      const tokenId = tx.id; // the id of the NFT minted
      const nft = await tx.data(); // (optional) fetch details of minted NFT
  • prepare: ((...args) => Promise<Transaction<TransactionResultWithId<NFT>>>)
      • (...args): Promise<Transaction<TransactionResultWithId<NFT>>>
      • Parameters

        • Rest ...args: [walletAddress: string, metadata: string | objectInputType<{
              animation_url: ZodNullable<ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                  data: ZodUnion<[ZodTypeAny, ZodString]>;
                  name: ZodString;
              }, "strip", ZodTypeAny, {
                  data?: any;
                  name: string;
              }, {
                  data?: any;
                  name: string;
              }>]>, ZodString]>>>;
              attributes: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
              background_color: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodEffects<ZodString, string, string>, ZodString]>>>;
              description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>;
              external_url: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                  data: ZodUnion<[ZodTypeAny, ZodString]>;
                  name: ZodString;
              }, "strip", ZodTypeAny, {
                  data?: any;
                  name: string;
              }, {
                  data?: any;
                  name: string;
              }>]>, ZodString]>>>;
              image: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
                  data: ZodUnion<[ZodTypeAny, ZodString]>;
                  name: ZodString;
              }, "strip", ZodTypeAny, {
                  data?: any;
                  name: string;
              }, {
                  data?: any;
                  name: string;
              }>]>, ZodString]>>>;
              name: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodNumber]>>>;
              properties: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
          }, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">]

        Returns Promise<Transaction<TransactionResultWithId<NFT>>>

owner: ContractOwner<TokenERC721>
platformFees: ContractPlatformFee<TokenERC721>
roles: ContractRoles<TokenERC721, "transfer" | "minter" | "admin">
royalties: ContractRoyalty<TokenERC721, {
    deploy: ZodObject<{
        app_uri: ZodOptional<ZodString>;
        description: ZodOptional<ZodString>;
        external_link: ZodOptional<ZodString>;
        fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        image: ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
            data: ZodUnion<[ZodTypeAny, ZodString]>;
            name: ZodString;
        }, "strip", ZodTypeAny, {
            data?: any;
            name: string;
        }, {
            data?: any;
            name: string;
        }>]>, ZodString]>>;
        name: ZodString;
        platform_fee_basis_points: ZodDefault<ZodNumber>;
        platform_fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        primary_sale_recipient: ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>;
        seller_fee_basis_points: ZodDefault<ZodNumber>;
        social_urls: ZodOptional<ZodRecord<ZodString, ZodString>>;
        symbol: ZodDefault<ZodString>;
        trusted_forwarders: ZodDefault<ZodArray<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>, "many">>;
    }, "strip", ZodTypeAny, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient: string;
        image?: any;
        name: string;
        platform_fee_basis_points: number;
        platform_fee_recipient: string;
        primary_sale_recipient: string;
        seller_fee_basis_points: number;
        social_urls?: Record<string, string>;
        symbol: string;
        trusted_forwarders: string[];
    }, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient?: string;
        image?: any;
        name: string;
        platform_fee_basis_points?: number;
        platform_fee_recipient?: string;
        primary_sale_recipient: string;
        seller_fee_basis_points?: number;
        social_urls?: Record<string, string>;
        symbol?: string;
        trusted_forwarders?: string[];
    }>;
    input: ZodObject<{
        app_uri: ZodOptional<ZodString>;
        description: ZodOptional<ZodString>;
        external_link: ZodOptional<ZodString>;
        fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        image: ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
            data: ZodUnion<[ZodTypeAny, ZodString]>;
            name: ZodString;
        }, "strip", ZodTypeAny, {
            data?: any;
            name: string;
        }, {
            data?: any;
            name: string;
        }>]>, ZodString]>>;
        name: ZodString;
        seller_fee_basis_points: ZodDefault<ZodNumber>;
        social_urls: ZodOptional<ZodRecord<ZodString, ZodString>>;
        symbol: ZodDefault<ZodString>;
    }, "strip", ZodTypeAny, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient: string;
        image?: any;
        name: string;
        seller_fee_basis_points: number;
        social_urls?: Record<string, string>;
        symbol: string;
    }, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient?: string;
        image?: any;
        name: string;
        seller_fee_basis_points?: number;
        social_urls?: Record<string, string>;
        symbol?: string;
    }>;
    output: ZodObject<{
        app_uri: ZodOptional<ZodString>;
        description: ZodOptional<ZodString>;
        external_link: ZodOptional<ZodString>;
        fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        image: ZodOptional<ZodString>;
        name: ZodString;
        seller_fee_basis_points: ZodDefault<ZodNumber>;
        social_urls: ZodOptional<ZodRecord<ZodString, ZodString>>;
        symbol: ZodDefault<ZodString>;
    }, "strip", ZodTypeAny, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient: string;
        image?: string;
        name: string;
        seller_fee_basis_points: number;
        social_urls?: Record<string, string>;
        symbol: string;
    }, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient?: string;
        image?: string;
        name: string;
        seller_fee_basis_points?: number;
        social_urls?: Record<string, string>;
        symbol?: string;
    }>;
}>

Configure royalties

Type declaration

  • deploy: ZodObject<{
        app_uri: ZodOptional<ZodString>;
        description: ZodOptional<ZodString>;
        external_link: ZodOptional<ZodString>;
        fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        image: ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
            data: ZodUnion<[ZodTypeAny, ZodString]>;
            name: ZodString;
        }, "strip", ZodTypeAny, {
            data?: any;
            name: string;
        }, {
            data?: any;
            name: string;
        }>]>, ZodString]>>;
        name: ZodString;
        platform_fee_basis_points: ZodDefault<ZodNumber>;
        platform_fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        primary_sale_recipient: ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>;
        seller_fee_basis_points: ZodDefault<ZodNumber>;
        social_urls: ZodOptional<ZodRecord<ZodString, ZodString>>;
        symbol: ZodDefault<ZodString>;
        trusted_forwarders: ZodDefault<ZodArray<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>, "many">>;
    }, "strip", ZodTypeAny, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient: string;
        image?: any;
        name: string;
        platform_fee_basis_points: number;
        platform_fee_recipient: string;
        primary_sale_recipient: string;
        seller_fee_basis_points: number;
        social_urls?: Record<string, string>;
        symbol: string;
        trusted_forwarders: string[];
    }, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient?: string;
        image?: any;
        name: string;
        platform_fee_basis_points?: number;
        platform_fee_recipient?: string;
        primary_sale_recipient: string;
        seller_fee_basis_points?: number;
        social_urls?: Record<string, string>;
        symbol?: string;
        trusted_forwarders?: string[];
    }>
  • input: ZodObject<{
        app_uri: ZodOptional<ZodString>;
        description: ZodOptional<ZodString>;
        external_link: ZodOptional<ZodString>;
        fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        image: ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
            data: ZodUnion<[ZodTypeAny, ZodString]>;
            name: ZodString;
        }, "strip", ZodTypeAny, {
            data?: any;
            name: string;
        }, {
            data?: any;
            name: string;
        }>]>, ZodString]>>;
        name: ZodString;
        seller_fee_basis_points: ZodDefault<ZodNumber>;
        social_urls: ZodOptional<ZodRecord<ZodString, ZodString>>;
        symbol: ZodDefault<ZodString>;
    }, "strip", ZodTypeAny, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient: string;
        image?: any;
        name: string;
        seller_fee_basis_points: number;
        social_urls?: Record<string, string>;
        symbol: string;
    }, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient?: string;
        image?: any;
        name: string;
        seller_fee_basis_points?: number;
        social_urls?: Record<string, string>;
        symbol?: string;
    }>
  • output: ZodObject<{
        app_uri: ZodOptional<ZodString>;
        description: ZodOptional<ZodString>;
        external_link: ZodOptional<ZodString>;
        fee_recipient: ZodDefault<ZodUnion<[ZodType<string, ZodTypeDef, string>, ZodType<`0x${string}`, ZodTypeDef, `${string}.eth` | `${string}.cb.id`>]>>;
        image: ZodOptional<ZodString>;
        name: ZodString;
        seller_fee_basis_points: ZodDefault<ZodNumber>;
        social_urls: ZodOptional<ZodRecord<ZodString, ZodString>>;
        symbol: ZodDefault<ZodString>;
    }, "strip", ZodTypeAny, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient: string;
        image?: string;
        name: string;
        seller_fee_basis_points: number;
        social_urls?: Record<string, string>;
        symbol: string;
    }, {
        app_uri?: string;
        description?: string;
        external_link?: string;
        fee_recipient?: string;
        image?: string;
        name: string;
        seller_fee_basis_points?: number;
        social_urls?: Record<string, string>;
        symbol?: string;
    }>

Remarks

Set your own royalties for the entire contract or per token

Example

// royalties on the whole contract
contract.royalties.setDefaultRoyaltyInfo({
seller_fee_basis_points: 100, // 1%
fee_recipient: "0x..."
});
// override royalty for a particular token
contract.royalties.setTokenRoyaltyInfo(tokenId, {
seller_fee_basis_points: 500, // 5%
fee_recipient: "0x..."
});

Signature Minting

Remarks

Generate dynamic NFTs with your own signature, and let others mint them using that signature.

Example

// see how to craft a payload to sign in the `contract.signature.generate()` documentation
const signedPayload = contract.signature().generate(payload);

// now anyone can mint the NFT
const tx = contract.signature.mint(signedPayload);
const receipt = tx.receipt; // the mint transaction receipt
const mintedId = tx.id; // the id of the NFT minted
storage: ThirdwebStorage<IpfsUploadBatchOptions>
transfer: {
    prepare: ((...args) => Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>);
    (...args): Promise<TResult>;
} = ...

Type declaration

    • (...args): Promise<TResult>
    • Transfer an NFT

      Parameters

      • Rest ...args: [to: string, tokenId: BigNumberish]

      Returns Promise<TResult>

      Remarks

      Transfer an NFT from the connected wallet to another wallet.

      Example

      const walletAddress = "{{wallet_address}}";
      const tokenId = 0;
      await contract.transfer(walletAddress, tokenId);
  • prepare: ((...args) => Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>)
      • (...args): Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>
      • Parameters

        • Rest ...args: [to: string, tokenId: BigNumberish]

        Returns Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>

contractRoles: readonly ["admin", "minter", "transfer"] = NFT_BASE_CONTRACT_ROLES

Accessors

Methods

  • Get NFT Balance

    Parameters

    • address: string

    Returns Promise<BigNumber>

    Remarks

    Get a wallets NFT balance (number of NFTs in this contract owned by the wallet).

    Example

    const walletAddress = "{{wallet_address}}";
    const balance = await contract.balanceOf(walletAddress);
    console.log(balance);
  • Get all NFTs

    Parameters

    • Optional queryParams: {
          count?: number;
          start?: number;
      }

      optional filtering to only fetch a subset of results.

      • Optional count?: number
      • Optional start?: number

    Returns Promise<NFT[]>

    The NFT metadata for all NFTs queried.

    Remarks

    Get all the data associated with every NFT in this contract.

    By default, returns the first 100 NFTs, use queryParams to fetch more.

    Example

    const nfts = await contract.getAll();
    console.log(nfts);
  • Construct a mint transaction without executing it. This is useful for estimating the gas cost of a mint transaction, overriding transaction options and having fine grained control over the transaction execution.

    Parameters

    • receiver: string

      Address you want to send the token to

    • metadata: string | objectInputType<{
          animation_url: ZodNullable<ZodOptional<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
              data: ZodUnion<[ZodTypeAny, ZodString]>;
              name: ZodString;
          }, "strip", ZodTypeAny, {
              data?: any;
              name: string;
          }, {
              data?: any;
              name: string;
          }>]>, ZodString]>>>;
          attributes: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
          background_color: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodEffects<ZodString, string, string>, ZodString]>>>;
          description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>;
          external_url: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
              data: ZodUnion<[ZodTypeAny, ZodString]>;
              name: ZodString;
          }, "strip", ZodTypeAny, {
              data?: any;
              name: string;
          }, {
              data?: any;
              name: string;
          }>]>, ZodString]>>>;
          image: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[ZodTypeAny, ZodObject<{
              data: ZodUnion<[ZodTypeAny, ZodString]>;
              name: ZodString;
          }, "strip", ZodTypeAny, {
              data?: any;
              name: string;
          }, {
              data?: any;
              name: string;
          }>]>, ZodString]>>>;
          name: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodNumber]>>>;
          properties: ZodNullable<ZodOptional<ZodUnion<[ZodArray<ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>, "many">, ZodObject<{}, "strip", ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, objectOutputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">, objectInputType<{}, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">>]>>>;
      }, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | BN | BigNumber>, ZodUnknown]>, "strip">

      The metadata of the NFT you want to mint

    Returns Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>

    Deprecated

    Use contract.mint.prepare(...args) instead

  • Get all NFTs owned by a specific wallet

    Parameters

    • Optional walletAddress: string

      the wallet address to query, defaults to the connected wallet

    • Optional queryParams: {
          count?: number;
          start?: number;
      }

      optional filtering to only fetch a subset of results.

      • Optional count?: number
      • Optional start?: number

    Returns Promise<NFT[]>

    The NFT metadata for all NFTs in the contract.

    Remarks

    Get all the data associated with the NFTs owned by a specific wallet.

    Example

    // Address of the wallet to get the NFTs of
    const address = "{{wallet_address}}";
    const nfts = await contract.getOwned(address);
    console.log(nfts);

Generated using TypeDoc