auction

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Cancel a bid on a running auction.
	Instruction_CancelBid uint8 = iota

	// Create a new auction account bound to a resource, initially in a pending state.
	Instruction_CreateAuction

	// Move SPL tokens from winning bid to the destination account.
	Instruction_ClaimBid

	// Ends an auction, regardless of end timing conditions
	Instruction_EndAuction

	// Start an inactive auction.
	Instruction_StartAuction

	// Update the authority for an auction account.
	// https://github.com/metaplex-foundation/metaplex/blob/4a1b7d2f674013bc8bd3149294c66b03b27120d0/rust/auction/program/src/instruction.rs#L115
	Instruction_SetAuthority

	// Place a bid on a running auction.
	Instruction_PlaceBid
)
View Source
const BASE_AUCTION_DATA_SIZE = 32 + 32 + 9 + 9 + 9 + 9 + 1 + 32 + 1 + 8 + 8 + 8
View Source
const BIDDER_METADATA_LEN = 32 + 32 + 8 + 8 + 1
View Source
const BID_LENGTH = 32 + 8
View Source
const EXTENDED = "extended"
View Source
const MAX_AUCTION_DATA_EXTENDED_SIZE = 8 + 9 + 2 + 200
View Source
const PREFIX = "auction"
View Source
const ProgramName = "Auction"

Variables

View Source
var InstructionImplDef = ag_binary.NewVariantDefinition(
	ag_binary.Uint8TypeIDEncoding,
	[]ag_binary.VariantType{
		{
			"CancelBid", (*CancelBid)(nil),
		},
		{
			"CreateAuction", (*CreateAuction)(nil),
		},
		{
			"ClaimBid", (*ClaimBid)(nil),
		},
		{
			"EndAuction", (*EndAuction)(nil),
		},
		{
			"StartAuction", (*StartAuction)(nil),
		},
		{
			"SetAuthority", (*SetAuthority)(nil),
		},
		{
			"PlaceBid", (*PlaceBid)(nil),
		},
	},
)
View Source
var ProgramID ag_solanago.PublicKey = ag_solanago.MustPublicKeyFromBase58("auctxRXPeJoc4817jDhf4HbjnhEcr1cCXenosMhK5R8")

Functions

func InstructionIDToName

func InstructionIDToName(id uint8) string

InstructionIDToName returns the name of the instruction given its ID.

func SetProgramID

func SetProgramID(pubkey ag_solanago.PublicKey)

Types

type AuctionData

type AuctionData struct {
	// Pubkey of the authority with permission to modify this auction.
	Authority ag_solanago.PublicKey

	// Token mint for the SPL token being used to bid
	TokenMint ag_solanago.PublicKey

	// The time the last bid was placed, used to keep track of auction timing.
	LastBid *ag_solanago.UnixTimeSeconds `bin:"optional"`

	// Slot time the auction was officially ended by.
	EndedAt *ag_solanago.UnixTimeSeconds `bin:"optional"`

	// End time is the cut-off point that the auction is forced to end by.
	EndAuctionAt *ag_solanago.UnixTimeSeconds `bin:"optional"`

	// Gap time is the amount of time in slots after the previous bid at which the auction ends.
	EndAuctionGap *ag_solanago.UnixTimeSeconds `bin:"optional"`

	// Minimum price for any bid to meet.
	PriceFloor PriceFloor

	// The state the auction is in, whether it has started or ended.
	State AuctionState

	// Auction Bids, each user may have one bid open at a time.
	BidState BidState
}

func (AuctionData) MarshalWithEncoder

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

func (*AuctionData) UnmarshalWithDecoder

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

type AuctionDataExtended

type AuctionDataExtended struct {
	// Total uncancelled bids
	TotalUncancelledBids uint64

	// Tick size
	TickSize *uint64 `bin:"optional"`

	// gap_tick_size_percentage - two decimal points
	GapTickSizePercentage *uint8 `bin:"optional"`
}

func (AuctionDataExtended) MarshalWithEncoder

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

func (*AuctionDataExtended) UnmarshalWithDecoder

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

type AuctionState

type AuctionState ag_binary.BorshEnum
const (
	Created_AuctionState AuctionState = iota
	Started_AuctionState
	Ended_AuctionState
)

func (AuctionState) String added in v0.1.2

func (value AuctionState) String() string

type Bid

type Bid struct {
	Key    ag_solanago.PublicKey
	Amount uint64
}

func (Bid) MarshalWithEncoder

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

func (*Bid) UnmarshalWithDecoder

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

type BidState

type BidState interface {
	// contains filtered or unexported methods
}

type BidderMetadata

type BidderMetadata struct {
	// Relationship with the bidder who's metadata this covers.
	BidderPubkey ag_solanago.PublicKey

	// Relationship with the auction this bid was placed on.
	AuctionPubkey ag_solanago.PublicKey

	// Amount that the user bid.
	LastBid uint64

	// Tracks the last time this user bid.
	LastBidTimestamp ag_solanago.UnixTimeSeconds

	// Whether the last bid the user made was cancelled. This should also be enough to know if the
	// user is a winner, as if cancelled it implies previous bids were also cancelled.
	Cancelled bool
}

func (BidderMetadata) MarshalWithEncoder

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

func (*BidderMetadata) UnmarshalWithDecoder

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

type BidderPot

type BidderPot struct {
	// Points at actual pot that is a token account
	BidderPot ag_solanago.PublicKey

	// Originating bidder account
	BidderAct ag_solanago.PublicKey

	// Auction account
	AuctionAct ag_solanago.PublicKey

	// emptied or not
	Emptied bool
}

func (BidderPot) MarshalWithEncoder

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

func (*BidderPot) UnmarshalWithDecoder

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

type BlindedPrice

type BlindedPrice struct {
	V ag_solanago.Hash
}

func (BlindedPrice) MarshalWithEncoder

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

func (*BlindedPrice) UnmarshalWithDecoder

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

type CancelBid

type CancelBid struct {
	Args *CancelBidArgs

	// [0] = [SIGNER] biddersPrimaryAccount
	// ··········· The bidders primary account, for PDA calculation/transit auth.
	//
	// [1] = [WRITE] biddersTokenAccount
	// ··········· The bidders token account they'll receive refund with
	//
	// [2] = [WRITE] pot
	// ··········· The pot, containing a reference to the stored SPL token account.
	//
	// [3] = [WRITE] potSPLAccount
	// ··········· The pot SPL account, where the tokens will be deposited.
	//
	// [4] = [WRITE] metadataAccount
	// ··········· The metadata account, storing information about the bidders actions.
	//
	// [5] = [WRITE] auctionAccount
	// ··········· Auction account, containing data about the auction and item being bid on.
	//
	// [6] = [WRITE] tokenMint
	// ··········· Token mint, for transfer instructions and verification.
	//
	// [7] = [] clockSysvar
	// ··········· Clock sysvar
	//
	// [8] = [] rentSysvar
	// ··········· Rent sysvar
	//
	// [9] = [] systemProgram
	// ··········· System program
	//
	// [10] = [] splTokenProgram
	// ··········· SPL Token Program
	ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}

Cancel a bid on a running auction.

func NewCancelBidInstruction

func NewCancelBidInstruction(

	args CancelBidArgs,

	biddersPrimaryAccount ag_solanago.PublicKey,
	biddersTokenAccount ag_solanago.PublicKey,
	pot ag_solanago.PublicKey,
	potSPLAccount ag_solanago.PublicKey,
	metadataAccount ag_solanago.PublicKey,
	auctionAccount ag_solanago.PublicKey,
	tokenMint ag_solanago.PublicKey,
	clockSysvar ag_solanago.PublicKey,
	rentSysvar ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey,
	splTokenProgram ag_solanago.PublicKey) *CancelBid

NewCancelBidInstruction declares a new CancelBid instruction with the provided parameters and accounts.

func NewCancelBidInstructionBuilder

func NewCancelBidInstructionBuilder() *CancelBid

NewCancelBidInstructionBuilder creates a new `CancelBid` instruction builder.

func (CancelBid) Build

func (inst CancelBid) Build() *Instruction

func (*CancelBid) EncodeToTree

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

func (*CancelBid) GetAuctionAccount

func (inst *CancelBid) GetAuctionAccount() *ag_solanago.AccountMeta

GetAuctionAccount gets the "auctionAccount" account. Auction account, containing data about the auction and item being bid on.

func (*CancelBid) GetBiddersPrimaryAccount

func (inst *CancelBid) GetBiddersPrimaryAccount() *ag_solanago.AccountMeta

GetBiddersPrimaryAccount gets the "biddersPrimaryAccount" account. The bidders primary account, for PDA calculation/transit auth.

func (*CancelBid) GetBiddersTokenAccount

func (inst *CancelBid) GetBiddersTokenAccount() *ag_solanago.AccountMeta

GetBiddersTokenAccount gets the "biddersTokenAccount" account. The bidders token account they'll receive refund with

func (*CancelBid) GetClockSysvarAccount

func (inst *CancelBid) GetClockSysvarAccount() *ag_solanago.AccountMeta

GetClockSysvarAccount gets the "clockSysvar" account. Clock sysvar

func (*CancelBid) GetMetadataAccount

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

GetMetadataAccount gets the "metadataAccount" account. The metadata account, storing information about the bidders actions.

func (*CancelBid) GetPotAccount

func (inst *CancelBid) GetPotAccount() *ag_solanago.AccountMeta

GetPotAccount gets the "pot" account. The pot, containing a reference to the stored SPL token account.

func (*CancelBid) GetPotSPLAccount

func (inst *CancelBid) GetPotSPLAccount() *ag_solanago.AccountMeta

GetPotSPLAccount gets the "potSPLAccount" account. The pot SPL account, where the tokens will be deposited.

func (*CancelBid) GetRentSysvarAccount

func (inst *CancelBid) GetRentSysvarAccount() *ag_solanago.AccountMeta

GetRentSysvarAccount gets the "rentSysvar" account. Rent sysvar

func (*CancelBid) GetSplTokenProgramAccount

func (inst *CancelBid) GetSplTokenProgramAccount() *ag_solanago.AccountMeta

GetSplTokenProgramAccount gets the "splTokenProgram" account. SPL Token Program

func (*CancelBid) GetSystemProgramAccount

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

GetSystemProgramAccount gets the "systemProgram" account. System program

func (*CancelBid) GetTokenMintAccount

func (inst *CancelBid) GetTokenMintAccount() *ag_solanago.AccountMeta

GetTokenMintAccount gets the "tokenMint" account. Token mint, for transfer instructions and verification.

func (CancelBid) MarshalWithEncoder

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

func (*CancelBid) SetArgs

func (inst *CancelBid) SetArgs(args CancelBidArgs) *CancelBid

SetArgs sets the "args" parameter.

func (*CancelBid) SetAuctionAccount

func (inst *CancelBid) SetAuctionAccount(auctionAccount ag_solanago.PublicKey) *CancelBid

SetAuctionAccount sets the "auctionAccount" account. Auction account, containing data about the auction and item being bid on.

