nft_candy_machine

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ProgramName = "NftCandyMachine"

Variables

View Source
var (
	Instruction_MintNft = ag_binary.TypeID([8]byte{211, 57, 6, 167, 15, 219, 35, 251})

	Instruction_UpdateCandyMachine = ag_binary.TypeID([8]byte{243, 251, 124, 156, 211, 211, 118, 239})

	Instruction_InitializeConfig = ag_binary.TypeID([8]byte{208, 127, 21, 1, 194, 190, 196, 70})

	Instruction_AddConfigLines = ag_binary.TypeID([8]byte{223, 50, 224, 227, 151, 8, 115, 106})

	Instruction_InitializeCandyMachine = ag_binary.TypeID([8]byte{142, 137, 167, 107, 47, 39, 240, 124})

	Instruction_UpdateAuthority = ag_binary.TypeID([8]byte{32, 46, 64, 28, 149, 75, 243, 88})

	Instruction_WithdrawFunds = ag_binary.TypeID([8]byte{241, 36, 29, 111, 208, 31, 104, 217})
)
View Source
var CandyMachineDiscriminator = [8]byte{51, 173, 177, 113, 25, 241, 109, 189}
View Source
var ConfigDiscriminator = [8]byte{155, 12, 170, 224, 30, 250, 204, 130}
View Source
var InstructionImplDef = ag_binary.NewVariantDefinition(
	ag_binary.AnchorTypeIDEncoding,
	[]ag_binary.VariantType{
		{
			"mint_nft", (*MintNft)(nil),
		},
		{
			"update_candy_machine", (*UpdateCandyMachine)(nil),
		},
		{
			"initialize_config", (*InitializeConfig)(nil),
		},
		{
			"add_config_lines", (*AddConfigLines)(nil),
		},
		{
			"initialize_candy_machine", (*InitializeCandyMachine)(nil),
		},
		{
			"update_authority", (*UpdateAuthority)(nil),
		},
		{
			"withdraw_funds", (*WithdrawFunds)(nil),
		},
	},
)

Functions

func InstructionIDToName

func InstructionIDToName(id ag_binary.TypeID) string

InstructionIDToName returns the name of the instruction given its ID.

func SetProgramID

func SetProgramID(pubkey ag_solanago.PublicKey)

Types

type AddConfigLines

type AddConfigLines struct {
	Index       *uint32
	ConfigLines *[]ConfigLine

	// [0] = [WRITE] config
	//
	// [1] = [SIGNER] authority
	ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}

AddConfigLines is the `addConfigLines` instruction.

func NewAddConfigLinesInstruction

func NewAddConfigLinesInstruction(

	index uint32,
	configLines []ConfigLine,

	config ag_solanago.PublicKey,
	authority ag_solanago.PublicKey) *AddConfigLines

NewAddConfigLinesInstruction declares a new AddConfigLines instruction with the provided parameters and accounts.

func NewAddConfigLinesInstructionBuilder

func NewAddConfigLinesInstructionBuilder() *AddConfigLines

NewAddConfigLinesInstructionBuilder creates a new `AddConfigLines` instruction builder.

func (AddConfigLines) Build

func (inst AddConfigLines) Build() *Instruction

func (*AddConfigLines) EncodeToTree

func (inst *AddConfigLines) EncodeToTree(parent ag_treeout.Branches)

func (*AddConfigLines) GetAuthorityAccount

func (inst *AddConfigLines) GetAuthorityAccount() *ag_solanago.AccountMeta

GetAuthorityAccount gets the "authority" account.

func (*AddConfigLines) GetConfigAccount

func (inst *AddConfigLines) GetConfigAccount() *ag_solanago.AccountMeta

GetConfigAccount gets the "config" account.

func (AddConfigLines) MarshalWithEncoder

func (obj AddConfigLines) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*AddConfigLines) SetAuthorityAccount

func (inst *AddConfigLines) SetAuthorityAccount(authority ag_solanago.PublicKey) *AddConfigLines

