asset

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LOGGER = logging.MustGetLogger("asset")

Functions

func ChangeTrust

func ChangeTrust(gClient gasservice.GasServiceClient, trustorAddr, trustee, assetCode, limit string) (string, error)

ChangeTrust: Creates change trust transaction and returns xdr

func CreateNativePayment

func CreateNativePayment(gClient gasservice.GasServiceClient, sourceAccount nc.Account, destinationAddress, amount string) (string, error)

func DecodeStellarError

func DecodeStellarError(err error) error

func DecodeStellarPaymentError

func DecodeStellarPaymentError(err error) error

func DoAllowTrust

func DoAllowTrust(gClient gasservice.GasServiceClient, trustorAccountAddress string, assetCode string, issuerAddress string,
	authorize bool, cClient crypto_client.CryptoServiceClient) (error, string)

DoAllowTrust support DO / DA

func DoChangeTrust

func DoChangeTrust(gClient gasservice.GasServiceClient, trustorAccount model.Account, assetCode string, issuerAddress string, limit int64,
	cClient crypto_client.CryptoServiceClient) (error, string)

DoChangeTrust: support DA / DO

func GetAssetType

func GetAssetType(assetCode string) string

func GetBalance

func GetBalance(accountId, assetCode, assetIssuer string) string

func GetCreditAsset

func GetCreditAsset(ast model.Asset, amount decimal.Decimal, prclient pr_client.PRServiceClient) (creditAsset interface{}, err error)

func GetStellarAccount

func GetStellarAccount(accountId string) hProtocol.Account

func GetTrustedAssets

func GetTrustedAssets(accountAddress string) (bool, []hProtocol.Asset)

func IsBalanceExist

func IsBalanceExist(accountId, assetCode, assetIssuer string) bool

func IsNative

func IsNative(assetCode string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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