Documentation ¶
Index ¶
- Constants
- type ApprovalForFungible
- type ApproveHash
- type ApproveTokenSpending
- type Client
- func (c *Client) AddMultisigOwner(ctx context.Context, conState jsonrpc.State, args MultisigOwner) (string, error)
- func (c *Client) Address(ctx context.Context, conState jsonrpc.State) (string, error)
- func (c *Client) ApproveEthTftSpending(ctx context.Context, conState jsonrpc.State, amount string) (string, error)
- func (c *Client) ApproveHash(ctx context.Context, conState jsonrpc.State, args ApproveHash) (string, error)
- func (c *Client) ApproveTokenSpending(ctx context.Context, conState jsonrpc.State, args ApproveTokenSpending) (string, error)
- func (c *Client) Balance(ctx context.Context, conState jsonrpc.State, address string) (string, error)
- func (c *Client) BridgeToStellar(ctx context.Context, conState jsonrpc.State, args TftEthTransfer) (string, error)
- func (c *Client) CreateAndActivateStellarAccount(ctx context.Context, conState jsonrpc.State, network string) (string, error)
- func (c *Client) EthTftSpendingAllowance(ctx context.Context, conState jsonrpc.State) (string, error)
- func (c *Client) GetApprovalForAllFungible(ctx context.Context, conState jsonrpc.State, args ApprovalForFungible) (bool, error)
- func (c *Client) GetApprovalForFungible(ctx context.Context, conState jsonrpc.State, args ApprovalForFungible) (bool, error)
- func (c *Client) GetEthTftBalance(ctx context.Context, conState jsonrpc.State) (string, error)
- func (c *Client) GetFungibleBalance(ctx context.Context, conState jsonrpc.State, args GetFungibleBalance) (string, error)
- func (c *Client) GetHexSeed(ctx context.Context, conState jsonrpc.State) (string, error)
- func (c *Client) GetMultisigOwners(ctx context.Context, conState jsonrpc.State, contractAddress string) ([]string, error)
- func (c *Client) GetMultisigThreshold(ctx context.Context, conState jsonrpc.State, contractAddress string) (string, error)
- func (c *Client) GetTokenBalance(ctx context.Context, conState jsonrpc.State, contractAddress string) (string, error)
- func (c *Client) Height(ctx context.Context, conState jsonrpc.State) (uint64, error)
- func (c *Client) InitiateMultisigEthTransfer(ctx context.Context, conState jsonrpc.State, args InitiateMultisigEthTransfer) (string, error)
- func (c *Client) InitiateMultisigTokenTransfer(ctx context.Context, conState jsonrpc.State, ...) (string, error)
- func (c *Client) IsApproved(ctx context.Context, conState jsonrpc.State, args ApproveHash) (bool, error)
- func (c *Client) Load(ctx context.Context, conState jsonrpc.State, args Load) error
- func (c *Client) OwnerOfFungible(ctx context.Context, conState jsonrpc.State, args OwnerOfFungible) (string, error)
- func (c *Client) QuoteEthForTft(ctx context.Context, conState jsonrpc.State, amountIn string) (string, error)
- func (c *Client) QuoteTftForEth(ctx context.Context, conState jsonrpc.State, amountIn string) (string, error)
- func (c *Client) RemoveMultisigOwner(ctx context.Context, conState jsonrpc.State, args MultisigOwner) (string, error)
- func (c *Client) SafeTransferFungible(ctx context.Context, conState jsonrpc.State, args TransferFungible) (string, error)
- func (c *Client) SetFungibleApproval(ctx context.Context, conState jsonrpc.State, args SetFungibleApproval) (string, error)
- func (c *Client) SetFungibleApprovalForAll(ctx context.Context, conState jsonrpc.State, args SetFungibleApprovalForAll) (string, error)
- func (c *Client) SwapEthForTft(ctx context.Context, conState jsonrpc.State, amountIn string) (string, error)
- func (c *Client) SwapTftForEth(ctx context.Context, conState jsonrpc.State, amountIn string) (string, error)
- func (c *Client) Transfer(ctx context.Context, conState jsonrpc.State, args Transfer) (string, error)
- func (c *Client) TransferEthTft(ctx context.Context, conState jsonrpc.State, args TftEthTransfer) (string, error)
- func (c *Client) TransferFromTokens(ctx context.Context, conState jsonrpc.State, args TokenTransferFrom) (string, error)
- func (c *Client) TransferFungible(ctx context.Context, conState jsonrpc.State, args TransferFungible) (string, error)
- func (c *Client) TransferTokens(ctx context.Context, conState jsonrpc.State, args TokenTransfer) (string, error)
- type EthState
- type GetFungibleBalance
- type GetTokenBalance
- type InitiateMultisigEthTransfer
- type InitiateMultisigTokenTransfer
- type Load
- type MultisigOwner
- type OwnerOfFungible
- type SetFungibleApproval
- type SetFungibleApprovalForAll
- type TftEthTransfer
- type TokenTransfer
- type TokenTransferFrom
- type Transfer
- type TransferFungible
Constants ¶
const (
// Eth is the ID for state of an eth client in the connection state.
EthID = "eth"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApprovalForFungible ¶
type ApproveHash ¶
type ApproveTokenSpending ¶
type Client ¶
type Client struct { }
Client exposes ethereum related functionality
func (*Client) AddMultisigOwner ¶
func (c *Client) AddMultisigOwner(ctx context.Context, conState jsonrpc.State, args MultisigOwner) (string, error)
AddMultisigOwner adds an owner to a multisig contract
func (*Client) ApproveEthTftSpending ¶
func (*Client) ApproveHash ¶
func (c *Client) ApproveHash(ctx context.Context, conState jsonrpc.State, args ApproveHash) (string, error)
ApproveHash approves a transaction hash
func (*Client) ApproveTokenSpending ¶
func (c *Client) ApproveTokenSpending(ctx context.Context, conState jsonrpc.State, args ApproveTokenSpending) (string, error)
ApproveTokenSpending approves spending from a token contract with a limit
func (*Client) Balance ¶
func (c *Client) Balance(ctx context.Context, conState jsonrpc.State, address string) (string, error)
Balance of an address
func (*Client) BridgeToStellar ¶
func (*Client) CreateAndActivateStellarAccount ¶
func (*Client) EthTftSpendingAllowance ¶
func (*Client) GetApprovalForAllFungible ¶
func (c *Client) GetApprovalForAllFungible(ctx context.Context, conState jsonrpc.State, args ApprovalForFungible) (bool, error)
GetApprovalForAllFungible returns whether the given address is approved to spend all the given fungible tokens
func (*Client) GetApprovalForFungible ¶
func (c *Client) GetApprovalForFungible(ctx context.Context, conState jsonrpc.State, args ApprovalForFungible) (bool, error)
GetApprovalForFungible returns whether the given address is approved to spend the given tokenId of the given fungible token
func (*Client) GetEthTftBalance ¶
func (*Client) GetFungibleBalance ¶
func (c *Client) GetFungibleBalance(ctx context.Context, conState jsonrpc.State, args GetFungibleBalance) (string, error)
GetFungibleBalance returns the balance of the given address for the given fungible token contract
func (*Client) GetHexSeed ¶
func (*Client) GetMultisigOwners ¶
func (c *Client) GetMultisigOwners(ctx context.Context, conState jsonrpc.State, contractAddress string) ([]string, error)
GetMultisigOwners fetches the owner addresses for a multisig contract
func (*Client) GetMultisigThreshold ¶
func (c *Client) GetMultisigThreshold(ctx context.Context, conState jsonrpc.State, contractAddress string) (string, error)
GetMultisigThreshold fetches the treshold for a multisig contract
func (*Client) GetTokenBalance ¶
func (c *Client) GetTokenBalance(ctx context.Context, conState jsonrpc.State, contractAddress string) (string, error)
GetTokenBalance fetches the balance for an erc20 compatible contract
func (*Client) InitiateMultisigEthTransfer ¶
func (c *Client) InitiateMultisigEthTransfer(ctx context.Context, conState jsonrpc.State, args InitiateMultisigEthTransfer) (string, error)
InitiateMultisigEthTransfer initiates a multisig eth transfer operation
func (*Client) InitiateMultisigTokenTransfer ¶
func (c *Client) InitiateMultisigTokenTransfer(ctx context.Context, conState jsonrpc.State, args InitiateMultisigTokenTransfer) (string, error)
InitiateMultisigTokenTransfer initiates a multisig eth transfer operation
func (*Client) IsApproved ¶
func (c *Client) IsApproved(ctx context.Context, conState jsonrpc.State, args ApproveHash) (bool, error)
IsApproved approves a transaction hash
func (*Client) Load ¶
Load a client, connecting to the rpc endpoint at the given URL and loading a keypair from the given secret
func (*Client) OwnerOfFungible ¶
func (c *Client) OwnerOfFungible(ctx context.Context, conState jsonrpc.State, args OwnerOfFungible) (string, error)
OwnerOfFungible returns the owner of the given fungible token
func (*Client) QuoteEthForTft ¶
func (*Client) QuoteTftForEth ¶
func (*Client) RemoveMultisigOwner ¶
func (c *Client) RemoveMultisigOwner(ctx context.Context, conState jsonrpc.State, args MultisigOwner) (string, error)
RemoveMultisigOwner adds an owner to a multisig contract
func (*Client) SafeTransferFungible ¶
func (c *Client) SafeTransferFungible(ctx context.Context, conState jsonrpc.State, args TransferFungible) (string, error)
SafeTransferFungible transfers a fungible token from the given address to the given target address
func (*Client) SetFungibleApproval ¶
func (c *Client) SetFungibleApproval(ctx context.Context, conState jsonrpc.State, args SetFungibleApproval) (string, error)
SetFungibleApproval approves the given address to spend the given tokenId of the given fungible token
func (*Client) SetFungibleApprovalForAll ¶
func (c *Client) SetFungibleApprovalForAll(ctx context.Context, conState jsonrpc.State, args SetFungibleApprovalForAll) (string, error)
SetFungibleApprovalForAll approves the given address to spend all the given fungible tokens
func (*Client) SwapEthForTft ¶
func (*Client) SwapTftForEth ¶
func (*Client) Transfer ¶
func (c *Client) Transfer(ctx context.Context, conState jsonrpc.State, args Transfer) (string, error)
Transer an amount of Eth from the loaded account to the destination. The transaction ID is returned.
func (*Client) TransferEthTft ¶
func (*Client) TransferFromTokens ¶
func (c *Client) TransferFromTokens(ctx context.Context, conState jsonrpc.State, args TokenTransferFrom) (string, error)
TransferFromTokens transfer tokens from an account to another account (can be executed by anyone that is approved to spend)
func (*Client) TransferFungible ¶
func (c *Client) TransferFungible(ctx context.Context, conState jsonrpc.State, args TransferFungible) (string, error)
TransferFungible transfers the given fungible token from the given address to the given target address
func (*Client) TransferTokens ¶
func (c *Client) TransferTokens(ctx context.Context, conState jsonrpc.State, args TokenTransfer) (string, error)
TransferToken transfer an erc20 compatible token to a destination
type EthState ¶
type EthState struct {
Client *goethclient.Client
}
EthState managed by ethereum client