Documentation ¶
Index ¶
- Variables
- func BuildAssociatedAccountCreationInstructions(ctx context.Context, connection *web3.Connection, payer web3.Signer, ...) ([]web3.Instruction, error)
- func DeDupBy[T comparable, K comparable, TS ~[]T](input TS, selector func(T) K) []T
- func GetBytes(input binary.BinaryMarshaler) []byte
- func GetProgramAccountFilters(option GetProgramAccountsOption) []web3.GetProgramAccountsFilter
- func GetSize(input binary.BinaryMarshaler) int
- func Map[T any, O any, TS ~[]T](input TS, mapper func(int, T) O) []O
- func Must(err error)
- func Must1[T any](arg T, err error) T
- func Must2[T any, T2 any](arg T, arg2 T2, err error) (T, T2)
- func Must3[T any, T2 any, T3 any](arg T, arg2 T2, arg3 T3, err error) (T, T2, T3)
- func Recover(err *error)
- type BasicMetadata
- type CreateTokenArgs
- type CreateTokenArgs2022
- type FileProvider
- type GetProgramAccountsOption
- type MetadataProvider
- type MintInfo
- type ProgramAccount
- type TokenAccount
- type TransactionBuilder
- func (b *TransactionBuilder) AddInsBuilder(builder interface{ ... }) *TransactionBuilder
- func (b *TransactionBuilder) AddInstructions(ins ...any) *TransactionBuilder
- func (b *TransactionBuilder) AddInstructions2(ins any, err error) *TransactionBuilder
- func (b *TransactionBuilder) Build() (*web3.Transaction, error)
- func (b *TransactionBuilder) SetFeePayer(feePayer web3.PublicKey) *TransactionBuilder
- func (b *TransactionBuilder) SetRecentBlockHash(connection *web3.Connection, commitment web3.Commitment) *TransactionBuilder
Constants ¶
This section is empty.
Variables ¶
View Source
var ACCOUNT_TYPE_SIZE = 1
View Source
var InvalidAccountSizeErr = errors.New("InvalidAccountSizeErr")
View Source
var MULTISIG_SIZE = 355
View Source
var MetaPlex = metaPlex{}
MetaPlex Metaplex https://www.metaplex.com/
View Source
var Token = tokenKit{}
View Source
var Token2022 = tokenKit2022{}
View Source
var TokenAccountNotFoundErr = errors.New("TokenAccountNotFoundErr")
View Source
var TokenInvalidAccountOwnerErr = errors.New("TokenInvalidAccountOwnerErr")
View Source
var TokenInvalidMintErr = errors.New("TokenInvalidMintErr")
View Source
var TokenMeta = &tokenMeta{}
Functions ¶
func DeDupBy ¶
func DeDupBy[T comparable, K comparable, TS ~[]T](input TS, selector func(T) K) []T
func GetBytes ¶
func GetBytes(input binary.BinaryMarshaler) []byte
func GetProgramAccountFilters ¶
func GetProgramAccountFilters(option GetProgramAccountsOption) []web3.GetProgramAccountsFilter
func GetSize ¶
func GetSize(input binary.BinaryMarshaler) int
Types ¶
type BasicMetadata ¶
type CreateTokenArgs ¶
type CreateTokenArgs struct { BasicMetadata Decimals uint8 InitialSupply *uint64 }
type CreateTokenArgs2022 ¶
type FileProvider ¶
type FileProvider interface {
MetadataURI(ctx context.Context, connection *web3.Connection, payer web3.Signer, basic BasicMetadata) (url string, err error)
}
type GetProgramAccountsOption ¶
type GetProgramAccountsOption struct { Mint *web3.PublicKey Owner *web3.PublicKey Amount *uint64 Delegate *web3.PublicKey State *spl_token_2022.AccountState IsNative *uint64 DelegatedAmount *uint64 CloseAuthority *web3.PublicKey }
GetProgramAccountsOption represents options for filtering program accounts. When a field is not nil, it indicates that the corresponding condition is enabled. Setting multiple fields to non-nil values represents an AND relationship, meaning accounts must meet all specified conditions to be included in the results.
type MetadataProvider ¶
type MetadataProvider int
const ( MetadataPlex MetadataProvider = iota SplToken2022 )
type ProgramAccount ¶
type TokenAccount ¶
type TransactionBuilder ¶
type TransactionBuilder struct {
// contains filtered or unexported fields
}
func NewTransactionBuilder ¶
func NewTransactionBuilder() *TransactionBuilder
func (*TransactionBuilder) AddInsBuilder ¶
func (b *TransactionBuilder) AddInsBuilder(builder interface { Validate() error }) *TransactionBuilder
func (*TransactionBuilder) AddInstructions ¶
func (b *TransactionBuilder) AddInstructions(ins ...any) *TransactionBuilder
AddInstructions Support web3.Instruction and solana.Instruction
func (*TransactionBuilder) AddInstructions2 ¶
func (b *TransactionBuilder) AddInstructions2(ins any, err error) *TransactionBuilder
func (*TransactionBuilder) Build ¶
func (b *TransactionBuilder) Build() (*web3.Transaction, error)
func (*TransactionBuilder) SetFeePayer ¶
func (b *TransactionBuilder) SetFeePayer(feePayer web3.PublicKey) *TransactionBuilder
func (*TransactionBuilder) SetRecentBlockHash ¶
func (b *TransactionBuilder) SetRecentBlockHash(connection *web3.Connection, commitment web3.Commitment) *TransactionBuilder
Source Files ¶
Click to show internal directories.
Click to hide internal directories.