func (*CancelBid) SetBiddersPrimaryAccount

func (inst *CancelBid) SetBiddersPrimaryAccount(biddersPrimaryAccount ag_solanago.PublicKey) *CancelBid

SetBiddersPrimaryAccount sets the "biddersPrimaryAccount" account. The bidders primary account, for PDA calculation/transit auth.

func (*CancelBid) SetBiddersTokenAccount

func (inst *CancelBid) SetBiddersTokenAccount(biddersTokenAccount ag_solanago.PublicKey) *CancelBid

SetBiddersTokenAccount sets the "biddersTokenAccount" account. The bidders token account they'll receive refund with

func (*CancelBid) SetClockSysvarAccount

func (inst *CancelBid) SetClockSysvarAccount(clockSysvar ag_solanago.PublicKey) *CancelBid

SetClockSysvarAccount sets the "clockSysvar" account. Clock sysvar

func (*CancelBid) SetMetadataAccount

func (inst *CancelBid) SetMetadataAccount(metadataAccount ag_solanago.PublicKey) *CancelBid

SetMetadataAccount sets the "metadataAccount" account. The metadata account, storing information about the bidders actions.

func (*CancelBid) SetPotAccount

func (inst *CancelBid) SetPotAccount(pot ag_solanago.PublicKey) *CancelBid

SetPotAccount sets the "pot" account. The pot, containing a reference to the stored SPL token account.

func (*CancelBid) SetPotSPLAccount

func (inst *CancelBid) SetPotSPLAccount(potSPLAccount ag_solanago.PublicKey) *CancelBid

SetPotSPLAccount sets the "potSPLAccount" account. The pot SPL account, where the tokens will be deposited.

func (*CancelBid) SetRentSysvarAccount

func (inst *CancelBid) SetRentSysvarAccount(rentSysvar ag_solanago.PublicKey) *CancelBid

SetRentSysvarAccount sets the "rentSysvar" account. Rent sysvar

func (*CancelBid) SetSplTokenProgramAccount

func (inst *CancelBid) SetSplTokenProgramAccount(splTokenProgram ag_solanago.PublicKey) *CancelBid

SetSplTokenProgramAccount sets the "splTokenProgram" account. SPL Token Program

func (*CancelBid) SetSystemProgramAccount

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

SetSystemProgramAccount sets the "systemProgram" account. System program

func (*CancelBid) SetTokenMintAccount

func (inst *CancelBid) SetTokenMintAccount(tokenMint ag_solanago.PublicKey) *CancelBid

SetTokenMintAccount sets the "tokenMint" account. Token mint, for transfer instructions and verification.

func (*CancelBid) UnmarshalWithDecoder

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

func (*CancelBid) Validate

func (inst *CancelBid) Validate() error

func (CancelBid) ValidateAndBuild

func (inst CancelBid) 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 CancelBidArgs

type CancelBidArgs struct {
	Resource ag_solanago.PublicKey
}

func (CancelBidArgs) MarshalWithEncoder

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

func (*CancelBidArgs) UnmarshalWithDecoder

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

type Capped

type Capped struct {
	Limit int64
}

func (Capped) MarshalWithEncoder

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

func (*Capped) UnmarshalWithDecoder

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

type ClaimBid

type ClaimBid struct {
	Args *ClaimBidArgs

	// [0] = [WRITE] destinationAccount
	// ··········· The destination account
	//
	// [1] = [WRITE] bidderPotTokenAccount
	// ··········· The bidder pot token account
	//
	// [2] = [] bidderPotPDAAccount
	// ··········· The bidder pot pda account [seed of ['auction', program_id, auction key, bidder key]]
	//
	// [3] = [SIGNER] authorityOnTheAuction
	// ··········· The authority on the auction
	//
	// [4] = [] auction
	// ··········· The auction
	//
	// [5] = [] bidderWallet
	// ··········· The bidder wallet
	//
	// [6] = [] tokenMintOfTheAuction
	// ··········· Token mint of the auction
	//
	// [7] = [] clockSysvar
	// ··········· Clock sysvar
	//
	// [8] = [] tokenProgram
	// ··········· Token program
	ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}

Move SPL tokens from winning bid to the destination account.

func NewClaimBidInstruction

func NewClaimBidInstruction(

	args ClaimBidArgs,

	destinationAccount ag_solanago.PublicKey,
	bidderPotTokenAccount ag_solanago.PublicKey,
	bidderPotPDAAccount ag_solanago.PublicKey,
	authorityOnTheAuction ag_solanago.PublicKey,
	auction ag_solanago.PublicKey,
	bidderWallet ag_solanago.PublicKey,
	tokenMintOfTheAuction ag_solanago.PublicKey,
	clockSysvar ag_solanago.PublicKey,
	tokenProgram ag_solanago.PublicKey) *ClaimBid

NewClaimBidInstruction declares a new ClaimBid instruction with the provided parameters and accounts.

func NewClaimBidInstructionBuilder

func NewClaimBidInstructionBuilder() *ClaimBid

NewClaimBidInstructionBuilder creates a new `ClaimBid` instruction builder.

func (ClaimBid) Build

func (inst ClaimBid) Build() *Instruction

func (*ClaimBid) EncodeToTree

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

func (*ClaimBid) GetAuctionAccount

func (inst *ClaimBid) GetAuctionAccount() *ag_solanago.AccountMeta

GetAuctionAccount gets the "auction" account. The auction

func (*ClaimBid) GetAuthorityOnTheAuctionAccount

func (inst *ClaimBid) GetAuthorityOnTheAuctionAccount() *ag_solanago.AccountMeta