SetAuthorityAccount sets the "authority" account.

func (*AddConfigLines) SetConfigAccount

func (inst *AddConfigLines) SetConfigAccount(config ag_solanago.PublicKey) *AddConfigLines

SetConfigAccount sets the "config" account.

func (*AddConfigLines) SetConfigLines

func (inst *AddConfigLines) SetConfigLines(configLines []ConfigLine) *AddConfigLines

SetConfigLines sets the "configLines" parameter.

func (*AddConfigLines) SetIndex

func (inst *AddConfigLines) SetIndex(index uint32) *AddConfigLines

SetIndex sets the "index" parameter.

func (*AddConfigLines) UnmarshalWithDecoder

func (obj *AddConfigLines) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*AddConfigLines) Validate

func (inst *AddConfigLines) Validate() error

func (AddConfigLines) ValidateAndBuild

func (inst AddConfigLines) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type CandyMachine

type CandyMachine struct {
	Authority     ag_solanago.PublicKey
	Wallet        ag_solanago.PublicKey
	TokenMint     *ag_solanago.PublicKey `bin:"optional"`
	Config        ag_solanago.PublicKey
	Data          CandyMachineData
	ItemsRedeemed uint64
	Bump          uint8
}

func (CandyMachine) MarshalWithEncoder

func (obj CandyMachine) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*CandyMachine) UnmarshalWithDecoder

func (obj *CandyMachine) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type CandyMachineData

type CandyMachineData struct {
	Uuid           string
	Price          uint64
	ItemsAvailable uint64
	GoLiveDate     *int64 `bin:"optional"`
}

func (CandyMachineData) MarshalWithEncoder

func (obj CandyMachineData) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*CandyMachineData) UnmarshalWithDecoder

func (obj *CandyMachineData) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type Config

type Config struct {
	Authority ag_solanago.PublicKey
	Data      ConfigData
}

func (Config) MarshalWithEncoder

func (obj Config) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*Config) UnmarshalWithDecoder

func (obj *Config) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type ConfigData

type ConfigData struct {
	Uuid                 string
	Symbol               string
	SellerFeeBasisPoints uint16
	Creators             []Creator
	MaxSupply            uint64
	IsMutable            bool
	RetainAuthority      bool
	MaxNumberOfLines     uint32
}

func (ConfigData) MarshalWithEncoder

func (obj ConfigData) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*ConfigData) UnmarshalWithDecoder

func (obj *ConfigData) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type ConfigLine

type ConfigLine struct {
	Name string
	Uri  string
}

func (ConfigLine) MarshalWithEncoder

func (obj ConfigLine) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*ConfigLine) UnmarshalWithDecoder

func (obj *ConfigLine) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type Creator

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

func (Creator) MarshalWithEncoder

func (obj Creator) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*Creator) UnmarshalWithDecoder

func (obj *Creator) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type InitializeCandyMachine

type InitializeCandyMachine struct {
	Bump *uint8
	Data *CandyMachineData

	// [0] = [WRITE] candyMachine
	//
	// [1] = [] wallet
	//
	// [2] = [] config
	//
	// [3] = [SIGNER] authority
	//
	// [4] = [WRITE, SIGNER] payer
	//
	// [5] = [] systemProgram
	//
	// [6] = [] rent
	ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}

InitializeCandyMachine is the `initializeCandyMachine` instruction.

func NewInitializeCandyMachineInstruction

func NewInitializeCandyMachineInstruction(

	bump uint8,
	data CandyMachineData,

	candyMachine ag_solanago.PublicKey,
	wallet ag_solanago.PublicKey,
	config ag_solanago.PublicKey,
	authority ag_solanago.PublicKey,
	payer ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey,
	rent ag_solanago.PublicKey) *InitializeCandyMachine

NewInitializeCandyMachineInstruction declares a new InitializeCandyMachine instruction with the provided parameters and accounts.

func NewInitializeCandyMachineInstructionBuilder

