README

txnbuild

txnbuild is a Stellar SDK, implemented in Go. It provides a reference implementation of the complete set of operations that compose transactions for the Stellar distributed ledger.

This project is maintained by the Stellar Development Foundation.

    import (
        "log"
        
        "github.com/stellar/go/clients/horizonclient"
        "github.com/stellar/go/keypair"
        "github.com/stellar/go/network"
        "github.com/stellar/go/txnbuild"
    )
    
    // Make a keypair for a known account from a secret seed
    kp, _ := keypair.Parse("SBPQUZ6G4FZNWFHKUWC5BEYWF6R52E3SEP7R3GWYSM2XTKGF5LNTWW4R")
    
    // Get the current state of the account from the network
    client := horizonclient.DefaultTestNetClient
    ar := horizonclient.AccountRequest{AccountID: kp.Address()}
    sourceAccount, err := client.AccountDetail(ar)
    if err != nil {
        log.Fatalln(err)
    }
    
    // Build an operation to create and fund a new account
    op := txnbuild.CreateAccount{
        Destination: "GCCOBXW2XQNUSL467IEILE6MMCNRR66SSVL4YQADUNYYNUVREF3FIV2Z",
        Amount:      "10",
    }
    
    // Construct the transaction that holds the operations to execute on the network
    tx, err := txnbuild.NewTransaction(
        txnbuild.TransactionParams{
            SourceAccount:        &sourceAccount,
            IncrementSequenceNum: true,
            Operations:           []txnbuild.Operation{&op},
            BaseFee:              txnbuild.MinBaseFee,
            Timebounds:           txnbuild.NewTimeout(300),
        },
    )
    if err != nil {
        log.Fatalln(err)
    )
    
    // Sign the transaction
    tx, err = tx.Sign(network.TestNetworkPassphrase, kp.(*keypair.Full))
    if err != nil {
        log.Fatalln(err)
    )
    
    // Get the base 64 encoded transaction envelope
    txe, err := tx.Base64()
    if err != nil {
        log.Fatalln(err)
    }
    
    // Send the transaction to the network
    resp, err := client.SubmitTransactionXDR(txe)
    if err != nil {
        log.Fatalln(err)
    }

Getting Started

This library is aimed at developers building Go applications on top of the Stellar network. Transactions constructed by this library may be submitted to any Horizon instance for processing onto the ledger, using any Stellar SDK client. The recommended client for Go programmers is horizonclient. Together, these two libraries provide a complete Stellar SDK.

An easy-to-follow demonstration that exercises this SDK on the TestNet with actual accounts is also included! See the Demo section below.

Prerequisites
  • Go (this repository is officially supported on the last two releases of Go)
  • Modules to manage dependencies
Installing
  • go get github.com/stellar/go/txnbuild

Running the tests

Run the unit tests from the package directory: go test

Demo

To see the SDK in action, build and run the demo:

  • Enter the demo directory: cd $GOPATH/src/github.com/stellar/go/txnbuild/cmd/demo
  • Build the demo: go build
  • Run the demo: ./demo init

Contributing

Please read Code of Conduct to understand this project's communication rules.

To submit improvements and fixes to this library, please see CONTRIBUTING.

License

This project is licensed under the Apache License - see the LICENSE file for details.

Expand ▾ Collapse ▴

Documentation