GetAuthorityOnTheAuctionAccount gets the "authorityOnTheAuction" account. The authority on the auction

func (*ClaimBid) GetBidderPotPDAAccount

func (inst *ClaimBid) GetBidderPotPDAAccount() *ag_solanago.AccountMeta

GetBidderPotPDAAccount gets the "bidderPotPDAAccount" account. The bidder pot pda account [seed of ['auction', program_id, auction key, bidder key]]

func (*ClaimBid) GetBidderPotTokenAccount

func (inst *ClaimBid) GetBidderPotTokenAccount() *ag_solanago.AccountMeta

GetBidderPotTokenAccount gets the "bidderPotTokenAccount" account. The bidder pot token account

func (*ClaimBid) GetBidderWalletAccount

func (inst *ClaimBid) GetBidderWalletAccount() *ag_solanago.AccountMeta

GetBidderWalletAccount gets the "bidderWallet" account. The bidder wallet

func (*ClaimBid) GetClockSysvarAccount

func (inst *ClaimBid) GetClockSysvarAccount() *ag_solanago.AccountMeta

GetClockSysvarAccount gets the "clockSysvar" account. Clock sysvar

func (*ClaimBid) GetDestinationAccount

func (inst *ClaimBid) GetDestinationAccount() *ag_solanago.AccountMeta

GetDestinationAccount gets the "destinationAccount" account. The destination account

func (*ClaimBid) GetTokenMintOfTheAuctionAccount

func (inst *ClaimBid) GetTokenMintOfTheAuctionAccount() *ag_solanago.AccountMeta

GetTokenMintOfTheAuctionAccount gets the "tokenMintOfTheAuction" account. Token mint of the auction

func (*ClaimBid) GetTokenProgramAccount

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

GetTokenProgramAccount gets the "tokenProgram" account. Token program

func (ClaimBid) MarshalWithEncoder

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

func (*ClaimBid) SetArgs

func (inst *ClaimBid) SetArgs(args ClaimBidArgs) *ClaimBid

SetArgs sets the "args" parameter.

func (*ClaimBid) SetAuctionAccount

func (inst *ClaimBid) SetAuctionAccount(auction ag_solanago.PublicKey) *ClaimBid

SetAuctionAccount sets the "auction" account. The auction

func (*ClaimBid) SetAuthorityOnTheAuctionAccount

func (inst *ClaimBid) SetAuthorityOnTheAuctionAccount(authorityOnTheAuction ag_solanago.PublicKey) *ClaimBid

SetAuthorityOnTheAuctionAccount sets the "authorityOnTheAuction" account. The authority on the auction

func (*ClaimBid) SetBidderPotPDAAccount

func (inst *ClaimBid) SetBidderPotPDAAccount(bidderPotPDAAccount ag_solanago.PublicKey) *ClaimBid

SetBidderPotPDAAccount sets the "bidderPotPDAAccount" account. The bidder pot pda account [seed of ['auction', program_id, auction key, bidder key]]

func (*ClaimBid) SetBidderPotTokenAccount

func (inst *ClaimBid) SetBidderPotTokenAccount(bidderPotTokenAccount ag_solanago.PublicKey) *ClaimBid

SetBidderPotTokenAccount sets the "bidderPotTokenAccount" account. The bidder pot token account

func (*ClaimBid) SetBidderWalletAccount

func (inst *ClaimBid) SetBidderWalletAccount(bidderWallet ag_solanago.PublicKey) *ClaimBid

SetBidderWalletAccount sets the "bidderWallet" account. The bidder wallet

func (*ClaimBid) SetClockSysvarAccount

func (inst *ClaimBid) SetClockSysvarAccount(clockSysvar ag_solanago.PublicKey) *ClaimBid

SetClockSysvarAccount sets the "clockSysvar" account. Clock sysvar

func (*ClaimBid) SetDestinationAccount

func (inst *ClaimBid) SetDestinationAccount(destinationAccount ag_solanago.PublicKey) *ClaimBid

SetDestinationAccount sets the "destinationAccount" account. The destination account

func (*ClaimBid) SetTokenMintOfTheAuctionAccount

func (inst *ClaimBid) SetTokenMintOfTheAuctionAccount(tokenMintOfTheAuction ag_solanago.PublicKey) *ClaimBid

SetTokenMintOfTheAuctionAccount sets the "tokenMintOfTheAuction" account. Token mint of the auction

func (*ClaimBid) SetTokenProgramAccount

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

SetTokenProgramAccount sets the "tokenProgram" account. Token program

func (*ClaimBid) UnmarshalWithDecoder

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

func (*ClaimBid) Validate

func (inst *ClaimBid) Validate() error

func (ClaimBid) ValidateAndBuild

func (inst ClaimBid) 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 ClaimBidArgs

type ClaimBidArgs struct {
	Resource ag_solanago.PublicKey
}

func (ClaimBidArgs) MarshalWithEncoder

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

func (*ClaimBidArgs) UnmarshalWithDecoder

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

type CreateAuction

type CreateAuction struct {
	Args *CreateAuctionArgs

	// [0] = [SIGNER] creator
	// ··········· The account creating the auction, which is authorised to make changes.
	//
	// [1] = [WRITE] uninitializedAuctionAccount
	// ··········· Uninitialized auction account.
	//
	// [2] = [] rentSysvar
	// ··········· Rent sysvar
	//
	// [3] = [] systemAccount
	// ··········· System account
	ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}

Create a new auction account bound to a resource, initially in a pending state.

func NewCreateAuctionInstruction

