nft_candy_machine_v2

package
v0.8.20 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ProgramName = "NftCandyMachineV2"

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_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_SetCollectionDuringMint = ag_binary.TypeID([8]byte{103, 17, 200, 25, 118, 95, 125, 61})

	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 CollectionPDADiscriminator = [8]byte{50, 183, 127, 103, 4, 213, 92, 53}
View Source
var InstructionImplDef = ag_binary.NewVariantDefinition(
	ag_binary.AnchorTypeIDEncoding,
	[]ag_binary.VariantType{
		{
			"mint_nft", (*MintNft)(nil),
		},
		{
			"update_candy_machine", (*UpdateCandyMachine)(nil),
		},
		{
			"add_config_lines", (*AddConfigLines)(nil),
		},
		{
			"initialize_candy_machine", (*InitializeCandyMachine)(nil),
		},
		{
			"update_authority", (*UpdateAuthority)(nil),
		},
		{
			"withdraw_funds", (*WithdrawFunds)(nil),
		},
		{
			"set_collection_during_mint", (*SetCollectionDuringMint)(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] candyMachine
	//
	// [1] = [SIGNER] authority
	ag_solanago.AccountMetaSlice `bin:"-"`
}

AddConfigLines is the `addConfigLines` instruction.

func NewAddConfigLinesInstruction

func NewAddConfigLinesInstruction(

	index uint32,
	configLines []ConfigLine,

	candyMachine 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) GetCandyMachineAccount

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

GetCandyMachineAccount gets the "candyMachine" 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) SetCandyMachineAccount

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

SetCandyMachineAccount sets the "candyMachine" 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"`
	ItemsRedeemed uint64
	Data          CandyMachineData
}

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
	Symbol                string
	SellerFeeBasisPoints  uint16
	MaxSupply             uint64
	IsMutable             bool
	RetainAuthority       bool
	GoLiveDate            *int64       `bin:"optional"`
	EndSettings           *EndSettings `bin:"optional"`
	Creators              []Creator
	HiddenSettings        *HiddenSettings        `bin:"optional"`
	WhitelistMintSettings *WhitelistMintSettings `bin:"optional"`
	ItemsAvailable        uint64
	Gatekeeper            *GatekeeperConfig `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 CollectionPDA added in v0.4.4

type CollectionPDA struct {
	Mint         ag_solanago.PublicKey
	CandyMachine ag_solanago.PublicKey
}

func (CollectionPDA) MarshalWithEncoder added in v0.4.4

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

func (*CollectionPDA) UnmarshalWithDecoder added in v0.4.4

func (obj *CollectionPDA) 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 EndSettingType

type EndSettingType ag_binary.BorshEnum
const (
	EndSettingTypeDate EndSettingType = iota
	EndSettingTypeAmount
)

func (EndSettingType) String

func (value EndSettingType) String() string

type EndSettings

type EndSettings struct {
	EndSettingType EndSettingType
	Number         uint64
}

func (EndSettings) MarshalWithEncoder

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

func (*EndSettings) UnmarshalWithDecoder

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

type GatekeeperConfig

type GatekeeperConfig struct {
	GatekeeperNetwork ag_solanago.PublicKey
	ExpireOnUse       bool
}

func (GatekeeperConfig) MarshalWithEncoder

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

func (*GatekeeperConfig) UnmarshalWithDecoder

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

type HiddenSettings

type HiddenSettings struct {
	Name string
	Uri  string
	Hash [32]uint8
}

func (HiddenSettings) MarshalWithEncoder

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

func (*HiddenSettings) UnmarshalWithDecoder

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

type InitializeCandyMachine

type InitializeCandyMachine struct {
	Data *CandyMachineData

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

InitializeCandyMachine is the `initializeCandyMachine` instruction.

func NewInitializeCandyMachineInstruction

func NewInitializeCandyMachineInstruction(

	data CandyMachineData,

	candyMachine ag_solanago.PublicKey,
	wallet 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) 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) SetCandyMachineAccount

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

SetCandyMachineAccount sets the "candyMachine" 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 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 {
	CreatorBump *uint8

	// [0] = [WRITE] candyMachine
	//
	// [1] = [] candyMachineCreator
	//
	// [2] = [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
	//
	// [14] = [] recentBlockhashes
	//
	// [15] = [] instructionSysvarAccount
	ag_solanago.AccountMetaSlice `bin:"-"`
}

MintNft is the `mintNft` instruction.

func NewMintNftInstruction

func NewMintNftInstruction(

	creatorBump uint8,

	candyMachine ag_solanago.PublicKey,
	candyMachineCreator 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,
	recentBlockhashes ag_solanago.PublicKey,
	instructionSysvarAccount ag_solanago.PublicKey,
	remainingAccounts []ag_solanago.AccountMeta) *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) GetCandyMachineCreatorAccount

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

GetCandyMachineCreatorAccount gets the "candyMachineCreator" account.

func (*MintNft) GetClockAccount

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

GetClockAccount gets the "clock" account.

func (*MintNft) GetInstructionSysvarAccountAccount

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

GetInstructionSysvarAccountAccount gets the "instructionSysvarAccount" 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) GetRecentBlockhashesAccount

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

GetRecentBlockhashesAccount gets the "recentBlockhashes" 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) SetCandyMachineCreatorAccount

func (inst *MintNft) SetCandyMachineCreatorAccount(candyMachineCreator ag_solanago.PublicKey) *MintNft

SetCandyMachineCreatorAccount sets the "candyMachineCreator" account.

func (*MintNft) SetClockAccount

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

SetClockAccount sets the "clock" account.

func (*MintNft) SetCreatorBump

func (inst *MintNft) SetCreatorBump(creatorBump uint8) *MintNft

SetCreatorBump sets the "creatorBump" parameter.

func (*MintNft) SetInstructionSysvarAccountAccount

func (inst *MintNft) SetInstructionSysvarAccountAccount(instructionSysvarAccount ag_solanago.PublicKey) *MintNft

SetInstructionSysvarAccountAccount sets the "instructionSysvarAccount" 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) SetRecentBlockhashesAccount

func (inst *MintNft) SetRecentBlockhashesAccount(recentBlockhashes ag_solanago.PublicKey) *MintNft

SetRecentBlockhashesAccount sets the "recentBlockhashes" account.

func (*MintNft) SetRemainingAccounts

func (inst *MintNft) SetRemainingAccounts(pk []ag_solanago.AccountMeta) *MintNft

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 SetCollectionDuringMint added in v0.4.4

type SetCollectionDuringMint struct {

	// [0] = [] candyMachine
	//
	// [1] = [] metadata
	//
	// [2] = [SIGNER] payer
	//
	// [3] = [WRITE] collectionPda
	//
	// [4] = [] tokenMetadataProgram
	//
	// [5] = [] instructions
	//
	// [6] = [] collectionMint
	//
	// [7] = [WRITE] collectionMetadata
	//
	// [8] = [] collectionMasterEdition
	//
	// [9] = [] authority
	//
	// [10] = [] collectionAuthorityRecord
	ag_solanago.AccountMetaSlice `bin:"-"`
}

SetCollectionDuringMint is the `setCollectionDuringMint` instruction.

func NewSetCollectionDuringMintInstruction added in v0.4.4

func NewSetCollectionDuringMintInstruction(

	candyMachine ag_solanago.PublicKey,
	metadata ag_solanago.PublicKey,
	payer ag_solanago.PublicKey,
	collectionPda ag_solanago.PublicKey,
	tokenMetadataProgram ag_solanago.PublicKey,
	instructions ag_solanago.PublicKey,
	collectionMint ag_solanago.PublicKey,
	collectionMetadata ag_solanago.PublicKey,
	collectionMasterEdition ag_solanago.PublicKey,
	authority ag_solanago.PublicKey,
	collectionAuthorityRecord ag_solanago.PublicKey) *SetCollectionDuringMint

NewSetCollectionDuringMintInstruction declares a new SetCollectionDuringMint instruction with the provided parameters and accounts.

func NewSetCollectionDuringMintInstructionBuilder added in v0.4.4

func NewSetCollectionDuringMintInstructionBuilder() *SetCollectionDuringMint

NewSetCollectionDuringMintInstructionBuilder creates a new `SetCollectionDuringMint` instruction builder.

func (SetCollectionDuringMint) Build added in v0.4.4

func (inst SetCollectionDuringMint) Build() *Instruction

func (*SetCollectionDuringMint) EncodeToTree added in v0.4.4

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

func (*SetCollectionDuringMint) GetAuthorityAccount added in v0.4.4

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

GetAuthorityAccount gets the "authority" account.

func (*SetCollectionDuringMint) GetCandyMachineAccount added in v0.4.4

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

GetCandyMachineAccount gets the "candyMachine" account.

func (*SetCollectionDuringMint) GetCollectionAuthorityRecordAccount added in v0.4.4

func (inst *SetCollectionDuringMint) GetCollectionAuthorityRecordAccount() *ag_solanago.AccountMeta

GetCollectionAuthorityRecordAccount gets the "collectionAuthorityRecord" account.

func (*SetCollectionDuringMint) GetCollectionMasterEditionAccount added in v0.4.4

func (inst *SetCollectionDuringMint) GetCollectionMasterEditionAccount() *ag_solanago.AccountMeta

GetCollectionMasterEditionAccount gets the "collectionMasterEdition" account.

func (*SetCollectionDuringMint) GetCollectionMetadataAccount added in v0.4.4

func (inst *SetCollectionDuringMint) GetCollectionMetadataAccount() *ag_solanago.AccountMeta

GetCollectionMetadataAccount gets the "collectionMetadata" account.

func (*SetCollectionDuringMint) GetCollectionMintAccount added in v0.4.4

func (inst *SetCollectionDuringMint) GetCollectionMintAccount() *ag_solanago.AccountMeta

GetCollectionMintAccount gets the "collectionMint" account.

func (*SetCollectionDuringMint) GetCollectionPdaAccount added in v0.4.4

func (inst *SetCollectionDuringMint) GetCollectionPdaAccount() *ag_solanago.AccountMeta

GetCollectionPdaAccount gets the "collectionPda" account.

func (*SetCollectionDuringMint) GetInstructionsAccount added in v0.4.4

func (inst *SetCollectionDuringMint) GetInstructionsAccount() *ag_solanago.AccountMeta

GetInstructionsAccount gets the "instructions" account.

func (*SetCollectionDuringMint) GetMetadataAccount added in v0.4.4

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

GetMetadataAccount gets the "metadata" account.

func (*SetCollectionDuringMint) GetPayerAccount added in v0.4.4

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

GetPayerAccount gets the "payer" account.

func (*SetCollectionDuringMint) GetTokenMetadataProgramAccount added in v0.4.4

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

GetTokenMetadataProgramAccount gets the "tokenMetadataProgram" account.

func (SetCollectionDuringMint) MarshalWithEncoder added in v0.4.4

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

func (*SetCollectionDuringMint) SetAuthorityAccount added in v0.4.4

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

SetAuthorityAccount sets the "authority" account.

func (*SetCollectionDuringMint) SetCandyMachineAccount added in v0.4.4

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

SetCandyMachineAccount sets the "candyMachine" account.

func (*SetCollectionDuringMint) SetCollectionAuthorityRecordAccount added in v0.4.4

func (inst *SetCollectionDuringMint) SetCollectionAuthorityRecordAccount(collectionAuthorityRecord ag_solanago.PublicKey) *SetCollectionDuringMint

SetCollectionAuthorityRecordAccount sets the "collectionAuthorityRecord" account.

func (*SetCollectionDuringMint) SetCollectionMasterEditionAccount added in v0.4.4

func (inst *SetCollectionDuringMint) SetCollectionMasterEditionAccount(collectionMasterEdition ag_solanago.PublicKey) *SetCollectionDuringMint

SetCollectionMasterEditionAccount sets the "collectionMasterEdition" account.

func (*SetCollectionDuringMint) SetCollectionMetadataAccount added in v0.4.4

func (inst *SetCollectionDuringMint) SetCollectionMetadataAccount(collectionMetadata ag_solanago.PublicKey) *SetCollectionDuringMint

SetCollectionMetadataAccount sets the "collectionMetadata" account.

func (*SetCollectionDuringMint) SetCollectionMintAccount added in v0.4.4

func (inst *SetCollectionDuringMint) SetCollectionMintAccount(collectionMint ag_solanago.PublicKey) *SetCollectionDuringMint

SetCollectionMintAccount sets the "collectionMint" account.

func (*SetCollectionDuringMint) SetCollectionPdaAccount added in v0.4.4

func (inst *SetCollectionDuringMint) SetCollectionPdaAccount(collectionPda ag_solanago.PublicKey) *SetCollectionDuringMint

SetCollectionPdaAccount sets the "collectionPda" account.

func (*SetCollectionDuringMint) SetInstructionsAccount added in v0.4.4

func (inst *SetCollectionDuringMint) SetInstructionsAccount(instructions ag_solanago.PublicKey) *SetCollectionDuringMint

SetInstructionsAccount sets the "instructions" account.

func (*SetCollectionDuringMint) SetMetadataAccount added in v0.4.4

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

SetMetadataAccount sets the "metadata" account.

func (*SetCollectionDuringMint) SetPayerAccount added in v0.4.4

SetPayerAccount sets the "payer" account.

func (*SetCollectionDuringMint) SetTokenMetadataProgramAccount added in v0.4.4

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

SetTokenMetadataProgramAccount sets the "tokenMetadataProgram" account.

func (*SetCollectionDuringMint) UnmarshalWithDecoder added in v0.4.4

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

func (*SetCollectionDuringMint) Validate added in v0.4.4

func (inst *SetCollectionDuringMint) Validate() error

func (SetCollectionDuringMint) ValidateAndBuild added in v0.4.4

func (inst SetCollectionDuringMint) 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
	//
	// [2] = [] wallet
	ag_solanago.AccountMetaSlice `bin:"-"`
}

UpdateAuthority is the `updateAuthority` instruction.

func NewUpdateAuthorityInstruction

func NewUpdateAuthorityInstruction(

	newAuthority ag_solanago.PublicKey,

	candyMachine ag_solanago.PublicKey,
	authority ag_solanago.PublicKey,
	wallet 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) GetWalletAccount

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

GetWalletAccount gets the "wallet" 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) SetWalletAccount

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

SetWalletAccount sets the "wallet" account.

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 {
	Data *CandyMachineData

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

UpdateCandyMachine is the `updateCandyMachine` instruction.

func NewUpdateCandyMachineInstruction

func NewUpdateCandyMachineInstruction(

	data CandyMachineData,

	candyMachine ag_solanago.PublicKey,
	authority ag_solanago.PublicKey,
	wallet 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) GetWalletAccount

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

GetWalletAccount gets the "wallet" 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) SetData

SetData sets the "data" parameter.

func (*UpdateCandyMachine) SetWalletAccount

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

SetWalletAccount sets the "wallet" account.

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 WhitelistMintMode

type WhitelistMintMode ag_binary.BorshEnum
const (
	WhitelistMintModeBurnEveryTime WhitelistMintMode = iota
	WhitelistMintModeNeverBurn
)

func (WhitelistMintMode) String

func (value WhitelistMintMode) String() string

type WhitelistMintSettings

type WhitelistMintSettings struct {
	Mode          WhitelistMintMode
	Mint          ag_solanago.PublicKey
	Presale       bool
	DiscountPrice *uint64 `bin:"optional"`
}

func (WhitelistMintSettings) MarshalWithEncoder

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

func (*WhitelistMintSettings) UnmarshalWithDecoder

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

type WithdrawFunds

type WithdrawFunds struct {

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

WithdrawFunds is the `withdrawFunds` instruction.

func NewWithdrawFundsInstruction

func NewWithdrawFundsInstruction(

	candyMachine 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) GetCandyMachineAccount

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

GetCandyMachineAccount gets the "candyMachine" 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) SetCandyMachineAccount

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

SetCandyMachineAccount sets the "candyMachine" 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