func NewInitializeCandyMachineInstructionBuilder() *InitializeCandyMachine

NewInitializeCandyMachineInstructionBuilder creates a new `InitializeCandyMachine` instruction builder.

func (InitializeCandyMachine) Build

func (inst InitializeCandyMachine) Build() *Instruction

func (*InitializeCandyMachine) EncodeToTree

func (inst *InitializeCandyMachine) EncodeToTree(parent ag_treeout.Branches)

func (*InitializeCandyMachine) GetAuthorityAccount

func (inst *InitializeCandyMachine) GetAuthorityAccount() *ag_solanago.AccountMeta

GetAuthorityAccount gets the "authority" account.

func (*InitializeCandyMachine) GetCandyMachineAccount

func (inst *InitializeCandyMachine) GetCandyMachineAccount() *ag_solanago.AccountMeta

GetCandyMachineAccount gets the "candyMachine" account.

func (*InitializeCandyMachine) GetConfigAccount

func (inst *InitializeCandyMachine) GetConfigAccount() *ag_solanago.AccountMeta

GetConfigAccount gets the "config" account.

func (*InitializeCandyMachine) GetPayerAccount

func (inst *InitializeCandyMachine) GetPayerAccount() *ag_solanago.AccountMeta

GetPayerAccount gets the "payer" account.

func (*InitializeCandyMachine) GetRentAccount

func (inst *InitializeCandyMachine) GetRentAccount() *ag_solanago.AccountMeta

GetRentAccount gets the "rent" account.

func (*InitializeCandyMachine) GetSystemProgramAccount

func (inst *InitializeCandyMachine) GetSystemProgramAccount() *ag_solanago.AccountMeta

GetSystemProgramAccount gets the "systemProgram" account.

func (*InitializeCandyMachine) GetWalletAccount

func (inst *InitializeCandyMachine) GetWalletAccount() *ag_solanago.AccountMeta

GetWalletAccount gets the "wallet" account.

func (InitializeCandyMachine) MarshalWithEncoder

func (obj InitializeCandyMachine) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*InitializeCandyMachine) SetAuthorityAccount

func (inst *InitializeCandyMachine) SetAuthorityAccount(authority ag_solanago.PublicKey) *InitializeCandyMachine

SetAuthorityAccount sets the "authority" account.

func (*InitializeCandyMachine) SetBump

SetBump sets the "bump" parameter.

func (*InitializeCandyMachine) SetCandyMachineAccount

func (inst *InitializeCandyMachine) SetCandyMachineAccount(candyMachine ag_solanago.PublicKey) *InitializeCandyMachine

SetCandyMachineAccount sets the "candyMachine" account.

func (*InitializeCandyMachine) SetConfigAccount

func (inst *InitializeCandyMachine) SetConfigAccount(config ag_solanago.PublicKey) *InitializeCandyMachine

SetConfigAccount sets the "config" account.

func (*InitializeCandyMachine) SetData

SetData sets the "data" parameter.

func (*InitializeCandyMachine) SetPayerAccount

SetPayerAccount sets the "payer" account.

func (*InitializeCandyMachine) SetRentAccount

SetRentAccount sets the "rent" account.

func (*InitializeCandyMachine) SetSystemProgramAccount

func (inst *InitializeCandyMachine) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *InitializeCandyMachine

SetSystemProgramAccount sets the "systemProgram" account.

func (*InitializeCandyMachine) SetWalletAccount

func (inst *InitializeCandyMachine) SetWalletAccount(wallet ag_solanago.PublicKey) *InitializeCandyMachine

SetWalletAccount sets the "wallet" account.

func (*InitializeCandyMachine) UnmarshalWithDecoder

func (obj *InitializeCandyMachine) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*InitializeCandyMachine) Validate

func (inst *InitializeCandyMachine) Validate() error

func (InitializeCandyMachine) ValidateAndBuild

func (inst InitializeCandyMachine) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializeConfig

type InitializeConfig struct {
	Data *ConfigData

	// [0] = [WRITE] config
	//
	// [1] = [] authority
	//
	// [2] = [WRITE, SIGNER] payer
	//
	// [3] = [] rent
	ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}

InitializeConfig is the `initializeConfig` instruction.

func NewInitializeConfigInstruction

func NewInitializeConfigInstruction(

	data ConfigData,

	config ag_solanago.PublicKey,
	authority ag_solanago.PublicKey,
	payer ag_solanago.PublicKey,
	rent ag_solanago.PublicKey) *InitializeConfig

NewInitializeConfigInstruction declares a new InitializeConfig instruction with the provided parameters and accounts.

func NewInitializeConfigInstructionBuilder

func NewInitializeConfigInstructionBuilder() *InitializeConfig

NewInitializeConfigInstructionBuilder creates a new `InitializeConfig` instruction builder.

func (InitializeConfig) Build

func (inst InitializeConfig) Build() *Instruction

func (*InitializeConfig) EncodeToTree

func (inst *InitializeConfig) EncodeToTree(parent ag_treeout.Branches)

func (*InitializeConfig) GetAuthorityAccount

func (inst *InitializeConfig) GetAuthorityAccount() *ag_solanago.AccountMeta

GetAuthorityAccount gets the "authority" account.

func (*InitializeConfig) GetConfigAccount

func (inst *InitializeConfig) GetConfigAccount() *ag_solanago.AccountMeta

GetConfigAccount gets the "config" account.

func (*InitializeConfig) GetPayerAccount

func (inst *InitializeConfig) GetPayerAccount() *ag_solanago.AccountMeta

GetPayerAccount gets the "payer" account.

func (*InitializeConfig) GetRentAccount

func (inst *InitializeConfig) GetRentAccount() *ag_solanago.AccountMeta

GetRentAccount gets the "rent" account.

func (InitializeConfig) MarshalWithEncoder

func (obj InitializeConfig) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*InitializeConfig) SetAuthorityAccount

func (inst *InitializeConfig) SetAuthorityAccount(authority ag_solanago.PublicKey) *InitializeConfig

SetAuthorityAccount sets the "authority" account.

func (*InitializeConfig) SetConfigAccount

func (inst *InitializeConfig) SetConfigAccount(config ag_solanago.PublicKey) *InitializeConfig

SetConfigAccount sets the "config" account.

func (*InitializeConfig) SetData

func (inst *InitializeConfig) SetData(data ConfigData) *InitializeConfig

SetData sets the "data" parameter.

func (*InitializeConfig) SetPayerAccount

func (inst *InitializeConfig) SetPayerAccount(payer ag_solanago.PublicKey) *InitializeConfig

SetPayerAccount sets the "payer" account.

func (*InitializeConfig) SetRentAccount

func (inst *InitializeConfig) SetRentAccount(rent ag_solanago.PublicKey) *InitializeConfig

SetRentAccount sets the "rent" account.

func (*InitializeConfig) UnmarshalWithDecoder

func (obj *InitializeConfig) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*InitializeConfig) Validate

func (inst *InitializeConfig) Validate() error

func (InitializeConfig) ValidateAndBuild

func (inst InitializeConfig) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type Instruction

type Instruction struct {
	ag_binary.BaseVariant
}

func DecodeInstruction

func DecodeInstruction(accounts []*ag_solanago.AccountMeta, data []byte) (*Instruction, error)

func (*Instruction) Accounts

func (inst *Instruction) Accounts() (out []*ag_solanago.AccountMeta)

func (*Instruction) Data

func (inst *Instruction) Data() ([]byte, error)

func (*Instruction) EncodeToTree

func (inst *Instruction) EncodeToTree(parent ag_treeout.Branches)

func (*Instruction) MarshalWithEncoder

func (inst *Instruction) MarshalWithEncoder(encoder *ag_binary.Encoder) error

func (*Instruction) ProgramID

func (inst *Instruction) ProgramID() ag_solanago.PublicKey

func (*Instruction) TextEncode

