Type alias CreateNftBuilderParams

CreateNftBuilderParams: {
    name: string;
    sellerFeeBasisPoints: number;
    uri: string;
    symbol?: undefined | string;
    collection?: undefined | Option<PublicKey>;
    creators?: undefined | CreatorInput[];
    tokenAddress?: undefined | PublicKey | Signer;
    mintAuthority?: undefined | Signer;
    mintTokens?: undefined | boolean;
    tokenOwner?: undefined | PublicKey;
    ruleSet?: undefined | Option<PublicKey>;
    maxSupply?: undefined | Option<BigNumber>;
    updateAuthority?: undefined | Signer;
    isMutable?: undefined | boolean;
    primarySaleHappened?: undefined | boolean;
    tokenStandard?: undefined | TokenStandard;
    uses?: undefined | Option<Uses>;
    collectionAuthority?: undefined | Option<Signer>;
    tree?: undefined | Option<PublicKey>;
    collectionAuthorityIsDelegated?: undefined | boolean;
    useNewMint?: undefined | Signer;
    useExistingMint?: undefined | PublicKey;
    isCollection?: undefined | boolean;
    collectionIsSized?: undefined | boolean;
    tokenExists?: undefined | boolean;
    createMintAccountInstructionKey?: undefined | string;
    initializeMintInstructionKey?: undefined | string;
    createAssociatedTokenAccountInstructionKey?: undefined | string;
    createTokenAccountInstructionKey?: undefined | string;
    initializeTokenInstructionKey?: undefined | string;
    mintTokensInstructionKey?: undefined | string;
    createMetadataInstructionKey?: undefined | string;
    createMasterEditionInstructionKey?: undefined | string;
}

