Documentation ¶
Overview ¶
Code generated by rice embed-go; DO NOT EDIT.
Index ¶
- Constants
- Variables
- func DoCloseAccount(ctx context.Context, rpcCli *rpc.Client, wsCli *ws.Client, ...) (string, error)
- func TransferToken(ctx context.Context, rpcCli *rpc.Client, wsCli *ws.Client, amount uint64, ...) (solana.PublicKey, string, error)
- type Account
- type Approve
- type ApproveAccounts
- type ApproveChecked
- type ApproveCheckedAccounts
- type AuthorityType
- type Burn
- type BurnAccounts
- type BurnChecked
- type BurnCheckedAccounts
- type CloseAccount
- type CloseAccountAccounts
- type FreezeAccount
- type FreezeAccountAccounts
- type InitializeAccount
- type InitializeAccountAccounts
- type InitializeMint
- type InitializeMintAccounts
- type InitializeMultisig
- type InitializeMultisigAccounts
- type Instruction
- func DecodeInstruction(accounts []*solana.AccountMeta, data []byte) (*Instruction, error)
- func NewCloseAccount(account solana.PublicKey, destination solana.PublicKey, owner solana.PublicKey) *Instruction
- func NewInitializeMintInstruction(decimals uint8, mint solana.PublicKey, mintAuthority solana.PublicKey, ...) *Instruction
- func NewMintTo(Amount uint64, Mint solana.PublicKey, Account solana.PublicKey, ...) *Instruction
- func NewSetAuthorityInstruction(account solana.PublicKey, newAuthority solana.PublicKey, ...) *Instruction
- func NewTransferInstruction(amount uint64, source solana.PublicKey, destination solana.PublicKey, ...) *Instruction
- func (i *Instruction) Accounts() (out []*solana.AccountMeta)
- func (i *Instruction) Data() ([]byte, error)
- func (i *Instruction) MarshalBinary(encoder *bin.Encoder) error
- func (i *Instruction) ProgramID() solana.PublicKey
- func (i *Instruction) TextEncode(encoder *text.Encoder, option *text.Option) error
- func (i *Instruction) UnmarshalBinary(decoder *bin.Decoder) (err error)
- type Mint
- type MintMeta
- type MintTo
- type MintToAccounts
- type MintToChecked
- type MintToCheckedAccounts
- type Multisig
- type Revoke
- type RevokeAccounts
- type SetAuthority
- type SetAuthorityAccounts
- type ThawAccount
- type ThawAccountAccounts
- type Token
- type Transfer
- type TransferAccounts
- type TransferChecked
- type TransferCheckedAccounts
Constants ¶
View Source
const ACCOUNT_SIZE = 165
View Source
const MINT_SIZE = 82
Variables ¶
View Source
var InstructionDefVariant = bin.NewVariantDefinition(bin.Uint8TypeIDEncoding, []bin.VariantType{ {"initialize_mint", (*InitializeMint)(nil)}, {"initialize_account", (*InitializeAccount)(nil)}, {"InitializeMultisig", (*InitializeMultisig)(nil)}, {"Transfer", (*Transfer)(nil)}, {"Approve", (*Approve)(nil)}, {"Revoke", (*Revoke)(nil)}, {"SetAuthority", (*SetAuthority)(nil)}, {"MintTo", (*MintTo)(nil)}, {"Burn", (*Burn)(nil)}, {"CloseAccount", (*CloseAccount)(nil)}, {"FreezeAccount", (*FreezeAccount)(nil)}, {"ThawAccount", (*ThawAccount)(nil)}, {"TransferChecked", (*TransferChecked)(nil)}, {"ApproveChecked", (*ApproveChecked)(nil)}, {"MintToChecked", (*MintToChecked)(nil)}, {"BurnChecked", (*BurnChecked)(nil)}, })
View Source
var PROGRAM_ID = solana.MustPublicKeyFromBase58("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA")
Functions ¶
func DoCloseAccount ¶
Types ¶
type Account ¶
type Account struct { Key solana.PublicKey `bin:"-"` Mint solana.PublicKey Owner solana.PublicKey Amount bin.Uint64 IsDelegateSet uint32 Delegate solana.PublicKey IsInitialized bool IsNative bool Padding [2]byte `json:"-"` DelegatedAmount bin.Uint64 }
func FetchAccountHolders ¶
func FetchAccountsForOwner ¶
type Approve ¶
type Approve struct {
Accounts *ApproveAccounts
}
type ApproveAccounts ¶
type ApproveAccounts struct { }
type ApproveChecked ¶
type ApproveChecked struct {
Accounts *ApproveCheckedAccounts
}
type ApproveCheckedAccounts ¶
type ApproveCheckedAccounts struct { }
type AuthorityType ¶
type AuthorityType byte
const ( MintTokensAuthorityType AuthorityType = iota FreezeAccountAuthorityType AccountOwnerAuthorityType CloseAccountAuthorityType )
type Burn ¶
type Burn struct {
Accounts *BurnAccounts
}
type BurnAccounts ¶
type BurnAccounts struct { }
type BurnChecked ¶
type BurnChecked struct {
Accounts *BurnCheckedAccounts
}
type BurnCheckedAccounts ¶
type BurnCheckedAccounts struct { }
type CloseAccount ¶
type CloseAccount struct {
Accounts *CloseAccountAccounts
}
type CloseAccountAccounts ¶
type CloseAccountAccounts struct { Account *solana.AccountMeta Destination *solana.AccountMeta Owner *solana.AccountMeta }
type FreezeAccount ¶
type FreezeAccount struct {
Accounts *FreezeAccountAccounts
}
type FreezeAccountAccounts ¶
type FreezeAccountAccounts struct { }
type InitializeAccount ¶
type InitializeAccount struct {
Accounts *InitializeAccountAccounts `bin:"-"`
}
func (*InitializeAccount) SetAccounts ¶
func (i *InitializeAccount) SetAccounts(accounts []*solana.AccountMeta) error
type InitializeAccountAccounts ¶
type InitializeAccountAccounts struct { Account *solana.AccountMeta `text:"linear,notype"` Mint *solana.AccountMeta `text:"linear,notype"` Owner *solana.AccountMeta `text:"linear,notype"` RentSysvar *solana.AccountMeta `text:"linear,notype"` }
type InitializeMint ¶
type InitializeMint struct { /// Number of base 10 digits to the right of the decimal place. Decimals uint8 /// The authority/multisignature to mint tokens. MintAuthority solana.PublicKey /// The freeze authority/multisignature of the mint. FreezeAuthority *solana.PublicKey `bin:"optional"` Accounts *InitializeMintAccounts `bin:"-"` }
func (*InitializeMint) SetAccounts ¶
func (i *InitializeMint) SetAccounts(accounts []*solana.AccountMeta) error
type InitializeMintAccounts ¶
type InitializeMintAccounts struct { Mint *solana.AccountMeta RentProgram *solana.AccountMeta }
type InitializeMultisig ¶
type InitializeMultisig struct {
Accounts *InitializeMultisigAccounts
}
type InitializeMultisigAccounts ¶
type InitializeMultisigAccounts struct { }
type Instruction ¶
type Instruction struct {
bin.BaseVariant
}
func DecodeInstruction ¶
func DecodeInstruction(accounts []*solana.AccountMeta, data []byte) (*Instruction, error)
func NewCloseAccount ¶
func NewCloseAccount( account solana.PublicKey, destination solana.PublicKey, owner solana.PublicKey, ) *Instruction
func NewInitializeMintInstruction ¶
func NewInitializeMintInstruction( decimals uint8, mint solana.PublicKey, mintAuthority solana.PublicKey, freezeAuthority *solana.PublicKey, rentProgram solana.PublicKey, ) *Instruction
func NewMintTo ¶
func NewMintTo( Amount uint64, Mint solana.PublicKey, Account solana.PublicKey, MintAuthority solana.PublicKey, ) *Instruction
func NewSetAuthorityInstruction ¶
func NewSetAuthorityInstruction( account solana.PublicKey, newAuthority solana.PublicKey, authorityType AuthorityType, currentAuthority solana.PublicKey, ) *Instruction
func NewTransferInstruction ¶
func NewTransferInstruction( amount uint64, source solana.PublicKey, destination solana.PublicKey, from solana.PublicKey, ) *Instruction
func (*Instruction) Accounts ¶
func (i *Instruction) Accounts() (out []*solana.AccountMeta)
func (*Instruction) Data ¶
func (i *Instruction) Data() ([]byte, error)
func (*Instruction) MarshalBinary ¶
func (i *Instruction) MarshalBinary(encoder *bin.Encoder) error
func (*Instruction) ProgramID ¶
func (i *Instruction) ProgramID() solana.PublicKey
func (*Instruction) TextEncode ¶
func (*Instruction) UnmarshalBinary ¶
func (i *Instruction) UnmarshalBinary(decoder *bin.Decoder) (err error)
type Mint ¶
type MintTo ¶
type MintTo struct { Amount uint64 Accounts *MintToAccounts `bin:"-"` }
type MintToAccounts ¶
type MintToAccounts struct { Mint *solana.AccountMeta Account *solana.AccountMeta MintAuthority *solana.AccountMeta }
type MintToChecked ¶
type MintToChecked struct {
Accounts *MintToCheckedAccounts
}
type MintToCheckedAccounts ¶
type MintToCheckedAccounts struct { }
type Revoke ¶
type Revoke struct {
Accounts *RevokeAccounts
}
type RevokeAccounts ¶
type RevokeAccounts struct { }
type SetAuthority ¶
type SetAuthority struct { AuthorityType AuthorityType NewAuthorityKey solana.PublicKey `bin:"optional"` Accounts *SetAuthorityAccounts `bin:"-"` }
type SetAuthorityAccounts ¶
type SetAuthorityAccounts struct { Account *solana.AccountMeta CurrentAuthority *solana.AccountMeta }
type ThawAccount ¶
type ThawAccount struct {
Accounts *ThawAccountAccounts
}
type ThawAccountAccounts ¶
type ThawAccountAccounts struct { }
type Transfer ¶
type Transfer struct { Amount uint64 Accounts *TransferAccounts }
type TransferAccounts ¶
type TransferAccounts struct { Source *solana.AccountMeta Destination *solana.AccountMeta From *solana.AccountMeta }
type TransferChecked ¶
type TransferChecked struct {
Accounts *TransferCheckedAccounts
}
type TransferCheckedAccounts ¶
type TransferCheckedAccounts struct { }
Click to show internal directories.
Click to hide internal directories.