Documentation ¶
Index ¶
- Constants
- Variables
- func Clean(str string) string
- func DeriveMetadataPublicKey(programID, mint solana.PublicKey) (solana.PublicKey, error)
- type AccountListable
- type Collection
- type CreateMetadataAccount
- type CreateMetadataAccountAccounts
- type Creator
- type Data
- type DataV2
- type InstType
- type Instruction
- func NewCreateMetadataAccountInstruction(programID solana.PublicKey, data Data, isMutable bool, ...) *Instruction
- func NewInstruction(programId solana.PublicKey, impl interface{}) *Instruction
- func NewUpdateMetadataAccountV1Instruction(programID solana.PublicKey, data *Data, updateAuthority *solana.PublicKey, ...) *Instruction
- func NewUpdateMetadataAccountV2Instruction(programID solana.PublicKey, data *DataV2, updateAuthority *solana.PublicKey, ...) *Instruction
- type Key
- type Metadata
- type TokenStandard
- type UpdateMetadataAccountV1Accounts
- type UpdateMetadataAccountV2Accounts
- type UpdateMetadataV1Account
- type UpdateMetadataV2Account
- type UseMethod
- type Uses
Constants ¶
View Source
const ( Uninitialized = iota EditionV1 MasterEditionV1 ReservationListV1 MetadataV1 ReservationListV2 MasterEditionV2 EditionMarker )
View Source
const ( Burn = iota Multiple Single )
View Source
const ( NonFungible = iota FungibleAsset Fungible NonFungibleEdition )
Variables ¶
View Source
var METADATA_REPLACE = regexp.MustCompile("\u0000")
View Source
var PROGRAM_ID = solana.MustPublicKeyFromBase58("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s")
Functions ¶
func DeriveMetadataPublicKey ¶
func DeriveMetadataPublicKey(programID, mint solana.PublicKey) (solana.PublicKey, error)
Types ¶
type AccountListable ¶
type AccountListable interface {
ListAccounts() []*solana.AccountMeta
}
type Collection ¶
type Collection struct { Verified bool Key solana.PublicKey }
type CreateMetadataAccount ¶
type CreateMetadataAccount struct { Instruction InstType Data Data IsMutable bool Accounts *CreateMetadataAccountAccounts `borsh_skip:"true"` }
func (CreateMetadataAccount) ListAccounts ¶
func (i CreateMetadataAccount) ListAccounts() []*solana.AccountMeta
type CreateMetadataAccountAccounts ¶
type CreateMetadataAccountAccounts struct { Metadata *solana.AccountMeta Mint *solana.AccountMeta MintAuthority *solana.AccountMeta Payer *solana.AccountMeta UpdateAuthority *solana.AccountMeta SystemProgram *solana.AccountMeta RentProgram *solana.AccountMeta }
/ Create Metadata object. / 0. `[writable]` Metadata key (pda of ['metadata', program id, mint id]) / 1. `[]` Mint of token asset / 2. `[signer]` Mint authority / 3. `[signer]` payer / 4. `[]` update authority info / 5. `[]` System program / 6. `[]` Rent info
type InstType ¶
type InstType uint8
const ( CreateMetadataAccountV1Inst InstType = iota UpdateMetadataAccountV1Inst DeprecatedCreateMasterEditionInst DeprecatedMintNewEditionFromMasterEditionViaPrintingTokenInst UpdatePrimarySaleHappenedViaTokenInst DeprecatedSetReservationListInst DeprecatedCreateReservationListInst SignMetadataInst DeprecatedMintPrintingTokensViaTokenInst DeprecatedMintPrintingTokensInst CreateMasterEditionInst MintNewEditionFromMasterEditionViaTokenInst ConvertMasterEditionV1ToV2Inst MintNewEditionFromMasterEditionViaVaultProxyInst PuffMetadataInst UpdateMetadataAccountV2Inst CreateMetadataAccountV2Inst CreateMasterEditionV3Inst VerifyCollectionInst UtilizeInst ApproveUseAuthorityInst RevokeUseAuthorityInst UnverifyCollectionInst ApproveCollectionAuthorityInst RevokeCollectionAuthorityInst )
type Instruction ¶
type Instruction struct { Impl interface{} // contains filtered or unexported fields }
func NewCreateMetadataAccountInstruction ¶
func NewCreateMetadataAccountInstruction( programID solana.PublicKey, data Data, isMutable bool, metadata, mint, mintAuthority, payer, updateAuthority solana.PublicKey, ) *Instruction
func NewInstruction ¶
func NewInstruction(programId solana.PublicKey, impl interface{}) *Instruction
func NewUpdateMetadataAccountV1Instruction ¶
func NewUpdateMetadataAccountV1Instruction( programID solana.PublicKey, data *Data, updateAuthority *solana.PublicKey, primarySaleHappened *bool, metadata solana.PublicKey, updateAuthorityKey solana.PublicKey, ) *Instruction
func NewUpdateMetadataAccountV2Instruction ¶
func NewUpdateMetadataAccountV2Instruction( programID solana.PublicKey, data *DataV2, updateAuthority *solana.PublicKey, primarySaleHappened *bool, isMutable *bool, metadata solana.PublicKey, updateAuthorityKey solana.PublicKey, ) *Instruction
func (*Instruction) Accounts ¶
func (i *Instruction) Accounts() (out []*solana.AccountMeta)
func (*Instruction) Data ¶
func (i *Instruction) Data() ([]byte, error)
func (*Instruction) ProgramID ¶
func (i *Instruction) ProgramID() solana.PublicKey
type Metadata ¶
type Metadata struct { Key Key UpdateAuthority solana.PublicKey Mint solana.PublicKey Data Data PrimarySaleHappened bool IsMutable bool EditionNonce *uint8 `bin:"optional"` TokenStandard *TokenStandard `bin:"optional"` Collection *Collection `bin:"optional"` Uses *Uses `bin:"optional"` }
type TokenStandard ¶
type TokenStandard borsh.Enum
type UpdateMetadataAccountV1Accounts ¶
type UpdateMetadataAccountV1Accounts struct { Metadata *solana.AccountMeta UpdateAuthorityKey *solana.AccountMeta }
/ Update a Metadata / 0. `[writable]` Metadata account / 1. `[signer]` Update authority key
type UpdateMetadataAccountV2Accounts ¶
type UpdateMetadataAccountV2Accounts struct { Metadata *solana.AccountMeta UpdateAuthorityKey *solana.AccountMeta }
type UpdateMetadataV1Account ¶
type UpdateMetadataV1Account struct { Instruction InstType Data *Data UpdateAuthority *solana.PublicKey PrimarySaleHappened *bool Accounts *UpdateMetadataAccountV1Accounts `borsh_skip:"true"` }
func (UpdateMetadataV1Account) ListAccounts ¶
func (i UpdateMetadataV1Account) ListAccounts() []*solana.AccountMeta
type UpdateMetadataV2Account ¶
type UpdateMetadataV2Account struct { Instruction InstType Data *DataV2 UpdateAuthority *solana.PublicKey PrimarySaleHappened *bool IsMutable *bool Accounts *UpdateMetadataAccountV2Accounts `borsh_skip:"true"` }
func (UpdateMetadataV2Account) ListAccounts ¶
func (i UpdateMetadataV2Account) ListAccounts() []*solana.AccountMeta
Click to show internal directories.
Click to hide internal directories.