func (inst *Instruction) TextEncode(encoder *ag_text.Encoder, option *ag_text.Option) error

func (*Instruction) UnmarshalWithDecoder

func (inst *Instruction) UnmarshalWithDecoder(decoder *ag_binary.Decoder) error

type MintNft

type MintNft struct {

	// [0] = [] config
	//
	// [1] = [WRITE] candyMachine
	//
	// [2] = [WRITE, SIGNER] payer
	//
	// [3] = [WRITE] wallet
	//
	// [4] = [WRITE] metadata
	//
	// [5] = [WRITE] mint
	//
	// [6] = [SIGNER] mintAuthority
	//
	// [7] = [SIGNER] updateAuthority
	//
	// [8] = [WRITE] masterEdition
	//
	// [9] = [] tokenMetadataProgram
	//
	// [10] = [] tokenProgram
	//
	// [11] = [] systemProgram
	//
	// [12] = [] rent
	//
	// [13] = [] clock
	ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}

MintNft is the `mintNft` instruction.

func NewMintNftInstruction

func NewMintNftInstruction(

	config ag_solanago.PublicKey,
	candyMachine ag_solanago.PublicKey,
	payer ag_solanago.PublicKey,
	wallet ag_solanago.PublicKey,
	metadata ag_solanago.PublicKey,
	mint ag_solanago.PublicKey,
	mintAuthority ag_solanago.PublicKey,
	updateAuthority ag_solanago.PublicKey,
	masterEdition ag_solanago.PublicKey,
	tokenMetadataProgram ag_solanago.PublicKey,
	tokenProgram ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey,
	rent ag_solanago.PublicKey,
	clock ag_solanago.PublicKey) *MintNft

NewMintNftInstruction declares a new MintNft instruction with the provided parameters and accounts.

func NewMintNftInstructionBuilder

func NewMintNftInstructionBuilder() *MintNft

NewMintNftInstructionBuilder creates a new `MintNft` instruction builder.

func (MintNft) Build

func (inst MintNft) Build() *Instruction

func (*MintNft) EncodeToTree

func (inst *MintNft) EncodeToTree(parent ag_treeout.Branches)

func (*MintNft) GetCandyMachineAccount

func (inst *MintNft) GetCandyMachineAccount() *ag_solanago.AccountMeta

GetCandyMachineAccount gets the "candyMachine" account.

func (*MintNft) GetClockAccount

func (inst *MintNft) GetClockAccount() *ag_solanago.AccountMeta

GetClockAccount gets the "clock" account.

func (*MintNft) GetConfigAccount

func (inst *MintNft) GetConfigAccount() *ag_solanago.AccountMeta

GetConfigAccount gets the "config" account.

func (*MintNft) GetMasterEditionAccount

func (inst *MintNft) GetMasterEditionAccount() *ag_solanago.AccountMeta

GetMasterEditionAccount gets the "masterEdition" account.

func (*MintNft) GetMetadataAccount

func (inst *MintNft) GetMetadataAccount() *ag_solanago.AccountMeta

GetMetadataAccount gets the "metadata" account.

func (*MintNft) GetMintAccount

func (inst *MintNft) GetMintAccount() *ag_solanago.AccountMeta

GetMintAccount gets the "mint" account.

func (*MintNft) GetMintAuthorityAccount

func (inst *MintNft) GetMintAuthorityAccount() *ag_solanago.AccountMeta

GetMintAuthorityAccount gets the "mintAuthority" account.

func (*MintNft) GetPayerAccount

func (inst *MintNft) GetPayerAccount() *ag_solanago.AccountMeta

GetPayerAccount gets the "payer" account.

func (*MintNft) GetRentAccount

func (inst *MintNft) GetRentAccount() *ag_solanago.AccountMeta

GetRentAccount gets the "rent" account.

func (*MintNft) GetSystemProgramAccount

func (inst *MintNft) GetSystemProgramAccount() *ag_solanago.AccountMeta

GetSystemProgramAccount gets the "systemProgram" account.

