token_metadata

package
v1.23.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

View Source
const EDITION_MARKER_BIT_SIZE uint64 = 248

Variables

This section is empty.

Functions

func ApproveCollectionAuthority

func ApproveCollectionAuthority(param ApproveCollectionAuthorityParam) types.Instruction

ApproveCollectionAuthority instruction allows the provided New Collection Authority account to update the Collection field of a Metadata account.

func ApproveUseAuthority

func ApproveUseAuthority(param ApproveUseAuthorityParam) types.Instruction

ApproveUseAuthority instruction allows the provided User account to utilize a Metadata account. The program keeps track of all the use authorities that have been approved via Use Authority Record PDAs.

func BurnEditionNft

func BurnEditionNft(param BurnEditionNftParam) types.Instruction

This instruction enables the owner of a Print Edition NFT to completely burn it:

  • burning the SPL token and closing the token account
  • closing the metadata and edition accounts
  • giving the owner the reclaimed funds from closing these accounts

https://docs.metaplex.com/programs/token-metadata/instructions#burn-an-edition-nft

func BurnNft

func BurnNft(param BurnNftParam) types.Instruction

func CreateMasterEdition

func CreateMasterEdition(param CreateMasterEditionParam) types.Instruction

func CreateMasterEditionV3

func CreateMasterEditionV3(param CreateMasterEditionParam) types.Instruction

func CreateMetadataAccount

func CreateMetadataAccount(param CreateMetadataAccountParam) types.Instruction

func CreateMetadataAccountV2

func CreateMetadataAccountV2(param CreateMetadataAccountV2Param) types.Instruction

func CreateMetadataAccountV3

func CreateMetadataAccountV3(param CreateMetadataAccountV3Param) types.Instruction

CreateMetadataAccountV3 instruction creates and initializes a new Metadata account for a given Mint account. It is required that the Mint account has been created and initialized by the Token Program before executing this instruction.

func FreezeDelegatedAccount

func FreezeDelegatedAccount(param FreezeDelegatedAccountParam) types.Instruction

FreezeDelegatedAccount instruction freezes a Token account but only if you are the Delegate Authority of the Token account. Because Mint Authority and Freeze Authority of NFTs are transferred to the Master Edition / Edition PDA, this instruction is the only way for a delegate to prevent the owner of an NFT to transfer it. This enables a variety of use-cases such as preventing someone to sell its NFT whilst being listed in an escrowless marketplace.

func GetCollectionAuthorityRecord

func GetCollectionAuthorityRecord(mint, authotity common.PublicKey) (common.PublicKey, error)

Collection Authority Record accounts are used internally by the program to keep track of which authorities are allowed to set and/or verify the collection of the token's Metadata account.

func GetEdition

func GetEdition(mint common.PublicKey) (common.PublicKey, error)

The Edition account, derived from a Mint Account, represents an NFT that was copied from a Master Edition NFT.

func GetEditionMark

func GetEditionMark(mint common.PublicKey, edition uint64) (common.PublicKey, error)

Edition Marker accounts are used internally by the program to keep track of which editions were printed for a given Master Edition.

func GetMasterEdition

func GetMasterEdition(mint common.PublicKey) (common.PublicKey, error)

The Master Edition account, derived from a Mint Account, is an important component of NFTs because its existence is proof of the Non-Fungibility of the token.

func GetMetadataDelegateRecord

func GetMetadataDelegateRecord(mint, updateAuthority, delegate common.PublicKey, delegateRole MetadataDelegate) (common.PublicKey, error)

Metadata Delegate Record accounts are used to store multiple delegate authorities for a given Metadata account.

func GetTokenMetaPubkey

func GetTokenMetaPubkey(mint common.PublicKey) (common.PublicKey, error)

The Metadata Account is responsible for storing additional data attached to tokens. As every account in the Token Metadata program, it derives from the Mint Account of the token using a PDA.

func GetTokenRecord

func GetTokenRecord(mint, tokenAccount common.PublicKey) (common.PublicKey, error)

Token Record accounts are used by Programmable NFTs only. Since Programmable NFTs add another layer on top of tokens, Token Record accounts enable us to attach custom data to token accounts rather than mint accounts.

func GetUseAuthorityRecord