func NewCreateAuctionInstruction(

	args CreateAuctionArgs,

	creator ag_solanago.PublicKey,
	uninitializedAuctionAccount ag_solanago.PublicKey,
	rentSysvar ag_solanago.PublicKey,
	systemAccount ag_solanago.PublicKey) *CreateAuction

NewCreateAuctionInstruction declares a new CreateAuction instruction with the provided parameters and accounts.

func NewCreateAuctionInstructionBuilder

func NewCreateAuctionInstructionBuilder() *CreateAuction

NewCreateAuctionInstructionBuilder creates a new `CreateAuction` instruction builder.

func (CreateAuction) Build

func (inst CreateAuction) Build() *Instruction

func (*CreateAuction) EncodeToTree

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

func (*CreateAuction) GetCreatorAccount

func (inst *CreateAuction) GetCreatorAccount() *ag_solanago.AccountMeta

GetCreatorAccount gets the "creator" account. The account creating the auction, which is authorised to make changes.

func (*CreateAuction) GetRentSysvarAccount

func (inst *CreateAuction) GetRentSysvarAccount() *ag_solanago.AccountMeta

GetRentSysvarAccount gets the "rentSysvar" account. Rent sysvar

func (*CreateAuction) GetSystemAccount

func (inst *CreateAuction) GetSystemAccount() *ag_solanago.AccountMeta

GetSystemAccount gets the "systemAccount" account. System account

func (*CreateAuction) GetUninitializedAuctionAccount

func (inst *CreateAuction) GetUninitializedAuctionAccount() *ag_solanago.AccountMeta

GetUninitializedAuctionAccount gets the "uninitializedAuctionAccount" account. Uninitialized auction account.

func (CreateAuction) MarshalWithEncoder

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

func (*CreateAuction) SetArgs

func (inst *CreateAuction) SetArgs(args CreateAuctionArgs) *CreateAuction

SetArgs sets the "args" parameter.

func (*CreateAuction) SetCreatorAccount

func (inst *CreateAuction) SetCreatorAccount(creator ag_solanago.PublicKey) *CreateAuction

SetCreatorAccount sets the "creator" account. The account creating the auction, which is authorised to make changes.

func (*CreateAuction) SetRentSysvarAccount

func (inst *CreateAuction) SetRentSysvarAccount(rentSysvar ag_solanago.PublicKey) *CreateAuction

SetRentSysvarAccount sets the "rentSysvar" account. Rent sysvar

func (*CreateAuction) SetSystemAccount

func (inst *CreateAuction) SetSystemAccount(systemAccount ag_solanago.PublicKey) *CreateAuction

SetSystemAccount sets the "systemAccount" account. System account

func (*CreateAuction) SetUninitializedAuctionAccount

func (inst *CreateAuction) SetUninitializedAuctionAccount(uninitializedAuctionAccount ag_solanago.PublicKey) *CreateAuction

SetUninitializedAuctionAccount sets the "uninitializedAuctionAccount" account. Uninitialized auction account.

func (*CreateAuction) UnmarshalWithDecoder

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

func (*CreateAuction) Validate

func (inst *CreateAuction) Validate() error

func (CreateAuction) ValidateAndBuild

func (inst CreateAuction) 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 CreateAuctionArgs

type CreateAuctionArgs struct {
	// How many winners are allowed for this auction. See AuctionData.
	Winners WinnerLimit

	// End time is the cut-off point that the auction is forced to end by. See AuctionData.
	EndAuctionAt *ag_solanago.UnixTimeSeconds `bin:"optional"`

	// Gap time is how much time after the previous bid where the auction ends. See AuctionData.
	EndAuctionGap *ag_solanago.UnixTimeSeconds `bin:"optional"`

	// Token mint for the SPL token used for bidding.
	TokenMint ag_solanago.PublicKey

	// Authority
	Authority ag_solanago.PublicKey

	// The resource being auctioned. See AuctionData.
	Resource ag_solanago.PublicKey

	// Set a price floor.
	PriceFloor PriceFloor

	// Add a tick size increment
	TickSize *uint64 `bin:"optional"`

	// Add a minimum percentage increase each bid must meet.
	GapTickSizePercentage *uint8 `bin:"optional"`
}

func (CreateAuctionArgs) MarshalWithEncoder

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

func (*CreateAuctionArgs) UnmarshalWithDecoder

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

type EndAuction

type EndAuction struct {
	Args *EndAuctionArgs

	ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}

Ends an auction, regardless of end timing conditions

func NewEndAuctionInstruction

func NewEndAuctionInstruction(

	args EndAuctionArgs) *EndAuction

NewEndAuctionInstruction declares a new EndAuction instruction with the provided parameters and accounts.

func NewEndAuctionInstructionBuilder

func NewEndAuctionInstructionBuilder() *EndAuction

NewEndAuctionInstructionBuilder creates a new `EndAuction` instruction builder.

func (EndAuction) Build

func (inst EndAuction) Build() *Instruction

func (*EndAuction) EncodeToTree

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

func (EndAuction) MarshalWithEncoder

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

func (*EndAuction) SetArgs

func (inst *EndAuction) SetArgs(args EndAuctionArgs) *EndAuction

SetArgs sets the "args" parameter.

func (*EndAuction) UnmarshalWithDecoder

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

func (*EndAuction) Validate

func (inst *EndAuction) Validate() error

func (EndAuction) ValidateAndBuild

func (inst EndAuction) 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 EndAuctionArgs

type EndAuctionArgs struct {
	// The resource being auctioned. See AuctionData.
	Resource ag_solanago.PublicKey

	// If the auction was blinded, a revealing price must be specified to release the auction
	// winnings.
	Reveal *Revealer `bin:"optional"`
}

