tokenmeta

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Deprecated: please use github.com/portto/solana-go-sdk/program/metaplex/token_metadata

Index

Constants

View Source
const EDITION_MARKER_BIT_SIZE uint64 = 248

Variables

This section is empty.

Functions

func CreateMasterEdition added in v1.11.0

func CreateMasterEdition(param CreateMasterEditionParam) types.Instruction

func CreateMasterEditionV3 added in v1.15.0

func CreateMasterEditionV3(param CreateMasterEditionParam) types.Instruction

func CreateMetadataAccount added in v1.9.0

func CreateMetadataAccount(param CreateMetadataAccountParam) types.Instruction

func CreateMetadataAccountV2 added in v1.15.0

func CreateMetadataAccountV2(param CreateMetadataAccountV2Param) types.Instruction

func GetEditionMark added in v1.11.0

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

func GetMasterEdition added in v1.11.0

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

func GetTokenMetaPubkey

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

func MintNewEditionFromMasterEditionViaToken added in v1.11.0

func MintNewEditionFromMasterEditionViaToken(param MintNewEditionFromMasterEditionViaTokeParam) types.Instruction

func SignMetadata added in v1.15.0

func SignMetadata(param SignMetadataParam) types.Instruction

func UpdateMetadataAccount added in v1.15.0

func UpdateMetadataAccount(param UpdateMetadataAccountParam) types.Instruction

Types

type Collection added in v1.15.0

type Collection struct {
	Verified bool
	Key      common.PublicKey
}

type CollectionDetails added in v1.19.0

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

type CollectionDetailsV1 added in v1.19.0

type CollectionDetailsV1 struct {
	Size uint64
}

type CreateMasterEditionParam added in v1.11.0

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 added in v1.15.0

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 added in v1.9.0

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 added in v1.15.0

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 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 added in v1.15.0

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

type Instruction added in v1.9.0

type Instruction uint8
const (
	InstructionCreateMetadataAccount Instruction = iota
	InstructionUpdateMetadataAccount
	InstructionDeprecatedCreateMasterEdition
	InstructionDeprecatedMintNewEditionFromMasterEditionViaPrintingToken
	InstructionUpdatePrimarySaleHappenedViaToken
	InstructionDeprecatedSetReservationList
	InstructionDeprecatedCreateReservationList
	InstructionSignMetadata
	InstructionDeprecatedMintPrintingTokensViaToken
	InstructionDeprecatedMintPrintingTokens
	InstructionCreateMasterEdition
	InstructionMintNewEditionFromMasterEditionViaToken
	InstructionConvertMasterEditionV1ToV2
	InstructionMintNewEditionFromMasterEditionViaVaultProxy
	InstructionPuffMetadata
	InstructionUpdateMetadataAccountV2
	InstructionCreateMetadataAccountV2
	InstructionCreateMasterEditionV3
	InstructionVerifyCollection
	InstructionUtilize
	InstructionApproveUseAuthority
	InstructionRevokeUseAuthority
	InstructionUnverifyCollection
	InstructionApproveCollectionAuthority
	InstructionRevokeCollectionAuthority
	InstructionSetAndVerifyCollection
	InstructionFreezeDelegatedAccount
	InstructionThawDelegatedAccount
	InstructionRemoveCreatorVerification
)

type Key

type Key borsh.Enum
const (
	KeyUninitialized Key = iota
	KeyEditionV1
	KeyMasterEditionV1
	KeyReservationListV1
	KeyMetadataV1
	KeyReservationListV2
	KeyMasterEditionV2
	KeyEditionMarker
	KeyUseAuthorityRecord
	KeyCollectionAuthorityRecord
)

type MasterEditionV2 added in v1.11.0

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 MintNewEditionFromMasterEditionViaTokeParam added in v1.11.0

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 SignMetadataParam added in v1.15.0

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

type TokenStandard added in v1.17.0

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

type UpdateMetadataAccountParam added in v1.15.0

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

type UseMethod added in v1.15.0

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

type Uses added in v1.15.0

type Uses struct {
	UseMethod UseMethod
	Remaining uint64
	Total     uint64
}

Jump to

Keyboard shortcuts

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