func (*MintNft) GetTokenMetadataProgramAccount

func (inst *MintNft) GetTokenMetadataProgramAccount() *ag_solanago.AccountMeta

GetTokenMetadataProgramAccount gets the "tokenMetadataProgram" account.

func (*MintNft) GetTokenProgramAccount

func (inst *MintNft) GetTokenProgramAccount() *ag_solanago.AccountMeta

GetTokenProgramAccount gets the "tokenProgram" account.

func (*MintNft) GetUpdateAuthorityAccount

func (inst *MintNft) GetUpdateAuthorityAccount() *ag_solanago.AccountMeta

GetUpdateAuthorityAccount gets the "updateAuthority" account.

func (*MintNft) GetWalletAccount

func (inst *MintNft) GetWalletAccount() *ag_solanago.AccountMeta

GetWalletAccount gets the "wallet" account.

func (MintNft) MarshalWithEncoder

func (obj MintNft) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*MintNft) SetCandyMachineAccount

func (inst *MintNft) SetCandyMachineAccount(candyMachine ag_solanago.PublicKey) *MintNft

SetCandyMachineAccount sets the "candyMachine" account.

func (*MintNft) SetClockAccount

func (inst *MintNft) SetClockAccount(clock ag_solanago.PublicKey) *MintNft

SetClockAccount sets the "clock" account.

func (*MintNft) SetConfigAccount

func (inst *MintNft) SetConfigAccount(config ag_solanago.PublicKey) *MintNft

SetConfigAccount sets the "config" account.

func (*MintNft) SetMasterEditionAccount

func (inst *MintNft) SetMasterEditionAccount(masterEdition ag_solanago.PublicKey) *MintNft

SetMasterEditionAccount sets the "masterEdition" account.

func (*MintNft) SetMetadataAccount

func (inst *MintNft) SetMetadataAccount(metadata ag_solanago.PublicKey) *MintNft

SetMetadataAccount sets the "metadata" account.

func (*MintNft) SetMintAccount

func (inst *MintNft) SetMintAccount(mint ag_solanago.PublicKey) *MintNft

SetMintAccount sets the "mint" account.

func (*MintNft) SetMintAuthorityAccount

func (inst *MintNft) SetMintAuthorityAccount(mintAuthority ag_solanago.PublicKey) *MintNft

SetMintAuthorityAccount sets the "mintAuthority" account.

func (*MintNft) SetPayerAccount

func (inst *MintNft) SetPayerAccount(payer ag_solanago.PublicKey) *MintNft

SetPayerAccount sets the "payer" account.

func (*MintNft) SetRentAccount

func (inst *MintNft) SetRentAccount(rent ag_solanago.PublicKey) *MintNft

SetRentAccount sets the "rent" account.

func (*MintNft) SetSystemProgramAccount

func (inst *MintNft) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *MintNft

SetSystemProgramAccount sets the "systemProgram" account.

func (*MintNft) SetTokenMetadataProgramAccount

func (inst *MintNft) SetTokenMetadataProgramAccount(tokenMetadataProgram ag_solanago.PublicKey) *MintNft

SetTokenMetadataProgramAccount sets the "tokenMetadataProgram" account.

func (*MintNft) SetTokenProgramAccount

func (inst *MintNft) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *MintNft

SetTokenProgramAccount sets the "tokenProgram" account.

func (*MintNft) SetUpdateAuthorityAccount

func (inst *MintNft) SetUpdateAuthorityAccount(updateAuthority ag_solanago.PublicKey) *MintNft

SetUpdateAuthorityAccount sets the "updateAuthority" account.

func (*MintNft) SetWalletAccount

func (inst *MintNft) SetWalletAccount(wallet ag_solanago.PublicKey) *MintNft

SetWalletAccount sets the "wallet" account.

func (*MintNft) UnmarshalWithDecoder

func (obj *MintNft) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*MintNft) Validate

func (inst *MintNft) Validate() error