func (EndAuctionArgs) MarshalWithEncoder

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

func (*EndAuctionArgs) UnmarshalWithDecoder

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

type EnglishAuction

type EnglishAuction struct {
	Bids []Bid
	Max  uint8
}

func (EnglishAuction) MarshalWithEncoder

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

func (*EnglishAuction) UnmarshalWithDecoder

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

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 MinimumPrice

type MinimumPrice struct {
	V [4]uint64
}

func (MinimumPrice) MarshalWithEncoder

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

func (*MinimumPrice) UnmarshalWithDecoder

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

type None

type None struct {
	V [32]uint8
}

func (None) MarshalWithEncoder

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

func (*None) UnmarshalWithDecoder

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

type OpenEdition

type OpenEdition struct {
	Bids []Bid
	Max  uint8
}

func (OpenEdition) MarshalWithEncoder

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

func (*OpenEdition) UnmarshalWithDecoder

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

type PlaceBid

type PlaceBid struct {
	Args *PlaceBidArgs

	// [0] = [SIGNER] biddersPrimaryAccount
	// ··········· The bidders primary account, for PDA calculation/transit auth.
	//
	// [1] = [WRITE] biddersTokenAccount
	// ··········· The bidders token account they'll pay with
	//
	// [2] = [WRITE] pot
	// ··········· The pot, containing a reference to the stored SPL token account.
	//
	// [3] = [WRITE] potSPLAccount
	// ··········· The pot SPL account, where the tokens will be deposited.
	//
	// [4] = [WRITE] metadataAccount
	// ··········· The metadata account, storing information about the bidders actions.
	//
	// [5] = [WRITE] auctionAccount
	// ··········· Auction account, containing data about the auction and item being bid on.
	//
	// [6] = [WRITE] tokenMint
	// ··········· Token mint, for transfer instructions and verification.
	//
	// [7] = [SIGNER] transferAuthority
	// ··········· Transfer authority, for moving tokens into the bid pot.
	//
	// [8] = [SIGNER] payer
	// ··········· Payer
	//
	// [9] = [] clockSysvar
	// ··········· Clock sysvar
	//
	// [10] = [] rentSysvar
	// ··········· Rent sysvar
	//
	// [11] = [] systemProgram
	// ··········· System program
	//
	// [12] = [] splTokenProgram
	// ··········· SPL Token Program
	ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}

Place a bid on a running auction.

func NewPlaceBidInstruction

func NewPlaceBidInstruction(

	args PlaceBidArgs,

	biddersPrimaryAccount ag_solanago.PublicKey,
	biddersTokenAccount ag_solanago.PublicKey,
	pot ag_solanago.PublicKey,
	potSPLAccount ag_solanago.PublicKey,
	metadataAccount ag_solanago.PublicKey,
	auctionAccount ag_solanago.PublicKey,
	tokenMint ag_solanago.PublicKey,
	transferAuthority ag_solanago.PublicKey,
	payer ag_solanago.PublicKey,
	clockSysvar ag_solanago.PublicKey,
	rentSysvar ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey,
	splTokenProgram ag_solanago.PublicKey) *PlaceBid

NewPlaceBidInstruction declares a new PlaceBid instruction with the provided parameters and accounts.

func NewPlaceBidInstructionBuilder

func NewPlaceBidInstructionBuilder() *PlaceBid

NewPlaceBidInstructionBuilder creates a new `PlaceBid` instruction builder.

func (PlaceBid) Build

func (inst PlaceBid) Build() *Instruction

func (*PlaceBid) EncodeToTree

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

func (*PlaceBid) GetAuctionAccount

func (inst *PlaceBid) GetAuctionAccount() *ag_solanago.AccountMeta

GetAuctionAccount gets the "auctionAccount" account. Auction account, containing data about the auction and item being bid on.

func (*PlaceBid) GetBiddersPrimaryAccount

func (inst *PlaceBid) GetBiddersPrimaryAccount() *ag_solanago.AccountMeta

GetBiddersPrimaryAccount gets the "biddersPrimaryAccount" account. The bidders primary account, for PDA calculation/transit auth.

func (*PlaceBid) GetBiddersTokenAccount

func (inst *PlaceBid) GetBiddersTokenAccount() *ag_solanago.AccountMeta

GetBiddersTokenAccount gets the "biddersTokenAccount" account. The bidders token account they'll pay with

func (*PlaceBid) GetClockSysvarAccount

func (inst *PlaceBid) GetClockSysvarAccount() *ag_solanago.AccountMeta

GetClockSysvarAccount gets the "clockSysvar" account. Clock sysvar

func (*PlaceBid) GetMetadataAccount

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

GetMetadataAccount gets the "metadataAccount" account. The metadata account, storing information about the bidders actions.

func (*PlaceBid) GetPayerAccount

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

GetPayerAccount gets the "payer" account. Payer

func (*PlaceBid) GetPotAccount

func (inst *PlaceBid) GetPotAccount() *ag_solanago.AccountMeta

GetPotAccount gets the "pot" account. The pot, containing a reference to the stored SPL token account.

func (*PlaceBid) GetPotSPLAccount

func (inst *PlaceBid) GetPotSPLAccount() *ag_solanago.AccountMeta

GetPotSPLAccount gets the "potSPLAccount" account. The pot SPL account, where the tokens will be deposited.

func (*PlaceBid) GetRentSysvarAccount

func (inst *PlaceBid) GetRentSysvarAccount() *ag_solanago.AccountMeta

GetRentSysvarAccount gets the "rentSysvar" account. Rent sysvar

