Versions in this module Expand all Collapse all v0 v0.1.0 Jan 28, 2021 Changes in this version + const AuthImmutable + const AuthRequired + const AuthRevocable + const MemoTextMaxLength + const MinBaseFee + const TimeoutInfinite + var MaxTrustlineLimit = amount.StringFromInt64(math.MaxInt64) + var UnconditionalPredicate = xdr.ClaimPredicate + func AndPredicate(left xdr.ClaimPredicate, right xdr.ClaimPredicate) xdr.ClaimPredicate + func BeforeAbsoluteTimePredicate(epochSeconds int64) xdr.ClaimPredicate + func BeforeRelativeTimePredicate(secondsBefore int64) xdr.ClaimPredicate + func NewHomeDomain(hd string) *string + func NewInflationDestination(ai string) *string + func NotPredicate(pred xdr.ClaimPredicate) xdr.ClaimPredicate + func OrPredicate(left xdr.ClaimPredicate, right xdr.ClaimPredicate) xdr.ClaimPredicate + func SetOpSourceAccount(op *xdr.Operation, sourceAccount Account) + func VerifyChallengeTxSigners(challengeTx, serverAccountID, network string, homeDomains []string, ...) ([]string, error) + func VerifyChallengeTxThreshold(challengeTx, serverAccountID, network string, homeDomains []string, ...) (signersFound []string, err error) + type Account interface + GetAccountID func() string + GetSequenceNumber func() (int64, error) + IncrementSequenceNumber func() (int64, error) + type AccountFlag uint32 + type AccountMerge struct + Destination string + SourceAccount Account + func (am *AccountMerge) BuildXDR() (xdr.Operation, error) + func (am *AccountMerge) FromXDR(xdrOp xdr.Operation) error + func (am *AccountMerge) GetSourceAccount() Account + func (am *AccountMerge) Validate() error + type AllowTrust struct + Authorize bool + AuthorizeToMaintainLiabilities bool + SourceAccount Account + Trustor string + Type Asset + func (at *AllowTrust) BuildXDR() (xdr.Operation, error) + func (at *AllowTrust) FromXDR(xdrOp xdr.Operation) error + func (at *AllowTrust) GetSourceAccount() Account + func (at *AllowTrust) Validate() error + type Asset interface + GetCode func() string + GetIssuer func() string + GetType func() (AssetType, error) + IsNative func() bool + ToXDR func() (xdr.Asset, error) + func ParseAssetString(canonical string) (Asset, error) + type AssetType xdr.AssetType + const AssetTypeCreditAlphanum12 + const AssetTypeCreditAlphanum4 + const AssetTypeNative + type BeginSponsoringFutureReserves struct + SourceAccount Account + SponsoredID string + func (bs *BeginSponsoringFutureReserves) BuildXDR() (xdr.Operation, error) + func (bs *BeginSponsoringFutureReserves) FromXDR(xdrOp xdr.Operation) error + func (bs *BeginSponsoringFutureReserves) GetSourceAccount() Account + func (bs *BeginSponsoringFutureReserves) Validate() error + type BumpSequence struct + BumpTo int64 + SourceAccount Account + func (bs *BumpSequence) BuildXDR() (xdr.Operation, error) + func (bs *BumpSequence) FromXDR(xdrOp xdr.Operation) error + func (bs *BumpSequence) GetSourceAccount() Account + func (bs *BumpSequence) Validate() error + type ChangeTrust struct + Limit string + Line Asset + SourceAccount Account + func RemoveTrustlineOp(issuedAsset Asset) ChangeTrust + func (ct *ChangeTrust) BuildXDR() (xdr.Operation, error) + func (ct *ChangeTrust) FromXDR(xdrOp xdr.Operation) error + func (ct *ChangeTrust) GetSourceAccount() Account + func (ct *ChangeTrust) Validate() error + type ClaimClaimableBalance struct + BalanceID string + SourceAccount Account + func (cb *ClaimClaimableBalance) BuildXDR() (xdr.Operation, error) + func (cb *ClaimClaimableBalance) FromXDR(xdrOp xdr.Operation) error + func (cb *ClaimClaimableBalance) GetSourceAccount() Account + func (cb *ClaimClaimableBalance) Validate() error + type Claimant struct + Destination string + Predicate xdr.ClaimPredicate + func NewClaimant(destination string, predicate *xdr.ClaimPredicate) Claimant + type CreateAccount struct + Amount string + Destination string + SourceAccount Account + func (ca *CreateAccount) BuildXDR() (xdr.Operation, error) + func (ca *CreateAccount) FromXDR(xdrOp xdr.Operation) error + func (ca *CreateAccount) GetSourceAccount() Account + func (ca *CreateAccount) Validate() error + type CreateClaimableBalance struct + Amount string + Asset Asset + Destinations []Claimant + SourceAccount Account + func (cb *CreateClaimableBalance) BuildXDR() (xdr.Operation, error) + func (cb *CreateClaimableBalance) FromXDR(xdrOp xdr.Operation) error + func (cb *CreateClaimableBalance) GetSourceAccount() Account + func (cb *CreateClaimableBalance) Validate() error + type CreatePassiveSellOffer struct + Amount string + Buying Asset + Price string + Selling Asset + SourceAccount Account + func (cpo *CreatePassiveSellOffer) BuildXDR() (xdr.Operation, error) + func (cpo *CreatePassiveSellOffer) FromXDR(xdrOp xdr.Operation) error + func (cpo *CreatePassiveSellOffer) GetSourceAccount() Account + func (cpo *CreatePassiveSellOffer) Validate() error + type CreditAsset struct + Code string + Issuer string + func (ca CreditAsset) GetCode() string + func (ca CreditAsset) GetIssuer() string + func (ca CreditAsset) GetType() (AssetType, error) + func (ca CreditAsset) IsNative() bool + func (ca CreditAsset) ToXDR() (xdr.Asset, error) + type DataID struct + Account string + DataName string + type EndSponsoringFutureReserves struct + SourceAccount Account + func (es *EndSponsoringFutureReserves) BuildXDR() (xdr.Operation, error) + func (es *EndSponsoringFutureReserves) FromXDR(xdrOp xdr.Operation) error + func (es *EndSponsoringFutureReserves) GetSourceAccount() Account + func (es *EndSponsoringFutureReserves) Validate() error + type FeeBumpTransaction struct + func NewFeeBumpTransaction(params FeeBumpTransactionParams) (*FeeBumpTransaction, error) + func (t *FeeBumpTransaction) AddSignatureBase64(network, publicKey, signature string) (*FeeBumpTransaction, error) + func (t *FeeBumpTransaction) Base64() (string, error) + func (t *FeeBumpTransaction) BaseFee() int64 + func (t *FeeBumpTransaction) FeeAccount() string + func (t *FeeBumpTransaction) Hash(networkStr string) ([32]byte, error) + func (t *FeeBumpTransaction) HashHex(network string) (string, error) + func (t *FeeBumpTransaction) InnerTransaction() *Transaction + func (t *FeeBumpTransaction) MarshalBinary() ([]byte, error) + func (t *FeeBumpTransaction) MaxFee() int64 + func (t *FeeBumpTransaction) Sign(network string, kps ...*keypair.Full) (*FeeBumpTransaction, error) + func (t *FeeBumpTransaction) SignHashX(preimage []byte) (*FeeBumpTransaction, error) + func (t *FeeBumpTransaction) SignWithKeyString(network string, keys ...string) (*FeeBumpTransaction, error) + func (t *FeeBumpTransaction) Signatures() []xdr.DecoratedSignature + func (t *FeeBumpTransaction) ToXDR() xdr.TransactionEnvelope + func (t *FeeBumpTransaction) TxEnvelope() (xdr.TransactionEnvelope, error) + type FeeBumpTransactionParams struct + BaseFee int64 + FeeAccount string + Inner *Transaction + type GenericTransaction struct + func TransactionFromXDR(txeB64 string) (*GenericTransaction, error) + func (t GenericTransaction) FeeBump() (*FeeBumpTransaction, bool) + func (t GenericTransaction) Transaction() (*Transaction, bool) + type Inflation struct + SourceAccount Account + func (inf *Inflation) BuildXDR() (xdr.Operation, error) + func (inf *Inflation) FromXDR(xdrOp xdr.Operation) error + func (inf *Inflation) GetSourceAccount() Account + func (inf *Inflation) Validate() error + type ManageBuyOffer struct + Amount string + Buying Asset + OfferID int64 + Price string + Selling Asset + SourceAccount Account + func (mo *ManageBuyOffer) BuildXDR() (xdr.Operation, error) + func (mo *ManageBuyOffer) FromXDR(xdrOp xdr.Operation) error + func (mo *ManageBuyOffer) GetSourceAccount() Account + func (mo *ManageBuyOffer) Validate() error + type ManageData struct + Name string + SourceAccount Account + Value []byte + func (md *ManageData) BuildXDR() (xdr.Operation, error) + func (md *ManageData) FromXDR(xdrOp xdr.Operation) error + func (md *ManageData) GetSourceAccount() Account + func (md *ManageData) Validate() error + type ManageSellOffer struct + Amount string + Buying Asset + OfferID int64 + Price string + Selling Asset + SourceAccount Account + func CreateOfferOp(selling, buying Asset, amount, price string, sourceAccount ...Account) (ManageSellOffer, error) + func DeleteOfferOp(offerID int64, sourceAccount ...Account) (ManageSellOffer, error) + func UpdateOfferOp(selling, buying Asset, amount, price string, offerID int64, ...) (ManageSellOffer, error) + func (mo *ManageSellOffer) BuildXDR() (xdr.Operation, error) + func (mo *ManageSellOffer) FromXDR(xdrOp xdr.Operation) error + func (mo *ManageSellOffer) GetSourceAccount() Account + func (mo *ManageSellOffer) Validate() error + type Memo interface + ToXDR func() (xdr.Memo, error) + type MemoHash [32]byte + func (mh MemoHash) ToXDR() (xdr.Memo, error) + type MemoID uint64 + func (mid MemoID) ToXDR() (xdr.Memo, error) + type MemoReturn [32]byte + func (mr MemoReturn) ToXDR() (xdr.Memo, error) + type MemoText string + func (mt MemoText) ToXDR() (xdr.Memo, error) + type NativeAsset struct + func (na NativeAsset) GetCode() string + func (na NativeAsset) GetIssuer() string + func (na NativeAsset) GetType() (AssetType, error) + func (na NativeAsset) IsNative() bool + func (na NativeAsset) ToXDR() (xdr.Asset, error) + type OfferID struct + OfferID int64 + SellerAccountAddress string + type Operation interface + BuildXDR func() (xdr.Operation, error) + FromXDR func(xdrOp xdr.Operation) error + GetSourceAccount func() Account + Validate func() error + type PathPayment = PathPaymentStrictReceive + type PathPaymentStrictReceive struct + DestAmount string + DestAsset Asset + Destination string + Path []Asset + SendAsset Asset + SendMax string + SourceAccount Account + func (pp *PathPaymentStrictReceive) BuildXDR() (xdr.Operation, error) + func (pp *PathPaymentStrictReceive) FromXDR(xdrOp xdr.Operation) error + func (pp *PathPaymentStrictReceive) GetSourceAccount() Account + func (pp *PathPaymentStrictReceive) Validate() error + type PathPaymentStrictSend struct + DestAsset Asset + DestMin string + Destination string + Path []Asset + SendAmount string + SendAsset Asset + SourceAccount Account + func (pp *PathPaymentStrictSend) BuildXDR() (xdr.Operation, error) + func (pp *PathPaymentStrictSend) FromXDR(xdrOp xdr.Operation) error + func (pp *PathPaymentStrictSend) GetSourceAccount() Account + func (pp *PathPaymentStrictSend) Validate() error + type Payment struct + Amount string + Asset Asset + Destination string + SourceAccount Account + func (p *Payment) BuildXDR() (xdr.Operation, error) + func (p *Payment) FromXDR(xdrOp xdr.Operation) error + func (p *Payment) GetSourceAccount() Account + func (p *Payment) Validate() error + type RevokeSponsorship struct + Account *string + ClaimableBalance *string + Data *DataID + Offer *OfferID + Signer *SignerID + SourceAccount Account + SponsorshipType RevokeSponsorshipType + TrustLine *TrustLineID + func (r *RevokeSponsorship) BuildXDR() (xdr.Operation, error) + func (r *RevokeSponsorship) FromXDR(xdrOp xdr.Operation) error + func (r *RevokeSponsorship) GetSourceAccount() Account + func (r *RevokeSponsorship) Validate() error + type RevokeSponsorshipType int + const RevokeSponsorshipTypeAccount + const RevokeSponsorshipTypeClaimableBalance + const RevokeSponsorshipTypeData + const RevokeSponsorshipTypeOffer + const RevokeSponsorshipTypeSigner + const RevokeSponsorshipTypeTrustLine + type SetOptions struct + ClearFlags []AccountFlag + HighThreshold *Threshold + HomeDomain *string + InflationDestination *string + LowThreshold *Threshold + MasterWeight *Threshold + MediumThreshold *Threshold + SetFlags []AccountFlag + Signer *Signer + SourceAccount Account + func (so *SetOptions) BuildXDR() (xdr.Operation, error) + func (so *SetOptions) FromXDR(xdrOp xdr.Operation) error + func (so *SetOptions) GetSourceAccount() Account + func (so *SetOptions) Validate() error + type Signer struct + Address string + Weight Threshold + type SignerID struct + AccountID string + SignerAddress string + type SignerSummary map[string]int32 + type SimpleAccount struct + AccountID string + Sequence int64 + func NewSimpleAccount(accountID string, sequence int64) SimpleAccount + func (sa *SimpleAccount) GetAccountID() string + func (sa *SimpleAccount) GetSequenceNumber() (int64, error) + func (sa *SimpleAccount) IncrementSequenceNumber() (int64, error) + type Threshold uint8 + func NewThreshold(t Threshold) *Threshold + type Timebounds struct + MaxTime int64 + MinTime int64 + func NewInfiniteTimeout() Timebounds + func NewTimebounds(minTime, maxTime int64) Timebounds + func NewTimeout(timeout int64) Timebounds + func (tb *Timebounds) Validate() error + type Transaction struct + func BuildChallengeTx(serverSignerSecret, clientAccountID, homeDomain, network string, ...) (*Transaction, error) + func NewTransaction(params TransactionParams) (*Transaction, error) + func ReadChallengeTx(challengeTx, serverAccountID, network string, homeDomains []string) (tx *Transaction, clientAccountID string, matchedHomeDomain string, err error) + func (t *Transaction) AddSignatureBase64(network, publicKey, signature string) (*Transaction, error) + func (t *Transaction) Base64() (string, error) + func (t *Transaction) BaseFee() int64 + func (t *Transaction) ClaimableBalanceID(operationIndex int) (string, error) + func (t *Transaction) Hash(networkStr string) ([32]byte, error) + func (t *Transaction) HashHex(network string) (string, error) + func (t *Transaction) MarshalBinary() ([]byte, error) + func (t *Transaction) MaxFee() int64 + func (t *Transaction) Memo() Memo + func (t *Transaction) Operations() []Operation + func (t *Transaction) Sign(network string, kps ...*keypair.Full) (*Transaction, error) + func (t *Transaction) SignHashX(preimage []byte) (*Transaction, error) + func (t *Transaction) SignWithKeyString(network string, keys ...string) (*Transaction, error) + func (t *Transaction) Signatures() []xdr.DecoratedSignature + func (t *Transaction) SourceAccount() SimpleAccount + func (t *Transaction) Timebounds() Timebounds + func (t *Transaction) ToXDR() xdr.TransactionEnvelope + func (t *Transaction) TxEnvelope() (xdr.TransactionEnvelope, error) + type TransactionParams struct + BaseFee int64 + IncrementSequenceNum bool + Memo Memo + Operations []Operation + SourceAccount Account + Timebounds Timebounds + type TrustLineID struct + Account string + Asset Asset + type ValidationError struct + Field string + Message string + func NewValidationError(field, message string) *ValidationError + func (opError *ValidationError) Error() string