Documentation

Overview

    Package xdr contains the generated code for parsing the xdr structures used for stellar.

    Package xdr is generated from:

    Stellar-SCP.x
    Stellar-ledger-entries.x
    Stellar-ledger.x
    Stellar-overlay.x
    Stellar-transaction.x
    Stellar-types.x
    

    DO NOT EDIT or your changes may be overwritten

    Index

    Examples

    Constants

    View Source
    const MaskAccountFlags = 0x7

      MaskAccountFlags is an XDR Const defines as:

      const MASK_ACCOUNT_FLAGS = 0x7;
      
      View Source
      const MaskAccountFlagsV16 = 0xF

        MaskAccountFlagsV16 is an XDR Const defines as:

        const MASK_ACCOUNT_FLAGS_V16 = 0xF;
        
        View Source
        const MaskClaimableBalanceFlags = 0x1

          MaskClaimableBalanceFlags is an XDR Const defines as:

          const MASK_CLAIMABLE_BALANCE_FLAGS = 0x1;
          
          View Source
          const MaskOfferentryFlags = 1

            MaskOfferentryFlags is an XDR Const defines as:

            const MASK_OFFERENTRY_FLAGS = 1;
            
            View Source
            const MaskTrustlineFlags = 1

              MaskTrustlineFlags is an XDR Const defines as:

              const MASK_TRUSTLINE_FLAGS = 1;
              
              View Source
              const MaskTrustlineFlagsV13 = 3

                MaskTrustlineFlagsV13 is an XDR Const defines as:

                const MASK_TRUSTLINE_FLAGS_V13 = 3;
                
                View Source
                const MaskTrustlineFlagsV16 = 7

                  MaskTrustlineFlagsV16 is an XDR Const defines as:

                  const MASK_TRUSTLINE_FLAGS_V16 = 7;
                  
                  View Source
                  const MaxOpsPerTx = 100

                    MaxOpsPerTx is an XDR Const defines as:

                    const MAX_OPS_PER_TX = 100;
                    
                    View Source
                    const MaxSigners = 20

                      MaxSigners is an XDR Const defines as:

                      const MAX_SIGNERS = 20;
                      

                      Variables

                      View Source
                      var AssetTypeToString = map[AssetType]string{
                      	AssetTypeAssetTypeNative:           "native",
                      	AssetTypeAssetTypeCreditAlphanum4:  "credit_alphanum4",
                      	AssetTypeAssetTypeCreditAlphanum12: "credit_alphanum12",
                      }

                        AssetTypeToString maps an xdr.AssetType to its string representation

                        View Source
                        var OperationTypeToStringMap = operationTypeMap
                        View Source
                        var StringToAssetType = map[string]AssetType{
                        	"native":            AssetTypeAssetTypeNative,
                        	"credit_alphanum4":  AssetTypeAssetTypeCreditAlphanum4,
                        	"credit_alphanum12": AssetTypeAssetTypeCreditAlphanum12,
                        }

                          StringToAssetType maps an strings to its xdr.AssetType representation

                          View Source
                          var ValidAssetCode = regexp.MustCompile("^[[:alnum:]]{1,12}$")

                          Functions

                          func Marshal

                          func Marshal(w io.Writer, v interface{}) (int, error)

                            Marshal writes an xdr element `v` into `w`.

                            func MarshalBase64

                            func MarshalBase64(v interface{}) (string, error)

                            func MarshalFramed

                            func MarshalFramed(w io.Writer, v interface{}) error

                            func MarshalHex

                            func MarshalHex(v interface{}) (string, error)

                            func ReadFrameLength

                            func ReadFrameLength(r io.Reader) (uint32, error)

                              ReadFrameLength returns a length of a framed XDR object.

                              func SafeUnmarshal

                              func SafeUnmarshal(data []byte, dest interface{}) error

                                SafeUnmarshal decodes the provided reader into the destination and verifies that provided bytes are all consumed by the unmarshalling process.

                                func SafeUnmarshalBase64

                                func SafeUnmarshalBase64(data string, dest interface{}) error

                                  SafeUnmarshalBase64 first decodes the provided reader from base64 before decoding the xdr into the provided destination. Also ensures that the reader is fully consumed.

                                  func SafeUnmarshalHex

                                  func SafeUnmarshalHex(data string, dest interface{}) error

                                    SafeUnmarshalHex first decodes the provided reader from hex before decoding the xdr into the provided destination. Also ensures that the reader is fully consumed.

                                    func Unmarshal

                                    func Unmarshal(r io.Reader, v interface{}) (int, error)

                                      Unmarshal reads an xdr element from `r` into `v`.

                                      Example

                                        ExampleUnmarshal shows the lowest-level process to decode a base64 envelope encoded in base64.

                                        Output:
                                        
                                        read 196 bytes
                                        This tx has 1 operations
                                        

                                        func UnmarshalFramed

                                        func UnmarshalFramed(r io.Reader, v interface{}) (int, error)

                                          XDR and RPC define a (minimal) framing format which our metadata arrives in: a 4-byte big-endian length header that has the high bit set, followed by that length worth of XDR data. Decoding this involves just a little more work than xdr.Unmarshal.

                                          Types

                                          type AccountEntry

                                          type AccountEntry struct {
                                          	AccountId     AccountId
                                          	Balance       Int64
                                          	SeqNum        SequenceNumber
                                          	NumSubEntries Uint32
                                          	InflationDest *AccountId
                                          	Flags         Uint32
                                          	HomeDomain    String32
                                          	Thresholds    Thresholds
                                          	Signers       []Signer `xdrmaxsize:"20"`
                                          	Ext           AccountEntryExt
                                          }

                                            AccountEntry is an XDR Struct defines as:

                                            struct AccountEntry
                                             {
                                                 AccountID accountID;      // master public key for this account
                                                 int64 balance;            // in stroops
                                                 SequenceNumber seqNum;    // last sequence number used for this account
                                                 uint32 numSubEntries;     // number of sub-entries this account has
                                                                           // drives the reserve
                                                 AccountID* inflationDest; // Account to vote for during inflation
                                                 uint32 flags;             // see AccountFlags
                                            
                                                 string32 homeDomain; // can be used for reverse federation and memo lookup
                                            
                                                 // fields used for signatures
                                                 // thresholds stores unsigned bytes: [weight of master|low|medium|high]
                                                 Thresholds thresholds;
                                            
                                                 Signer signers<MAX_SIGNERS>; // possible signers for this account
                                            
                                                 // reserved for future use
                                                 union switch (int v)
                                                 {
                                                 case 0:
                                                     void;
                                                 case 1:
                                                     AccountEntryExtensionV1 v1;
                                                 }
                                                 ext;
                                             };
                                            

                                            func (*AccountEntry) Liabilities

                                            func (account *AccountEntry) Liabilities() Liabilities

                                              Liabilities returns AccountEntry's liabilities

                                              func (AccountEntry) MarshalBinary

                                              func (s AccountEntry) MarshalBinary() ([]byte, error)

                                                MarshalBinary implements encoding.BinaryMarshaler.

                                                func (*AccountEntry) MasterKeyWeight

                                                func (account *AccountEntry) MasterKeyWeight() byte

                                                func (*AccountEntry) NumSponsored

                                                func (account *AccountEntry) NumSponsored() Uint32

                                                  NumSponsored returns NumSponsored value for account.

                                                  func (*AccountEntry) NumSponsoring

                                                  func (account *AccountEntry) NumSponsoring() Uint32

                                                    NumSponsoring returns NumSponsoring value for account.

                                                    func (*AccountEntry) SignerSponsoringIDs

                                                    func (account *AccountEntry) SignerSponsoringIDs() []SponsorshipDescriptor

                                                      SignerSponsoringIDs returns SignerSponsoringIDs value for account. This will return a slice of nil values if V2 extension does not exist.

                                                      func (*AccountEntry) SignerSummary

                                                      func (account *AccountEntry) SignerSummary() map[string]int32

                                                      func (*AccountEntry) SponsorPerSigner

                                                      func (account *AccountEntry) SponsorPerSigner() map[string]AccountId

                                                        SponsorPerSigner returns a mapping of signer to its sponsor

                                                        func (*AccountEntry) ThresholdHigh

                                                        func (account *AccountEntry) ThresholdHigh() byte

                                                        func (*AccountEntry) ThresholdLow

                                                        func (account *AccountEntry) ThresholdLow() byte

                                                        func (*AccountEntry) ThresholdMedium

                                                        func (account *AccountEntry) ThresholdMedium() byte

                                                        func (*AccountEntry) UnmarshalBinary

                                                        func (s *AccountEntry) UnmarshalBinary(inp []byte) error

                                                          UnmarshalBinary implements encoding.BinaryUnmarshaler.

                                                          type AccountEntryExt

                                                          type AccountEntryExt struct {
                                                          	V  int32
                                                          	V1 *AccountEntryExtensionV1
                                                          }

                                                            AccountEntryExt is an XDR NestedUnion defines as:

                                                            union switch (int v)
                                                                 {
                                                                 case 0:
                                                                     void;
                                                                 case 1:
                                                                     AccountEntryExtensionV1 v1;
                                                                 }
                                                            

                                                            func NewAccountEntryExt

                                                            func NewAccountEntryExt(v int32, value interface{}) (result AccountEntryExt, err error)

                                                              NewAccountEntryExt creates a new AccountEntryExt.

                                                              func (AccountEntryExt) ArmForSwitch

                                                              func (u AccountEntryExt) ArmForSwitch(sw int32) (string, bool)

                                                                ArmForSwitch returns which field name should be used for storing the value for an instance of AccountEntryExt

                                                                func (AccountEntryExt) GetV1

                                                                func (u AccountEntryExt) GetV1() (result AccountEntryExtensionV1, ok bool)

                                                                  GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.

                                                                  func (AccountEntryExt) MarshalBinary

                                                                  func (s AccountEntryExt) MarshalBinary() ([]byte, error)

                                                                    MarshalBinary implements encoding.BinaryMarshaler.

                                                                    func (AccountEntryExt) MustV1

                                                                      MustV1 retrieves the V1 value from the union, panicing if the value is not set.

                                                                      func (AccountEntryExt) SwitchFieldName

                                                                      func (u AccountEntryExt) SwitchFieldName() string

                                                                        SwitchFieldName returns the field name in which this union's discriminant is stored

                                                                        func (*AccountEntryExt) UnmarshalBinary

                                                                        func (s *AccountEntryExt) UnmarshalBinary(inp []byte) error

                                                                          UnmarshalBinary implements encoding.BinaryUnmarshaler.

                                                                          type AccountEntryExtensionV1

                                                                          type AccountEntryExtensionV1 struct {
                                                                          	Liabilities Liabilities
                                                                          	Ext         AccountEntryExtensionV1Ext
                                                                          }

                                                                            AccountEntryExtensionV1 is an XDR Struct defines as:

                                                                            struct AccountEntryExtensionV1
                                                                             {
                                                                                 Liabilities liabilities;
                                                                            
                                                                                 union switch (int v)
                                                                                 {
                                                                                 case 0:
                                                                                     void;
                                                                                 case 2:
                                                                                     AccountEntryExtensionV2 v2;
                                                                                 }
                                                                                 ext;
                                                                             };
                                                                            

                                                                            func (AccountEntryExtensionV1) MarshalBinary

                                                                            func (s AccountEntryExtensionV1) MarshalBinary() ([]byte, error)

                                                                              MarshalBinary implements encoding.BinaryMarshaler.

                                                                              func (*AccountEntryExtensionV1) UnmarshalBinary

                                                                              func (s *AccountEntryExtensionV1) UnmarshalBinary(inp []byte) error

                                                                                UnmarshalBinary implements encoding.BinaryUnmarshaler.

                                                                                type AccountEntryExtensionV1Ext

                                                                                type AccountEntryExtensionV1Ext struct {
                                                                                	V  int32
                                                                                	V2 *AccountEntryExtensionV2
                                                                                }

                                                                                  AccountEntryExtensionV1Ext is an XDR NestedUnion defines as:

                                                                                  union switch (int v)
                                                                                       {
                                                                                       case 0:
                                                                                           void;
                                                                                       case 2:
                                                                                           AccountEntryExtensionV2 v2;
                                                                                       }
                                                                                  

                                                                                  func NewAccountEntryExtensionV1Ext

                                                                                  func NewAccountEntryExtensionV1Ext(v int32, value interface{}) (result AccountEntryExtensionV1Ext, err error)

                                                                                    NewAccountEntryExtensionV1Ext creates a new AccountEntryExtensionV1Ext.

                                                                                    func (AccountEntryExtensionV1Ext) ArmForSwitch

                                                                                    func (u AccountEntryExtensionV1Ext) ArmForSwitch(sw int32) (string, bool)

                                                                                      ArmForSwitch returns which field name should be used for storing the value for an instance of AccountEntryExtensionV1Ext

                                                                                      func (AccountEntryExtensionV1Ext) GetV2

                                                                                        GetV2 retrieves the V2 value from the union, returning ok if the union's switch indicated the value is valid.

                                                                                        func (AccountEntryExtensionV1Ext) MarshalBinary

                                                                                        func (s AccountEntryExtensionV1Ext) MarshalBinary() ([]byte, error)

                                                                                          MarshalBinary implements encoding.BinaryMarshaler.

                                                                                          func (AccountEntryExtensionV1Ext) MustV2

                                                                                            MustV2 retrieves the V2 value from the union, panicing if the value is not set.

                                                                                            func (AccountEntryExtensionV1Ext) SwitchFieldName

                                                                                            func (u AccountEntryExtensionV1Ext) SwitchFieldName() string

                                                                                              SwitchFieldName returns the field name in which this union's discriminant is stored

                                                                                              func (*AccountEntryExtensionV1Ext) UnmarshalBinary

                                                                                              func (s *AccountEntryExtensionV1Ext) UnmarshalBinary(inp []byte) error

                                                                                                UnmarshalBinary implements encoding.BinaryUnmarshaler.

                                                                                                type AccountEntryExtensionV2

                                                                                                type AccountEntryExtensionV2 struct {
                                                                                                	NumSponsored        Uint32
                                                                                                	NumSponsoring       Uint32
                                                                                                	SignerSponsoringIDs []SponsorshipDescriptor `xdrmaxsize:"20"`
                                                                                                	Ext                 AccountEntryExtensionV2Ext
                                                                                                }

                                                                                                  AccountEntryExtensionV2 is an XDR Struct defines as:

                                                                                                  struct AccountEntryExtensionV2
                                                                                                   {
                                                                                                       uint32 numSponsored;
                                                                                                       uint32 numSponsoring;
                                                                                                       SponsorshipDescriptor signerSponsoringIDs<MAX_SIGNERS>;
                                                                                                  
                                                                                                       union switch (int v)
                                                                                                       {
                                                                                                       case 0:
                                                                                                           void;
                                                                                                       }
                                                                                                       ext;
                                                                                                   };
                                                                                                  

                                                                                                  func (AccountEntryExtensionV2) MarshalBinary

                                                                                                  func (s AccountEntryExtensionV2) MarshalBinary() ([]byte, error)

                                                                                                    MarshalBinary implements encoding.BinaryMarshaler.

                                                                                                    func (*AccountEntryExtensionV2) UnmarshalBinary

                                                                                                    func (s *AccountEntryExtensionV2) UnmarshalBinary(inp []byte) error

                                                                                                      UnmarshalBinary implements encoding.BinaryUnmarshaler.

                                                                                                      type AccountEntryExtensionV2Ext

                                                                                                      type AccountEntryExtensionV2Ext struct {
                                                                                                      	V int32
                                                                                                      }

                                                                                                        AccountEntryExtensionV2Ext is an XDR NestedUnion defines as:

                                                                                                        union switch (int v)
                                                                                                             {
                                                                                                             case 0:
                                                                                                                 void;
                                                                                                             }
                                                                                                        

                                                                                                        func NewAccountEntryExtensionV2Ext

                                                                                                        func NewAccountEntryExtensionV2Ext(v int32, value interface{}) (result AccountEntryExtensionV2Ext, err error)

                                                                                                          NewAccountEntryExtensionV2Ext creates a new AccountEntryExtensionV2Ext.

                                                                                                          func (AccountEntryExtensionV2Ext) ArmForSwitch

                                                                                                          func (u AccountEntryExtensionV2Ext) ArmForSwitch(sw int32) (string, bool)

                                                                                                            ArmForSwitch returns which field name should be used for storing the value for an instance of AccountEntryExtensionV2Ext

                                                                                                            func (AccountEntryExtensionV2Ext) MarshalBinary

                                                                                                            func (s AccountEntryExtensionV2Ext) MarshalBinary() ([]byte, error)

                                                                                                              MarshalBinary implements encoding.BinaryMarshaler.

                                                                                                              func (AccountEntryExtensionV2Ext) SwitchFieldName

                                                                                                              func (u AccountEntryExtensionV2Ext) SwitchFieldName() string

                                                                                                                SwitchFieldName returns the field name in which this union's discriminant is stored

                                                                                                                func (*AccountEntryExtensionV2Ext) UnmarshalBinary

                                                                                                                func (s *AccountEntryExtensionV2Ext) UnmarshalBinary(inp []byte) error

                                                                                                                  UnmarshalBinary implements encoding.BinaryUnmarshaler.

                                                                                                                  type AccountFlags

                                                                                                                  type AccountFlags int32

                                                                                                                    AccountFlags is an XDR Enum defines as:

                                                                                                                    enum AccountFlags
                                                                                                                     { // masks for each flag
                                                                                                                    
                                                                                                                         // Flags set on issuer accounts
                                                                                                                         // TrustLines are created with authorized set to "false" requiring
                                                                                                                         // the issuer to set it for each TrustLine
                                                                                                                         AUTH_REQUIRED_FLAG = 0x1,
                                                                                                                         // If set, the authorized flag in TrustLines can be cleared
                                                                                                                         // otherwise, authorization cannot be revoked
                                                                                                                         AUTH_REVOCABLE_FLAG = 0x2,
                                                                                                                         // Once set, causes all AUTH_* flags to be read-only
                                                                                                                         AUTH_IMMUTABLE_FLAG = 0x4,
                                                                                                                         // Trustlines are created with clawback enabled set to "true",
                                                                                                                         // and claimable balances created from those trustlines are created
                                                                                                                         // with clawback enabled set to "true"
                                                                                                                         AUTH_CLAWBACK_ENABLED_FLAG = 0x8
                                                                                                                     };
                                                                                                                    
                                                                                                                    const (
                                                                                                                    	AccountFlagsAuthRequiredFlag        AccountFlags = 1
                                                                                                                    	AccountFlagsAuthRevocableFlag       AccountFlags = 2
                                                                                                                    	AccountFlagsAuthImmutableFlag       AccountFlags = 4
                                                                                                                    	AccountFlagsAuthClawbackEnabledFlag AccountFlags = 8
                                                                                                                    )

                                                                                                                    func (AccountFlags) IsAuthClawbackEnabled

                                                                                                                    func (accountFlags AccountFlags) IsAuthClawbackEnabled() bool

                                                                                                                      IsAuthClawbackEnabled returns true if the account has the "AUTH_CLAWBACK_ENABLED" option turned on.

                                                                                                                      func (AccountFlags) IsAuthImmutable

                                                                                                                      func (accountFlags AccountFlags) IsAuthImmutable() bool

                                                                                                                        IsAuthImmutable returns true if the account has the "AUTH_IMMUTABLE" option turned on.

                                                                                                                        func (AccountFlags) IsAuthRequired

                                                                                                                        func (accountFlags AccountFlags) IsAuthRequired() bool

                                                                                                                          IsAuthRequired returns true if the account has the "AUTH_REQUIRED" option turned on.

                                                                                                                          func (AccountFlags) IsAuthRevocable

                                                                                                                          func (accountFlags AccountFlags) IsAuthRevocable() bool

                                                                                                                            IsAuthRevocable returns true if the account has the "AUTH_REVOCABLE" option turned on.

                                                                                                                            func (AccountFlags) MarshalBinary

                                                                                                                            func (s AccountFlags) MarshalBinary() ([]byte, error)

                                                                                                                              MarshalBinary implements encoding.BinaryMarshaler.

                                                                                                                              func (*AccountFlags) Scan

                                                                                                                              func (t *AccountFlags) Scan(src interface{}) error

                                                                                                                                Scan reads from src into an AccountFlags

                                                                                                                                func (AccountFlags) String

                                                                                                                                func (e AccountFlags) String() string

                                                                                                                                  String returns the name of `e`

                                                                                                                                  func (*AccountFlags) UnmarshalBinary

                                                                                                                                  func (s *AccountFlags) UnmarshalBinary(inp []byte) error

                                                                                                                                    UnmarshalBinary implements encoding.BinaryUnmarshaler.

                                                                                                                                    func (AccountFlags) ValidEnum

                                                                                                                                    func (e AccountFlags) ValidEnum(v int32) bool

                                                                                                                                      ValidEnum validates a proposed value for this enum. Implements the Enum interface for AccountFlags

                                                                                                                                      type AccountId

                                                                                                                                      type AccountId PublicKey

                                                                                                                                        AccountId is an XDR Typedef defines as:

                                                                                                                                        typedef PublicKey AccountID;
                                                                                                                                        

                                                                                                                                        func AddressToAccountId

                                                                                                                                        func AddressToAccountId(address string) (AccountId, error)

                                                                                                                                          AddressToAccountId returns an AccountId for a given address string. If the address is not valid the error returned will not be nil

                                                                                                                                          func MustAddress

                                                                                                                                          func MustAddress(address string) AccountId

                                                                                                                                          func MustAddressPtr

                                                                                                                                          func MustAddressPtr(address string) *AccountId

                                                                                                                                          func NewAccountId

                                                                                                                                          func NewAccountId(aType PublicKeyType, value interface{}) (result AccountId, err error)

                                                                                                                                            NewAccountId creates a new AccountId.

                                                                                                                                            func (*AccountId) Address

                                                                                                                                            func (aid *AccountId) Address() string

                                                                                                                                              Address returns the strkey encoded form of this AccountId. This method will panic if the accountid is backed by a public key of an unknown type.

                                                                                                                                              func (AccountId) ArmForSwitch

                                                                                                                                              func (u AccountId) ArmForSwitch(sw int32) (string, bool)

                                                                                                                                                ArmForSwitch returns which field name should be used for storing the value for an instance of PublicKey

                                                                                                                                                func (*AccountId) Equals

                                                                                                                                                func (aid *AccountId) Equals(other AccountId) bool

                                                                                                                                                  Equals returns true if `other` is equivalent to `aid`

                                                                                                                                                  func (*AccountId) GetAddress

                                                                                                                                                  func (aid *AccountId) GetAddress() (string, error)

                                                                                                                                                    GetAddress returns the strkey encoded form of this AccountId, and an error if the AccountId is backed by a public key of an unknown type.

                                                                                                                                                    func (AccountId) GetEd25519

                                                                                                                                                    func (u AccountId) GetEd25519() (result Uint256, ok bool)

                                                                                                                                                      GetEd25519 retrieves the Ed25519 value from the union, returning ok if the union's switch indicated the value is valid.

                                                                                                                                                      func (AccountId) GoString

                                                                                                                                                      func (a AccountId) GoString() string

                                                                                                                                                        GoString implements fmt.GoStringer.

                                                                                                                                                        func (*AccountId) LedgerKey

                                                                                                                                                        func (aid *AccountId) LedgerKey() (ret LedgerKey)

                                                                                                                                                          LedgerKey implements the `Keyer` interface

                                                                                                                                                          func (AccountId) MarshalBinary

                                                                                                                                                          func (s AccountId) MarshalBinary() ([]byte, error)

                                                                                                                                                            MarshalBinary implements encoding.BinaryMarshaler.

                                                                                                                                                            func (AccountId) MarshalBinaryCompress

                                                                                                                                                            func (aid AccountId) MarshalBinaryCompress() ([]byte, error)

                                                                                                                                                              MarshalBinaryCompress marshals AccountId to []byte but unlike MarshalBinary() it removes all unnecessary bytes, exploting the fact that XDR is padding data to 4 bytes in union discriminants etc. It's primary use is in ingest/io.StateReader that keep LedgerKeys in memory so this function decrease memory requirements.

                                                                                                                                                              Warning, do not use UnmarshalBinary() on data encoded using this method!

                                                                                                                                                              func (AccountId) MustEd25519

                                                                                                                                                              func (u AccountId) MustEd25519() Uint256

                                                                                                                                                                MustEd25519 retrieves the Ed25519 value from the union, panicing if the value is not set.

                                                                                                                                                                func (*AccountId) SetAddress

                                                                                                                                                                func (aid *AccountId) SetAddress(address string) error

                                                                                                                                                                  SetAddress modifies the receiver, setting it's value to the AccountId form of the provided address.

                                                                                                                                                                  func (AccountId) SwitchFieldName

                                                                                                                                                                  func (u AccountId) SwitchFieldName() string

                                                                                                                                                                    SwitchFieldName returns the field name in which this union's discriminant is stored

                                                                                                                                                                    func (*AccountId) ToMuxedAccount

                                                                                                                                                                    func (aid *AccountId) ToMuxedAccount() MuxedAccount

                                                                                                                                                                      ToMuxedAccount transforms an AccountId into a MuxedAccount with a zero memo id

                                                                                                                                                                      func (*AccountId) UnmarshalBinary

                                                                                                                                                                      func (s *AccountId) UnmarshalBinary(inp []byte) error

                                                                                                                                                                        UnmarshalBinary implements encoding.BinaryUnmarshaler.

                                                                                                                                                                        type AccountMergeResult

                                                                                                                                                                        type AccountMergeResult struct {
                                                                                                                                                                        	Code                 AccountMergeResultCode
                                                                                                                                                                        	SourceAccountBalance *Int64
                                                                                                                                                                        }

                                                                                                                                                                          AccountMergeResult is an XDR Union defines as:

                                                                                                                                                                          union AccountMergeResult switch (AccountMergeResultCode code)
                                                                                                                                                                           {
                                                                                                                                                                           case ACCOUNT_MERGE_SUCCESS:
                                                                                                                                                                               int64 sourceAccountBalance; // how much got transfered from source account
                                                                                                                                                                           default:
                                                                                                                                                                               void;
                                                                                                                                                                           };
                                                                                                                                                                          

                                                                                                                                                                          func NewAccountMergeResult

                                                                                                                                                                          func NewAccountMergeResult(code AccountMergeResultCode, value interface{}) (result AccountMergeResult, err error)

                                                                                                                                                                            NewAccountMergeResult creates a new AccountMergeResult.

                                                                                                                                                                            func (AccountMergeResult) ArmForSwitch

                                                                                                                                                                            func (u AccountMergeResult) ArmForSwitch(sw int32) (string, bool)

                                                                                                                                                                              ArmForSwitch returns which field name should be used for storing the value for an instance of AccountMergeResult

                                                                                                                                                                              func (AccountMergeResult) GetSourceAccountBalance

                                                                                                                                                                              func (u AccountMergeResult) GetSourceAccountBalance() (result Int64, ok bool)

                                                                                                                                                                                GetSourceAccountBalance retrieves the SourceAccountBalance value from the union, returning ok if the union's switch indicated the value is valid.

                                                                                                                                                                                func (AccountMergeResult) MarshalBinary

                                                                                                                                                                                func (s AccountMergeResult) MarshalBinary() ([]byte, error)

                                                                                                                                                                                  MarshalBinary implements encoding.BinaryMarshaler.

                                                                                                                                                                                  func (AccountMergeResult) MustSourceAccountBalance