Documentation ¶
Index ¶
- Constants
- type AccountData
- type BridgeTransfer
- type Client
- func (c *Client) AccountData(ctx context.Context, conState jsonrpc.State, account string) (horizon.Account, error)
- func (c *Client) Address(ctx context.Context, conState jsonrpc.State) (string, error)
- func (c *Client) AwaitTransactionOnEthBridge(ctx context.Context, conState jsonrpc.State, memo string) error
- func (c *Client) Balance(ctx context.Context, conState jsonrpc.State, address string) (string, error)
- func (c *Client) BridgeToEth(ctx context.Context, conState jsonrpc.State, args BridgeTransfer) (string, error)
- func (c *Client) BridgeToTfchain(ctx context.Context, conState jsonrpc.State, args TfchainBridgeTransfer) (string, error)
- func (c *Client) CreateAccount(ctx context.Context, conState jsonrpc.State, network string) (string, error)
- func (c *Client) Load(ctx context.Context, conState jsonrpc.State, args Load) error
- func (c *Client) Swap(ctx context.Context, conState jsonrpc.State, args Swap) error
- func (c *Client) Transactions(ctx context.Context, conState jsonrpc.State, args Transactions) ([]horizon.Transaction, error)
- func (c *Client) Transfer(ctx context.Context, conState jsonrpc.State, args Transfer) (string, error)
- type ErrUnknownNetwork
- type Load
- type StellarState
- type Swap
- type TfchainBridgeTransfer
- type Transactions
- type Transfer
Constants ¶
const (
// StellarID is the ID for state of a stellar client in the connection state.
StellarID = "stellar"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountData ¶
type AccountData struct {
Account string `json:"account"`
}
type BridgeTransfer ¶
type Client ¶
type Client struct { }
Client exposing stellar methods
func (*Client) AccountData ¶
func (c *Client) AccountData(ctx context.Context, conState jsonrpc.State, account string) (horizon.Account, error)
Get data related to a stellar account
func (*Client) AwaitTransactionOnEthBridge ¶
func (c *Client) AwaitTransactionOnEthBridge(ctx context.Context, conState jsonrpc.State, memo string) error
Await till a transaction is processed on ethereum bridge that contains a specific memo
func (*Client) Balance ¶
func (c *Client) Balance(ctx context.Context, conState jsonrpc.State, address string) (string, error)
Balance of an account for TFT on stellar.
func (*Client) BridgeToEth ¶
func (c *Client) BridgeToEth(ctx context.Context, conState jsonrpc.State, args BridgeTransfer) (string, error)
BridgeToEth transfers TFT from the loaded account to eth bridge and deposits into the destination ethereum account.
func (*Client) BridgeToTfchain ¶
func (c *Client) BridgeToTfchain(ctx context.Context, conState jsonrpc.State, args TfchainBridgeTransfer) (string, error)
BridgeToTfchain transfers TFT from the loaded account to tfchain bridge and deposits into a twin account.
func (*Client) CreateAccount ¶
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) Transactions ¶
func (c *Client) Transactions(ctx context.Context, conState jsonrpc.State, args Transactions) ([]horizon.Transaction, error)
Get the last transactions of your account
type ErrUnknownNetwork ¶
type ErrUnknownNetwork struct{}
ErrUnknownNetwork indicates a client was requested for an unknown network
func (ErrUnknownNetwork) Error ¶
func (e ErrUnknownNetwork) Error() string
Error implements the error interface
type StellarState ¶
type StellarState struct { Client *stellargoclient.Client // contains filtered or unexported fields }
func State ¶
func State(conState jsonrpc.State) *StellarState
State from a connection. If no state is present, it is initialized