Overview

    Package txnbuild implements transactions and operations on the Stellar network. This library provides an interface to the Stellar transaction model. It supports the building of Go applications on top of the Stellar network (https://www.stellar.org/). Transactions constructed by this library may be submitted to any Horizon instance for processing onto the ledger, using any Stellar SDK client. The recommended client for Go programmers is horizonclient (https://github.com/stellar/go/tree/master/clients/horizonclient). Together, these two libraries provide a complete Stellar SDK. For more information and further examples, see https://www.stellar.org/developers/go/reference/index.html.

    Index

    Examples

    Constants

      AuthClawbackEnabled is a flag that if set allows clawing back assets.

        AuthImmutable is a flag that if set prevents any authorization flags from being set, and prevents the account from ever being merged (deleted).

          AuthRequired is a flag that requires the issuing account to give other accounts permission before they can hold the issuing account's credit.

            AuthRevocable is a flag that allows the issuing account to revoke its credit held by other accounts.

            View Source
            const MemoTextMaxLength = 28

              MemoTextMaxLength is the maximum number of bytes allowed for a text memo.

              View Source
              const MinBaseFee = 100

                MinBaseFee is the minimum transaction fee for the Stellar network.

                View Source
                const TimeoutInfinite = int64(0)

                  TimeoutInfinite allows an indefinite upper bound to be set for Transaction.MaxTime. This is usually not what you want.

                    TrustLineAuthorized is a flag that indicates whether the trustline is authorized.

                    View Source
                    const TrustLineAuthorizedToMaintainLiabilities = TrustLineFlag(xdr.TrustLineFlagsAuthorizedToMaintainLiabilitiesFlag)

                      TrustLineAuthorizedToMaintainLiabilities is a flag that if set, will allow a trustline to maintain liabilities without permitting any other operations.

                        TrustLineClawbackEnabled is a flag that if set allows clawing back assets.

                        Variables

                        View Source
                        var MaxTrustlineLimit = amount.StringFromInt64(math.MaxInt64)

                          MaxTrustlineLimit represents the maximum value that can be set as a trustline limit.

                          Functions

                          func AndPredicate

                          func AndPredicate(left xdr.ClaimPredicate, right xdr.ClaimPredicate) xdr.ClaimPredicate

                            AndPredicate returns a xdr.ClaimPredicate

                            func BeforeAbsoluteTimePredicate

                            func BeforeAbsoluteTimePredicate(epochSeconds int64) xdr.ClaimPredicate

                              BeforeAbsoluteTimePredicate returns a Before Absolute Time xdr.ClaimPredicate

                              This predicate will be fulfilled if the closing time of the ledger that includes the CreateClaimableBalance operation is less than this (absolute) Unix timestamp.

                              func BeforeRelativeTimePredicate

                              func BeforeRelativeTimePredicate(secondsBefore int64) xdr.ClaimPredicate

                                BeforeRelativeTimePredicate returns a Before Relative Time xdr.ClaimPredicate

                                This predicate will be fulfilled if the closing time of the ledger that includes the CreateClaimableBalance operation plus this relative time delta (in seconds) is less than the current time.

                                func NewHomeDomain

                                func NewHomeDomain(hd string) *string

                                  NewHomeDomain is syntactic sugar that makes instantiating SetOptions more convenient.

                                  func NewInflationDestination

                                  func NewInflationDestination(ai string) *string

                                    NewInflationDestination is syntactic sugar that makes instantiating SetOptions more convenient.

                                    func NotPredicate

                                    func NotPredicate(pred xdr.ClaimPredicate) xdr.ClaimPredicate

                                      NotPredicate returns a new predicate inverting the passed in predicate

                                      func OrPredicate

                                      func OrPredicate(left xdr.ClaimPredicate, right xdr.ClaimPredicate) xdr.ClaimPredicate

                                        OrPredicate returns a xdr.ClaimPredicate

                                        func SetOpSourceAccount

                                        func SetOpSourceAccount(op *xdr.Operation, sourceAccount string)

                                          SetOpSourceAccount sets the source account ID on an Operation.

                                          func SetOpSourceMuxedAccount

                                          func SetOpSourceMuxedAccount(op *xdr.Operation, sourceAccount string)

                                            SetOpSourceAccount sets the source account ID on an Operation, allowing M-strkeys (as defined in SEP23).

                                            func VerifyChallengeTxSigners

                                            func VerifyChallengeTxSigners(challengeTx, serverAccountID, network, webAuthDomain string, homeDomains []string, signers ...string) ([]string, error)

                                              VerifyChallengeTxSigners verifies that for a SEP 10 challenge transaction all signatures on the transaction are accounted for. A transaction is verified if it is signed by the server account, and all other signatures match a signer that has been provided as an argument. Additional signers can be provided that do not have a signature, but all signatures must be matched to a signer for verification to succeed. If verification succeeds a list of signers that were found is returned, excluding the server account ID.

                                              Signers that are not prefixed as an address/account ID strkey (G...) will be ignored.

                                              The homeDomain field is reserved for future use and not used.

                                              If the challenge contains a subsequent Manage Data operation with key web_auth_domain the value will be checked to match the webAuthDomain provided. If it does not match the function will return an error.

                                              Errors will be raised if:

                                              - The transaction is invalid according to ReadChallengeTx.
                                              - No client signatures are found on the transaction.
                                              - One or more signatures in the transaction are not identifiable as the
                                                server account or one of the signers provided in the arguments.
                                              

                                              func VerifyChallengeTxThreshold

                                              func VerifyChallengeTxThreshold(challengeTx, serverAccountID, network, webAuthDomain string, homeDomains []string, threshold Threshold, signerSummary SignerSummary) (signersFound []string, err error)

                                                VerifyChallengeTxThreshold verifies that for a SEP 10 challenge transaction all signatures on the transaction are accounted for and that the signatures meet a threshold on an account. A transaction is verified if it is signed by the server account, and all other signatures match a signer that has been provided as an argument, and those signatures meet a threshold on the account.

                                                Signers that are not prefixed as an address/account ID strkey (G...) will be ignored.

                                                The homeDomain field is reserved for future use and not used.

                                                If the challenge contains a subsequent Manage Data operation with key web_auth_domain the value will be checked to match the webAuthDomain provided. If it does not match the function will return an error.

                                                Errors will be raised if:

                                                - The transaction is invalid according to ReadChallengeTx.
                                                - No client signatures are found on the transaction.
                                                - One or more signatures in the transaction are not identifiable as the
                                                  server account or one of the signers provided in the arguments.
                                                - The signatures are all valid but do not meet the threshold.
                                                
                                                Example
                                                Output:
                                                
                                                Client Signers Verified:
                                                GAS4V4O2B7DW5T7IQRPEEVCRXMDZESKISR7DVIGKZQYYV3OSQ5SH5LVP weight: 60
                                                GDQNY3PBOJOKYZSRMK2S7LHHGWZIUISD4QORETLMXEWXBI7KFZZMKTL3 weight: 40
                                                

                                                Types

                                                type Account

                                                type Account interface {
                                                	GetAccountID() string
                                                	IncrementSequenceNumber() (int64, error)
                                                	GetSequenceNumber() (int64, error)
                                                }

                                                  Account represents the aspects of a Stellar account necessary to construct transactions. See https://www.stellar.org/developers/guides/concepts/accounts.html

                                                  type AccountFlag

                                                  type AccountFlag uint32

                                                    AccountFlag represents the bitmask flags used to set and clear account authorization options.

                                                    type AccountMerge

                                                    type AccountMerge struct {
                                                    	Destination   string
                                                    	SourceAccount string
                                                    }

                                                      AccountMerge represents the Stellar merge account operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                      Example
                                                      Output:
                                                      
                                                      AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACAAAAACE4N7avBtJL576CIWTzGCbGPvSlVfMQAOjcYbSsSF2VAAAAAAAAAAB6i5yxQAAAEAvOx3WHzmaTsf4rK+yRDsvXn9xh+dU6CkpAum+FCXQ5LZQqhxQg9HErbSfxeTFMdknEpMKXgJRFUfAetl+jf4O
                                                      

                                                      func (*AccountMerge) BuildXDR

                                                      func (am *AccountMerge) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                        BuildXDR for AccountMerge returns a fully configured XDR Operation.

                                                        func (*AccountMerge) FromXDR

                                                        func (am *AccountMerge) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                          FromXDR for AccountMerge initialises the txnbuild struct from the corresponding xdr Operation.

                                                          func (*AccountMerge) GetSourceAccount

                                                          func (am *AccountMerge) GetSourceAccount() string

                                                            GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                            func (*AccountMerge) Validate

                                                            func (am *AccountMerge) Validate(withMuxedAccounts bool) error

                                                              Validate for AccountMerge validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                              type AllowTrust

                                                              type AllowTrust struct {
                                                              	Trustor                        string
                                                              	Type                           Asset
                                                              	Authorize                      bool
                                                              	AuthorizeToMaintainLiabilities bool
                                                              	ClawbackEnabled                bool
                                                              	SourceAccount                  string
                                                              }

                                                                Deprecated: use SetTrustLineFlags instead. AllowTrust represents the Stellar allow trust operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                Example
                                                                Output:
                                                                
                                                                AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAABwAAAACE4N7avBtJL576CIWTzGCbGPvSlVfMQAOjcYbSsSF2VAAAAAFBQkNEAAAAAQAAAAAAAAAB6i5yxQAAAEAY3MnWiMcL18SxRITSuI5tZSXmEo0Q38UZg0jiJGU2U6kSnsCNTTJiGACGQlIrPfAMYt9koarrX11w7HLBosQN
                                                                

                                                                func (*AllowTrust) BuildXDR

                                                                func (at *AllowTrust) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                  BuildXDR for AllowTrust returns a fully configured XDR Operation.

                                                                  func (*AllowTrust) FromXDR

                                                                  func (at *AllowTrust) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                    FromXDR for AllowTrust initialises the txnbuild struct from the corresponding xdr Operation.

                                                                    func (*AllowTrust) GetSourceAccount

                                                                    func (at *AllowTrust) GetSourceAccount() string

                                                                      GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                      func (*AllowTrust) Validate

                                                                      func (at *AllowTrust) Validate(withMuxedAccounts bool) error

                                                                        Validate for AllowTrust validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                        type Asset

                                                                        type Asset interface {
                                                                        	GetType() (AssetType, error)
                                                                        	IsNative() bool
                                                                        	GetCode() string
                                                                        	GetIssuer() string
                                                                        	ToXDR() (xdr.Asset, error)
                                                                        }

                                                                          Asset represents a Stellar asset.

                                                                          func ParseAssetString

                                                                          func ParseAssetString(canonical string) (Asset, error)

                                                                            ParseAssetString parses an asset string in canonical form (SEP-11) into an Asset structure. https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0011.md#asset

                                                                            type AssetType

                                                                            type AssetType xdr.AssetType

                                                                              AssetType represents the type of a Stellar asset.

                                                                                AssetTypeNative, AssetTypeCreditAlphanum4, AssetTypeCreditAlphanum12 enumerate the different types of asset on the Stellar network.

                                                                                type BeginSponsoringFutureReserves

                                                                                type BeginSponsoringFutureReserves struct {
                                                                                	SponsoredID   string
                                                                                	SourceAccount string
                                                                                }

                                                                                  BeginSponsoringFutureReserves represents the Stellar begin sponsoring future reserves operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                  Example
                                                                                  Output:
                                                                                  
                                                                                  AAAAAgAAAAC0FS8Odh4yFSpaseK1sYMMVdTpVCJmylGJpMeYu9LOKAAAASwAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAEAAAAAC0FS8Odh4yFSpaseK1sYMMVdTpVCJmylGJpMeYu9LOKAAAAAEAAAAAtBUvDnYeMhUqWrHitbGDDFXU6VQiZspRiaTHmLvSzigAAAAGAAAAAUFCQ0QAAAAAfhHLNNY19eGrAtSgLD3VpaRm2AjNjxIBWQg9zS4VWZh//////////wAAAAAAAAARAAAAAAAAAAIuFVmYAAAAQARLe8wjGKq6WwdOPGkw2jo4eltp6dAHXEum4kYKzIjYx9fs4kdNJAaJE0s3Fy6JAIo1ttrGWp8zq6VX6P5CcAW70s4oAAAAQNpzu6NxKgcYd70mJl6EHyRPdjNTfxGm1w4XIIyIfZElRpmuZ6aWpXA0wwS6BimT3UQizK55T1kt1B2Pi3KyPAw=
                                                                                  
                                                                                  Example (Transfer)
                                                                                  Output:
                                                                                  
                                                                                  AAAAAgAAAAB+Ecs01jX14asC1KAsPdWlpGbYCM2PEgFZCD3NLhVZmAAAASwAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAABAAAAAODcbeFyXKxmUWK1L6znNbKKIkPkHRJNbLktcKPqLnLFAAAAEAAAAAB+Ecs01jX14asC1KAsPdWlpGbYCM2PEgFZCD3NLhVZmAAAAAAAAAASAAAAAAAAAAEAAAAAtBUvDnYeMhUqWrHitbGDDFXU6VQiZspRiaTHmLvSzigAAAABRUZHSAAAAAB+Ecs01jX14asC1KAsPdWlpGbYCM2PEgFZCD3NLhVZmAAAAAAAAAARAAAAAAAAAAIuFVmYAAAAQDx6tSWzDT5MCVpolKLvhBwM/PpV9d/Om8PlJ4GZekp+DY6H2XAZ+Rldlfa0DqK8KNuMF921Vha6fpmK7FY4/QrqLnLFAAAAQCxxzLrpHFwd+CS6xmAoytq+ORtrkxUy2k6B7wIuASrlJDnYAHZptf7bBKXPn5ImcpJIcB3E5Xl98s/lEA0+YAA=
                                                                                  

                                                                                  func (*BeginSponsoringFutureReserves) BuildXDR

                                                                                  func (bs *BeginSponsoringFutureReserves) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                    BuildXDR for BeginSponsoringFutureReserves returns a fully configured XDR Operation.

                                                                                    func (*BeginSponsoringFutureReserves) FromXDR

                                                                                    func (bs *BeginSponsoringFutureReserves) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                      FromXDR for BeginSponsoringFutureReserves initializes the txnbuild struct from the corresponding xdr Operation.

                                                                                      func (*BeginSponsoringFutureReserves) GetSourceAccount

                                                                                      func (bs *BeginSponsoringFutureReserves) GetSourceAccount() string

                                                                                        GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                                        func (*BeginSponsoringFutureReserves) Validate

                                                                                        func (bs *BeginSponsoringFutureReserves) Validate(withMuxedAccounts bool) error

                                                                                          Validate for BeginSponsoringFutureReserves validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                          type BumpSequence

                                                                                          type BumpSequence struct {
                                                                                          	BumpTo        int64
                                                                                          	SourceAccount string
                                                                                          }

                                                                                            BumpSequence represents the Stellar bump sequence operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                            Example
                                                                                            Output:
                                                                                            
                                                                                            AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACwAiILoAAABsAAAAAAAAAAHqLnLFAAAAQEIvyOHdPn82ckKXISGF6sR4YU5ox735ivKrC/wS4615j1AA42vbXSLqShJA5/7/DX56UUv+Lt7vlcu9M7jsRw4=
                                                                                            

                                                                                            func (*BumpSequence) BuildXDR

                                                                                            func (bs *BumpSequence) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                              BuildXDR for BumpSequence returns a fully configured XDR Operation.

                                                                                              func (*BumpSequence) FromXDR

                                                                                              func (bs *BumpSequence) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                FromXDR for BumpSequence initialises the txnbuild struct from the corresponding xdr Operation.

                                                                                                func (*BumpSequence) GetSourceAccount

                                                                                                func (bs *BumpSequence) GetSourceAccount() string

                                                                                                  GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                                                  func (*BumpSequence) Validate

                                                                                                  func (bs *BumpSequence) Validate(withMuxedAccounts bool) error

                                                                                                    Validate for BumpSequence validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                    type ChangeTrust

                                                                                                    type ChangeTrust struct {
                                                                                                    	Line          Asset
                                                                                                    	Limit         string
                                                                                                    	SourceAccount string
                                                                                                    }

                                                                                                      ChangeTrust represents the Stellar change trust operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html. If Limit is omitted, it defaults to txnbuild.MaxTrustlineLimit.

                                                                                                      Example
                                                                                                      Output:
                                                                                                      
                                                                                                      AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAABgAAAAFBQkNEAAAAAITg3tq8G0kvnvoIhZPMYJsY+9KVV8xAA6NxhtKxIXZUAAAAAAX14QAAAAAAAAAAAeoucsUAAABAqqUuIlFMrlElYnGSLHlaI/A41oGA3rdtc1EHhza9bXk35ZwlEvmsBUOZTasZfgBzwd+CczekWKBCEqBCHzaSBw==
                                                                                                      
                                                                                                      Example (RemoveTrustline)
                                                                                                      Output:
                                                                                                      
                                                                                                      AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAABgAAAAFBQkNEAAAAAITg3tq8G0kvnvoIhZPMYJsY+9KVV8xAA6NxhtKxIXZUAAAAAAAAAAAAAAAAAAAAAeoucsUAAABAKLmUWcLjxeY+vG8jEXMNprU6EupxbMRiXGYzuKBptnVlbFUtTBqhYa/ibyCZTEVCinT8bWQKDvZI0m6VLKVHAg==
                                                                                                      

                                                                                                      func RemoveTrustlineOp

                                                                                                      func RemoveTrustlineOp(issuedAsset Asset) ChangeTrust

                                                                                                        RemoveTrustlineOp returns a ChangeTrust operation to remove the trustline of the described asset, by setting the limit to "0".

                                                                                                        func (*ChangeTrust) BuildXDR

                                                                                                        func (ct *ChangeTrust) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                          BuildXDR for ChangeTrust returns a fully configured XDR Operation.

                                                                                                          func (*ChangeTrust) FromXDR

                                                                                                          func (ct *ChangeTrust) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                            FromXDR for ChangeTrust initialises the txnbuild struct from the corresponding xdr Operation.

                                                                                                            func (*ChangeTrust) GetSourceAccount

                                                                                                            func (ct *ChangeTrust) GetSourceAccount() string

                                                                                                              GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                                                              func (*ChangeTrust) Validate

                                                                                                              func (ct *ChangeTrust) Validate(withMuxedAccounts bool) error

                                                                                                                Validate for ChangeTrust validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                type ClaimClaimableBalance

                                                                                                                type ClaimClaimableBalance struct {
                                                                                                                	BalanceID     string
                                                                                                                	SourceAccount string
                                                                                                                }

                                                                                                                  ClaimClaimableBalance represents the Stellar claim claimable balance operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                  Example
                                                                                                                  Output:
                                                                                                                  
                                                                                                                  AAAAAgAAAAC0FS8Odh4yFSpaseK1sYMMVdTpVCJmylGJpMeYu9LOKAAAAGQAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAADwAAAAAL8KeMfKKpgHaLZpgLqXk087O0WgXOelGVpEtkt97a2wAAAAAAAAABu9LOKAAAAEAesnN9L5oVpoZloBoUYfafhhuGSXAsJL2q15zyyWysc7fOADPdiQXQTEuySp12/ciGYWbZhw/fvyzLJlTgqmsI
                                                                                                                  

                                                                                                                  func (*ClaimClaimableBalance) BuildXDR

                                                                                                                  func (cb *ClaimClaimableBalance) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                    BuildXDR for ClaimClaimableBalance returns a fully configured XDR Operation.

                                                                                                                    func (*ClaimClaimableBalance) FromXDR

                                                                                                                    func (cb *ClaimClaimableBalance) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                      FromXDR for ClaimClaimableBalance initializes the txnbuild struct from the corresponding xdr Operation.

                                                                                                                      func (*ClaimClaimableBalance) GetSourceAccount

                                                                                                                      func (cb *ClaimClaimableBalance) GetSourceAccount() string

                                                                                                                        GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                                                                        func (*ClaimClaimableBalance) Validate

                                                                                                                        func (cb *ClaimClaimableBalance) Validate(withMuxedAccounts bool) error

                                                                                                                          Validate for ClaimClaimableBalance validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                          type Claimant

                                                                                                                          type Claimant struct {
                                                                                                                          	Destination string
                                                                                                                          	Predicate   xdr.ClaimPredicate
                                                                                                                          }

                                                                                                                            Claimant represents a claimable balance claimant

                                                                                                                            func NewClaimant

                                                                                                                            func NewClaimant(destination string, predicate *xdr.ClaimPredicate) Claimant

                                                                                                                              NewClaimant returns a new Claimant, if predicate is nil then a Claimant with unconditional predicate is returned.

                                                                                                                              type Clawback

                                                                                                                              type Clawback struct {
                                                                                                                              	From          string
                                                                                                                              	Amount        string
                                                                                                                              	Asset         Asset
                                                                                                                              	SourceAccount string
                                                                                                                              }

                                                                                                                                Clawback represents the Stellar clawback operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                                func (*Clawback) BuildXDR

                                                                                                                                func (cb *Clawback) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                  BuildXDR for Clawback returns a fully configured XDR Operation.

                                                                                                                                  func (*Clawback) FromXDR

                                                                                                                                  func (cb *Clawback) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                    FromXDR for Clawback initialises the txnbuild struct from the corresponding xdr Operation.

                                                                                                                                    func (*Clawback) GetSourceAccount

                                                                                                                                    func (cb *Clawback) GetSourceAccount() string

                                                                                                                                      GetSourceAccount returns the source account of the operation, or nil if not set.

                                                                                                                                      func (*Clawback) Validate

                                                                                                                                      func (cb *Clawback) Validate(withMuxedAccounts bool) error

                                                                                                                                        Validate for Clawback validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                                        type ClawbackClaimableBalance

                                                                                                                                        type ClawbackClaimableBalance struct {
                                                                                                                                        	BalanceID     string
                                                                                                                                        	SourceAccount string
                                                                                                                                        }

                                                                                                                                          ClawbackClaimableBalance represents the Stellar clawback claimable balance operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                                          func (*ClawbackClaimableBalance) BuildXDR

                                                                                                                                          func (cb *ClawbackClaimableBalance) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                            BuildXDR for ClawbackClaimableBalance returns a fully configured XDR Operation.

                                                                                                                                            func (*ClawbackClaimableBalance) FromXDR

                                                                                                                                            func (cb *ClawbackClaimableBalance) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                              FromXDR for ClawbackClaimableBalance initializes the txnbuild struct from the corresponding xdr Operation.

                                                                                                                                              func (*ClawbackClaimableBalance) GetSourceAccount

                                                                                                                                              func (cb *ClawbackClaimableBalance) GetSourceAccount() string

                                                                                                                                                GetSourceAccount returns the source account of the operation, or nil if not set.

                                                                                                                                                func (*ClawbackClaimableBalance) Validate

                                                                                                                                                func (cb *ClawbackClaimableBalance) Validate(withMuxedAccounts bool) error

                                                                                                                                                  Validate for ClawbackClaimableBalance validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                                                  type CreateAccount

                                                                                                                                                  type CreateAccount struct {
                                                                                                                                                  	Destination   string
                                                                                                                                                  	Amount        string
                                                                                                                                                  	SourceAccount string
                                                                                                                                                  }

                                                                                                                                                    CreateAccount represents the Stellar create account operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                                                    Example
                                                                                                                                                    Output:
                                                                                                                                                    
                                                                                                                                                    AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAACE4N7avBtJL576CIWTzGCbGPvSlVfMQAOjcYbSsSF2VAAAAAAF9eEAAAAAAAAAAAHqLnLFAAAAQKsrlxt6Ri/WuDGcK1+Tk1hdYHdPeK7KMIds10mcwzw6BpQFZYxP8o6O6ejJFGO06TAGt2PolwuWnpeiVQ9Kcg0=
                                                                                                                                                    

                                                                                                                                                    func (*CreateAccount) BuildXDR

                                                                                                                                                    func (ca *CreateAccount) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                                      BuildXDR for CreateAccount returns a fully configured XDR Operation.

                                                                                                                                                      func (*CreateAccount) FromXDR

                                                                                                                                                      func (ca *CreateAccount) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                                        FromXDR for CreateAccount initialises the txnbuild struct from the corresponding xdr Operation.

                                                                                                                                                        func (*CreateAccount) GetSourceAccount

                                                                                                                                                        func (ca *CreateAccount) GetSourceAccount() string

                                                                                                                                                          GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                                                                                                          func (*CreateAccount) Validate

                                                                                                                                                          func (ca *CreateAccount) Validate(withMuxedAccounts bool) error

                                                                                                                                                            Validate for CreateAccount validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                                                            type CreateClaimableBalance

                                                                                                                                                            type CreateClaimableBalance struct {
                                                                                                                                                            	Amount        string
                                                                                                                                                            	Asset         Asset
                                                                                                                                                            	Destinations  []Claimant
                                                                                                                                                            	SourceAccount string
                                                                                                                                                            }

                                                                                                                                                              CreateClaimableBalance represents the Stellar create claimable balance operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                                                              Example
                                                                                                                                                              Output:
                                                                                                                                                              
                                                                                                                                                              000000000bf0a78c7ca2a980768b66980ba97934f3b3b45a05ce7a5195a44b64b7dedadb
                                                                                                                                                              

                                                                                                                                                              func (*CreateClaimableBalance) BuildXDR

                                                                                                                                                              func (cb *CreateClaimableBalance) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                                                BuildXDR for CreateClaimableBalance returns a fully configured XDR Operation.

                                                                                                                                                                func (*CreateClaimableBalance) FromXDR

                                                                                                                                                                func (cb *CreateClaimableBalance) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                                                  FromXDR for CreateClaimableBalance initializes the txnbuild struct from the corresponding xdr Operation.

                                                                                                                                                                  func (*CreateClaimableBalance) GetSourceAccount

                                                                                                                                                                  func (cb *CreateClaimableBalance) GetSourceAccount() string

                                                                                                                                                                    GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                                                                                                                    func (*CreateClaimableBalance) Validate

                                                                                                                                                                    func (cb *CreateClaimableBalance) Validate(withMuxedAccounts bool) error

                                                                                                                                                                      Validate for CreateClaimableBalance validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                                                                      type CreatePassiveSellOffer

                                                                                                                                                                      type CreatePassiveSellOffer struct {
                                                                                                                                                                      	Selling Asset
                                                                                                                                                                      	Buying  Asset
                                                                                                                                                                      	Amount  string
                                                                                                                                                                      	Price   string
                                                                                                                                                                      
                                                                                                                                                                      	SourceAccount string
                                                                                                                                                                      	// contains filtered or unexported fields
                                                                                                                                                                      }

                                                                                                                                                                        CreatePassiveSellOffer represents the Stellar create passive offer operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                                                                        Example
                                                                                                                                                                        Output:
                                                                                                                                                                        
                                                                                                                                                                        AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAABAAAAAAAAAABQUJDRAAAAAAlyvHaD8duz+iEXkJUUbsHkklIlH46oMrMMYrt0odkfgAAAAAF9eEAAAAAAQAAAAEAAAAAAAAAAeoucsUAAABAE4XbLdDVz1MwC9Bs84nkqK8hyHheVbYznNSiAP0hiP8auvcKAMnYz3HJvzM8H0q/K5MPvgBaehHZ/tQtaPSGBg==
                                                                                                                                                                        

                                                                                                                                                                        func (*CreatePassiveSellOffer) BuildXDR

                                                                                                                                                                        func (cpo *CreatePassiveSellOffer) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                                                          BuildXDR for CreatePassiveSellOffer returns a fully configured XDR Operation.

                                                                                                                                                                          func (*CreatePassiveSellOffer) FromXDR

                                                                                                                                                                          func (cpo *CreatePassiveSellOffer) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                                                            FromXDR for CreatePassiveSellOffer initialises the txnbuild struct from the corresponding xdr Operation.

                                                                                                                                                                            func (*CreatePassiveSellOffer) GetSourceAccount

                                                                                                                                                                            func (cpo *CreatePassiveSellOffer) GetSourceAccount() string

                                                                                                                                                                              GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                                                                                                                              func (*CreatePassiveSellOffer) Validate

                                                                                                                                                                              func (cpo *CreatePassiveSellOffer) Validate(withMuxedAccounts bool) error

                                                                                                                                                                                Validate for CreatePassiveSellOffer validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                                                                                type CreditAsset

                                                                                                                                                                                type CreditAsset struct {
                                                                                                                                                                                	Code   string
                                                                                                                                                                                	Issuer string
                                                                                                                                                                                }

                                                                                                                                                                                  CreditAsset represents non-XLM assets on the Stellar network.

                                                                                                                                                                                  func (CreditAsset) GetCode

                                                                                                                                                                                  func (ca CreditAsset) GetCode() string

                                                                                                                                                                                    GetCode for CreditAsset returns the asset code.

                                                                                                                                                                                    func (CreditAsset) GetIssuer

                                                                                                                                                                                    func (ca CreditAsset) GetIssuer() string

                                                                                                                                                                                      GetIssuer for CreditAsset returns the address of the issuing account.

                                                                                                                                                                                      func (CreditAsset) GetType

                                                                                                                                                                                      func (ca CreditAsset) GetType() (AssetType, error)

                                                                                                                                                                                        GetType for CreditAsset returns the enum type of the asset, based on its code length.

                                                                                                                                                                                        func (CreditAsset) IsNative

                                                                                                                                                                                        func (ca CreditAsset) IsNative() bool

                                                                                                                                                                                          IsNative for CreditAsset returns false (this is not an XLM asset).

                                                                                                                                                                                          func (CreditAsset) ToXDR

                                                                                                                                                                                          func (ca CreditAsset) ToXDR() (xdr.Asset, error)

                                                                                                                                                                                            ToXDR for CreditAsset produces a corresponding XDR asset.

                                                                                                                                                                                            type DataID

                                                                                                                                                                                            type DataID struct {
                                                                                                                                                                                            	Account  string
                                                                                                                                                                                            	DataName string
                                                                                                                                                                                            }

                                                                                                                                                                                            type EndSponsoringFutureReserves

                                                                                                                                                                                            type EndSponsoringFutureReserves struct {
                                                                                                                                                                                            	SourceAccount string
                                                                                                                                                                                            }

                                                                                                                                                                                              EndSponsoringFutureReserves represents the Stellar begin sponsoring future reserves operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                                                                                              func (*EndSponsoringFutureReserves) BuildXDR

                                                                                                                                                                                              func (es *EndSponsoringFutureReserves) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                                                                                BuildXDR for EndSponsoringFutureReserves returns a fully configured XDR Operation.

                                                                                                                                                                                                func (*EndSponsoringFutureReserves) FromXDR

                                                                                                                                                                                                func (es *EndSponsoringFutureReserves) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                                                                                  FromXDR for EndSponsoringFutureReserves initializes the txnbuild struct from the corresponding xdr Operation.

                                                                                                                                                                                                  func (*EndSponsoringFutureReserves) GetSourceAccount

                                                                                                                                                                                                  func (es *EndSponsoringFutureReserves) GetSourceAccount() string

                                                                                                                                                                                                    GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                                                                                                                                                    func (*EndSponsoringFutureReserves) Validate

                                                                                                                                                                                                    func (es *EndSponsoringFutureReserves) Validate(withMuxedAccounts bool) error

                                                                                                                                                                                                      Validate for EndSponsoringFutureReserves validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                                                                                                      type FeeBumpTransaction

                                                                                                                                                                                                      type FeeBumpTransaction struct {
                                                                                                                                                                                                      	// contains filtered or unexported fields
                                                                                                                                                                                                      }

                                                                                                                                                                                                        FeeBumpTransaction represents a CAP 15 fee bump transaction. Fee bump transactions allow an arbitrary account to pay the fee for a transaction.

                                                                                                                                                                                                        Example
                                                                                                                                                                                                        Output:
                                                                                                                                                                                                        
                                                                                                                                                                                                        AAAABQAAAAB+Ecs01jX14asC1KAsPdWlpGbYCM2PEgFZCD3NLhVZmAAAAAAAAADIAAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACwAiILoAAABsAAAAAAAAAAHqLnLFAAAAQEIvyOHdPn82ckKXISGF6sR4YU5ox735ivKrC/wS4615j1AA42vbXSLqShJA5/7/DX56UUv+Lt7vlcu9M7jsRw4AAAAAAAAAAS4VWZgAAABAeD0gL6WpzSdGTzWd4c9yUu3r+W21hOTLT4ItHGBTHYPT20Wk3dytuqfP89EzlkZXvtG8/N0HH4w+oJCLOL/5Aw==
                                                                                                                                                                                                        

                                                                                                                                                                                                        func NewFeeBumpTransaction

                                                                                                                                                                                                        func NewFeeBumpTransaction(params FeeBumpTransactionParams) (*FeeBumpTransaction, error)

                                                                                                                                                                                                          NewFeeBumpTransaction returns a new FeeBumpTransaction instance

                                                                                                                                                                                                          func (*FeeBumpTransaction) AddSignatureBase64

                                                                                                                                                                                                          func (t *FeeBumpTransaction) AddSignatureBase64(network, publicKey, signature string) (*FeeBumpTransaction, error)

                                                                                                                                                                                                            AddSignatureBase64 returns a new FeeBumpTransaction instance which extends the current instance with an additional signature derived from the given base64-encoded signature.

                                                                                                                                                                                                            func (*FeeBumpTransaction) Base64

                                                                                                                                                                                                            func (t *FeeBumpTransaction) Base64() (string, error)

                                                                                                                                                                                                              Base64 returns the base 64 XDR representation of the transaction envelope.

                                                                                                                                                                                                              func (*FeeBumpTransaction) BaseFee

                                                                                                                                                                                                              func (t *FeeBumpTransaction) BaseFee() int64

                                                                                                                                                                                                                BaseFee returns the per operation fee for this transaction.

                                                                                                                                                                                                                func (*FeeBumpTransaction) FeeAccount

                                                                                                                                                                                                                func (t *FeeBumpTransaction) FeeAccount() string

                                                                                                                                                                                                                  FeeAccount returns the address of the account which will be paying for the inner transaction.

                                                                                                                                                                                                                  func (*FeeBumpTransaction) Hash

                                                                                                                                                                                                                  func (t *FeeBumpTransaction) Hash(networkStr string) ([32]byte, error)

                                                                                                                                                                                                                    Hash returns the network specific hash of this transaction encoded as a byte array.

                                                                                                                                                                                                                    func (*FeeBumpTransaction) HashHex

                                                                                                                                                                                                                    func (t *FeeBumpTransaction) HashHex(network string) (string, error)

                                                                                                                                                                                                                      HashHex returns the network specific hash of this transaction encoded as a hexadecimal string.

                                                                                                                                                                                                                      func (*FeeBumpTransaction) InnerTransaction

                                                                                                                                                                                                                      func (t *FeeBumpTransaction) InnerTransaction() *Transaction

                                                                                                                                                                                                                        InnerTransaction returns the Transaction which is wrapped by this FeeBumpTransaction instance.

                                                                                                                                                                                                                        func (*FeeBumpTransaction) MarshalBinary

                                                                                                                                                                                                                        func (t *FeeBumpTransaction) MarshalBinary() ([]byte, error)

                                                                                                                                                                                                                          MarshalBinary returns the binary XDR representation of the transaction envelope.

                                                                                                                                                                                                                          func (*FeeBumpTransaction) MaxFee

                                                                                                                                                                                                                          func (t *FeeBumpTransaction) MaxFee() int64

                                                                                                                                                                                                                            MaxFee returns the total fees which can be spent to submit this transaction.

                                                                                                                                                                                                                            func (*FeeBumpTransaction) Sign

                                                                                                                                                                                                                            func (t *FeeBumpTransaction) Sign(network string, kps ...*keypair.Full) (*FeeBumpTransaction, error)

                                                                                                                                                                                                                              Sign returns a new FeeBumpTransaction instance which extends the current instance with additional signatures derived from the given list of keypair instances.

                                                                                                                                                                                                                              func (*FeeBumpTransaction) SignHashX

                                                                                                                                                                                                                              func (t *FeeBumpTransaction) SignHashX(preimage []byte) (*FeeBumpTransaction, error)

                                                                                                                                                                                                                                SignHashX returns a new FeeBumpTransaction instance which extends the current instance with HashX signature type. See description here: https://www.stellar.org/developers/guides/concepts/multi-sig.html#hashx.

                                                                                                                                                                                                                                func (*FeeBumpTransaction) SignWithKeyString

                                                                                                                                                                                                                                func (t *FeeBumpTransaction) SignWithKeyString(network string, keys ...string) (*FeeBumpTransaction, error)

                                                                                                                                                                                                                                  SignWithKeyString returns a new FeeBumpTransaction instance which extends the current instance with additional signatures derived from the given list of private key strings.

                                                                                                                                                                                                                                  func (*FeeBumpTransaction) Signatures

                                                                                                                                                                                                                                  func (t *FeeBumpTransaction) Signatures() []xdr.DecoratedSignature

                                                                                                                                                                                                                                    Signatures returns the list of signatures attached to this transaction. The contents of the returned slice should not be modified.

                                                                                                                                                                                                                                    func (*FeeBumpTransaction) ToXDR

                                                                                                                                                                                                                                      ToXDR returns the a xdr.TransactionEnvelope which is equivalent to this transaction. The envelope should not be modified because any changes applied may affect the internals of the FeeBumpTransaction instance.

                                                                                                                                                                                                                                      type FeeBumpTransactionParams

                                                                                                                                                                                                                                      type FeeBumpTransactionParams struct {
                                                                                                                                                                                                                                      	Inner               *Transaction
                                                                                                                                                                                                                                      	FeeAccount          string
                                                                                                                                                                                                                                      	BaseFee             int64
                                                                                                                                                                                                                                      	EnableMuxedAccounts bool
                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                        FeeBumpTransactionParams is a container for parameters which are used to construct new FeeBumpTransaction instances

                                                                                                                                                                                                                                        type GenericTransaction

                                                                                                                                                                                                                                        type GenericTransaction struct {
                                                                                                                                                                                                                                        	// contains filtered or unexported fields
                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                          GenericTransaction represents a parsed transaction envelope returned by TransactionFromXDR. A GenericTransaction can be either a Transaction or a FeeBumpTransaction.

                                                                                                                                                                                                                                          func TransactionFromXDR

                                                                                                                                                                                                                                          func TransactionFromXDR(txeB64 string, options ...TransactionFromXDROption) (*GenericTransaction, error)

                                                                                                                                                                                                                                            TransactionFromXDR parses the supplied transaction envelope in base64 XDR and returns a GenericTransaction instance.

                                                                                                                                                                                                                                            func (GenericTransaction) FeeBump

                                                                                                                                                                                                                                            func (t GenericTransaction) FeeBump() (*FeeBumpTransaction, bool)

                                                                                                                                                                                                                                              FeeBump unpacks the GenericTransaction instance into a FeeBumpTransaction. The function also returns a boolean which is true if the GenericTransaction can be unpacked into a FeeBumpTransaction.

                                                                                                                                                                                                                                              func (GenericTransaction) Transaction

                                                                                                                                                                                                                                              func (t GenericTransaction) Transaction() (*Transaction, bool)

                                                                                                                                                                                                                                                Transaction unpacks the GenericTransaction instance into a Transaction. The function also returns a boolean which is true if the GenericTransaction can be unpacked into a Transaction.

                                                                                                                                                                                                                                                type Inflation

                                                                                                                                                                                                                                                type Inflation struct {
                                                                                                                                                                                                                                                	SourceAccount string
                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                  Inflation represents the Stellar inflation operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                                                                                                                                                  Example
                                                                                                                                                                                                                                                  Output:
                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                  AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACQAAAAAAAAAB6i5yxQAAAED9zR1l78yiBwd/o44RyE3XP7QT57VmI90qE46TjfncYyqlOaIRWpkh3qouTjV5IRPVGo6+bFWV40H1HE087FgA
                                                                                                                                                                                                                                                  

                                                                                                                                                                                                                                                  func (*Inflation) BuildXDR

                                                                                                                                                                                                                                                  func (inf *Inflation) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                                                                                                                                    BuildXDR for Inflation returns a fully configured XDR Operation.

                                                                                                                                                                                                                                                    func (*Inflation) FromXDR

                                                                                                                                                                                                                                                    func (inf *Inflation) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                                                                                                                                      FromXDR for Inflation initialises the txnbuild struct from the corresponding xdr Operation.

                                                                                                                                                                                                                                                      func (*Inflation) GetSourceAccount

                                                                                                                                                                                                                                                      func (inf *Inflation) GetSourceAccount() string

                                                                                                                                                                                                                                                        GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                                                                                                                                                                                                        func (*Inflation) Validate

                                                                                                                                                                                                                                                        func (inf *Inflation) Validate(withMuxedAccounts bool) error

                                                                                                                                                                                                                                                          Validate for Inflation is just a method that implements the Operation interface. No logic is actually performed because the inflation operation does not have any required field. Nil is always returned.

                                                                                                                                                                                                                                                          type ManageBuyOffer

                                                                                                                                                                                                                                                          type ManageBuyOffer struct {
                                                                                                                                                                                                                                                          	Selling Asset
                                                                                                                                                                                                                                                          	Buying  Asset
                                                                                                                                                                                                                                                          	Amount  string
                                                                                                                                                                                                                                                          	Price   string
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          	OfferID       int64
                                                                                                                                                                                                                                                          	SourceAccount string
                                                                                                                                                                                                                                                          	// contains filtered or unexported fields
                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                            ManageBuyOffer represents the Stellar manage buy offer operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                                                                                                                                                            Example
                                                                                                                                                                                                                                                            Output:
                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                            AAAAAgAAAAB+Ecs01jX14asC1KAsPdWlpGbYCM2PEgFZCD3NLhVZmAAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAADAAAAAAAAAABQUJDRAAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAAA7msoAAAAAAQAAAGQAAAAAAAAAAAAAAAAAAAABLhVZmAAAAED4fIdU68w6XIMwf1RPFdF9qRRlfPycrmK8dCOW0XwSbiya9JfMi9YrD9cGY7zHV+3zYpLcEi7lLo++PZ1gOsAK
                                                                                                                                                                                                                                                            

                                                                                                                                                                                                                                                            func (*ManageBuyOffer) BuildXDR

                                                                                                                                                                                                                                                            func (mo *ManageBuyOffer) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                                                                                                                                              BuildXDR for ManageBuyOffer returns a fully configured XDR Operation.

                                                                                                                                                                                                                                                              func (*ManageBuyOffer) FromXDR

                                                                                                                                                                                                                                                              func (mo *ManageBuyOffer) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                FromXDR for ManageBuyOffer initialises the txnbuild struct from the corresponding xdr Operation.

                                                                                                                                                                                                                                                                func (*ManageBuyOffer) GetSourceAccount

                                                                                                                                                                                                                                                                func (mo *ManageBuyOffer) GetSourceAccount() string

                                                                                                                                                                                                                                                                  GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                                                                                                                                                                                                                  func (*ManageBuyOffer) Validate

                                                                                                                                                                                                                                                                  func (mo *ManageBuyOffer) Validate(withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                    Validate for ManageBuyOffer validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                                                                                                                                                                    type ManageData

                                                                                                                                                                                                                                                                    type ManageData struct {
                                                                                                                                                                                                                                                                    	Name          string
                                                                                                                                                                                                                                                                    	Value         []byte
                                                                                                                                                                                                                                                                    	SourceAccount string
                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                      ManageData represents the Stellar manage data operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                                                                                                                                                                      Example
                                                                                                                                                                                                                                                                      Output:
                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                      AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAABBGcnVpdCBwcmVmZXJlbmNlAAAAAQAAAAVBcHBsZQAAAAAAAAAAAAAB6i5yxQAAAEDtRCyQRKKgQ8iLEu7kicHtSzoplfxPtPTMhdRv/sq8UoIBVTxIw+S13Jv+jzs3tyLDLiGCVNXreUNlbfX+980K
                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                      Example (RemoveDataEntry)
                                                                                                                                                                                                                                                                      Output:
                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                      AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAABBGcnVpdCBwcmVmZXJlbmNlAAAAAAAAAAAAAAAB6i5yxQAAAEDFpI1vphzG8Dny4aVDA7tyOlP579d9kWO0U/vmq6pWTrNocd6+xTiU753W50ksEscA6f1WNwUsQf+DCwmZfqIA
                                                                                                                                                                                                                                                                      

                                                                                                                                                                                                                                                                      func (*ManageData) BuildXDR

                                                                                                                                                                                                                                                                      func (md *ManageData) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                                                                                                                                                        BuildXDR for ManageData returns a fully configured XDR Operation.

                                                                                                                                                                                                                                                                        func (*ManageData) FromXDR

                                                                                                                                                                                                                                                                        func (md *ManageData) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                          FromXDR for ManageData initialises the txnbuild struct from the corresponding xdr Operation.

                                                                                                                                                                                                                                                                          func (*ManageData) GetSourceAccount

                                                                                                                                                                                                                                                                          func (md *ManageData) GetSourceAccount() string

                                                                                                                                                                                                                                                                            GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                                                                                                                                                                                                                            func (*ManageData) Validate

                                                                                                                                                                                                                                                                            func (md *ManageData) Validate(withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                              Validate for ManageData validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                                                                                                                                                                              type ManageSellOffer

                                                                                                                                                                                                                                                                              type ManageSellOffer struct {
                                                                                                                                                                                                                                                                              	Selling Asset
                                                                                                                                                                                                                                                                              	Buying  Asset
                                                                                                                                                                                                                                                                              	Amount  string
                                                                                                                                                                                                                                                                              	Price   string
                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                              	OfferID       int64
                                                                                                                                                                                                                                                                              	SourceAccount string
                                                                                                                                                                                                                                                                              	// contains filtered or unexported fields
                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                ManageSellOffer represents the Stellar manage offer operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                                                                                                                                                                                Example
                                                                                                                                                                                                                                                                                Output:
                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAAAAAABQUJDRAAAAAAlyvHaD8duz+iEXkJUUbsHkklIlH46oMrMMYrt0odkfgAAAAA7msoAAAAAAQAAAGQAAAAAAAAAAAAAAAAAAAAB6i5yxQAAAEBtfrN+VUE7iCwBk0+rmg0/Ua4DItMWEy6naGWxoDBi4ksCIJSZPzkv79Q65rIaFyIcC/zuyJcnIcv73AP+HQEK
                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                Example (DeleteOffer)
                                                                                                                                                                                                                                                                                Output:
                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAAAAAABRkFLRQAAAABBB4BkxJWGYvNgJBoiXUo2tjgWlNmhHMMKdwGN7RSdsQAAAAAAAAAAAAAAAQAAAAEAAAAAACyUlgAAAAAAAAAB6i5yxQAAAEBnE+oILauqt6m8fj7DIBNW/XBmKJ34SLvHdxP04vb26aI8q9i/2p9/pJMnWPeOoIw0f6jreR306qPJFhjMtl4G
                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                Example (UpdateOffer)
                                                                                                                                                                                                                                                                                Output:
                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAAAAAABQUJDRAAAAAAlyvHaD8duz+iEXkJUUbsHkklIlH46oMrMMYrt0odkfgAAAAAdzWUAAAAAAQAAADIAAAAAACYcXAAAAAAAAAAB6i5yxQAAAECmO+4yukAuLRtR4IRWPVtoyZ2LJeaipPuec+/M1JGDoTFPULDl3kgugPwV3mr0jvMNArBdR8S3NUw31gtT5TcO
                                                                                                                                                                                                                                                                                

                                                                                                                                                                                                                                                                                func CreateOfferOp

                                                                                                                                                                                                                                                                                func CreateOfferOp(selling, buying Asset, amount, price string, sourceAccount ...string) (ManageSellOffer, error)

                                                                                                                                                                                                                                                                                  CreateOfferOp returns a ManageSellOffer operation to create a new offer, by setting the OfferID to "0". The sourceAccount is optional, and if not provided, will be that of the surrounding transaction.

                                                                                                                                                                                                                                                                                  func DeleteOfferOp

                                                                                                                                                                                                                                                                                  func DeleteOfferOp(offerID int64, sourceAccount ...string) (ManageSellOffer, error)

                                                                                                                                                                                                                                                                                    DeleteOfferOp returns a ManageSellOffer operation to delete an offer, by setting the Amount to "0". The sourceAccount is optional, and if not provided, will be that of the surrounding transaction.

                                                                                                                                                                                                                                                                                    func UpdateOfferOp

                                                                                                                                                                                                                                                                                    func UpdateOfferOp(selling, buying Asset, amount, price string, offerID int64, sourceAccount ...string) (ManageSellOffer, error)

                                                                                                                                                                                                                                                                                      UpdateOfferOp returns a ManageSellOffer operation to update an offer. The sourceAccount is optional, and if not provided, will be that of the surrounding transaction.

                                                                                                                                                                                                                                                                                      func (*ManageSellOffer) BuildXDR

                                                                                                                                                                                                                                                                                      func (mo *ManageSellOffer) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                                                                                                                                                                        BuildXDR for ManageSellOffer returns a fully configured XDR Operation.

                                                                                                                                                                                                                                                                                        func (*ManageSellOffer) FromXDR

                                                                                                                                                                                                                                                                                        func (mo *ManageSellOffer) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                                          FromXDR for ManageSellOffer initialises the txnbuild struct from the corresponding xdr Operation.

                                                                                                                                                                                                                                                                                          func (*ManageSellOffer) GetSourceAccount

                                                                                                                                                                                                                                                                                          func (mo *ManageSellOffer) GetSourceAccount() string

                                                                                                                                                                                                                                                                                            GetSourceAccount returns the source account of the operation, or nil if not set.

                                                                                                                                                                                                                                                                                            func (*ManageSellOffer) Validate

                                                                                                                                                                                                                                                                                            func (mo *ManageSellOffer) Validate(withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                                              Validate for ManageSellOffer validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                                                                                                                                                                                              type Memo

                                                                                                                                                                                                                                                                                              type Memo interface {
                                                                                                                                                                                                                                                                                              	ToXDR() (xdr.Memo, error)
                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                Memo represents the superset of all memo types.

                                                                                                                                                                                                                                                                                                type MemoHash

                                                                                                                                                                                                                                                                                                type MemoHash [32]byte

                                                                                                                                                                                                                                                                                                  MemoHash is a hash representing a reference to another transaction.

                                                                                                                                                                                                                                                                                                  func (MemoHash) ToXDR

                                                                                                                                                                                                                                                                                                  func (mh MemoHash) ToXDR() (xdr.Memo, error)

                                                                                                                                                                                                                                                                                                    ToXDR for MemoHash returns an XDR object representation of a Memo of the same type.

                                                                                                                                                                                                                                                                                                    type MemoID

                                                                                                                                                                                                                                                                                                    type MemoID uint64

                                                                                                                                                                                                                                                                                                      MemoID is an identifier representing the transaction originator.

                                                                                                                                                                                                                                                                                                      func (MemoID) ToXDR

                                                                                                                                                                                                                                                                                                      func (mid MemoID) ToXDR() (xdr.Memo, error)

                                                                                                                                                                                                                                                                                                        ToXDR for MemoID returns an XDR object representation of a Memo of the same type.

                                                                                                                                                                                                                                                                                                        type MemoReturn

                                                                                                                                                                                                                                                                                                        type MemoReturn [32]byte

                                                                                                                                                                                                                                                                                                          MemoReturn is a hash representing the hash of the transaction the sender is refunding.

                                                                                                                                                                                                                                                                                                          func (MemoReturn) ToXDR

                                                                                                                                                                                                                                                                                                          func (mr MemoReturn) ToXDR() (xdr.Memo, error)

                                                                                                                                                                                                                                                                                                            ToXDR for MemoReturn returns an XDR object representation of a Memo of the same type.

                                                                                                                                                                                                                                                                                                            type MemoText

                                                                                                                                                                                                                                                                                                            type MemoText string

                                                                                                                                                                                                                                                                                                              MemoText is used to send human messages of up to 28 bytes of ASCII/UTF-8.

                                                                                                                                                                                                                                                                                                              func (MemoText) ToXDR

                                                                                                                                                                                                                                                                                                              func (mt MemoText) ToXDR() (xdr.Memo, error)

                                                                                                                                                                                                                                                                                                                ToXDR for MemoText returns an XDR object representation of a Memo of the same type.

                                                                                                                                                                                                                                                                                                                type NativeAsset

                                                                                                                                                                                                                                                                                                                type NativeAsset struct{}

                                                                                                                                                                                                                                                                                                                  NativeAsset represents the native XLM asset.

                                                                                                                                                                                                                                                                                                                  func (NativeAsset) GetCode

                                                                                                                                                                                                                                                                                                                  func (na NativeAsset) GetCode() string

                                                                                                                                                                                                                                                                                                                    GetCode for NativeAsset returns an empty string (XLM doesn't have a code).

                                                                                                                                                                                                                                                                                                                    func (NativeAsset) GetIssuer

                                                                                                                                                                                                                                                                                                                    func (na NativeAsset) GetIssuer() string

                                                                                                                                                                                                                                                                                                                      GetIssuer for NativeAsset returns an empty string (XLM doesn't have an issuer).

                                                                                                                                                                                                                                                                                                                      func (NativeAsset) GetType

                                                                                                                                                                                                                                                                                                                      func (na NativeAsset) GetType() (AssetType, error)

                                                                                                                                                                                                                                                                                                                        GetType for NativeAsset returns the enum type of the asset.

                                                                                                                                                                                                                                                                                                                        func (NativeAsset) IsNative

                                                                                                                                                                                                                                                                                                                        func (na NativeAsset) IsNative() bool

                                                                                                                                                                                                                                                                                                                          IsNative for NativeAsset returns true (this is an XLM asset).

                                                                                                                                                                                                                                                                                                                          func (NativeAsset) ToXDR

                                                                                                                                                                                                                                                                                                                          func (na NativeAsset) ToXDR() (xdr.Asset, error)

                                                                                                                                                                                                                                                                                                                            ToXDR for NativeAsset produces a corresponding XDR asset.

                                                                                                                                                                                                                                                                                                                            type OfferID

                                                                                                                                                                                                                                                                                                                            type OfferID struct {
                                                                                                                                                                                                                                                                                                                            	SellerAccountAddress string
                                                                                                                                                                                                                                                                                                                            	OfferID              int64
                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                            type Operation

                                                                                                                                                                                                                                                                                                                            type Operation interface {
                                                                                                                                                                                                                                                                                                                            	BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)
                                                                                                                                                                                                                                                                                                                            	FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error
                                                                                                                                                                                                                                                                                                                            	Validate(withMuxedAccounts bool) error
                                                                                                                                                                                                                                                                                                                            	GetSourceAccount() string
                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                              Operation represents the operation types of the Stellar network.

                                                                                                                                                                                                                                                                                                                              type PathPayment

                                                                                                                                                                                                                                                                                                                              type PathPayment = PathPaymentStrictReceive

                                                                                                                                                                                                                                                                                                                                PathPayment represents the Stellar path_payment operation. This operation was removed in Stellar Protocol 12 and replaced by PathPaymentStrictReceive. Deprecated: This operation was renamed to PathPaymentStrictReceive, which functions identically.

                                                                                                                                                                                                                                                                                                                                Example
                                                                                                                                                                                                                                                                                                                                Output:
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                AAAAAgAAAAB+Ecs01jX14asC1KAsPdWlpGbYCM2PEgFZCD3NLhVZmAAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAgAAAAAAAAAABfXhAAAAAAB+Ecs01jX14asC1KAsPdWlpGbYCM2PEgFZCD3NLhVZmAAAAAAAAAAAAJiWgAAAAAEAAAABQUJDRAAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAAAAAAABLhVZmAAAAEDhhPsNm7yKfCUCDyBV1pOZDu+3DVDpT2cJSLQOVevP6pmU2yVqvMKnWbYxC5GbTXEEF+MfBE6EoW5+Z4rRt0QO
                                                                                                                                                                                                                                                                                                                                

                                                                                                                                                                                                                                                                                                                                type PathPaymentStrictReceive

                                                                                                                                                                                                                                                                                                                                type PathPaymentStrictReceive struct {
                                                                                                                                                                                                                                                                                                                                	SendAsset     Asset
                                                                                                                                                                                                                                                                                                                                	SendMax       string
                                                                                                                                                                                                                                                                                                                                	Destination   string
                                                                                                                                                                                                                                                                                                                                	DestAsset     Asset
                                                                                                                                                                                                                                                                                                                                	DestAmount    string
                                                                                                                                                                                                                                                                                                                                	Path          []Asset
                                                                                                                                                                                                                                                                                                                                	SourceAccount string
                                                                                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                                                                                  PathPaymentStrictReceive represents the Stellar path_payment_strict_receive operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                                                                                                                                                                                                                                  Example
                                                                                                                                                                                                                                                                                                                                  Output:
                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                  AAAAAgAAAAB+Ecs01jX14asC1KAsPdWlpGbYCM2PEgFZCD3NLhVZmAAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAgAAAAAAAAAABfXhAAAAAAB+Ecs01jX14asC1KAsPdWlpGbYCM2PEgFZCD3NLhVZmAAAAAAAAAAAAJiWgAAAAAEAAAABQUJDRAAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAAAAAAABLhVZmAAAAEDhhPsNm7yKfCUCDyBV1pOZDu+3DVDpT2cJSLQOVevP6pmU2yVqvMKnWbYxC5GbTXEEF+MfBE6EoW5+Z4rRt0QO
                                                                                                                                                                                                                                                                                                                                  

                                                                                                                                                                                                                                                                                                                                  func (*PathPaymentStrictReceive) BuildXDR

                                                                                                                                                                                                                                                                                                                                  func (pp *PathPaymentStrictReceive) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                                                                                                                                                                                                                    BuildXDR for PathPaymentStrictReceive returns a fully configured XDR Operation.

                                                                                                                                                                                                                                                                                                                                    func (*PathPaymentStrictReceive) FromXDR

                                                                                                                                                                                                                                                                                                                                    func (pp *PathPaymentStrictReceive) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                                                                                      FromXDR for PathPaymentStrictReceive initialises the txnbuild struct from the corresponding xdr Operation.

                                                                                                                                                                                                                                                                                                                                      func (*PathPaymentStrictReceive) GetSourceAccount

                                                                                                                                                                                                                                                                                                                                      func (pp *PathPaymentStrictReceive) GetSourceAccount() string

                                                                                                                                                                                                                                                                                                                                        GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                                                                                                                                                                                                                                                                                        func (*PathPaymentStrictReceive) Validate

                                                                                                                                                                                                                                                                                                                                        func (pp *PathPaymentStrictReceive) Validate(withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                                                                                          Validate for PathPaymentStrictReceive validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                                                                                                                                                                                                                                          type PathPaymentStrictSend

                                                                                                                                                                                                                                                                                                                                          type PathPaymentStrictSend struct {
                                                                                                                                                                                                                                                                                                                                          	SendAsset     Asset
                                                                                                                                                                                                                                                                                                                                          	SendAmount    string
                                                                                                                                                                                                                                                                                                                                          	Destination   string
                                                                                                                                                                                                                                                                                                                                          	DestAsset     Asset
                                                                                                                                                                                                                                                                                                                                          	DestMin       string
                                                                                                                                                                                                                                                                                                                                          	Path          []Asset
                                                                                                                                                                                                                                                                                                                                          	SourceAccount string
                                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                                            PathPaymentStrictSend represents the Stellar path_payment_strict_send operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                                                                                                                                                                                                                                            Example
                                                                                                                                                                                                                                                                                                                                            Output:
                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                            AAAAAgAAAAB+Ecs01jX14asC1KAsPdWlpGbYCM2PEgFZCD3NLhVZmAAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAADQAAAAAAAAAAAJiWgAAAAAB+Ecs01jX14asC1KAsPdWlpGbYCM2PEgFZCD3NLhVZmAAAAAAAAAAABfXhAAAAAAEAAAABQUJDRAAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAAAAAAABLhVZmAAAAEDV6CmR4ATvtm2qBzHE9UqqS95ZnIIHgpuU7hTZO38DHhf+oeZQ02DGvst4vYMMAIPGkMAsLlfAN/AFinz74DAD
                                                                                                                                                                                                                                                                                                                                            

                                                                                                                                                                                                                                                                                                                                            func (*PathPaymentStrictSend) BuildXDR

                                                                                                                                                                                                                                                                                                                                            func (pp *PathPaymentStrictSend) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                                                                                                                                                                                                                              BuildXDR for Payment returns a fully configured XDR Operation.

                                                                                                                                                                                                                                                                                                                                              func (*PathPaymentStrictSend) FromXDR

                                                                                                                                                                                                                                                                                                                                              func (pp *PathPaymentStrictSend) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                                                                                                FromXDR for PathPaymentStrictSend initialises the txnbuild struct from the corresponding xdr Operation.

                                                                                                                                                                                                                                                                                                                                                func (*PathPaymentStrictSend) GetSourceAccount

                                                                                                                                                                                                                                                                                                                                                func (pp *PathPaymentStrictSend) GetSourceAccount() string

                                                                                                                                                                                                                                                                                                                                                  GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                                                                                                                                                                                                                                                                                                  func (*PathPaymentStrictSend) Validate

                                                                                                                                                                                                                                                                                                                                                  func (pp *PathPaymentStrictSend) Validate(withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                                                                                                    Validate for PathPaymentStrictSend validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                                                                                                                                                                                                                                                    type Payment

                                                                                                                                                                                                                                                                                                                                                    type Payment struct {
                                                                                                                                                                                                                                                                                                                                                    	Destination   string
                                                                                                                                                                                                                                                                                                                                                    	Amount        string
                                                                                                                                                                                                                                                                                                                                                    	Asset         Asset
                                                                                                                                                                                                                                                                                                                                                    	SourceAccount string
                                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                                      Payment represents the Stellar payment operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                                                                                                                                                                                                                                                      Example
                                                                                                                                                                                                                                                                                                                                                      Output:
                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                      AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAACE4N7avBtJL576CIWTzGCbGPvSlVfMQAOjcYbSsSF2VAAAAAAAAAAABfXhAAAAAAAAAAAB6i5yxQAAAEB2/C066OEFac3Bszk6FtvKd+NKOeCl+f8caHQATPos8HkJW1Sm/WyEkVDrvrDX4udMHl3gHhlS/qE0EuWEeJYC
                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                      Example (SetBaseFee)
                                                                                                                                                                                                                                                                                                                                                      Output:
                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                      AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAABLAADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAACE4N7avBtJL576CIWTzGCbGPvSlVfMQAOjcYbSsSF2VAAAAAAAAAAABfXhAAAAAAAAAAABAAAAAITg3tq8G0kvnvoIhZPMYJsY+9KVV8xAA6NxhtKxIXZUAAAAAAAAAAA7msoAAAAAAAAAAAHqLnLFAAAAQMmOXP+k93ENYtu7evNTu2h63UkNrQnF6ci49Oh1XufQ3rhzS4Dd1+6AXqgWa4FbcvlTVRjxCurkflI4Rov2xgQ=
                                                                                                                                                                                                                                                                                                                                                      

                                                                                                                                                                                                                                                                                                                                                      func (*Payment) BuildXDR

                                                                                                                                                                                                                                                                                                                                                      func (p *Payment) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                                                                                                                                                                                                                                      func (*Payment) FromXDR

                                                                                                                                                                                                                                                                                                                                                      func (p *Payment) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                                                                                                        FromXDR for Payment initialises the txnbuild struct from the corresponding xdr Operation.

                                                                                                                                                                                                                                                                                                                                                        func (*Payment) GetSourceAccount

                                                                                                                                                                                                                                                                                                                                                        func (p *Payment) GetSourceAccount() string

                                                                                                                                                                                                                                                                                                                                                          GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                                                                                                                                                                                                                                                                                                          func (*Payment) Validate

                                                                                                                                                                                                                                                                                                                                                          func (p *Payment) Validate(withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                                                                                                            Validate for Payment validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                                                                                                                                                                                                                                                            type RevokeSponsorship

                                                                                                                                                                                                                                                                                                                                                            type RevokeSponsorship struct {
                                                                                                                                                                                                                                                                                                                                                            	SourceAccount   string
                                                                                                                                                                                                                                                                                                                                                            	SponsorshipType RevokeSponsorshipType
                                                                                                                                                                                                                                                                                                                                                            	// Account ID (strkey)
                                                                                                                                                                                                                                                                                                                                                            	Account   *string
                                                                                                                                                                                                                                                                                                                                                            	TrustLine *TrustLineID
                                                                                                                                                                                                                                                                                                                                                            	Offer     *OfferID
                                                                                                                                                                                                                                                                                                                                                            	Data      *DataID
                                                                                                                                                                                                                                                                                                                                                            	// Claimable Balance ID
                                                                                                                                                                                                                                                                                                                                                            	ClaimableBalance *string
                                                                                                                                                                                                                                                                                                                                                            	Signer           *SignerID
                                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                                              RevokeSponsorship is a union type representing a RevokeSponsorship Operation. SponsorshipType stablishes which sponsorship is being revoked. The other fields should be ignored.

                                                                                                                                                                                                                                                                                                                                                              Example
                                                                                                                                                                                                                                                                                                                                                              Output:
                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                              AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAMgAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAEgAAAAAAAAABAAAAALQVLw52HjIVKlqx4rWxgwxV1OlUImbKUYmkx5i70s4oAAAAAUVGR0gAAAAAfhHLNNY19eGrAtSgLD3VpaRm2AjNjxIBWQg9zS4VWZgAAAAAAAAAEgAAAAAAAAABAAAAALQVLw52HjIVKlqx4rWxgwxV1OlUImbKUYmkx5i70s4oAAAAAUlKS0wAAAAA4Nxt4XJcrGZRYrUvrOc1sooiQ+QdEk1suS1wo+oucsUAAAAAAAAAAeoucsUAAABA9YO+xRc5Vb8ueP1U8go7ka+u/gZJd2z075c2pdFxYb+4AvQUQGvg+N4wvtNll43lPwXq5XAz74BfP99wugplDQ==
                                                                                                                                                                                                                                                                                                                                                              

                                                                                                                                                                                                                                                                                                                                                              func (*RevokeSponsorship) BuildXDR

                                                                                                                                                                                                                                                                                                                                                              func (r *RevokeSponsorship) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                                                                                                                                                                                                                                              func (*RevokeSponsorship) FromXDR

                                                                                                                                                                                                                                                                                                                                                              func (r *RevokeSponsorship) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                                                                                                              func (*RevokeSponsorship) GetSourceAccount

                                                                                                                                                                                                                                                                                                                                                              func (r *RevokeSponsorship) GetSourceAccount() string

                                                                                                                                                                                                                                                                                                                                                              func (*RevokeSponsorship) Validate

                                                                                                                                                                                                                                                                                                                                                              func (r *RevokeSponsorship) Validate(withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                                                                                                              type RevokeSponsorshipType

                                                                                                                                                                                                                                                                                                                                                              type RevokeSponsorshipType int
                                                                                                                                                                                                                                                                                                                                                              const (
                                                                                                                                                                                                                                                                                                                                                              	RevokeSponsorshipTypeAccount RevokeSponsorshipType = iota + 1
                                                                                                                                                                                                                                                                                                                                                              	RevokeSponsorshipTypeTrustLine
                                                                                                                                                                                                                                                                                                                                                              	RevokeSponsorshipTypeOffer
                                                                                                                                                                                                                                                                                                                                                              	RevokeSponsorshipTypeData
                                                                                                                                                                                                                                                                                                                                                              	RevokeSponsorshipTypeClaimableBalance
                                                                                                                                                                                                                                                                                                                                                              	RevokeSponsorshipTypeSigner
                                                                                                                                                                                                                                                                                                                                                              )

                                                                                                                                                                                                                                                                                                                                                              type SetOptions

                                                                                                                                                                                                                                                                                                                                                              type SetOptions struct {
                                                                                                                                                                                                                                                                                                                                                              	InflationDestination *string
                                                                                                                                                                                                                                                                                                                                                              	SetFlags             []AccountFlag
                                                                                                                                                                                                                                                                                                                                                              	ClearFlags           []AccountFlag
                                                                                                                                                                                                                                                                                                                                                              	MasterWeight         *Threshold
                                                                                                                                                                                                                                                                                                                                                              	LowThreshold         *Threshold
                                                                                                                                                                                                                                                                                                                                                              	MediumThreshold      *Threshold
                                                                                                                                                                                                                                                                                                                                                              	HighThreshold        *Threshold
                                                                                                                                                                                                                                                                                                                                                              	HomeDomain           *string
                                                                                                                                                                                                                                                                                                                                                              	Signer               *Signer
                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                              	SourceAccount string
                                                                                                                                                                                                                                                                                                                                                              	// contains filtered or unexported fields
                                                                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                                                                SetOptions represents the Stellar set options operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                                                                                                                                                                                                                                                                Example
                                                                                                                                                                                                                                                                                                                                                                Output:
                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                AAAAAgAAAADg3G3hclysZlFitS+s5zWyiiJD5B0STWy5LXCj6i5yxQAAAGQADKI/AAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAABQAAAAEAAAAAhODe2rwbSS+e+giFk8xgmxj70pVXzEADo3GG0rEhdlQAAAABAAAAAgAAAAEAAAAFAAAAAQAAAAoAAAABAAAAAQAAAAEAAAACAAAAAQAAAAIAAAABAAAAHExvdmVseUx1bWVuc0xvb2tMdW1pbm91cy5jb20AAAABAAAAAITg3tq8G0kvnvoIhZPMYJsY+9KVV8xAA6NxhtKxIXZUAAAABAAAAAAAAAAB6i5yxQAAAEBxncRuLogeNQ8sG9TojUMB6QmKDWYmhF00Wz43UX90pAQnSNcJAQxur0RA7Fn6LjJLObqyjcdIc4P2DC02u08G
                                                                                                                                                                                                                                                                                                                                                                

                                                                                                                                                                                                                                                                                                                                                                func (*SetOptions) BuildXDR

                                                                                                                                                                                                                                                                                                                                                                func (so *SetOptions) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                                                                                                                                                                                                                                                  BuildXDR for SetOptions returns a fully configured XDR Operation.

                                                                                                                                                                                                                                                                                                                                                                  func (*SetOptions) FromXDR

                                                                                                                                                                                                                                                                                                                                                                  func (so *SetOptions) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                                                                                                                    FromXDR for SetOptions initialises the txnbuild struct from the corresponding xdr Operation.

                                                                                                                                                                                                                                                                                                                                                                    func (*SetOptions) GetSourceAccount

                                                                                                                                                                                                                                                                                                                                                                    func (so *SetOptions) GetSourceAccount() string

                                                                                                                                                                                                                                                                                                                                                                      GetSourceAccount returns the source account of the operation, or the empty string if not set.

                                                                                                                                                                                                                                                                                                                                                                      func (*SetOptions) Validate

                                                                                                                                                                                                                                                                                                                                                                      func (so *SetOptions) Validate(withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                                                                                                                        Validate for SetOptions validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                                                                                                                                                                                                                                                                        type SetTrustLineFlags

                                                                                                                                                                                                                                                                                                                                                                        type SetTrustLineFlags struct {
                                                                                                                                                                                                                                                                                                                                                                        	Trustor       string
                                                                                                                                                                                                                                                                                                                                                                        	Asset         Asset
                                                                                                                                                                                                                                                                                                                                                                        	SetFlags      []TrustLineFlag
                                                                                                                                                                                                                                                                                                                                                                        	ClearFlags    []TrustLineFlag
                                                                                                                                                                                                                                                                                                                                                                        	SourceAccount string
                                                                                                                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                                                                                                                          SetTrustLineFlags represents the Stellar set trust line flags operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

                                                                                                                                                                                                                                                                                                                                                                          func (*SetTrustLineFlags) BuildXDR

                                                                                                                                                                                                                                                                                                                                                                          func (stf *SetTrustLineFlags) BuildXDR(withMuxedAccounts bool) (xdr.Operation, error)

                                                                                                                                                                                                                                                                                                                                                                            BuildXDR for ASetTrustLineFlags returns a fully configured XDR Operation.

                                                                                                                                                                                                                                                                                                                                                                            func (*SetTrustLineFlags) FromXDR

                                                                                                                                                                                                                                                                                                                                                                            func (stf *SetTrustLineFlags) FromXDR(xdrOp xdr.Operation, withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                                                                                                                              FromXDR for SetTrustLineFlags initialises the txnbuild struct from the corresponding xdr Operation.

                                                                                                                                                                                                                                                                                                                                                                              func (*SetTrustLineFlags) GetSourceAccount

                                                                                                                                                                                                                                                                                                                                                                              func (stf *SetTrustLineFlags) GetSourceAccount() string

                                                                                                                                                                                                                                                                                                                                                                                GetSourceAccount returns the source account of the operation, or nil if not set.

                                                                                                                                                                                                                                                                                                                                                                                func (*SetTrustLineFlags) Validate

                                                                                                                                                                                                                                                                                                                                                                                func (stf *SetTrustLineFlags) Validate(withMuxedAccounts bool) error

                                                                                                                                                                                                                                                                                                                                                                                  Validate for SetTrustLineFlags validates the required struct fields. It returns an error if any of the fields are invalid. Otherwise, it returns nil.

                                                                                                                                                                                                                                                                                                                                                                                  type Signer

                                                                                                                                                                                                                                                                                                                                                                                  type Signer struct {
                                                                                                                                                                                                                                                                                                                                                                                  	Address string
                                                                                                                                                                                                                                                                                                                                                                                  	Weight  Threshold
                                                                                                                                                                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                                                                                                                                                                    Signer represents the Signer in a SetOptions operation. If the signer already exists, it is updated. If the weight is 0, the signer is deleted.

                                                                                                                                                                                                                                                                                                                                                                                    type SignerID

                                                                                                                                                                                                                                                                                                                                                                                    type SignerID struct {
                                                                                                                                                                                                                                                                                                                                                                                    	AccountID     string
                                                                                                                                                                                                                                                                                                                                                                                    	SignerAddress string
                                                                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                                                                    type SignerSummary

                                                                                                                                                                                                                                                                                                                                                                                    type SignerSummary map[string]int32

                                                                                                                                                                                                                                                                                                                                                                                      SignerSummary is a map of signers to their weights.

                                                                                                                                                                                                                                                                                                                                                                                      type SimpleAccount

                                                                                                                                                                                                                                                                                                                                                                                      type SimpleAccount struct {
                                                                                                                                                                                                                                                                                                                                                                                      	AccountID string
                                                                                                                                                                                                                                                                                                                                                                                      	Sequence  int64
                                                                                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                                                                                        SimpleAccount is a minimal implementation of an Account.

                                                                                                                                                                                                                                                                                                                                                                                        func NewSimpleAccount

                                                                                                                                                                                                                                                                                                                                                                                        func NewSimpleAccount(accountID string, sequence int64) SimpleAccount

                                                                                                                                                                                                                                                                                                                                                                                          NewSimpleAccount is a factory method that creates a SimpleAccount from "accountID" and "sequence".

                                                                                                                                                                                                                                                                                                                                                                                          func (*SimpleAccount) GetAccountID

                                                                                                                                                                                                                                                                                                                                                                                          func (sa *SimpleAccount) GetAccountID() string

                                                                                                                                                                                                                                                                                                                                                                                            GetAccountID returns the Account ID.

                                                                                                                                                                                                                                                                                                                                                                                            func (*SimpleAccount) GetSequenceNumber

                                                                                                                                                                                                                                                                                                                                                                                            func (sa *SimpleAccount) GetSequenceNumber() (int64, error)

                                                                                                                                                                                                                                                                                                                                                                                              GetSequenceNumber returns the sequence number of the account.

                                                                                                                                                                                                                                                                                                                                                                                              func (*SimpleAccount) IncrementSequenceNumber

                                                                                                                                                                                                                                                                                                                                                                                              func (sa *SimpleAccount) IncrementSequenceNumber() (int64, error)

                                                                                                                                                                                                                                                                                                                                                                                                IncrementSequenceNumber increments the internal record of the account's sequence number by 1.

                                                                                                                                                                                                                                                                                                                                                                                                type Threshold

                                                                                                                                                                                                                                                                                                                                                                                                type Threshold uint8

                                                                                                                                                                                                                                                                                                                                                                                                  Threshold is the datatype for MasterWeight, Signer.Weight, and Thresholds. Each is a number between 0-255 inclusive.

                                                                                                                                                                                                                                                                                                                                                                                                  func NewThreshold

                                                                                                                                                                                                                                                                                                                                                                                                  func NewThreshold(t Threshold) *Threshold

                                                                                                                                                                                                                                                                                                                                                                                                    NewThreshold is syntactic sugar that makes instantiating SetOptions more convenient.

                                                                                                                                                                                                                                                                                                                                                                                                    type Timebounds

                                                                                                                                                                                                                                                                                                                                                                                                    type Timebounds struct {
                                                                                                                                                                                                                                                                                                                                                                                                    	MinTime int64
                                                                                                                                                                                                                                                                                                                                                                                                    	MaxTime int64
                                                                                                                                                                                                                                                                                                                                                                                                    	// contains filtered or unexported fields
                                                                                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                                                                                      Timebounds represents the time window during which a Stellar transaction is considered valid.

                                                                                                                                                                                                                                                                                                                                                                                                      MinTime and MaxTime represent Stellar timebounds - a window of time over which the Transaction will be considered valid. In general, almost all Transactions benefit from setting an upper timebound, because once submitted, the status of a pending Transaction may remain unresolved for a long time if the network is congested. With an upper timebound, the submitter has a guaranteed time at which the Transaction is known to have either succeeded or failed, and can then take appropriate action (e.g. to resubmit or mark as resolved).

                                                                                                                                                                                                                                                                                                                                                                                                      Create a Timebounds struct using one of NewTimebounds(), NewTimeout(), or NewInfiniteTimeout().

                                                                                                                                                                                                                                                                                                                                                                                                      func NewInfiniteTimeout

                                                                                                                                                                                                                                                                                                                                                                                                      func NewInfiniteTimeout() Timebounds

                                                                                                                                                                                                                                                                                                                                                                                                        NewInfiniteTimeout is a factory method that sets the MaxTime to a value representing an indefinite upper time bound. This is rarely needed, but is helpful for certain smart contracts, and for deterministic testing. A Transaction cannot be built unless a Timebounds object is provided through a factory method.

                                                                                                                                                                                                                                                                                                                                                                                                        func NewTimebounds

                                                                                                                                                                                                                                                                                                                                                                                                        func NewTimebounds(minTime, maxTime int64) Timebounds

                                                                                                                                                                                                                                                                                                                                                                                                          NewTimebounds is a factory method that constructs a Timebounds object from a min and max time. A Transaction cannot be built unless a Timebounds object is provided through a factory method.

                                                                                                                                                                                                                                                                                                                                                                                                          func NewTimeout

                                                                                                                                                                                                                                                                                                                                                                                                          func NewTimeout(timeout int64) Timebounds

                                                                                                                                                                                                                                                                                                                                                                                                            NewTimeout is a factory method that sets the MaxTime to be the duration in seconds in the future specified by 'timeout'. A Transaction cannot be built unless a Timebounds object is provided through a factory method. This method uses the provided system time - make sure it is accurate.

                                                                                                                                                                                                                                                                                                                                                                                                            func (*Timebounds) Validate

                                                                                                                                                                                                                                                                                                                                                                                                            func (tb *Timebounds) Validate() error

                                                                                                                                                                                                                                                                                                                                                                                                              Validate for Timebounds sanity-checks the configured Timebound limits, and confirms the object was built using a factory method. This is done to ensure that default Timebound structs (which have no limits) are not valid - you must explicitly specifiy the Timebound you require.

                                                                                                                                                                                                                                                                                                                                                                                                              type Transaction

                                                                                                                                                                                                                                                                                                                                                                                                              type Transaction struct {
                                                                                                                                                                                                                                                                                                                                                                                                              	// contains filtered or unexported fields
                                                                                                                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                                                                                                                Transaction represents a Stellar transaction. See https://www.stellar.org/developers/guides/concepts/transactions.html A Transaction may be wrapped by a FeeBumpTransaction in which case the account authorizing the FeeBumpTransaction will pay for the transaction fees instead of the Transaction's source account.

                                                                                                                                                                                                                                                                                                                                                                                                                func BuildChallengeTx

                                                                                                                                                                                                                                                                                                                                                                                                                func BuildChallengeTx(serverSignerSecret, clientAccountID, webAuthDomain, homeDomain, network string, timebound time.Duration) (*Transaction, error)

                                                                                                                                                                                                                                                                                                                                                                                                                  BuildChallengeTx is a factory method that creates a valid SEP 10 challenge, for use in web authentication. "timebound" is the time duration the transaction should be valid for, and must be greater than 1s (300s is recommended). More details on SEP 10: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md

                                                                                                                                                                                                                                                                                                                                                                                                                  Example
                                                                                                                                                                                                                                                                                                                                                                                                                  Output:
                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                  true
                                                                                                                                                                                                                                                                                                                                                                                                                  

                                                                                                                                                                                                                                                                                                                                                                                                                  func NewTransaction

                                                                                                                                                                                                                                                                                                                                                                                                                  func NewTransaction(params TransactionParams) (*Transaction, error)

                                                                                                                                                                                                                                                                                                                                                                                                                    NewTransaction returns a new Transaction instance

                                                                                                                                                                                                                                                                                                                                                                                                                    func ReadChallengeTx

                                                                                                                                                                                                                                                                                                                                                                                                                    func ReadChallengeTx(challengeTx, serverAccountID, network, webAuthDomain string, homeDomains []string) (tx *Transaction, clientAccountID string, matchedHomeDomain string, err error)

                                                                                                                                                                                                                                                                                                                                                                                                                      ReadChallengeTx reads a SEP 10 challenge transaction and returns the decoded transaction and client account ID contained within.

                                                                                                                                                                                                                                                                                                                                                                                                                      Before calling this function, retrieve the SIGNING_KEY included in the TOML file hosted on the service's homeDomain and ensure it matches the serverAccountID you intend to pass.

                                                                                                                                                                                                                                                                                                                                                                                                                      This function verifies the serverAccountID signed the challenge. If the serverAccountID also matches the SIGNING_KEY included in the TOML file hosted the service's homeDomain passed, malicious web services will not be able to use the challenge transaction POSTed back to the authentication endpoint.

                                                                                                                                                                                                                                                                                                                                                                                                                      The challenge's first Manage Data operation is expected to contain the homeDomain parameter passed to the function.

                                                                                                                                                                                                                                                                                                                                                                                                                      If the challenge contains a subsequent Manage Data operation with key web_auth_domain the value will be checked to match the webAuthDomain provided. If it does not match the function will return an error.

                                                                                                                                                                                                                                                                                                                                                                                                                      It does not verify that the transaction has been signed by the client or that any signatures other than the servers on the transaction are valid. Use one of the following functions to completely verify the transaction: - VerifyChallengeTxThreshold - VerifyChallengeTxSigners

                                                                                                                                                                                                                                                                                                                                                                                                                      func (*Transaction) AddSignatureBase64

                                                                                                                                                                                                                                                                                                                                                                                                                      func (t *Transaction) AddSignatureBase64(network, publicKey, signature string) (*Transaction, error)

                                                                                                                                                                                                                                                                                                                                                                                                                        AddSignatureBase64 returns a new Transaction instance which extends the current instance with an additional signature derived from the given base64-encoded signature.

                                                                                                                                                                                                                                                                                                                                                                                                                        func (*Transaction) Base64

                                                                                                                                                                                                                                                                                                                                                                                                                        func (t *Transaction) Base64() (string, error)

                                                                                                                                                                                                                                                                                                                                                                                                                          Base64 returns the base 64 XDR representation of the transaction envelope.

                                                                                                                                                                                                                                                                                                                                                                                                                          func (*Transaction) BaseFee

                                                                                                                                                                                                                                                                                                                                                                                                                          func (t *Transaction) BaseFee() int64

                                                                                                                                                                                                                                                                                                                                                                                                                            BaseFee returns the per operation fee for this transaction.

                                                                                                                                                                                                                                                                                                                                                                                                                            func (*Transaction) ClaimableBalanceID

                                                                                                                                                                                                                                                                                                                                                                                                                            func (t *Transaction) ClaimableBalanceID(operationIndex int) (string, error)

                                                                                                                                                                                                                                                                                                                                                                                                                              ClaimableBalanceID returns the claimable balance ID for the operation at the given index within the transaction. given index (which should be a `CreateClaimableBalance` operation).

                                                                                                                                                                                                                                                                                                                                                                                                                              func (*Transaction) Hash

                                                                                                                                                                                                                                                                                                                                                                                                                              func (t *Transaction) Hash(networkStr string) ([32]byte, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                Hash returns the network specific hash of this transaction encoded as a byte array.

                                                                                                                                                                                                                                                                                                                                                                                                                                func (*Transaction) HashHex

                                                                                                                                                                                                                                                                                                                                                                                                                                func (t *Transaction) HashHex(network string) (string, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                  HashHex returns the network specific hash of this transaction encoded as a hexadecimal string.

                                                                                                                                                                                                                                                                                                                                                                                                                                  func (*Transaction) MarshalBinary

                                                                                                                                                                                                                                                                                                                                                                                                                                  func (t *Transaction) MarshalBinary() ([]byte, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                    MarshalBinary returns the binary XDR representation of the transaction envelope.

                                                                                                                                                                                                                                                                                                                                                                                                                                    func (*Transaction) MaxFee

                                                                                                                                                                                                                                                                                                                                                                                                                                    func (t *Transaction) MaxFee() int64

                                                                                                                                                                                                                                                                                                                                                                                                                                      MaxFee returns the total fees which can be spent to submit this transaction.

                                                                                                                                                                                                                                                                                                                                                                                                                                      func (*Transaction) Memo

                                                                                                                                                                                                                                                                                                                                                                                                                                      func (t *Transaction) Memo() Memo

                                                                                                                                                                                                                                                                                                                                                                                                                                        Memo returns the memo configured for this transaction.

                                                                                                                                                                                                                                                                                                                                                                                                                                        func (*Transaction) Operations

                                                                                                                                                                                                                                                                                                                                                                                                                                        func (t *Transaction) Operations() []Operation

                                                                                                                                                                                                                                                                                                                                                                                                                                          Operations returns the list of operations included in this transaction. The contents of the returned slice should not be modified.

                                                                                                                                                                                                                                                                                                                                                                                                                                          func (*Transaction) Sign

                                                                                                                                                                                                                                                                                                                                                                                                                                          func (t *Transaction) Sign(network string, kps ...*keypair.Full) (*Transaction, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                            Sign returns a new Transaction instance which extends the current instance with additional signatures derived from the given list of keypair instances.

                                                                                                                                                                                                                                                                                                                                                                                                                                            func (*Transaction) SignHashX

                                                                                                                                                                                                                                                                                                                                                                                                                                            func (t *Transaction) SignHashX(preimage []byte) (*Transaction, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                              SignHashX returns a new Transaction instance which extends the current instance with HashX signature type. See description here: https://www.stellar.org/developers/guides/concepts/multi-sig.html#hashx.

                                                                                                                                                                                                                                                                                                                                                                                                                                              func (*Transaction) SignWithKeyString

                                                                                                                                                                                                                                                                                                                                                                                                                                              func (t *Transaction) SignWithKeyString(network string, keys ...string) (*Transaction, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                                SignWithKeyString returns a new Transaction instance which extends the current instance with additional signatures derived from the given list of private key strings.

                                                                                                                                                                                                                                                                                                                                                                                                                                                func (*Transaction) Signatures

                                                                                                                                                                                                                                                                                                                                                                                                                                                func (t *Transaction) Signatures() []xdr.DecoratedSignature

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Signatures returns the list of signatures attached to this transaction. The contents of the returned slice should not be modified.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (*Transaction) SourceAccount

                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (t *Transaction) SourceAccount() SimpleAccount

                                                                                                                                                                                                                                                                                                                                                                                                                                                    SourceAccount returns the account which is originating this account.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    func (*Transaction) Timebounds

                                                                                                                                                                                                                                                                                                                                                                                                                                                    func (t *Transaction) Timebounds() Timebounds

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Timebounds returns the Timebounds configured for this transaction.

                                                                                                                                                                                                                                                                                                                                                                                                                                                      func (*Transaction) ToXDR

                                                                                                                                                                                                                                                                                                                                                                                                                                                      func (t *Transaction) ToXDR() xdr.TransactionEnvelope

                                                                                                                                                                                                                                                                                                                                                                                                                                                        ToXDR returns the a xdr.TransactionEnvelope which is equivalent to this transaction. The envelope should not be modified because any changes applied may affect the internals of the Transaction instance.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        type TransactionFromXDROption

                                                                                                                                                                                                                                                                                                                                                                                                                                                        type TransactionFromXDROption int
                                                                                                                                                                                                                                                                                                                                                                                                                                                        const (
                                                                                                                                                                                                                                                                                                                                                                                                                                                        	TransactionFromXDROptionEnableMuxedAccounts TransactionFromXDROption = iota
                                                                                                                                                                                                                                                                                                                                                                                                                                                        )

                                                                                                                                                                                                                                                                                                                                                                                                                                                        type TransactionParams

                                                                                                                                                                                                                                                                                                                                                                                                                                                        type TransactionParams struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                                        	SourceAccount        Account
                                                                                                                                                                                                                                                                                                                                                                                                                                                        	IncrementSequenceNum bool
                                                                                                                                                                                                                                                                                                                                                                                                                                                        	Operations           []Operation
                                                                                                                                                                                                                                                                                                                                                                                                                                                        	BaseFee              int64
                                                                                                                                                                                                                                                                                                                                                                                                                                                        	Memo                 Memo
                                                                                                                                                                                                                                                                                                                                                                                                                                                        	Timebounds           Timebounds
                                                                                                                                                                                                                                                                                                                                                                                                                                                        	EnableMuxedAccounts  bool
                                                                                                                                                                                                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                                                                                                                                                                                                          TransactionParams is a container for parameters which are used to construct new Transaction instances

                                                                                                                                                                                                                                                                                                                                                                                                                                                          type TrustLineFlag

                                                                                                                                                                                                                                                                                                                                                                                                                                                          type TrustLineFlag uint32

                                                                                                                                                                                                                                                                                                                                                                                                                                                            TrustLineFlag represents the bitmask flags used to set and clear account authorization options.

                                                                                                                                                                                                                                                                                                                                                                                                                                                            type TrustLineID

                                                                                                                                                                                                                                                                                                                                                                                                                                                            type TrustLineID struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            	Account string
                                                                                                                                                                                                                                                                                                                                                                                                                                                            	Asset   Asset
                                                                                                                                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                                                                                                                                            type ValidationError

                                                                                                                                                                                                                                                                                                                                                                                                                                                            type ValidationError struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            	Field   string // Field is the struct field on which the validation error occured.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            	Message string // Message is the validation error message.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                                                                                                                                              ValidationError is a custom error struct that holds validation errors of txnbuild's operation structs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                              func NewValidationError

                                                                                                                                                                                                                                                                                                                                                                                                                                                              func NewValidationError(field, message string) *ValidationError

                                                                                                                                                                                                                                                                                                                                                                                                                                                                NewValidationError creates a ValidationError struct with the provided field and message values.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                func (*ValidationError) Error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                func (opError *ValidationError) Error() string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Error for ValidationError struct implements the error interface.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Directories

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Path Synopsis
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  cmd
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  demo
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Demo is an interactive demonstration of the Go SDK using the Stellar TestNet.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Demo is an interactive demonstration of the Go SDK using the Stellar TestNet.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  demo/operations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Package demo is an interactive demonstration of the Go SDK using the Stellar TestNet.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Package demo is an interactive demonstration of the Go SDK using the Stellar TestNet.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Package examplehorizonclient provides a dummy client for use with the GoDoc examples.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Package examplehorizonclient provides a dummy client for use with the GoDoc examples.