func GetUseAuthorityRecord(mint, authotity common.PublicKey) (common.PublicKey, error)

Use Authority Record accounts are used internally by the program to keep track of which authorities are allowed to reduce the uses of the token's Metadata account.

func RemoveCreatorVerification

func RemoveCreatorVerification(param RemoveCreatorVerificationParam) types.Instruction

This instruction unverifies one creator on the Metadata account. As long as the provided Creator account signs the transaction, the Verified boolean will be set to False on the appropriate creator of the Creators array.

func RevokeCollectionAuthority

func RevokeCollectionAuthority(param RevokeCollectionAuthorityParam) types.Instruction

RevokeCollectionAuthority instruction revokes an existing collection authority, meaning they will no longer be able to update the Collection field of the Metadata account associated with that Mint account.

func RevokeUseAuthority

func RevokeUseAuthority(param RevokeUseAuthorityParam) types.Instruction

ApproveUseAuthority instruction allows the provided User account to utilize a Metadata account. The program keeps track of all the use authorities that have been approved via Use Authority Record PDAs.

func SetAndVerifyCollection

func SetAndVerifyCollection(param SetAndVerifyCollectionParam) types.Instruction

SetAndVerifyCollection instruction updates the Collection field of a Metadata account using the provided Collection Mint account as long as its Collection Authority signs the transaction and the parent NFT does not have the collection details field populated (unsized).

func SetAndVerifySizedCollectionItem

func SetAndVerifySizedCollectionItem(param SetAndVerifySizedCollectionItemParam) types.Instruction

SetAndVerifySizedCollectionItem instruction updates the Collection field of a Metadata account for sized collections using the provided Collection Mint account as long as its Collection Authority signs the transaction and the parent NFT has the collection details field populated (sized).

func SetCollectionSize

func SetCollectionSize(param SetCollectionSizeParam) types.Instruction

SetCollectionSize instruction allows the update authority of a collection parent NFT to set the size of the collection once in order to allow existing unsized collections to be updated to track size. Once a collection is sized it can only be verified and unverified by the sized handlers and can't be changed back to unsized.

func SetTokenStandard

func SetTokenStandard(param SetTokenStandardParam) types.Instruction

SetTokenStandard instruction allows an update authority to pass in a metadata account with an optional edition account and then it determines what the correct TokenStandard type is and writes it to the metadata. See Token Standard for more information:

func SignMetadata

func SignMetadata(param SignMetadataParam) types.Instruction

func ThawDelegatedAccount

func ThawDelegatedAccount(param ThawDelegatedAccountParam) types.Instruction

ThawDelegatedAccount instruction reverts the instruction above by unfreezing a Token account, only if you are the Delegate Authority of the Token account.

func UnverifyCollection

func UnverifyCollection(param UnverifyCollectionParam) types.Instruction

This instruction unverifies the collection of a Metadata account for unsized parent NFTs, by setting the Verified boolean to False on the Collection field. Calling it on a collection whose parent NFT has a size field will throw an error.

func UnverifySizedCollectionItem

func UnverifySizedCollectionItem(param UnverifySizedCollectionItemParam) types.Instruction

This instruction unverifies the collection of a Metadata account, by setting the Verified boolean to False on the Collection field, and increments the size field of the parent NFT. Calling it on a collection whose parent NFT does not have a size field will throw an error.

func UpdateMetadataAccount

func UpdateMetadataAccount(param UpdateMetadataAccountParam) types.Instruction

func UpdateMetadataAccountV2

func UpdateMetadataAccountV2(param UpdateMetadataAccountV2Param) types.Instruction

This instruction enables us to update parts of the Metadata account. Note that some fields have constraints limiting how they can be updated. For instance, once the Is Mutable field is set to False, it cannot be changed back to True.

func UpdatePrimarySaleHappenedViaToken

func UpdatePrimarySaleHappenedViaToken(param UpdatePrimarySaleHappenedViaTokenParam) types.Instruction

This instruction flips the Primary Sale Happened flag to True, indicating that the first sale has happened. Note that this field is indicative and is typically used by marketplaces to calculate royalties.

func Utilize

func Utilize(param UtilizeParam) types.Instruction

Utilize instruction reduces the number of uses of a Metadata account. This can either be done by the Update Authority of the Metadata account or by an approved Use Authority.

