tokenmeta

package
Version: v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: MIT Imports: 6 Imported by: 2

Documentation

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

func CreateMetadataAccount(param CreateMetadataAccountParam) 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

Types

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

type Instruction uint8
const (
	InstructionCreateMetadataAccount Instruction = iota
	InstructionUpdateMetadataAccunnt
	InstructionDeprecatedCreateMasterEdition
	InstructionDeprecatedMintNewEditionFromMasterEditionViaPrintingToken
	InstructionUpdatePrimarySaleHappenedViaToken
	InstructionDeprecatedSetReservationList
	InstructionDeprecatedCreateReservationList
	InstructionSignMetadata
	InstructionDeprecatedMintPrintingTokensViaToken
	InstructionDeprecatedMintPrintingTokens
	InstructionCreateMasterEdition
	InstructionMintNewEditionFromMasterEditionViaToken
	InstructionConvertMasterEditionV1ToV2
	InstructionMintNewEditionFromMasterEditionViaVaultProxy
	InstructionPuffMetadata
)

type Key

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

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
}

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
}

Jump to

Keyboard shortcuts

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