figment

package
v0.0.0-...-78810ce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2025 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(rpcClient *evmclient.Client, chain *xc.ChainConfig, figmentCfg *services.FigmentConfig) (xcclient.StakingClient, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) CompleteManualUnstaking

func (cli *Client) CompleteManualUnstaking(ctx context.Context, unstake *xcclient.Unstake) error

We only want to unstake from a predetermined list of validators, as opposed to asking the provider to unstake N validators for us. This is because we don't want to risk a double-unstake (unstaking double the amount we intended). By only unstaking from a predetermined list, we can ensure this is safely idempotent.

func (*Client) FetchActiveValidators

func (cli *Client) FetchActiveValidators(ctx context.Context, from xc.Address) ([][]byte, error)

func (*Client) FetchStakeBalance

func (cli *Client) FetchStakeBalance(ctx context.Context, args xcclient.StakedBalanceArgs) ([]*xcclient.StakedBalance, error)

func (*Client) FetchStakingInput

func (cli *Client) FetchStakingInput(ctx context.Context, args xcbuilder.StakeArgs) (xc.StakeTxInput, error)

func (*Client) FetchUnstakingInput

func (cli *Client) FetchUnstakingInput(ctx context.Context, args xcbuilder.StakeArgs) (xc.UnstakeTxInput, error)

func (*Client) FetchWithdrawInput

func (cli *Client) FetchWithdrawInput(ctx context.Context, args xcbuilder.StakeArgs) (xc.WithdrawTxInput, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL