Skip to main content

CollectionData

Represents the data associated with an NFT collection, including configuration parameters and permission flags.

Hierarchy

  • { canChangeBaseUri: Bool; canChangeCreator: Bool; canChangeName: Bool; canChangeRoyalty: Bool; canChangeTransferFee: Bool; canMint: Bool; canPause: Bool; canSetAdmin: Bool; isPaused: Bool; requireBuyApproval: Bool; requireCreatorSignatureToUpgradeCollection: Bool; requireCreatorSignatureToUpgradeNFT: Bool; requireSaleApproval: Bool; requireTransferApproval: Bool; requireUpdateApproval: Bool; royaltyFee: UInt32; transferFee: UInt64; upgradeAuthority: PublicKey }
    • CollectionData

Index

Constructors

externalconstructor

  • new CollectionData(value: { canChangeBaseUri: Bool; canChangeCreator: Bool; canChangeName: Bool; canChangeRoyalty: Bool; canChangeTransferFee: Bool; canMint: Bool; canPause: Bool; canSetAdmin: Bool; isPaused: Bool; requireBuyApproval: Bool; requireCreatorSignatureToUpgradeCollection: Bool; requireCreatorSignatureToUpgradeNFT: Bool; requireSaleApproval: Bool; requireTransferApproval: Bool; requireUpdateApproval: Bool; royaltyFee: UInt32; transferFee: UInt64; upgradeAuthority: PublicKey }): CollectionData
  • Parameters

    • externalvalue: { canChangeBaseUri: Bool; canChangeCreator: Bool; canChangeName: Bool; canChangeRoyalty: Bool; canChangeTransferFee: Bool; canMint: Bool; canPause: Bool; canSetAdmin: Bool; isPaused: Bool; requireBuyApproval: Bool; requireCreatorSignatureToUpgradeCollection: Bool; requireCreatorSignatureToUpgradeNFT: Bool; requireSaleApproval: Bool; requireTransferApproval: Bool; requireUpdateApproval: Bool; royaltyFee: UInt32; transferFee: UInt64; upgradeAuthority: PublicKey }
      • externalcanChangeBaseUri: Bool = Bool

        If true, the base URI for the collection's metadata can be changed.

      • externalcanChangeCreator: Bool = Bool

        If true, the creator of the collection can be changed.

      • externalcanChangeName: Bool = Bool

        If true, the name of the collection can be changed.

      • externalcanChangeRoyalty: Bool = Bool

        If true, the royalty fee configuration can be changed.

      • externalcanChangeTransferFee: Bool = Bool

        If true, the transfer fee configuration can be changed.

      • externalcanMint: Bool = Bool

        If true, new NFTs can be minted in this collection.

      • externalcanPause: Bool = Bool

        If true, the collection can be paused and resumed by authorized parties.

      • externalcanSetAdmin: Bool = Bool

        If true, the admin contract associated with the collection can be changed.

      • externalisPaused: Bool = Bool

        Indicates whether the collection is currently paused.

      • externalrequireBuyApproval: Bool = Bool

        If true, purchasing NFTs requires approval from the admin contract.

      • externalrequireCreatorSignatureToUpgradeCollection: Bool = Bool

        If true, upgrading the collection's verification key requires the creator's signature.

      • externalrequireCreatorSignatureToUpgradeNFT: Bool = Bool

        If true, upgrading an NFT's verification key requires the creator's signature.

      • externalrequireSaleApproval: Bool = Bool

        If true, listing NFTs for sale requires approval from the admin contract.

      • externalrequireTransferApproval: Bool = Bool

        If true, transferring NFTs requires approval from the admin contract.

      • externalrequireUpdateApproval: Bool = Bool

        If true, updating NFTs requires approval from the admin contract.

      • externalroyaltyFee: UInt32 = UInt32

        The royalty fee percentage (e.g., 1000 = 1%, 100 = 0.1%).

      • externaltransferFee: UInt64 = UInt64

        The transfer fee amount.

      • externalupgradeAuthority: PublicKey = PublicKey

        The public key of the upgrade authority contract.

    Returns CollectionData

Properties

canChangeBaseUri

canChangeBaseUri: Bool = Bool

If true, the base URI for the collection's metadata can be changed.

canChangeCreator

canChangeCreator: Bool = Bool

If true, the creator of the collection can be changed.

canChangeName

canChangeName: Bool = Bool

If true, the name of the collection can be changed.

canChangeRoyalty

