Documentation ¶
Index ¶
- type Client
- func (client *Client) FetchBalance(ctx context.Context, address xc.Address) (xc.AmountBlockchain, error)
- func (client *Client) FetchBalanceForAsset(ctx context.Context, address xc.Address, assetCfg xc.ITask) (xc.AmountBlockchain, error)
- func (client *Client) FetchBaseInput(ctx context.Context, fromAddr xc.Address) (*tx_input.TxInput, error)
- func (client *Client) FetchDecimals(ctx context.Context, contract xc.ContractAddress) (int, error)
- func (client *Client) FetchLegacyTxInfo(ctx context.Context, txHash xc.TxHash) (xc.LegacyTxInfo, error)
- func (client *Client) FetchLegacyTxInput(ctx context.Context, from xc.Address, to xc.Address) (xc.TxInput, error)
- func (client *Client) FetchNativeBalance(ctx context.Context, address xc.Address) (xc.AmountBlockchain, error)
- func (client *Client) FetchStakeBalance(ctx context.Context, args xclient.StakedBalanceArgs) ([]*xclient.StakedBalance, error)
- func (client *Client) FetchStakingInput(ctx context.Context, args xcbuilder.StakeArgs) (xc.StakeTxInput, error)
- func (client *Client) FetchTransferInput(ctx context.Context, args xcbuilder.TransferArgs) (xc.TxInput, error)
- func (client *Client) FetchTxInfo(ctx context.Context, txHashStr xc.TxHash) (xclient.TxInfo, error)
- func (client *Client) FetchUnstakingInput(ctx context.Context, args xcbuilder.StakeArgs) (xc.UnstakeTxInput, error)
- func (client *Client) FetchWithdrawInput(ctx context.Context, args xcbuilder.StakeArgs) (xc.WithdrawTxInput, error)
- func (client *Client) GetStakeAccounts(ctx context.Context, address xc.Address) ([]*parsedStakeAccount, error)
- func (client *Client) GetTokenAccountsByOwner(ctx context.Context, addr string, contract string) ([]*TokenAccountWithInfo, error)
- func (client *Client) LookupStakeAccount(ctx context.Context, stakeAccount solana.PublicKey) (types.StakeAccount, error)
- func (client *Client) LookupTokenAccount(ctx context.Context, tokenAccount solana.PublicKey) (types.TokenAccountInfo, error)
- func (client *Client) LookupTokenMint(ctx context.Context, tokenContract solana.PublicKey) (types.MintAccountInfo, error)
- func (client *Client) SubmitTx(ctx context.Context, txInput xc.Tx) error
- type TokenAccountWithInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client for Solana
func (*Client) FetchBalance ¶
func (client *Client) FetchBalance(ctx context.Context, address xc.Address) (xc.AmountBlockchain, error)
FetchBalance fetches token balance for a Solana address
func (*Client) FetchBalanceForAsset ¶
func (client *Client) FetchBalanceForAsset(ctx context.Context, address xc.Address, assetCfg xc.ITask) (xc.AmountBlockchain, error)
FetchBalanceForAsset fetches a specific token balance which may not be the asset configured for the client
func (*Client) FetchBaseInput ¶
func (*Client) FetchDecimals ¶
func (*Client) FetchLegacyTxInfo ¶
func (client *Client) FetchLegacyTxInfo(ctx context.Context, txHash xc.TxHash) (xc.LegacyTxInfo, error)
FetchLegacyTxInfo returns tx info for a Solana tx
func (*Client) FetchLegacyTxInput ¶
func (*Client) FetchNativeBalance ¶
func (client *Client) FetchNativeBalance(ctx context.Context, address xc.Address) (xc.AmountBlockchain, error)
FetchNativeBalance fetches account balance for a Solana address
func (*Client) FetchStakeBalance ¶
func (client *Client) FetchStakeBalance(ctx context.Context, args xclient.StakedBalanceArgs) ([]*xclient.StakedBalance, error)
func (*Client) FetchStakingInput ¶
func (*Client) FetchTransferInput ¶
func (client *Client) FetchTransferInput(ctx context.Context, args xcbuilder.TransferArgs) (xc.TxInput, error)
FetchLegacyTxInput returns tx input for a Solana tx, namely a RecentBlockHash
func (*Client) FetchTxInfo ¶
func (*Client) FetchUnstakingInput ¶
func (*Client) FetchWithdrawInput ¶
func (*Client) GetStakeAccounts ¶
func (*Client) GetTokenAccountsByOwner ¶
func (client *Client) GetTokenAccountsByOwner(ctx context.Context, addr string, contract string) ([]*TokenAccountWithInfo, error)
Get all token accounts for a given token that are owned by an address.
func (*Client) LookupStakeAccount ¶
func (*Client) LookupTokenAccount ¶
func (*Client) LookupTokenMint ¶
type TokenAccountWithInfo ¶
type TokenAccountWithInfo struct { // We need to manually parse TokenAccountInfo Info *types.TokenAccountInfo // Account is what's returned by solana client Account *rpc.TokenAccount }
Click to show internal directories.
Click to hide internal directories.