func VerifyCollection

func VerifyCollection(param VerifyCollectionParam) types.Instruction

This instruction verifies the collection of a Metadata account for unsized parent NFTs, by setting the Verified boolean to True on the Collection field. Calling it on a collection whose parent NFT has a size field will throw an error.

func VerifySizedCollectionItem

func VerifySizedCollectionItem(param VerifySizedCollectionItemParam) types.Instruction

This instruction verifies the collection of a Metadata account, by setting the Verified boolean to True on the Collection field, and increments the size field of the parent NFT. Calling it on a collection whose parent NFT does not have a size field will throw an error.

Types

type ApproveCollectionAuthorityParam

type ApproveCollectionAuthorityParam struct {
	CollectionAuthorityRecord common.PublicKey // Collection Authority Record PDA
	NewCollectionAuthority    common.PublicKey // New Collection Authority
	UpdateAuthority           common.PublicKey // Update Authority of Collection NFT
	Payer                     common.PublicKey // Payer of the transaction
	CollectionMetadata        common.PublicKey // Metadata account of the collection
	CollectionMint            common.PublicKey // Mint of the collection
}

ApproveCollectionAuthorityParam is the params for ApproveCollectionAuthority instruction.

type ApproveUseAuthorityParam

type ApproveUseAuthorityParam struct {
	UseAuthorityRecord common.PublicKey // Use Authority Record PDA If present the program Assumes a delegated use authority
	Owner              common.PublicKey // Owner of the NFT
	Payer              common.PublicKey // Payer of the transaction
	User               common.PublicKey // User to be approved
	OwnerTokenAccount  common.PublicKey // Owned Token Account Of Mint
	Metadata           common.PublicKey // Metadata account of the NFT
	Mint               common.PublicKey // Mint of the NFT
	Burner             common.PublicKey // Program As Signer (Burner)
	NumberOfUses       uint64           // Number of times the NFT can be used
}

ApproveUseAuthorityParam is the params for ApproveUseAuthority instruction.

type BurnEditionNftParam

type BurnEditionNftParam struct {
	Metadata                  common.PublicKey // Metadata (pda of ['metadata', program id, mint id])
	Owner                     common.PublicKey // NFT owner
	PrintEditionMint          common.PublicKey // Mint of the print edition NFT
	MasterEditionMint         common.PublicKey // Mint of the original/master NFT
	PrintEditionTokenAccount  common.PublicKey // Token account the print edition NFT is in
	MasterEditionTokenAccount common.PublicKey // Token account the Master Edition NFT is in
	MasterEditionAccount      common.PublicKey // MasterEdition2 of the original NFT
	PrintEditionAccount       common.PublicKey // Print Edition account of the NFT
	EditionMarkerAccount      common.PublicKey // Edition Marker PDA of the NFT
}

type BurnNftParam

type BurnNftParam struct {
	Metadata             common.PublicKey  // Metadata (pda of ['metadata', program id, mint id])
	Owner                common.PublicKey  // NFT owner
	Mint                 common.PublicKey  // Mint of the NFT
	TokenAccount         common.PublicKey  // Token account to close
	MasterEditionAccount common.PublicKey  // MasterEdition2 of the NFT
	CollectionMetadata   *common.PublicKey // Metadata of the Collection
}

type Collection

type Collection struct {
	Verified bool
	Key      common.PublicKey
}

type CollectionAuthorityRecord

type CollectionAuthorityRecord struct {
	Key  Key
	Bump *uint8
}

type CollectionDetails

type CollectionDetails struct {
	Enum borsh.Enum `borsh_enum:"true"`
	V1   CollectionDetailsV1
}

type CollectionDetailsV1

type CollectionDetailsV1 struct {
	Size uint64
}

type CreateMasterEditionParam

type CreateMasterEditionParam struct {
	Edition         common.PublicKey
	Mint            common.PublicKey
	UpdateAuthority common.PublicKey
	MintAuthority   common.PublicKey
	Metadata        common.PublicKey
	Payer           common.PublicKey
	MaxSupply       *uint64
}

type CreateMasterEditionV3Param

type CreateMasterEditionV3Param struct {
	Edition         common.PublicKey
	Mint            common.PublicKey
	UpdateAuthority common.PublicKey
	MintAuthority   common.PublicKey
	Metadata        common.PublicKey
	Payer           common.PublicKey
	MaxSupply       *uint64
}