func (*PlaceBid) GetSplTokenProgramAccount

func (inst *PlaceBid) GetSplTokenProgramAccount() *ag_solanago.AccountMeta

GetSplTokenProgramAccount gets the "splTokenProgram" account. SPL Token Program

func (*PlaceBid) GetSystemProgramAccount

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

GetSystemProgramAccount gets the "systemProgram" account. System program

func (*PlaceBid) GetTokenMintAccount

func (inst *PlaceBid) GetTokenMintAccount() *ag_solanago.AccountMeta

GetTokenMintAccount gets the "tokenMint" account. Token mint, for transfer instructions and verification.

func (*PlaceBid) GetTransferAuthorityAccount

func (inst *PlaceBid) GetTransferAuthorityAccount() *ag_solanago.AccountMeta

GetTransferAuthorityAccount gets the "transferAuthority" account. Transfer authority, for moving tokens into the bid pot.

func (PlaceBid) MarshalWithEncoder

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

func (*PlaceBid) SetArgs

func (inst *PlaceBid) SetArgs(args PlaceBidArgs) *PlaceBid

SetArgs sets the "args" parameter.

func (*PlaceBid) SetAuctionAccount

func (inst *PlaceBid) SetAuctionAccount(auctionAccount ag_solanago.PublicKey) *PlaceBid

SetAuctionAccount sets the "auctionAccount" account. Auction account, containing data about the auction and item being bid on.

func (*PlaceBid) SetBiddersPrimaryAccount

func (inst *PlaceBid) SetBiddersPrimaryAccount(biddersPrimaryAccount ag_solanago.PublicKey) *PlaceBid

SetBiddersPrimaryAccount sets the "biddersPrimaryAccount" account. The bidders primary account, for PDA calculation/transit auth.

func (*PlaceBid) SetBiddersTokenAccount

func (inst *PlaceBid) SetBiddersTokenAccount(biddersTokenAccount ag_solanago.PublicKey) *PlaceBid

SetBiddersTokenAccount sets the "biddersTokenAccount" account. The bidders token account they'll pay with

func (*PlaceBid) SetClockSysvarAccount

func (inst *PlaceBid) SetClockSysvarAccount(clockSysvar ag_solanago.PublicKey) *PlaceBid

SetClockSysvarAccount sets the "clockSysvar" account. Clock sysvar

func (*PlaceBid) SetMetadataAccount

func (inst *PlaceBid) SetMetadataAccount(metadataAccount ag_solanago.PublicKey) *PlaceBid

SetMetadataAccount sets the "metadataAccount" account. The metadata account, storing information about the bidders actions.

func (*PlaceBid) SetPayerAccount

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

SetPayerAccount sets the "payer" account. Payer

func (*PlaceBid) SetPotAccount

func (inst *PlaceBid) SetPotAccount(pot ag_solanago.PublicKey) *PlaceBid

SetPotAccount sets the "pot" account. The pot, containing a reference to the stored SPL token account.

func (*PlaceBid) SetPotSPLAccount

func (inst *PlaceBid) SetPotSPLAccount(potSPLAccount ag_solanago.PublicKey) *PlaceBid

SetPotSPLAccount sets the "potSPLAccount" account. The pot SPL account, where the tokens will be deposited.

func (*PlaceBid) SetRentSysvarAccount

func (inst *PlaceBid) SetRentSysvarAccount(rentSysvar ag_solanago.PublicKey) *PlaceBid

SetRentSysvarAccount sets the "rentSysvar" account. Rent sysvar

func (*PlaceBid) SetSplTokenProgramAccount

func (inst *PlaceBid) SetSplTokenProgramAccount(splTokenProgram ag_solanago.PublicKey) *PlaceBid

SetSplTokenProgramAccount sets the "splTokenProgram" account. SPL Token Program

func (*PlaceBid) SetSystemProgramAccount

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

SetSystemProgramAccount sets the "systemProgram" account. System program

func (*PlaceBid) SetTokenMintAccount

func (inst *PlaceBid) SetTokenMintAccount(tokenMint ag_solanago.PublicKey) *PlaceBid

SetTokenMintAccount sets the "tokenMint" account. Token mint, for transfer instructions and verification.

func (*PlaceBid) SetTransferAuthorityAccount

func (inst *PlaceBid) SetTransferAuthorityAccount(transferAuthority ag_solanago.PublicKey) *PlaceBid

SetTransferAuthorityAccount sets the "transferAuthority" account. Transfer authority, for moving tokens into the bid pot.

func (*PlaceBid) UnmarshalWithDecoder

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

func (*PlaceBid) Validate

func (inst *PlaceBid) Validate() error

func (PlaceBid) ValidateAndBuild

func (inst PlaceBid) 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 PlaceBidArgs

type PlaceBidArgs struct {
	// Size of the bid being placed. The user must have enough SOL to satisfy this amount.
	Amount uint64

	// Resource being bid on.
	Resource ag_solanago.PublicKey
}

func (PlaceBidArgs) MarshalWithEncoder

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

func (*PlaceBidArgs) UnmarshalWithDecoder

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

type PriceFloor

type PriceFloor interface {
	// contains filtered or unexported methods
}

type Revealer

type Revealer struct {
	Price uint64
	Salt  uint64
}

func (Revealer) MarshalWithEncoder

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

func (*Revealer) UnmarshalWithDecoder

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

type SetAuthority

type SetAuthority struct {

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

Update the authority for an auction account. https://github.com/metaplex-foundation/metaplex/blob/4a1b7d2f674013bc8bd3149294c66b03b27120d0/rust/auction/program/src/instruction.rs#L115

func NewSetAuthorityInstruction

func NewSetAuthorityInstruction(

	auction ag_solanago.PublicKey,
	authority ag_solanago.PublicKey,
	newAuthority ag_solanago.PublicKey) *SetAuthority

NewSetAuthorityInstruction declares a new SetAuthority instruction with the provided parameters and accounts.

func NewSetAuthorityInstructionBuilder

func NewSetAuthorityInstructionBuilder() *SetAuthority

NewSetAuthorityInstructionBuilder creates a new `SetAuthority` instruction builder.

func (SetAuthority) Build

func (inst SetAuthority) Build() *Instruction

func (*SetAuthority) EncodeToTree

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

func (*SetAuthority) GetAuctionAccount

func (inst *SetAuthority) GetAuctionAccount() *ag_solanago.AccountMeta

GetAuctionAccount gets the "auction" account.

func (*SetAuthority) GetAuthorityAccount

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

GetAuthorityAccount gets the "authority" account.

func (*SetAuthority) GetNewAuthorityAccount

func (inst *SetAuthority) GetNewAuthorityAccount() *ag_solanago.AccountMeta

GetNewAuthorityAccount gets the "newAuthority" account.

func (SetAuthority) MarshalWithEncoder

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

func (*SetAuthority) SetAuctionAccount

func (inst *SetAuthority) SetAuctionAccount(auction ag_solanago.PublicKey) *SetAuthority

SetAuctionAccount sets the "auction" account.

func (*SetAuthority) SetAuthorityAccount

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

SetAuthorityAccount sets the "authority" account.

func (*SetAuthority) SetNewAuthorityAccount

func (inst *SetAuthority) SetNewAuthorityAccount(newAuthority ag_solanago.PublicKey) *SetAuthority

SetNewAuthorityAccount sets the "newAuthority" account.

func (*SetAuthority) UnmarshalWithDecoder

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

func (*SetAuthority) Validate

func (inst *SetAuthority) Validate() error

func (SetAuthority) ValidateAndBuild

func (inst SetAuthority) 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 StartAuction

type StartAuction struct {
	Args *StartAuctionArgs

	// [0] = [SIGNER] creatorAccount
	// ··········· The creator/authorised account.
	//
	// [1] = [WRITE] initializedAuctionAccount
	// ··········· Initialized auction account.
	//
	// [2] = [] clockSysvar
	// ··········· Clock sysvar
	ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}

Start an inactive auction.

func NewStartAuctionInstruction

func NewStartAuctionInstruction(

	args StartAuctionArgs,

	creatorAccount ag_solanago.PublicKey,
	initializedAuctionAccount ag_solanago.PublicKey,
	clockSysvar ag_solanago.PublicKey) *StartAuction

NewStartAuctionInstruction declares a new StartAuction instruction with the provided parameters and accounts.

func NewStartAuctionInstructionBuilder

func NewStartAuctionInstructionBuilder() *StartAuction

NewStartAuctionInstructionBuilder creates a new `StartAuction` instruction builder.

func (StartAuction) Build

func (inst StartAuction) Build() *Instruction

func (*StartAuction) EncodeToTree

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

func (*StartAuction) GetClockSysvarAccount

func (inst *StartAuction) GetClockSysvarAccount() *ag_solanago.AccountMeta

GetClockSysvarAccount gets the "clockSysvar" account. Clock sysvar

func (*StartAuction) GetCreatorAccount

func (inst *StartAuction) GetCreatorAccount() *ag_solanago.AccountMeta

GetCreatorAccount gets the "creatorAccount" account. The creator/authorised account.

func (*StartAuction) GetInitializedAuctionAccount

func (inst *StartAuction) GetInitializedAuctionAccount() *ag_solanago.AccountMeta

GetInitializedAuctionAccount gets the "initializedAuctionAccount" account. Initialized auction account.

func (StartAuction) MarshalWithEncoder

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

func (*StartAuction) SetArgs

func (inst *StartAuction) SetArgs(args StartAuctionArgs) *StartAuction

SetArgs sets the "args" parameter.

func (*StartAuction) SetClockSysvarAccount

func (inst *StartAuction) SetClockSysvarAccount(clockSysvar ag_solanago.PublicKey) *StartAuction

SetClockSysvarAccount sets the "clockSysvar" account. Clock sysvar

func (*StartAuction) SetCreatorAccount

func (inst *StartAuction) SetCreatorAccount(creatorAccount ag_solanago.PublicKey) *StartAuction

SetCreatorAccount sets the "creatorAccount" account. The creator/authorised account.

func (*StartAuction) SetInitializedAuctionAccount

func (inst *StartAuction) SetInitializedAuctionAccount(initializedAuctionAccount ag_solanago.PublicKey) *StartAuction

SetInitializedAuctionAccount sets the "initializedAuctionAccount" account. Initialized auction account.

func (*StartAuction) UnmarshalWithDecoder

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

func (*StartAuction) Validate

func (inst *StartAuction) Validate() error

func (StartAuction) ValidateAndBuild

func (inst StartAuction) 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 StartAuctionArgs

type StartAuctionArgs struct {
	// The resource being auctioned. See AuctionData.
	Resource ag_solanago.PublicKey
}

func (StartAuctionArgs) MarshalWithEncoder

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

func (*StartAuctionArgs) UnmarshalWithDecoder

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

type Unlimited

type Unlimited struct {
	N int64
}

func (Unlimited) MarshalWithEncoder

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

func (*Unlimited) UnmarshalWithDecoder

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

type WinnerLimit

type WinnerLimit interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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