func (MintNft) ValidateAndBuild

func (inst MintNft) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type UpdateAuthority

type UpdateAuthority struct {
	NewAuthority *ag_solanago.PublicKey `bin:"optional"`

	// [0] = [WRITE] candyMachine
	//
	// [1] = [SIGNER] authority
	ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}

UpdateAuthority is the `updateAuthority` instruction.

func NewUpdateAuthorityInstruction

func NewUpdateAuthorityInstruction(

	newAuthority ag_solanago.PublicKey,

	candyMachine ag_solanago.PublicKey,
	authority ag_solanago.PublicKey) *UpdateAuthority

NewUpdateAuthorityInstruction declares a new UpdateAuthority instruction with the provided parameters and accounts.

func NewUpdateAuthorityInstructionBuilder

func NewUpdateAuthorityInstructionBuilder() *UpdateAuthority

NewUpdateAuthorityInstructionBuilder creates a new `UpdateAuthority` instruction builder.

func (UpdateAuthority) Build

func (inst UpdateAuthority) Build() *Instruction

func (*UpdateAuthority) EncodeToTree

func (inst *UpdateAuthority) EncodeToTree(parent ag_treeout.Branches)

func (*UpdateAuthority) GetAuthorityAccount

func (inst *UpdateAuthority) GetAuthorityAccount() *ag_solanago.AccountMeta

GetAuthorityAccount gets the "authority" account.

func (*UpdateAuthority) GetCandyMachineAccount

func (inst *UpdateAuthority) GetCandyMachineAccount() *ag_solanago.AccountMeta

GetCandyMachineAccount gets the "candyMachine" account.

func (UpdateAuthority) MarshalWithEncoder

func (obj UpdateAuthority) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*UpdateAuthority) SetAuthorityAccount

func (inst *UpdateAuthority) SetAuthorityAccount(authority ag_solanago.PublicKey) *UpdateAuthority

SetAuthorityAccount sets the "authority" account.

func (*UpdateAuthority) SetCandyMachineAccount

func (inst *UpdateAuthority) SetCandyMachineAccount(candyMachine ag_solanago.PublicKey) *UpdateAuthority

SetCandyMachineAccount sets the "candyMachine" account.

func (*UpdateAuthority) SetNewAuthority

func (inst *UpdateAuthority) SetNewAuthority(newAuthority ag_solanago.PublicKey) *UpdateAuthority

SetNewAuthority sets the "newAuthority" parameter.

func (*UpdateAuthority) UnmarshalWithDecoder

func (obj *UpdateAuthority) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*UpdateAuthority) Validate

func (inst *UpdateAuthority) Validate() error

func (UpdateAuthority) ValidateAndBuild

func (inst UpdateAuthority) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type UpdateCandyMachine

type UpdateCandyMachine struct {
	Price      *uint64 `bin:"optional"`
	GoLiveDate *int64  `bin:"optional"`

	// [0] = [WRITE] candyMachine
	//
	// [1] = [SIGNER] authority
	ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}

UpdateCandyMachine is the `updateCandyMachine` instruction.

func NewUpdateCandyMachineInstruction

func NewUpdateCandyMachineInstruction(

	price uint64,
	goLiveDate int64,

	candyMachine ag_solanago.PublicKey,
	authority ag_solanago.PublicKey) *UpdateCandyMachine

NewUpdateCandyMachineInstruction declares a new UpdateCandyMachine instruction with the provided parameters and accounts.

func NewUpdateCandyMachineInstructionBuilder

func NewUpdateCandyMachineInstructionBuilder() *UpdateCandyMachine

NewUpdateCandyMachineInstructionBuilder creates a new `UpdateCandyMachine` instruction builder.

func (UpdateCandyMachine) Build

func (inst UpdateCandyMachine) Build() *Instruction

func (*UpdateCandyMachine) EncodeToTree

func (inst *UpdateCandyMachine) EncodeToTree(parent ag_treeout.Branches)

func (*UpdateCandyMachine) GetAuthorityAccount