type CreateMetadataAccountParam

type CreateMetadataAccountParam struct {
	Metadata                common.PublicKey
	Mint                    common.PublicKey
	MintAuthority           common.PublicKey
	Payer                   common.PublicKey
	UpdateAuthority         common.PublicKey
	UpdateAuthorityIsSigner bool
	IsMutable               bool
	MintData                Data
}

type CreateMetadataAccountV2Param

type CreateMetadataAccountV2Param struct {
	Metadata                common.PublicKey
	Mint                    common.PublicKey
	MintAuthority           common.PublicKey
	Payer                   common.PublicKey
	UpdateAuthority         common.PublicKey
	UpdateAuthorityIsSigner bool
	IsMutable               bool
	Data                    DataV2
}

type CreateMetadataAccountV3Param

type CreateMetadataAccountV3Param struct {
	Metadata                common.PublicKey
	Mint                    common.PublicKey
	MintAuthority           common.PublicKey
	Payer                   common.PublicKey
	UpdateAuthority         common.PublicKey
	UpdateAuthorityIsSigner bool
	IsMutable               bool
	Data                    DataV2
	CollectionDetails       *CollectionDetails // (Optional) This optional enum allows us to differentiate Collection NFTs from Regular NFTs whilst adding additional context such as the amount of NFTs that are linked to the Collection NFT.
	CollectionSize          *uint64            // (Optional) This optional field allows us to specify the amount of NFTs that are linked to the Collection NFT.
}

CreateMetadataAccountV3Param is the parameter for CreateMetadataAccountV3

type Creator

type Creator struct {
	Address  common.PublicKey
	Verified bool
	Share    uint8
}

type Data

type Data struct {
	Name                 string
	Symbol               string
	Uri                  string
	SellerFeeBasisPoints uint16
	Creators             *[]Creator
}

type DataV2

type DataV2 struct {
	Name                 string
	Symbol               string
	Uri                  string
	SellerFeeBasisPoints uint16
	Creators             *[]Creator
	Collection           *Collection
	Uses                 *Uses
}

type FreezeDelegatedAccountParam

type FreezeDelegatedAccountParam struct {
	Delegate     common.PublicKey // Delegate
	TokenAccount common.PublicKey // Token Account to freeze
	Edition      common.PublicKey // Edition
	Mint         common.PublicKey // Mint of the NFT
}

FreezeDelegatedAccountParam is the params for FreezeDelegatedAccount instruction.

type Instruction

type Instruction uint8
const (
	InstructionCreateMetadataAccount Instruction = iota
	InstructionUpdateMetadataAccount
	InstructionDeprecatedCreateMasterEdition                             // deprecated
	InstructionDeprecatedMintNewEditionFromMasterEditionViaPrintingToken // deprecated
	InstructionUpdatePrimarySaleHappenedViaToken
	InstructionDeprecatedSetReservationList    // deprecated
	InstructionDeprecatedCreateReservationList // deprecated
	InstructionSignMetadata
	InstructionDeprecatedMintPrintingTokensViaToken // deprecated
	InstructionDeprecatedMintPrintingTokens         // deprecated
	InstructionCreateMasterEdition
	InstructionMintNewEditionFromMasterEditionViaToken
	InstructionConvertMasterEditionV1ToV2
	InstructionMintNewEditionFromMasterEditionViaVaultProxy
	InstructionPuffMetadata
	InstructionUpdateMetadataAccountV2
	InstructionCreateMetadataAccountV2
	InstructionCreateMasterEditionV3
	InstructionVerifyCollection
	InstructionUtilize
	InstructionApproveUseAuthority
	InstructionRevokeUseAuthority
	InstructionUnverifyCollection
	InstructionApproveCollectionAuthority
	InstructionRevokeCollectionAuthority
	InstructionSetAndVerifyCollection
	InstructionFreezeDelegatedAccount
	InstructionThawDelegatedAccount
	InstructionRemoveCreatorVerification
	InstructionBurnNft
	InstructionVerifySizedCollectionItem
	InstructionUnverifySizedCollectionItem
	InstructionSetAndVerifySizedCollectionItem
	InstructionCreateMetadataAccountV3
	InstructionSetCollectionSize
	InstructionSetTokenStandard
	InstructionUnknown // FIXME: Could not find instruction in the metaplex docs
	InstructionBurnEditionNft
)