canChangeRoyalty: Bool = Bool

If true, the royalty fee configuration can be changed.

canChangeTransferFee

canChangeTransferFee: Bool = Bool

If true, the transfer fee configuration can be changed.

canMint

canMint: Bool = Bool

If true, new NFTs can be minted in this collection.

canPause

canPause: Bool = Bool

If true, the collection can be paused and resumed by authorized parties.

canSetAdmin

canSetAdmin: Bool = Bool

If true, the admin contract associated with the collection can be changed.

isPaused

isPaused: Bool = Bool

Indicates whether the collection is currently paused.

requireBuyApproval

requireBuyApproval: Bool = Bool

If true, purchasing NFTs requires approval from the admin contract.

requireCreatorSignatureToUpgradeCollection

requireCreatorSignatureToUpgradeCollection: Bool = Bool

If true, upgrading the collection's verification key requires the creator's signature.

requireCreatorSignatureToUpgradeNFT

requireCreatorSignatureToUpgradeNFT: Bool = Bool

If true, upgrading an NFT's verification key requires the creator's signature.

requireSaleApproval

requireSaleApproval: Bool = Bool

If true, listing NFTs for sale requires approval from the admin contract.

requireTransferApproval

requireTransferApproval: Bool = Bool

If true, transferring NFTs requires approval from the admin contract.

requireUpdateApproval

requireUpdateApproval: Bool = Bool

If true, updating NFTs requires approval from the admin contract.

royaltyFee

royaltyFee: UInt32 = UInt32

The royalty fee percentage (e.g., 1000 = 1%, 100 = 0.1%).

transferFee

transferFee: UInt64 = UInt64

The transfer fee amount.

upgradeAuthority

upgradeAuthority: PublicKey = PublicKey

The public key of the upgrade authority contract.

Methods

pack

  • Packs the CollectionData into a CollectionDataPacked representation for efficient storage.


    Returns CollectionDataPacked

    The packed CollectionDataPacked instance.

staticnew

  • new(params: { canChangeBaseUri?: boolean; canChangeCreator?: boolean; canChangeName?: boolean; canChangeRoyalty?: boolean; canChangeTransferFee?: boolean; canMint?: boolean; canPause?: boolean; canSetAdmin?: boolean; isPaused?: boolean; requireBuyApproval?: boolean; requireCreatorSignatureToUpgradeCollection?: boolean; requireCreatorSignatureToUpgradeNFT?: boolean; requireSaleApproval?: boolean; requireTransferApproval?: boolean; requireUpdateApproval?: boolean; royaltyFee?: number; transferFee?: number; upgradeAuthority?: PublicKey }): CollectionData
  • Creates a new CollectionData instance with specified parameters.


    Parameters

    • params: { canChangeBaseUri?: boolean; canChangeCreator?: boolean; canChangeName?: boolean; canChangeRoyalty?: boolean; canChangeTransferFee?: boolean; canMint?: boolean; canPause?: boolean; canSetAdmin?: boolean; isPaused?: boolean; requireBuyApproval?: boolean; requireCreatorSignatureToUpgradeCollection?: boolean; requireCreatorSignatureToUpgradeNFT?: boolean; requireSaleApproval?: boolean; requireTransferApproval?: boolean; requireUpdateApproval?: boolean; royaltyFee?: number; transferFee?: number; upgradeAuthority?: PublicKey }

      The parameters to create the CollectionData.

      • optionalcanChangeBaseUri: boolean
      • optionalcanChangeCreator: boolean
      • optionalcanChangeName: boolean
      • optionalcanChangeRoyalty: boolean
      • optionalcanChangeTransferFee: boolean
      • optionalcanMint: boolean
      • optionalcanPause: boolean
      • optionalcanSetAdmin: boolean
      • optionalisPaused: boolean
      • optionalrequireBuyApproval: boolean
      • optionalrequireCreatorSignatureToUpgradeCollection: boolean
      • optionalrequireCreatorSignatureToUpgradeNFT: boolean
      • optionalrequireSaleApproval: boolean
      • optionalrequireTransferApproval: boolean
      • optionalrequireUpdateApproval: boolean
      • optionalroyaltyFee: number
      • optionaltransferFee: number
      • optionalupgradeAuthority: PublicKey

    Returns CollectionData

    A new CollectionData instance.

staticunpack

  • Unpacks a CollectionDataPacked instance into a CollectionData instance.


    Parameters

    Returns CollectionData

    A new CollectionData instance.