Versions in this module Expand all Collapse all v0 v0.1.2 Aug 6, 2021 v0.1.1 Jul 8, 2021 Changes in this version + var ERROR_ACCOUNT_DOES_NOT_TRUST_ASSET = 4 + var ERROR_ACCOUNT_TRUST_LIMIT_EXCEEDED = 5 + var ERROR_AMOUNT_LESSTHEN_EQUAL_ZERO = 10 + var ERROR_ASSET_DOES_NOT_EXIST = 12 + var ERROR_GET_STELLAR_ASSET = 1 + var ERROR_INSUFFICIENT_BALANCE = 2 + var ERROR_MAP_STELLAR_ADDRESS = 3 + var ERROR_MAP_STELLAR_ASSET = 8 + var ERROR_NO_ISSUER_INVOLVED = 11 + var ERROR_SIGNING_TRANSACTION = 7 + var ERROR_SUBMIT_TRANSACTION = 9 + var ERROR_TIMEOUT = 6 + var LOGGER = logging.MustGetLogger("onboarding") + func AppendSignature(transactionSigned xdr.TransactionEnvelope, txeB *b.TransactionEnvelopeBuilder) error + type Account struct + Account string + ParticipantID string + type Balance struct + Amount decimal.Decimal + TrustLimit decimal.Decimal + func GetBalance(account Account, asset model.Asset, prc PRClient, hc *horizon.Client) (Balance, error) + type CheckResult struct + Error Error + func CheckTrustline(paymentAccount Account, paymentAsset model.Asset, ...) CheckResult + type CryptoClientGlobal interface + RequestSigning func(txeBase64 string, requestBase64 string, signedRequestBase64 string, ...) (string, error) + type Error interface + Code func() int + Msg func() string + func SanityCheck(payments []Payment, prc PRClient, hc *horizon.Client) Error + type OutstandingBalance struct + Account Account + Balance Balance + func GetOutstandingBalances(asset model.Asset, prc PRClient, nhc hClient.ClientInterface) ([]OutstandingBalance, error) + type PRClient interface + GetAllParticipants func() ([]model.Participant, error) + GetParticipantAccount func(domain string, account string) (string, error) + type Payment struct + Amount decimal.Decimal + Asset model.Asset + SourceAccount Account + TargetAccount Account + type StellarTransactionConstructor struct + func (self *StellarTransactionConstructor) AddOperation(operation b.TransactionMutator) error + func (self *StellarTransactionConstructor) AddPayment(payment Payment, prc PRClient) error + func (self *StellarTransactionConstructor) AddPaymentWithSanityCheck(payment Payment, prc PRClient, hc *horizon.Client) error + func (self *StellarTransactionConstructor) Base64() string + func (self *StellarTransactionConstructor) Bytes() []byte + func (self *StellarTransactionConstructor) GetTxeB() b.TransactionEnvelopeBuilder + func (self *StellarTransactionConstructor) ImportTransaction(txe xdr.TransactionEnvelope) + func (self *StellarTransactionConstructor) InitTransaction(gsc gasserviceclient.GasServiceClient) error + func (self *StellarTransactionConstructor) SendTransaction(gsc gasserviceclient.GasServiceClient) (string, uint64, error) + func (self *StellarTransactionConstructor) SetFee() error + func (self *StellarTransactionConstructor) SetTimeBound(lowerbound, upperbound int64) error + func (self *StellarTransactionConstructor) SetTxeB(txeB b.TransactionEnvelopeBuilder) + func (self *StellarTransactionConstructor) SignTransactionAndAppend(account string, cc crypto_client.CryptoServiceClient) error + func (self *StellarTransactionConstructor) SignTransactionGlobalAndAppend(account string, cc CryptoClientGlobal, participant model.Participant, ...) error