func (inst *UpdateCandyMachine) GetAuthorityAccount() *ag_solanago.AccountMeta

GetAuthorityAccount gets the "authority" account.

func (*UpdateCandyMachine) GetCandyMachineAccount

func (inst *UpdateCandyMachine) GetCandyMachineAccount() *ag_solanago.AccountMeta

GetCandyMachineAccount gets the "candyMachine" account.

func (UpdateCandyMachine) MarshalWithEncoder

func (obj UpdateCandyMachine) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*UpdateCandyMachine) SetAuthorityAccount

func (inst *UpdateCandyMachine) SetAuthorityAccount(authority ag_solanago.PublicKey) *UpdateCandyMachine

SetAuthorityAccount sets the "authority" account.

func (*UpdateCandyMachine) SetCandyMachineAccount

func (inst *UpdateCandyMachine) SetCandyMachineAccount(candyMachine ag_solanago.PublicKey) *UpdateCandyMachine

SetCandyMachineAccount sets the "candyMachine" account.

func (*UpdateCandyMachine) SetGoLiveDate

func (inst *UpdateCandyMachine) SetGoLiveDate(goLiveDate int64) *UpdateCandyMachine

SetGoLiveDate sets the "goLiveDate" parameter.

func (*UpdateCandyMachine) SetPrice

func (inst *UpdateCandyMachine) SetPrice(price uint64) *UpdateCandyMachine

SetPrice sets the "price" parameter.

func (*UpdateCandyMachine) UnmarshalWithDecoder

func (obj *UpdateCandyMachine) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*UpdateCandyMachine) Validate

func (inst *UpdateCandyMachine) Validate() error

func (UpdateCandyMachine) ValidateAndBuild

func (inst UpdateCandyMachine) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type WithdrawFunds

type WithdrawFunds struct {

	// [0] = [WRITE] config
	//
	// [1] = [SIGNER] authority
	ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}

WithdrawFunds is the `withdrawFunds` instruction.

func NewWithdrawFundsInstruction

func NewWithdrawFundsInstruction(

	config ag_solanago.PublicKey,
	authority ag_solanago.PublicKey) *WithdrawFunds

NewWithdrawFundsInstruction declares a new WithdrawFunds instruction with the provided parameters and accounts.

func NewWithdrawFundsInstructionBuilder

func NewWithdrawFundsInstructionBuilder() *WithdrawFunds

NewWithdrawFundsInstructionBuilder creates a new `WithdrawFunds` instruction builder.

func (WithdrawFunds) Build

func (inst WithdrawFunds) Build() *Instruction

func (*WithdrawFunds) EncodeToTree

func (inst *WithdrawFunds) EncodeToTree(parent ag_treeout.Branches)

func (*WithdrawFunds) GetAuthorityAccount

func (inst *WithdrawFunds) GetAuthorityAccount() *ag_solanago.AccountMeta

GetAuthorityAccount gets the "authority" account.

func (*WithdrawFunds) GetConfigAccount

func (inst *WithdrawFunds) GetConfigAccount() *ag_solanago.AccountMeta

GetConfigAccount gets the "config" account.

func (WithdrawFunds) MarshalWithEncoder

func (obj WithdrawFunds) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*WithdrawFunds) SetAuthorityAccount

func (inst *WithdrawFunds) SetAuthorityAccount(authority ag_solanago.PublicKey) *WithdrawFunds

SetAuthorityAccount sets the "authority" account.

func (*WithdrawFunds) SetConfigAccount

func (inst *WithdrawFunds) SetConfigAccount(config ag_solanago.PublicKey) *WithdrawFunds

SetConfigAccount sets the "config" account.

func (*WithdrawFunds) UnmarshalWithDecoder

func (obj *WithdrawFunds) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*WithdrawFunds) Validate

func (inst *WithdrawFunds) Validate() error

func (WithdrawFunds) ValidateAndBuild

func (inst WithdrawFunds) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

Jump to

Keyboard shortcuts

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