Documentation ¶
Index ¶
- Constants
- type Client
- func (client *Client) ApiCallWithUrl(ctx context.Context, method string, url string, data interface{}) ([]byte, error)
- func (cli *Client) CompleteManualUnstaking(ctx context.Context, unstake *xcclient.Unstake) error
- func (client *Client) FetchBalance(ctx context.Context, address xc.Address) (xc.AmountBlockchain, 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 xcclient.StakedBalanceArgs) ([]*xcclient.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) SubmitTx(ctx context.Context, txInput xc.Tx) error
Constants ¶
View Source
const ServiceApiKeyHeader = "x-service-api-key"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Asset xc.ITask URL string Http *http.Client Network xc.NetworkSelector StakingProvider xc.StakingProvider ApiKey string ServiceApiKey string }
Client for Template
func NewStakingClient ¶
func (*Client) ApiCallWithUrl ¶
func (*Client) CompleteManualUnstaking ¶
func (client *Client) FetchWithdrawInput(ctx context.Context, args xcbuilder.StakeArgs) (xc.WithdrawTxInput, error) {
func (*Client) FetchBalance ¶
func (client *Client) FetchBalance(ctx context.Context, address xc.Address) (xc.AmountBlockchain, error)
FetchBalance fetches token balance from a Crosschain endpoint
func (*Client) FetchLegacyTxInfo ¶
func (client *Client) FetchLegacyTxInfo(ctx context.Context, txHash xc.TxHash) (xc.LegacyTxInfo, error)
FetchLegacyTxInfo returns tx info from a Crosschain endpoint
func (*Client) FetchLegacyTxInput ¶
func (*Client) FetchNativeBalance ¶
func (client *Client) FetchNativeBalance(ctx context.Context, address xc.Address) (xc.AmountBlockchain, error)
FetchNativeBalance fetches account balance from a Crosschain endpoint
func (*Client) FetchStakeBalance ¶
func (client *Client) FetchStakeBalance(ctx context.Context, args xcclient.StakedBalanceArgs) ([]*xcclient.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 from a Crosschain endpoint
func (*Client) FetchTxInfo ¶
func (*Client) FetchUnstakingInput ¶
func (*Client) FetchWithdrawInput ¶
Click to show internal directories.
Click to hide internal directories.