Documentation ¶
Index ¶
- Constants
- Variables
- func GetHorizonClient(stellarNetwork string) *horizonclient.Client
- func GetKeypairFromSeed(seed string) (*keypair.Full, error)
- type Client
- func (c *Client) AccountData(account string) (horizon.Account, error)
- func (c *Client) Address() string
- func (c *Client) AwaitForTransactionWithMemoOnTfchainBridge(ctx context.Context, memo string, timeout int) error
- func (c *Client) AwaitTransactionWithMemo(ctx context.Context, account string, memo string, timeout int) error
- func (c *Client) AwaitTransactionWithMemoOnEthBridge(ctx context.Context, memo string, timeout int) error
- func (c *Client) CreateAccount() (string, error)
- func (c *Client) FundTransactionUsingTft(destination string, amount string) error
- func (c *Client) GetActivationServiceUrl() string
- func (c *Client) GetAssetFromString(asset string) (txnbuild.Asset, error)
- func (c *Client) GetBalance(account string) (string, error)
- func (c *Client) GetEthBridgeAddress() (string, error)
- func (c *Client) GetStellarNetworkPassphrase() string
- func (c *Client) GetTfchainBridgeAddress() (string, error)
- func (c *Client) GetTftAsset() txnbuild.CreditAsset
- func (c *Client) GetTftBaseAsset() base.Asset
- func (c *Client) GetTransactionFundingUrlFromNetwork() string
- func (c *Client) GetXlmAsset() txnbuild.CreditAsset
- func (c *Client) KeyPair() keypair.Full
- func (c *Client) Load(secret string) error
- func (c *Client) SetAccountOptions(keypairs []keypair.Full) error
- func (c *Client) SignAndSubmit(txn *txnbuild.Transaction) error
- func (c *Client) SignFundAndSubmitTransaction(tx *txnbuild.Transaction) error
- func (c *Client) SignTransactionXdr(txXdr string) error
- func (c *Client) Swap(sourceAsset string, destinationAsset string, amount string) error
- func (c *Client) Transactions(account string, limit uint, includeFailed bool, cursor string, ...) ([]horizon.Transaction, error)
- func (c *Client) Transfer(destination, memo string, amount string) (string, error)
- func (c *Client) TransferToEthBridge(destination, amount string) (string, error)
- func (c *Client) TransferToTfchainBridge(amount string, twinID uint32) (string, error)
Constants ¶
View Source
const ( TFT = "TFT" TESTNET_ISSUER = "GA47YZA3PKFUZMPLQ3B5F2E3CJIB57TGGU7SPCQT2WAEYKN766PWIMB3" MAINNET_ISSUER = "GBOVQKJYHXRR3DX6NOX2RRYFRCUMSADGDESTDNBDS6CDVLGVESRTAC47" BaseFee = 1000000 )
Variables ¶
View Source
var MainnetTft = txnbuild.CreditAsset{Code: TFT, Issuer: MAINNET_ISSUER}
View Source
var MainnetTftAsset = base.Asset{Type: "credit_alphanum4", Code: TFT, Issuer: MAINNET_ISSUER}
View Source
var TestnetTft = txnbuild.CreditAsset{Code: TFT, Issuer: TESTNET_ISSUER}
View Source
var TestnetTftAsset = base.Asset{Type: "credit_alphanum4", Code: TFT, Issuer: TESTNET_ISSUER}
Functions ¶
func GetHorizonClient ¶
func GetHorizonClient(stellarNetwork string) *horizonclient.Client
GetHorizonClient returns the horizon client for the stellar network
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
NewClient creates a new client stellarNetwork can be "testnet" or "public" if stellarNetwork is not "testnet" or "public" it will default to "testnet"
func (*Client) AwaitForTransactionWithMemoOnTfchainBridge ¶
func (*Client) AwaitTransactionWithMemo ¶
func (*Client) AwaitTransactionWithMemoOnEthBridge ¶
func (*Client) CreateAccount ¶
func (*Client) FundTransactionUsingTft ¶
Allows you to fund a transaction with tft instead of lumen by using the transaction funding service: https://github.com/threefoldfoundation/tft-stellar/tree/master/ThreeBotPackages/transactionfunding_service
func (*Client) GetActivationServiceUrl ¶
func (*Client) GetAssetFromString ¶
GetTftAsset returns the tft asset for the stellar network
func (*Client) GetEthBridgeAddress ¶
func (*Client) GetStellarNetworkPassphrase ¶
GetStellarNetworkPassphrase returns the passphrase for the stellar network
func (*Client) GetTfchainBridgeAddress ¶
func (*Client) GetTftAsset ¶
func (c *Client) GetTftAsset() txnbuild.CreditAsset
GetTftAsset returns the tft asset for the stellar network
func (*Client) GetTftBaseAsset ¶
GetTftAsset returns the tft asset for the stellar network
func (*Client) GetTransactionFundingUrlFromNetwork ¶
func (*Client) GetXlmAsset ¶
func (c *Client) GetXlmAsset() txnbuild.CreditAsset
func (*Client) SetAccountOptions ¶
func (*Client) SignAndSubmit ¶
func (c *Client) SignAndSubmit(txn *txnbuild.Transaction) error
func (*Client) SignFundAndSubmitTransaction ¶
func (c *Client) SignFundAndSubmitTransaction(tx *txnbuild.Transaction) error
func (*Client) SignTransactionXdr ¶
func (*Client) Transactions ¶
func (c *Client) Transactions(account string, limit uint, includeFailed bool, cursor string, order horizonclient.Order) ([]horizon.Transaction, error)
func (*Client) TransferToEthBridge ¶
Click to show internal directories.
Click to hide internal directories.