Documentation ¶
Index ¶
- Variables
- func BuildTransacion(ctx context.Context, clientRPC *rpc.Client, signers []solana.PrivateKey, ...) (*solana.Transaction, error)
- func CheckAccount(url string, payer solana.PublicKey, publicKey solana.PublicKey, ...) (map[string]solana.PublicKey, []solana.Instruction, error)
- func ExecuteInstructions(ctx context.Context, clientRPC *rpc.Client, signers []solana.PrivateKey, ...) (string, error)
- func ExecuteInstructionsAndWaitConfirm(ctx context.Context, clientRPC *rpc.Client, RPCWs string, ...) (string, error)
- func GetBalance(url string, pubkey string) (uint64, error)
- func GetTokenAccountBalance(url string, pubkey string) (string, float64, error)
- func GetTokenAccountsFromMints(ctx context.Context, url string, owner solana.PublicKey, ...) (map[string]solana.PublicKey, map[string]solana.PublicKey, error)
- func GetTransaction(url string, signature string) (out *rpc.GetTransactionResult, err error)
- func TransferSOL(url string, wsUrl string, fromKey string, to string, amount uint64) (sig string, err error)
- func TransferToken(ctx context.Context, url string, wsUrl string, amount uint64, ...) (sig string, err error)
- type Context
- type Encoding
- type GetBalanceResponse
- type GetTokenAccountsByOwnerResponse
- type MetaResponse
- type Mint
- type PoolInfoResponse
- type Program
- type RaydiumLiquidityPoolv4
- type RaydiumSwapInnerInstructionData
- type RaydiumSwapInstructionParam
- type Result
- type TokenAccountInfo
- type TokenBalance
- type TransferSOLInstructionParam
- type Value
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RaydiumLiquidityPoolv4ProgramID = solana.MustPublicKeyFromBase58("675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8") NativeSOL = "11111111111111111111111111111111" )
Functions ¶
func BuildTransacion ¶ added in v1.0.9
func CheckAccount ¶ added in v1.0.15
func ExecuteInstructions ¶ added in v1.0.9
func ExecuteInstructionsAndWaitConfirm ¶ added in v1.0.9
func GetTokenAccountBalance ¶ added in v1.0.7
func GetTokenAccountsFromMints ¶ added in v1.0.15
func GetTransaction ¶ added in v1.0.7
func GetTransaction(url string, signature string) (out *rpc.GetTransactionResult, err error)
func TransferSOL ¶ added in v1.0.14
Types ¶
type GetBalanceResponse ¶ added in v1.0.11
type GetTokenAccountsByOwnerResponse ¶ added in v1.0.7
type GetTokenAccountsByOwnerResponse struct { Context struct { Slot int `json:"slot"` } `json:"context"` Value []struct { Account struct { Data struct { Parsed struct { Info struct { IsNative bool `json:"isNative"` Mint string `json:"mint"` Owner string `json:"owner"` State string `json:"state"` TokenAmount struct { Amount string `json:"amount"` Decimals int `json:"decimals"` UIAmount float64 `json:"uiAmount"` UIAmountString string `json:"uiAmountString"` } `json:"tokenAmount"` } `json:"info"` Type string `json:"type"` } `json:"parsed"` Program string `json:"program"` Space int `json:"space"` } `json:"data"` Executable bool `json:"executable"` Lamports int `json:"lamports"` Owner string `json:"owner"` } `json:"account"` Pubkey string `json:"pubkey"` } `json:"value"` }
func GetTokenAccountsByOwner ¶ added in v1.0.7
type MetaResponse ¶ added in v1.0.7
type PoolInfoResponse ¶ added in v1.0.7
type PoolInfoResponse struct {
RaydiumLiquidityPoolv4 []*RaydiumLiquidityPoolv4 `json:"Raydium_LiquidityPoolv4"`
}
func GetPoolInfo ¶ added in v1.0.7
type RaydiumLiquidityPoolv4 ¶ added in v1.0.7
type RaydiumLiquidityPoolv4 struct { BaseDecimal int `json:"baseDecimal"` BaseMint string `json:"baseMint"` BaseVault string `json:"baseVault"` LpMint string `json:"lpMint"` LpVault string `json:"lpVault"` MarketId string `json:"marketId"` MarketProgramId string `json:"marketProgramId"` OpenOrders string `json:"openOrders"` QuoteDecimal int `json:"quoteDecimal"` QuoteMint string `json:"quoteMint"` QuoteVault string `json:"quoteVault"` TargetOrders string `json:"targetOrders"` WithdrawQueue string `json:"withdrawQueue"` Pubkey string `json:"pubkey"` }
type RaydiumSwapInnerInstructionData ¶ added in v1.0.11
type RaydiumSwapInstructionParam ¶ added in v1.0.11
type RaydiumSwapInstructionParam struct { SwapIn *RaydiumSwapInnerInstructionData SwapOut *RaydiumSwapInnerInstructionData }
func ParseRaydiumSwapInstructionParam ¶ added in v1.0.11
func ParseRaydiumSwapInstructionParam(out *rpc.GetTransactionResult) (param *RaydiumSwapInstructionParam, succeed bool, err error)
type Result ¶ added in v1.0.7
type TokenAccountInfo ¶ added in v1.0.15
type TokenAccountInfo struct { Mint solana.PublicKey Account solana.PublicKey }
type TokenBalance ¶ added in v1.0.7
type TransferSOLInstructionParam ¶ added in v1.0.11
func ParseTransferSOLInstructionParam ¶ added in v1.0.11
func ParseTransferSOLInstructionParam(out *rpc.GetTransactionResult) (params []*TransferSOLInstructionParam, succeed bool, err error)
Click to show internal directories.
Click to hide internal directories.