Documentation
¶
Index ¶
- func GetAssetCode(asset xdr.Asset) xc.NativeAsset
- func ProcessPathPayment(txInfo *xclient.TxInfo, sourceAsset xc.NativeAsset, ...) error
- func ProcessPayment(txInfo *xclient.TxInfo, asset xc.NativeAsset, source xdr.MuxedAccount, ...) error
- type Client
- func (client *Client) FetchAccountDetails(address xc.Address) (types.GetAccountResult, error)
- func (client *Client) FetchBalance(ctx context.Context, address xc.Address) (xc.AmountBlockchain, error)
- func (client *Client) FetchBalanceByAsset(address xc.Address, fetchNative bool, assetID string) (xc.AmountBlockchain, error)
- func (client *Client) FetchDecimals(ctx context.Context, contract xc.ContractAddress) (int, error)
- func (client *Client) FetchLatestLedgerInfo() (types.GetLedgerResult, error)
- func (client *Client) FetchLedgerInfo(sequence uint64) (types.GetLedgerResult, 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) FetchTransferInput(ctx context.Context, args xcbuilder.TransferArgs) (xc.TxInput, error)
- func (client *Client) FetchTxInfo(ctx context.Context, txHash xc.TxHash) (xclient.TxInfo, error)
- func (client *Client) Get(url string, response any) error
- func (client *Client) InitializeTxInfo(txHash xc.TxHash, transaction types.GetTransactionResult) (xclient.TxInfo, error)
- func (client *Client) Post(url string, requestBody any, response any) error
- func (client *Client) SubmitTx(ctx context.Context, tx xc.Tx) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAssetCode ¶
func GetAssetCode(asset xdr.Asset) xc.NativeAsset
Conversion from xdr.Asset to xc.NativeAsset
func ProcessPathPayment ¶
func ProcessPathPayment(txInfo *xclient.TxInfo, sourceAsset xc.NativeAsset, destinationAsset xc.NativeAsset, source xdr.MuxedAccount, destination xdr.MuxedAccount, sourceAmount xdr.Int64, destinationAmount xdr.Int64) error
Process cross asset payments. This type of operation produce two movements: one for source account and one for destination account
func ProcessPayment ¶
func ProcessPayment(txInfo *xclient.TxInfo, asset xc.NativeAsset, source xdr.MuxedAccount, destination xdr.MuxedAccount, amount xdr.Int64) error
Process payment like operation. This type of operations produce one movement containing source and destination.
Types ¶
type Client ¶
func (*Client) FetchAccountDetails ¶
func (*Client) FetchBalance ¶
func (*Client) FetchBalanceByAsset ¶
func (client *Client) FetchBalanceByAsset(address xc.Address, fetchNative bool, assetID string) (xc.AmountBlockchain, error)
Fetch asset balance by asset code
func (*Client) FetchDecimals ¶
func (*Client) FetchLatestLedgerInfo ¶
func (client *Client) FetchLatestLedgerInfo() (types.GetLedgerResult, error)
func (*Client) FetchLedgerInfo ¶
func (client *Client) FetchLedgerInfo(sequence uint64) (types.GetLedgerResult, error)
func (*Client) FetchLegacyTxInfo ¶
func (client *Client) FetchLegacyTxInfo(ctx context.Context, txHash xc.TxHash) (xc.LegacyTxInfo, error)
Returns transaction info - legacy/old endpoint
func (*Client) FetchLegacyTxInput ¶
func (client *Client) FetchLegacyTxInput(ctx context.Context, from xc.Address, to xc.Address) (xc.TxInput, error)
Deprecated method - use FetchTransferInput
func (*Client) FetchNativeBalance ¶
func (*Client) FetchTransferInput ¶
func (client *Client) FetchTransferInput(ctx context.Context, args xcbuilder.TransferArgs) (xc.TxInput, error)
FetchTransferInput returns tx input for a Stellar tx
func (*Client) FetchTxInfo ¶
Returns transaction info - new endpoint
func (*Client) InitializeTxInfo ¶
func (client *Client) InitializeTxInfo(txHash xc.TxHash, transaction types.GetTransactionResult) (xclient.TxInfo, error)
Fetch ledger data and create xclient.TxInfo
Click to show internal directories.
Click to hide internal directories.