type Key

type Key borsh.Enum
const (
	KeyUninitialized Key = iota
	KeyEditionV1
	KeyMasterEditionV1
	KeyReservationListV1
	KeyMetadataV1
	KeyReservationListV2
	KeyMasterEditionV2
	KeyEditionMarker
	KeyUseAuthorityRecord
	KeyCollectionAuthorityRecord
	KeyUnknown          // FIXME: could not find this in the metaplex docs
	KeyTokenRecord      // 11
	KeyMetadataDelegate // 12
)

type MasterEditionV2

type MasterEditionV2 struct {
	Key       Key
	Supply    uint64
	MaxSupply *uint64
}

type Metadata

type Metadata struct {
	Key                 Key
	UpdateAuthority     common.PublicKey
	Mint                common.PublicKey
	Data                Data
	PrimarySaleHappened bool
	IsMutable           bool
	EditionNonce        *uint8
	TokenStandard       *TokenStandard
	Collection          *Collection
	Uses                *Uses
	CollectionDetails   *CollectionDetails
}

func MetadataDeserialize

func MetadataDeserialize(data []byte) (Metadata, error)

type MetadataDelegate

type MetadataDelegate borsh.Enum

MetadataDelegates are delegates that operate at the metadata level. https://github.com/metaplex-foundation/metaplex-program-library/blob/master/token-metadata/program/ProgrammableNFTGuide.md#metadata-delegates

const (
	MetadataDelegateCollection MetadataDelegate = iota
	MetadataDelegateUse
	MetadataDelegateUpdate
)

type MetadataDelegateRecord

type MetadataDelegateRecord struct {
	Key             Key
	Bump            uint8
	Mint            common.PublicKey
	Delegate        common.PublicKey
	UpdateAuthority common.PublicKey
}

type MintNewEditionFromMasterEditionViaTokeParam

type MintNewEditionFromMasterEditionViaTokeParam struct {
	NewMetaData                common.PublicKey
	NewEdition                 common.PublicKey
	MasterEdition              common.PublicKey
	NewMint                    common.PublicKey
	EditionMark                common.PublicKey
	NewMintAuthority           common.PublicKey
	Payer                      common.PublicKey
	TokenAccountOwner          common.PublicKey
	TokenAccount               common.PublicKey
	NewMetadataUpdateAuthority common.PublicKey
	MasterMetadata             common.PublicKey
	Edition                    uint64
}

type RemoveCreatorVerificationParam

type RemoveCreatorVerificationParam struct {
	Metadata common.PublicKey
	Creator  common.PublicKey
}

RemoveCreatorVerificationParams is the params for RemoveCreatorVerification instruction.

type RevokeCollectionAuthorityParam

type RevokeCollectionAuthorityParam struct {
	CollectionAuthorityRecord common.PublicKey // Collection Authority Record PDA
	DelegateAuthority         common.PublicKey // Delegated Collection Authority
	RevokeAuthority           common.PublicKey // Update Authority, or Delegated Authority, of Collection NFT
	CollectionMetadata        common.PublicKey // Metadata account of the collection
	CollectionMint            common.PublicKey // Mint of the collection
}

RevokeCollectionAuthorityParam is the params for RevokeCollectionAuthority instruction.

type RevokeUseAuthorityParam

type RevokeUseAuthorityParam struct {
	UseAuthorityRecord common.PublicKey // Use Authority Record PDA If present the program Assumes a delegated use authority
	Owner              common.PublicKey // Owner of the NFT
	User               common.PublicKey // User to be approved
	OwnerTokenAccount  common.PublicKey // Owned Token Account Of Mint
	Mint               common.PublicKey // Mint of the NFT
	Metadata           common.PublicKey // Metadata account of the NFT
}

RevokeUseAuthorityParam is the params for RevokeUseAuthority instruction.

type SetAndVerifyCollectionParam

type SetAndVerifyCollectionParam struct {
	Metadata                       common.PublicKey // Metadata account
	CollectionAuthority            common.PublicKey // Collection Update authority
	Payer                          common.PublicKey // Payer of the transaction
	UpdateAuthority                common.PublicKey // Update Authority of Collection NFT and NFT
	CollectionMint                 common.PublicKey // Mint of the collection
	CollectionMetadata             common.PublicKey // Metadata account of the collection
	CollectionMasterEditionAccount common.PublicKey // MasterEdition2 Account of the Collection Token
	CollectionAuthorityRecord      common.PublicKey // Collection Authority Record PDA
}

SetAndVerifyCollectionParam is the params for SetAndVerifyCollection instruction.

type SetAndVerifySizedCollectionItemParam

type SetAndVerifySizedCollectionItemParam struct {
	Metadata                       common.PublicKey // Metadata account
	CollectionAuthority            common.PublicKey // Collection Update authority
	Payer                          common.PublicKey // Payer of the transaction
	UpdateAuthority                common.PublicKey // Update Authority of Collection NFT and NFT
	CollectionMint                 common.PublicKey // Mint of the collection
	CollectionMetadata             common.PublicKey // Metadata account of the collection
	CollectionMasterEditionAccount common.PublicKey // MasterEdition2 Account of the Collection Token
	CollectionAuthorityRecord      common.PublicKey // Collection Authority Record PDA
}

SetAndVerifySizedCollectionItemParam is the params for SetAndVerifySizedCollectionItem instruction.

type SetCollectionSizeParam

type SetCollectionSizeParam struct {
	CollectionMetadata        common.PublicKey // Collection Metadata account
	CollectionAuthority       common.PublicKey // Collection Update Authority
	CollectionMint            common.PublicKey // Mint of the Collection
	CollectionAuthorityRecord common.PublicKey // Collection Authority Record PDA
	Size                      uint64           // Size of the Collection
}

SetCollectionSizeParam is the params for SetCollectionSize instruction.

type SetTokenStandardParam

type SetTokenStandardParam struct {
	Metadata        common.PublicKey // Metadata account
	UpdateAuthority common.PublicKey // Update Authority
	Mint            common.PublicKey // Mint of the NFT
	Edition         common.PublicKey // Edition account of the NFT
}

SetTokenStandardParam is the params for SetTokenStandard instruction.

type SignMetadataParam

type SignMetadataParam struct {
	Metadata common.PublicKey
	Creator  common.PublicKey
}

type ThawDelegatedAccountParam

type ThawDelegatedAccountParam struct {
	Delegate     common.PublicKey // Delegate
	TokenAccount common.PublicKey // Token Account to freeze
	Edition      common.PublicKey // Edition
	Mint         common.PublicKey // Mint of the NFT
}

ThawDelegatedAccountParam is the params for ThawDelegatedAccount instruction.

type TokenDelegateRole

type TokenDelegateRole borsh.Enum

TokenDelegateRole represents the different delegates types. There are six different values and instrution are restricted depending on the token delegate role and token state values.

const (
	TokenDelegateRoleNone TokenDelegateRole = iota
	TokenDelegateRoleSale
	TokenDelegateRoleTransfer
	TokenDelegateRoleLockedTransfer
	TokenDelegateRoleUtility
	TokenDelegateRoleStaking
	TokenDelegateRoleMigration
	TokenDelegateRoleStandard
)

type TokenStandard

type TokenStandard borsh.Enum
const (
	NonFungible TokenStandard = iota
	FungibleAsset
	Fungible
	NonFungibleEdition
	ProgrammableNonFungible
)

type TokenState

type TokenState borsh.Enum
const (
	TokenStateUninitialized TokenState = iota
	TokenStateOwnerTransfer
	TokenStateDelegateTransfer
	TokenStateOwnerBurn
	TokenStateDelegateBurn
	TokenStateOwnerRevoke
	TokenStateOwnerApprove
	TokenStateOwnerUnlock
	TokenStateDelegateUnlock
	TokenStateOwnerLock
	TokenStateDelegateLock
	TokenStateMint
)

type UnverifyCollectionParam

type UnverifyCollectionParam struct {
	Metadata                       common.PublicKey // Metadata account
	CollectionAuthority            common.PublicKey // Collection Update authority
	CollectionMint                 common.PublicKey // Mint of the collection
	CollectionMetadata             common.PublicKey // Metadata account of the collection
	CollectionMasterEditionAccount common.PublicKey // MasterEdition2 Account of the Collection Token
	CollectionAuthorityRecord      common.PublicKey // Collection Authority Record PDA
}