Type declaration

  • name: string

    The on-chain name of the asset, e.g. "My NFT #123".

  • sellerFeeBasisPoints: number

    The royalties in percent basis point (i.e. 250 is 2.5%) that should be paid to the creators on each secondary sale.

  • uri: string

    The URI that points to the JSON metadata of the asset.

  • Optional symbol?: undefined | string

    The on-chain symbol of the asset, stored in the Metadata account. E.g. "MYNFT".

    Default Value

    ""

  • Optional collection?: undefined | Option<PublicKey>

    The Collection NFT that this new NFT belongs to. When null, the created NFT will not be part of a collection.

    Default Value

    null

  • Optional creators?: undefined | CreatorInput[]

    This object provides a way of providing creator information when needed, e.g. when creating or updating NFTs, candy machines, etc.

    It allows us to optionally provide an authority as a Signer so we can both set and verify the creator within the same operation.

    Default Value

    Defaults to using the provided updateAuthority as the only verified creator.

    [{
    address: updateAuthority.publicKey,
    authority: updateAuthority,
    share: 100,
    }]
  • Optional tokenAddress?: undefined | PublicKey | Signer

    The token account linking the mint account and the token owner together. By default, the associated token account will be used.

    If the provided token account does not exist, it must be passed as a Signer as we will need to create it before creating the NFT.

    Default Value

    Defaults to creating a new associated token account using the mintAddress and tokenOwner parameters.

  • Optional mintAuthority?: undefined | Signer

    The authority that is currently allowed to mint new tokens for the provided mint account.

    Note that this is only relevant if the useExistingMint parameter if provided.

    Default Value

    metaplex.identity()

  • Optional mintTokens?: undefined | boolean

    Whether or not we should mint one token for the new NFT.

    Default Value

    true

  • Optional tokenOwner?: undefined | PublicKey

    The owner of the NFT to create.

    Default Value

    metaplex.identity().publicKey

  • Optional ruleSet?: undefined | Option<PublicKey>

    The ruleset account that should be used to configure the programmable NFT.

    This is only relevant for programmable NFTs, i.e. if the tokenStandard is set to TokenStandard.ProgrammableNonFungible.

    Default Value

    null

  • Optional maxSupply?: undefined | Option<BigNumber>

    The maximum supply of printed editions. When this is null, an unlimited amount of editions can be printed from the original edition.

    Default Value

    toBigNumber(0)

  • Optional updateAuthority?: undefined | Signer

    The authority that will be able to make changes to the created NFT.

    This is required as a Signer because creating the master edition account requires the update authority to sign the transaction.

    Default Value

    metaplex.identity()

  • Optional isMutable?: undefined | boolean

    Whether or not the NFT's metadata is mutable. When set to false no one can update the Metadata account, not even the update authority.

    Default Value

    true

  • Optional primarySaleHappened?: undefined | boolean

    Whether or not selling this asset is considered a primary sale. Once flipped from false to true, this field is immutable and all subsequent sales of this asset will be considered secondary.

    Default Value

    false

  • Optional tokenStandard?: undefined | TokenStandard

    Describes the asset class of the token. It can be one of the following:

    • TokenStandard.NonFungible: A traditional NFT (master edition).
    • TokenStandard.FungibleAsset: A fungible token with metadata that can also have attrributes.
    • TokenStandard.Fungible: A fungible token with simple metadata.
    • TokenStandard.NonFungibleEdition: A limited edition NFT "printed" from a master edition.
    • TokenStandard.ProgrammableNonFungible: A master edition NFT with programmable configuration.

    Default Value

    TokenStandard.NonFungible

  • Optional uses?: undefined | Option<Uses>

    When this field is not null, it indicates that the NFT can be "used" by its owner or any approved "use authorities".

    Default Value

    null

  • Optional collectionAuthority?: undefined | Option<Signer>

    The collection authority that should sign the created NFT to prove that it is part of the provided collection. When null, the provided collection will not be verified.

    Default Value

    null

  • Optional tree?: undefined | Option<PublicKey>

    The Merkle tree used to store the NFT

  • Optional collectionAuthorityIsDelegated?: undefined | boolean

    Whether or not the provided collectionAuthority is a delegated collection authority, i.e. it was approved by the update authority using metaplex.nfts().approveCollectionAuthority().

    Default Value

    false

  • Optional useNewMint?: undefined | Signer

    The address of the new mint account as a Signer. This is useful if you already have a generated Keypair for the mint account of the NFT to create.

    Default Value

    Keypair.generate()

  • Optional useExistingMint?: undefined | PublicKey

    The address of the existing mint account that should be converted into an NFT. The account at this address should have the right requirements to become an NFT, e.g. its supply should contains exactly 1 token.

    Default Value

    Defaults to creating a new mint account with the right requirements.

  • Optional isCollection?: undefined | boolean

    Whether the created NFT is a Collection NFT. When set to true, the NFT will be created as a Sized Collection NFT with an initial size of 0.

    Default Value

    false

  • Optional collectionIsSized?: undefined | boolean

    Whether or not the provided collection is a sized collection and not a legacy collection.

    Default Value

    true

  • Optional tokenExists?: undefined | boolean

    Whether or not the provided token account already exists. If false, we'll add another instruction to create it.

    Default Value

    true

  • Optional createMintAccountInstructionKey?: undefined | string

    A key to distinguish the instruction that creates the mint account.

  • Optional initializeMintInstructionKey?: undefined | string

    A key to distinguish the instruction that initializes the mint account.

  • Optional createAssociatedTokenAccountInstructionKey?: undefined | string

    A key to distinguish the instruction that creates the associated token account.

  • Optional createTokenAccountInstructionKey?: undefined | string

    A key to distinguish the instruction that creates the token account.

  • Optional initializeTokenInstructionKey?: undefined | string

    A key to distinguish the instruction that initializes the token account.

  • Optional mintTokensInstructionKey?: undefined | string

    A key to distinguish the instruction that mints tokens.

  • Optional createMetadataInstructionKey?: undefined | string

    A key to distinguish the instruction that creates the metadata account.

  • Optional createMasterEditionInstructionKey?: undefined | string

    A key to distinguish the instruction that creates the master edition account.

Generated using TypeDoc