UnverifyCollectionParam is the params for UnverifyCollection instruction.

type UnverifySizedCollectionItemParam

type UnverifySizedCollectionItemParam struct {
	Metadata                       common.PublicKey // Metadata account
	CollectionAuthority            common.PublicKey // Collection Update authority
	Payer                          common.PublicKey // Payer of the transaction
	CollectionMint                 common.PublicKey // Mint of the collection
	CollectionMetadata             common.PublicKey // Metadata account of the collection
	CollectionMasterEditionAccount common.PublicKey // MasterEdition2 Account of the Collection Token
	CollectionAuthorityRecord      common.PublicKey // Collection Authority Record PDA
}

UnverifySizedCollectionItemParam is the params for UnverifySizedCollectionItem instruction.

type UpdateMetadataAccountParam

type UpdateMetadataAccountParam struct {
	MetadataAccount     common.PublicKey
	UpdateAuthority     common.PublicKey
	Data                *Data
	NewUpdateAuthority  *common.PublicKey
	PrimarySaleHappened *bool
}

type UpdateMetadataAccountV2Param

type UpdateMetadataAccountV2Param struct {
	MetadataAccount     common.PublicKey // Metadata account
	UpdateAuthority     common.PublicKey // Update authority key
	Data                *DataV2
	NewUpdateAuthority  *common.PublicKey
	PrimarySaleHappened *bool
	IsMutable           *bool
}

type UpdatePrimarySaleHappenedViaTokenParam

type UpdatePrimarySaleHappenedViaTokenParam struct {
	Metadata common.PublicKey // Metadata key (pda of ['metadata', program id, mint id])
	Owner    common.PublicKey // Owner on the token account
	Token    common.PublicKey // Account containing tokens from the metadata's mint
}

type UseAuthorityRecord

type UseAuthorityRecord struct {
	Key         Key
	AllowedUses uint64
	Bump        *uint8
}

type UseMethod

type UseMethod borsh.Enum
const (
	Burn UseMethod = iota
	Multiple
	Single
)

type Uses

type Uses struct {
	UseMethod UseMethod
	Remaining uint64
	Total     uint64
}

type UtilizeParam

type UtilizeParam struct {
	Metadata           common.PublicKey // Metadata account of the NFT
	TokenAccount       common.PublicKey // Token account of the NFT
	Mint               common.PublicKey // Mint of the NFT
	UseAuthority       common.PublicKey // A Use Authority / Can be the current Owner of the NFT
	Owner              common.PublicKey // Owner of the NFT
	UseAuthorityRecord common.PublicKey // Use Authority Record PDA If present the program Assumes a delegated use authority
	Burner             common.PublicKey // Program As Signer (Burner)
	NumberOfUses       uint64           // Number of times the NFT can be used
}

UtilizeParam is the params for Utilize instruction.

type VerifyCollectionParam

type VerifyCollectionParam struct {
	Metadata                       common.PublicKey // Metadata account
	CollectionAuthority            common.PublicKey // Collection Update authority
	Payer                          common.PublicKey // Payer of the transaction
	CollectionMint                 common.PublicKey // Mint of the collection
	CollectionMetadata             common.PublicKey // Metadata account of the collection
	CollectionMasterEditionAccount common.PublicKey // MasterEdition2 Account of the Collection Token
}

VerifyCollectionParam is the params for VerifyCollection instruction.

type VerifySizedCollectionItemParam

type VerifySizedCollectionItemParam struct {
	Metadata                       common.PublicKey // Metadata account
	CollectionAuthority            common.PublicKey // Collection Update authority
	Payer                          common.PublicKey // Payer of the transaction
	CollectionMint                 common.PublicKey // Mint of the collection
	CollectionMetadata             common.PublicKey // Metadata account of the collection
	CollectionMasterEditionAccount common.PublicKey // MasterEdition2 Account of the Collection Token
	CollectionAuthorityRecord      common.PublicKey // Collection Authority Record PDA
}

VerifySizedCollectionItemParam is the params for VerifySizedCollectionItem instruction.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL