xdr

package
v0.0.0-...-2e41b90 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0, Apache-2.0 Imports: 21 Imported by: 0

README

xdr

The xdr package contains encoding/decoding of Stellar XDR types.

Code Generate

Most of the code this package is generated.

To download new XDR for code generation:

docker run --platform linux/amd64 -it --rm -v $PWD:/wd -w /wd ruby /bin/bash -c 'bundle install && bundle exec rake xdr:download'

To regenerate the code from the local XDR:

docker run --platform linux/amd64 -it --rm -v $PWD:/wd -w /wd ruby /bin/bash -c 'bundle install && bundle exec rake xdr:generate' && go fmt ./xdr

To download XDR for a different branch of stellar-core, modify Rakefile in the root.

Documentation

Overview

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

Package xdr is generated from:

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

DO NOT EDIT or your changes may be overwritten

Index

Examples

Constants

View Source
const LiquidityPoolFeeV18 = 30

LiquidityPoolFeeV18 is an XDR Const defines as:

const LIQUIDITY_POOL_FEE_V18 = 30;
View Source
const MaskAccountFlags = 0x7

MaskAccountFlags is an XDR Const defines as:

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

MaskAccountFlagsV17 is an XDR Const defines as:

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

MaskClaimableBalanceFlags is an XDR Const defines as:

const MASK_CLAIMABLE_BALANCE_FLAGS = 0x1;
View Source
const MaskLedgerHeaderFlags = 0x7

MaskLedgerHeaderFlags is an XDR Const defines as:

const MASK_LEDGER_HEADER_FLAGS = 0x7;
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 MaskTrustlineFlagsV17 = 7

MaskTrustlineFlagsV17 is an XDR Const defines as:

const MASK_TRUSTLINE_FLAGS_V17 = 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 LiquidityPoolTypeToString = map[LiquidityPoolType]string{
	LiquidityPoolTypeLiquidityPoolConstantProduct: "constant_product",
}

LiquidityPoolTypeToString maps an xdr.LiquidityPoolType 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(d *xdr.Decoder) (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.

data := "AAAAAgAAAABi/B0L0JGythwN1lY0aypo19NHxvLCyO5tBEcCVvwF9wAAAAoAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAK6jei3jmoI8TGlD/egc37PXtHKKzWV8wViZBaCu5L5MAAAAADuaygAAAAAAAAAAAVb8BfcAAABACmeyD4/+Oj7llOmTrcjKLHLTQJF0TV/VggCOUZ30ZPgMsQy6A2T//Zdzb7MULVo/Y7kDrqAZRS51rvIp7YMUAA=="

rawr := strings.NewReader(data)
b64r := base64.NewDecoder(base64.StdEncoding, rawr)

var tx TransactionEnvelope
bytesRead, err := Unmarshal(b64r, &tx)

fmt.Printf("read %d bytes\n", bytesRead)

if err != nil {
	log.Fatal(err)
}

operations := tx.Operations()
fmt.Printf("This tx has %d operations\n", len(operations))
Output:

read 196 bytes
This tx has 1 operations

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) DecodeFrom

func (s *AccountEntry) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*AccountEntry) EncodeTo

func (s *AccountEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

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) SeqLedger

func (account *AccountEntry) SeqLedger() Uint32

func (*AccountEntry) SeqTime

func (account *AccountEntry) SeqTime() TimePoint

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) DecodeFrom

func (u *AccountEntryExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (AccountEntryExt) EncodeTo

func (u AccountEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

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) DecodeFrom

func (s *AccountEntryExtensionV1) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*AccountEntryExtensionV1) EncodeTo

func (s *AccountEntryExtensionV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

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) DecodeFrom

func (u *AccountEntryExtensionV1Ext) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (AccountEntryExtensionV1Ext) EncodeTo

func (u AccountEntryExtensionV1Ext) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

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;
     case 3:
         AccountEntryExtensionV3 v3;
     }
     ext;
 };

func (*AccountEntryExtensionV2) DecodeFrom

func (s *AccountEntryExtensionV2) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*AccountEntryExtensionV2) EncodeTo

func (s *AccountEntryExtensionV2) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

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
	V3 *AccountEntryExtensionV3
}

AccountEntryExtensionV2Ext is an XDR NestedUnion defines as:

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

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) DecodeFrom

func (u *AccountEntryExtensionV2Ext) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (AccountEntryExtensionV2Ext) EncodeTo

func (u AccountEntryExtensionV2Ext) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (AccountEntryExtensionV2Ext) GetV3

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

func (AccountEntryExtensionV2Ext) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AccountEntryExtensionV2Ext) MustV3

MustV3 retrieves the V3 value from the union, panicing if the value is not set.

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 AccountEntryExtensionV3

type AccountEntryExtensionV3 struct {
	Ext       ExtensionPoint
	SeqLedger Uint32
	SeqTime   TimePoint
}

AccountEntryExtensionV3 is an XDR Struct defines as:

struct AccountEntryExtensionV3
 {
     // We can use this to add more fields, or because it is first, to
     // change AccountEntryExtensionV3 into a union.
     ExtensionPoint ext;

     // Ledger number at which `seqNum` took on its present value.
     uint32 seqLedger;

     // Time at which `seqNum` took on its present value.
     TimePoint seqTime;
 };

func (*AccountEntryExtensionV3) DecodeFrom

func (s *AccountEntryExtensionV3) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*AccountEntryExtensionV3) EncodeTo

func (s *AccountEntryExtensionV3) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (AccountEntryExtensionV3) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AccountEntryExtensionV3) UnmarshalBinary

func (s *AccountEntryExtensionV3) 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) DecodeFrom

func (e *AccountFlags) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (AccountFlags) EncodeTo

func (e AccountFlags) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

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) DecodeFrom

func (s *AccountId) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (AccountId) EncodeTo

func (s AccountId) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

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) 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 transferred 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) DecodeFrom

func (u *AccountMergeResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (AccountMergeResult) EncodeTo

func (u AccountMergeResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

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

func (u AccountMergeResult) MustSourceAccountBalance() Int64

MustSourceAccountBalance retrieves the SourceAccountBalance value from the union, panicing if the value is not set.

func (AccountMergeResult) SwitchFieldName

func (u AccountMergeResult) SwitchFieldName() string

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

func (*AccountMergeResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountMergeResultCode

type AccountMergeResultCode int32

AccountMergeResultCode is an XDR Enum defines as:

enum AccountMergeResultCode
 {
     // codes considered as "success" for the operation
     ACCOUNT_MERGE_SUCCESS = 0,
     // codes considered as "failure" for the operation
     ACCOUNT_MERGE_MALFORMED = -1,       // can't merge onto itself
     ACCOUNT_MERGE_NO_ACCOUNT = -2,      // destination does not exist
     ACCOUNT_MERGE_IMMUTABLE_SET = -3,   // source account has AUTH_IMMUTABLE set
     ACCOUNT_MERGE_HAS_SUB_ENTRIES = -4, // account has trust lines/offers
     ACCOUNT_MERGE_SEQNUM_TOO_FAR = -5,  // sequence number is over max allowed
     ACCOUNT_MERGE_DEST_FULL = -6,       // can't add source balance to
                                         // destination balance
     ACCOUNT_MERGE_IS_SPONSOR = -7       // can't merge account that is a sponsor
 };
const (
	AccountMergeResultCodeAccountMergeSuccess       AccountMergeResultCode = 0
	AccountMergeResultCodeAccountMergeMalformed     AccountMergeResultCode = -1
	AccountMergeResultCodeAccountMergeNoAccount     AccountMergeResultCode = -2
	AccountMergeResultCodeAccountMergeImmutableSet  AccountMergeResultCode = -3
	AccountMergeResultCodeAccountMergeHasSubEntries AccountMergeResultCode = -4
	AccountMergeResultCodeAccountMergeSeqnumTooFar  AccountMergeResultCode = -5
	AccountMergeResultCodeAccountMergeDestFull      AccountMergeResultCode = -6
	AccountMergeResultCodeAccountMergeIsSponsor     AccountMergeResultCode = -7
)

func (*AccountMergeResultCode) DecodeFrom

func (e *AccountMergeResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (AccountMergeResultCode) EncodeTo

func (e AccountMergeResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (AccountMergeResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AccountMergeResultCode) String

func (e AccountMergeResultCode) String() string

String returns the name of `e`

func (*AccountMergeResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AccountMergeResultCode) ValidEnum

func (e AccountMergeResultCode) ValidEnum(v int32) bool

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

type AllowTrustOp

type AllowTrustOp struct {
	Trustor   AccountId
	Asset     AssetCode
	Authorize Uint32
}

AllowTrustOp is an XDR Struct defines as:

struct AllowTrustOp
 {
     AccountID trustor;
     AssetCode asset;

     // One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG
     uint32 authorize;
 };

func (*AllowTrustOp) DecodeFrom

func (s *AllowTrustOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*AllowTrustOp) EncodeTo

func (s *AllowTrustOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (AllowTrustOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AllowTrustOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AllowTrustResult

type AllowTrustResult struct {
	Code AllowTrustResultCode
}

AllowTrustResult is an XDR Union defines as:

union AllowTrustResult switch (AllowTrustResultCode code)
 {
 case ALLOW_TRUST_SUCCESS:
     void;
 default:
     void;
 };

func NewAllowTrustResult

func NewAllowTrustResult(code AllowTrustResultCode, value interface{}) (result AllowTrustResult, err error)

NewAllowTrustResult creates a new AllowTrustResult.

func (AllowTrustResult) ArmForSwitch

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

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

func (*AllowTrustResult) DecodeFrom

func (u *AllowTrustResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (AllowTrustResult) EncodeTo

func (u AllowTrustResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (AllowTrustResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AllowTrustResult) SwitchFieldName

func (u AllowTrustResult) SwitchFieldName() string

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

func (*AllowTrustResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AllowTrustResultCode

type AllowTrustResultCode int32

AllowTrustResultCode is an XDR Enum defines as:

enum AllowTrustResultCode
 {
     // codes considered as "success" for the operation
     ALLOW_TRUST_SUCCESS = 0,
     // codes considered as "failure" for the operation
     ALLOW_TRUST_MALFORMED = -1,     // asset is not ASSET_TYPE_ALPHANUM
     ALLOW_TRUST_NO_TRUST_LINE = -2, // trustor does not have a trustline
                                     // source account does not require trust
     ALLOW_TRUST_TRUST_NOT_REQUIRED = -3,
     ALLOW_TRUST_CANT_REVOKE = -4,      // source account can't revoke trust,
     ALLOW_TRUST_SELF_NOT_ALLOWED = -5, // trusting self is not allowed
     ALLOW_TRUST_LOW_RESERVE = -6       // claimable balances can't be created
                                        // on revoke due to low reserves
 };
const (
	AllowTrustResultCodeAllowTrustSuccess          AllowTrustResultCode = 0
	AllowTrustResultCodeAllowTrustMalformed        AllowTrustResultCode = -1
	AllowTrustResultCodeAllowTrustNoTrustLine      AllowTrustResultCode = -2
	AllowTrustResultCodeAllowTrustTrustNotRequired AllowTrustResultCode = -3
	AllowTrustResultCodeAllowTrustCantRevoke       AllowTrustResultCode = -4
	AllowTrustResultCodeAllowTrustSelfNotAllowed   AllowTrustResultCode = -5
	AllowTrustResultCodeAllowTrustLowReserve       AllowTrustResultCode = -6
)

func (*AllowTrustResultCode) DecodeFrom

func (e *AllowTrustResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (AllowTrustResultCode) EncodeTo

func (e AllowTrustResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (AllowTrustResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AllowTrustResultCode) String

func (e AllowTrustResultCode) String() string

String returns the name of `e`

func (*AllowTrustResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AllowTrustResultCode) ValidEnum

func (e AllowTrustResultCode) ValidEnum(v int32) bool

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

type AlphaNum12

type AlphaNum12 struct {
	AssetCode AssetCode12
	Issuer    AccountId
}

AlphaNum12 is an XDR Struct defines as:

struct AlphaNum12
 {
     AssetCode12 assetCode;
     AccountID issuer;
 };

func (*AlphaNum12) DecodeFrom

func (s *AlphaNum12) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*AlphaNum12) EncodeTo

func (s *AlphaNum12) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (AlphaNum12) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AlphaNum12) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AlphaNum4

type AlphaNum4 struct {
	AssetCode AssetCode4
	Issuer    AccountId
}

AlphaNum4 is an XDR Struct defines as:

struct AlphaNum4
 {
     AssetCode4 assetCode;
     AccountID issuer;
 };

func (*AlphaNum4) DecodeFrom

func (s *AlphaNum4) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*AlphaNum4) EncodeTo

func (s *AlphaNum4) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (AlphaNum4) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AlphaNum4) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Asset

type Asset struct {
	Type       AssetType
	AlphaNum4  *AlphaNum4
	AlphaNum12 *AlphaNum12
}

Asset is an XDR Union defines as:

union Asset switch (AssetType type)
 {
 case ASSET_TYPE_NATIVE: // Not credit
     void;

 case ASSET_TYPE_CREDIT_ALPHANUM4:
     AlphaNum4 alphaNum4;

 case ASSET_TYPE_CREDIT_ALPHANUM12:
     AlphaNum12 alphaNum12;

     // add other asset types here in the future
 };

func BuildAsset

func BuildAsset(assetType, issuer, code string) (Asset, error)

BuildAsset creates a new asset from a given `assetType`, `code`, and `issuer`.

Valid assetTypes are:

  • `native`
  • `credit_alphanum4`
  • `credit_alphanum12`

func BuildAssets

func BuildAssets(s string) ([]Asset, error)

BuildAssets parses a list of assets from a given string. The string is expected to be a comma separated list of assets encoded in the format (Code:Issuer or "native") defined by SEP-0011 https://github.com/stellar/stellar-protocol/pull/313 If the string is empty, BuildAssets will return an empty list of assets

func MustNewCreditAsset

func MustNewCreditAsset(code string, issuer string) Asset

MustNewCreditAsset returns a new general asset, panicking if it can't.

func MustNewNativeAsset

func MustNewNativeAsset() Asset

MustNewNativeAsset returns a new native asset, panicking if it can't.

func NewAsset

func NewAsset(aType AssetType, value interface{}) (result Asset, err error)

NewAsset creates a new Asset.

func NewCreditAsset

func NewCreditAsset(code string, issuer string) (Asset, error)

NewCreditAsset returns a new general asset, returning an error if it can't.

func (Asset) ArmForSwitch

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

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

func (*Asset) DecodeFrom

func (u *Asset) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Asset) EncodeTo

func (u Asset) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Asset) Equals

func (a Asset) Equals(other Asset) bool

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

func (Asset) Extract

func (a Asset) Extract(typ interface{}, code interface{}, issuer interface{}) error

Extract is a helper function to extract information from an xdr.Asset structure. It extracts the asset's type to the `typ` input parameter (which must be either a *string or *xdr.AssetType). It also extracts the asset's code and issuer to `code` and `issuer` respectively if they are of type *string and the asset is non-native

func (Asset) GetAlphaNum12

func (u Asset) GetAlphaNum12() (result AlphaNum12, ok bool)

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

func (Asset) GetAlphaNum4

func (u Asset) GetAlphaNum4() (result AlphaNum4, ok bool)

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

func (*Asset) GetCode

func (a *Asset) GetCode() string

func (*Asset) GetIssuer

func (a *Asset) GetIssuer() string

func (Asset) GoString

func (a Asset) GoString() string

GoString implements fmt.GoStringer.

func (*Asset) LessThan

func (a *Asset) LessThan(b Asset) bool

func (Asset) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (Asset) MustAlphaNum12

func (u Asset) MustAlphaNum12() AlphaNum12

MustAlphaNum12 retrieves the AlphaNum12 value from the union, panicing if the value is not set.

func (Asset) MustAlphaNum4

func (u Asset) MustAlphaNum4() AlphaNum4

MustAlphaNum4 retrieves the AlphaNum4 value from the union, panicing if the value is not set.

func (Asset) MustExtract

func (a Asset) MustExtract(typ interface{}, code interface{}, issuer interface{})

MustExtract behaves as Extract, but panics if an error occurs.

func (*Asset) Scan

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

Scan reads from src into an Asset

func (*Asset) SetCredit

func (a *Asset) SetCredit(code string, issuer AccountId) error

SetCredit overwrites `a` with a credit asset using `code` and `issuer`. The asset type (CreditAlphanum4 or CreditAlphanum12) is chosen automatically based upon the length of `code`.

func (*Asset) SetNative

func (a *Asset) SetNative() error

SetNative overwrites `a` with the native asset type

func (Asset) String

func (a Asset) String() string

String returns a display friendly form of the asset

func (Asset) StringCanonical

func (a Asset) StringCanonical() string

StringCanonical returns a display friendly form of the asset following its canonical representation

func (Asset) SwitchFieldName

func (u Asset) SwitchFieldName() string

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

func (*Asset) ToAssetCode

func (a *Asset) ToAssetCode(code string) (AssetCode, error)

ToAssetCode for Asset converts the Asset to a corresponding XDR "allow trust" asset, used by the XDR allow trust operation.

func (Asset) ToChangeTrustAsset

func (a Asset) ToChangeTrustAsset() ChangeTrustAsset

ToChangeTrustAsset converts Asset to ChangeTrustAsset.

func (Asset) ToTrustLineAsset

func (a Asset) ToTrustLineAsset() TrustLineAsset

ToTrustLineAsset converts Asset to TrustLineAsset.

func (*Asset) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (Asset) Value

func (t Asset) Value() (driver.Value, error)

Value implements the database/sql/driver Valuer interface.

type AssetCode

type AssetCode struct {
	Type        AssetType
	AssetCode4  *AssetCode4
	AssetCode12 *AssetCode12
}

AssetCode is an XDR Union defines as:

union AssetCode switch (AssetType type)
 {
 case ASSET_TYPE_CREDIT_ALPHANUM4:
     AssetCode4 assetCode4;

 case ASSET_TYPE_CREDIT_ALPHANUM12:
     AssetCode12 assetCode12;

     // add other asset types here in the future
 };

func MustNewAssetCodeFromString

func MustNewAssetCodeFromString(code string) AssetCode

MustNewAssetCodeFromString returns a new allow trust asset, panicking if it can't.

func NewAssetCode

func NewAssetCode(aType AssetType, value interface{}) (result AssetCode, err error)

NewAssetCode creates a new AssetCode.

func NewAssetCodeFromString

func NewAssetCodeFromString(code string) (AssetCode, error)

NewAssetCodeFromString returns a new allow trust asset, panicking if it can't.

func (AssetCode) ArmForSwitch

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

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

func (*AssetCode) DecodeFrom

func (u *AssetCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (AssetCode) EncodeTo

func (u AssetCode) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (AssetCode) GetAssetCode12

func (u AssetCode) GetAssetCode12() (result AssetCode12, ok bool)

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

func (AssetCode) GetAssetCode4

func (u AssetCode) GetAssetCode4() (result AssetCode4, ok bool)

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

func (AssetCode) GoString

func (s AssetCode) GoString() string

GoString implements fmt.GoStringer.

func (AssetCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AssetCode) MustAssetCode12

func (u AssetCode) MustAssetCode12() AssetCode12

MustAssetCode12 retrieves the AssetCode12 value from the union, panicing if the value is not set.

func (AssetCode) MustAssetCode4

func (u AssetCode) MustAssetCode4() AssetCode4

MustAssetCode4 retrieves the AssetCode4 value from the union, panicing if the value is not set.

func (AssetCode) SwitchFieldName

func (u AssetCode) SwitchFieldName() string

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

func (AssetCode) ToAsset

func (a AssetCode) ToAsset(issuer AccountId) (asset Asset)

ToAsset for AssetCode converts the xdr.AssetCode to a standard xdr.Asset.

func (*AssetCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AssetCode12

type AssetCode12 [12]byte

AssetCode12 is an XDR Typedef defines as:

typedef opaque AssetCode12[12];

func (*AssetCode12) DecodeFrom

func (s *AssetCode12) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*AssetCode12) EncodeTo

func (s *AssetCode12) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (AssetCode12) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AssetCode12) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AssetCode12) XDRMaxSize

func (e AssetCode12) XDRMaxSize() int

XDRMaxSize implements the Sized interface for AssetCode12

type AssetCode4

type AssetCode4 [4]byte

AssetCode4 is an XDR Typedef defines as:

typedef opaque AssetCode4[4];

func (*AssetCode4) DecodeFrom

func (s *AssetCode4) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*AssetCode4) EncodeTo

func (s *AssetCode4) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (AssetCode4) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AssetCode4) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AssetCode4) XDRMaxSize

func (e AssetCode4) XDRMaxSize() int

XDRMaxSize implements the Sized interface for AssetCode4

type AssetType

type AssetType int32

AssetType is an XDR Enum defines as:

enum AssetType
 {
     ASSET_TYPE_NATIVE = 0,
     ASSET_TYPE_CREDIT_ALPHANUM4 = 1,
     ASSET_TYPE_CREDIT_ALPHANUM12 = 2,
     ASSET_TYPE_POOL_SHARE = 3
 };
const (
	AssetTypeAssetTypeNative           AssetType = 0
	AssetTypeAssetTypeCreditAlphanum4  AssetType = 1
	AssetTypeAssetTypeCreditAlphanum12 AssetType = 2
	AssetTypeAssetTypePoolShare        AssetType = 3
)

func (*AssetType) DecodeFrom

func (e *AssetType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (AssetType) EncodeTo

func (e AssetType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (AssetType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AssetType) Scan

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

Scan reads from src into an AssetType

func (AssetType) String

func (e AssetType) String() string

String returns the name of `e`

func (*AssetType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AssetType) ValidEnum

func (e AssetType) ValidEnum(v int32) bool

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

type Auth

type Auth struct {
	Unused int32
}

Auth is an XDR Struct defines as:

struct Auth
 {
     // Empty message, just to confirm
     // establishment of MAC keys.
     int unused;
 };

func (*Auth) DecodeFrom

func (s *Auth) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Auth) EncodeTo

func (s *Auth) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Auth) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Auth) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AuthCert

type AuthCert struct {
	Pubkey     Curve25519Public
	Expiration Uint64
	Sig        Signature
}

AuthCert is an XDR Struct defines as:

struct AuthCert
 {
     Curve25519Public pubkey;
     uint64 expiration;
     Signature sig;
 };

func (*AuthCert) DecodeFrom

func (s *AuthCert) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*AuthCert) EncodeTo

func (s *AuthCert) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (AuthCert) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AuthCert) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AuthenticatedMessage

type AuthenticatedMessage struct {
	V  Uint32
	V0 *AuthenticatedMessageV0
}

AuthenticatedMessage is an XDR Union defines as:

union AuthenticatedMessage switch (uint32 v)
 {
 case 0:
     struct
     {
         uint64 sequence;
         StellarMessage message;
         HmacSha256Mac mac;
     } v0;
 };

func NewAuthenticatedMessage

func NewAuthenticatedMessage(v Uint32, value interface{}) (result AuthenticatedMessage, err error)

NewAuthenticatedMessage creates a new AuthenticatedMessage.

func (AuthenticatedMessage) ArmForSwitch

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

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

func (*AuthenticatedMessage) DecodeFrom

func (u *AuthenticatedMessage) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (AuthenticatedMessage) EncodeTo

func (u AuthenticatedMessage) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (AuthenticatedMessage) GetV0

func (u AuthenticatedMessage) GetV0() (result AuthenticatedMessageV0, ok bool)

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

func (AuthenticatedMessage) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AuthenticatedMessage) MustV0

MustV0 retrieves the V0 value from the union, panicing if the value is not set.

func (AuthenticatedMessage) SwitchFieldName

func (u AuthenticatedMessage) SwitchFieldName() string

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

func (*AuthenticatedMessage) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AuthenticatedMessageV0

type AuthenticatedMessageV0 struct {
	Sequence Uint64
	Message  StellarMessage
	Mac      HmacSha256Mac
}

AuthenticatedMessageV0 is an XDR NestedStruct defines as:

struct
     {
         uint64 sequence;
         StellarMessage message;
         HmacSha256Mac mac;
     }

func (*AuthenticatedMessageV0) DecodeFrom

func (s *AuthenticatedMessageV0) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*AuthenticatedMessageV0) EncodeTo

func (s *AuthenticatedMessageV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (AuthenticatedMessageV0) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AuthenticatedMessageV0) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BeginSponsoringFutureReservesOp

type BeginSponsoringFutureReservesOp struct {
	SponsoredId AccountId
}

BeginSponsoringFutureReservesOp is an XDR Struct defines as:

struct BeginSponsoringFutureReservesOp
 {
     AccountID sponsoredID;
 };

func (*BeginSponsoringFutureReservesOp) DecodeFrom

func (s *BeginSponsoringFutureReservesOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*BeginSponsoringFutureReservesOp) EncodeTo

func (s *BeginSponsoringFutureReservesOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (BeginSponsoringFutureReservesOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*BeginSponsoringFutureReservesOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BeginSponsoringFutureReservesResult

type BeginSponsoringFutureReservesResult struct {
	Code BeginSponsoringFutureReservesResultCode
}

BeginSponsoringFutureReservesResult is an XDR Union defines as:

union BeginSponsoringFutureReservesResult switch (
     BeginSponsoringFutureReservesResultCode code)
 {
 case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS:
     void;
 default:
     void;
 };

func NewBeginSponsoringFutureReservesResult

func NewBeginSponsoringFutureReservesResult(code BeginSponsoringFutureReservesResultCode, value interface{}) (result BeginSponsoringFutureReservesResult, err error)

NewBeginSponsoringFutureReservesResult creates a new BeginSponsoringFutureReservesResult.

func (BeginSponsoringFutureReservesResult) ArmForSwitch

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

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

func (*BeginSponsoringFutureReservesResult) DecodeFrom

func (u *BeginSponsoringFutureReservesResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (BeginSponsoringFutureReservesResult) EncodeTo

func (u BeginSponsoringFutureReservesResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (BeginSponsoringFutureReservesResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BeginSponsoringFutureReservesResult) SwitchFieldName

func (u BeginSponsoringFutureReservesResult) SwitchFieldName() string

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

func (*BeginSponsoringFutureReservesResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BeginSponsoringFutureReservesResultCode

type BeginSponsoringFutureReservesResultCode int32

BeginSponsoringFutureReservesResultCode is an XDR Enum defines as:

enum BeginSponsoringFutureReservesResultCode
 {
     // codes considered as "success" for the operation
     BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS = 0,

     // codes considered as "failure" for the operation
     BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED = -1,
     BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED = -2,
     BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE = -3
 };
const (
	BeginSponsoringFutureReservesResultCodeBeginSponsoringFutureReservesSuccess          BeginSponsoringFutureReservesResultCode = 0
	BeginSponsoringFutureReservesResultCodeBeginSponsoringFutureReservesMalformed        BeginSponsoringFutureReservesResultCode = -1
	BeginSponsoringFutureReservesResultCodeBeginSponsoringFutureReservesAlreadySponsored BeginSponsoringFutureReservesResultCode = -2
	BeginSponsoringFutureReservesResultCodeBeginSponsoringFutureReservesRecursive        BeginSponsoringFutureReservesResultCode = -3
)

func (*BeginSponsoringFutureReservesResultCode) DecodeFrom

func (e *BeginSponsoringFutureReservesResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (BeginSponsoringFutureReservesResultCode) EncodeTo

func (e BeginSponsoringFutureReservesResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (BeginSponsoringFutureReservesResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BeginSponsoringFutureReservesResultCode) String

String returns the name of `e`

func (*BeginSponsoringFutureReservesResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (BeginSponsoringFutureReservesResultCode) ValidEnum

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

type BucketEntry

type BucketEntry struct {
	Type      BucketEntryType
	LiveEntry *LedgerEntry
	DeadEntry *LedgerKey
	MetaEntry *BucketMetadata
}

BucketEntry is an XDR Union defines as:

union BucketEntry switch (BucketEntryType type)
 {
 case LIVEENTRY:
 case INITENTRY:
     LedgerEntry liveEntry;

 case DEADENTRY:
     LedgerKey deadEntry;
 case METAENTRY:
     BucketMetadata metaEntry;
 };

func NewBucketEntry

func NewBucketEntry(aType BucketEntryType, value interface{}) (result BucketEntry, err error)

NewBucketEntry creates a new BucketEntry.

func (BucketEntry) ArmForSwitch

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

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

func (*BucketEntry) DecodeFrom

func (u *BucketEntry) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (BucketEntry) EncodeTo

func (u BucketEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (BucketEntry) GetDeadEntry

func (u BucketEntry) GetDeadEntry() (result LedgerKey, ok bool)

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

func (BucketEntry) GetLiveEntry

func (u BucketEntry) GetLiveEntry() (result LedgerEntry, ok bool)

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

func (BucketEntry) GetMetaEntry

func (u BucketEntry) GetMetaEntry() (result BucketMetadata, ok bool)

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

func (BucketEntry) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BucketEntry) MustDeadEntry

func (u BucketEntry) MustDeadEntry() LedgerKey

MustDeadEntry retrieves the DeadEntry value from the union, panicing if the value is not set.

func (BucketEntry) MustLiveEntry

func (u BucketEntry) MustLiveEntry() LedgerEntry

MustLiveEntry retrieves the LiveEntry value from the union, panicing if the value is not set.

func (BucketEntry) MustMetaEntry

func (u BucketEntry) MustMetaEntry() BucketMetadata

MustMetaEntry retrieves the MetaEntry value from the union, panicing if the value is not set.

func (BucketEntry) SwitchFieldName

func (u BucketEntry) SwitchFieldName() string

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

func (*BucketEntry) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BucketEntryType

type BucketEntryType int32

BucketEntryType is an XDR Enum defines as:

enum BucketEntryType
 {
     METAENTRY =
         -1, // At-and-after protocol 11: bucket metadata, should come first.
     LIVEENTRY = 0, // Before protocol 11: created-or-updated;
                    // At-and-after protocol 11: only updated.
     DEADENTRY = 1,
     INITENTRY = 2 // At-and-after protocol 11: only created.
 };
const (
	BucketEntryTypeMetaentry BucketEntryType = -1
	BucketEntryTypeLiveentry BucketEntryType = 0
	BucketEntryTypeDeadentry BucketEntryType = 1
	BucketEntryTypeInitentry BucketEntryType = 2
)

func (*BucketEntryType) DecodeFrom

func (e *BucketEntryType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (BucketEntryType) EncodeTo

func (e BucketEntryType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (BucketEntryType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BucketEntryType) String

func (e BucketEntryType) String() string

String returns the name of `e`

func (*BucketEntryType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (BucketEntryType) ValidEnum

func (e BucketEntryType) ValidEnum(v int32) bool

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

type BucketMetadata

type BucketMetadata struct {
	LedgerVersion Uint32
	Ext           BucketMetadataExt
}

BucketMetadata is an XDR Struct defines as:

struct BucketMetadata
 {
     // Indicates the protocol version used to create / merge this bucket.
     uint32 ledgerVersion;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*BucketMetadata) DecodeFrom

func (s *BucketMetadata) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*BucketMetadata) EncodeTo

func (s *BucketMetadata) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (BucketMetadata) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*BucketMetadata) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BucketMetadataExt

type BucketMetadataExt struct {
	V int32
}

BucketMetadataExt is an XDR NestedUnion defines as:

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

func NewBucketMetadataExt

func NewBucketMetadataExt(v int32, value interface{}) (result BucketMetadataExt, err error)

NewBucketMetadataExt creates a new BucketMetadataExt.

func (BucketMetadataExt) ArmForSwitch

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

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

func (*BucketMetadataExt) DecodeFrom

func (u *BucketMetadataExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (BucketMetadataExt) EncodeTo

func (u BucketMetadataExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (BucketMetadataExt) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BucketMetadataExt) SwitchFieldName

func (u BucketMetadataExt) SwitchFieldName() string

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

func (*BucketMetadataExt) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BumpSequenceOp

type BumpSequenceOp struct {
	BumpTo SequenceNumber
}

BumpSequenceOp is an XDR Struct defines as:

struct BumpSequenceOp
 {
     SequenceNumber bumpTo;
 };

func (*BumpSequenceOp) DecodeFrom

func (s *BumpSequenceOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*BumpSequenceOp) EncodeTo

func (s *BumpSequenceOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (BumpSequenceOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*BumpSequenceOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BumpSequenceResult

type BumpSequenceResult struct {
	Code BumpSequenceResultCode
}

BumpSequenceResult is an XDR Union defines as:

union BumpSequenceResult switch (BumpSequenceResultCode code)
 {
 case BUMP_SEQUENCE_SUCCESS:
     void;
 default:
     void;
 };

func NewBumpSequenceResult

func NewBumpSequenceResult(code BumpSequenceResultCode, value interface{}) (result BumpSequenceResult, err error)

NewBumpSequenceResult creates a new BumpSequenceResult.

func (BumpSequenceResult) ArmForSwitch

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

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

func (*BumpSequenceResult) DecodeFrom

func (u *BumpSequenceResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (BumpSequenceResult) EncodeTo

func (u BumpSequenceResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (BumpSequenceResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BumpSequenceResult) SwitchFieldName

func (u BumpSequenceResult) SwitchFieldName() string

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

func (*BumpSequenceResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BumpSequenceResultCode

type BumpSequenceResultCode int32

BumpSequenceResultCode is an XDR Enum defines as:

enum BumpSequenceResultCode
 {
     // codes considered as "success" for the operation
     BUMP_SEQUENCE_SUCCESS = 0,
     // codes considered as "failure" for the operation
     BUMP_SEQUENCE_BAD_SEQ = -1 // `bumpTo` is not within bounds
 };
const (
	BumpSequenceResultCodeBumpSequenceSuccess BumpSequenceResultCode = 0
	BumpSequenceResultCodeBumpSequenceBadSeq  BumpSequenceResultCode = -1
)

func (*BumpSequenceResultCode) DecodeFrom

func (e *BumpSequenceResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (BumpSequenceResultCode) EncodeTo

func (e BumpSequenceResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (BumpSequenceResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BumpSequenceResultCode) String

func (e BumpSequenceResultCode) String() string

String returns the name of `e`

func (*BumpSequenceResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (BumpSequenceResultCode) ValidEnum

func (e BumpSequenceResultCode) ValidEnum(v int32) bool

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

type BytesDecoder

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

BytesDecoder efficiently manages a byte reader and an xdr decoder so that they don't need to be allocated in every decoding call.

func NewBytesDecoder

func NewBytesDecoder() *BytesDecoder

func (*BytesDecoder) DecodeBytes

func (d *BytesDecoder) DecodeBytes(v DecoderFrom, b []byte) (int, error)

type ChangeTrustAsset

type ChangeTrustAsset struct {
	Type          AssetType
	AlphaNum4     *AlphaNum4
	AlphaNum12    *AlphaNum12
	LiquidityPool *LiquidityPoolParameters
}

ChangeTrustAsset is an XDR Union defines as:

union ChangeTrustAsset switch (AssetType type)
 {
 case ASSET_TYPE_NATIVE: // Not credit
     void;

 case ASSET_TYPE_CREDIT_ALPHANUM4:
     AlphaNum4 alphaNum4;

 case ASSET_TYPE_CREDIT_ALPHANUM12:
     AlphaNum12 alphaNum12;

 case ASSET_TYPE_POOL_SHARE:
     LiquidityPoolParameters liquidityPool;

     // add other asset types here in the future
 };

func NewChangeTrustAsset

func NewChangeTrustAsset(aType AssetType, value interface{}) (result ChangeTrustAsset, err error)

NewChangeTrustAsset creates a new ChangeTrustAsset.

func (ChangeTrustAsset) ArmForSwitch

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

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

func (*ChangeTrustAsset) DecodeFrom

func (u *ChangeTrustAsset) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ChangeTrustAsset) EncodeTo

func (u ChangeTrustAsset) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ChangeTrustAsset) GetAlphaNum12

func (u ChangeTrustAsset) GetAlphaNum12() (result AlphaNum12, ok bool)

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

func (ChangeTrustAsset) GetAlphaNum4

func (u ChangeTrustAsset) GetAlphaNum4() (result AlphaNum4, ok bool)

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

func (ChangeTrustAsset) GetLiquidityPool

func (u ChangeTrustAsset) GetLiquidityPool() (result LiquidityPoolParameters, ok bool)

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

func (ChangeTrustAsset) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ChangeTrustAsset) MustAlphaNum12

func (u ChangeTrustAsset) MustAlphaNum12() AlphaNum12

MustAlphaNum12 retrieves the AlphaNum12 value from the union, panicing if the value is not set.

func (ChangeTrustAsset) MustAlphaNum4

func (u ChangeTrustAsset) MustAlphaNum4() AlphaNum4

MustAlphaNum4 retrieves the AlphaNum4 value from the union, panicing if the value is not set.

func (ChangeTrustAsset) MustLiquidityPool

func (u ChangeTrustAsset) MustLiquidityPool() LiquidityPoolParameters

MustLiquidityPool retrieves the LiquidityPool value from the union, panicing if the value is not set.

func (ChangeTrustAsset) SwitchFieldName

func (u ChangeTrustAsset) SwitchFieldName() string

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

func (ChangeTrustAsset) ToAsset

func (tla ChangeTrustAsset) ToAsset() Asset

ToAsset converts ChangeTrustAsset to Asset. Panics on type other than AssetTypeAssetTypeNative, AssetTypeAssetTypeCreditAlphanum4 or AssetTypeAssetTypeCreditAlphanum12.

func (*ChangeTrustAsset) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ChangeTrustOp

type ChangeTrustOp struct {
	Line  ChangeTrustAsset
	Limit Int64
}

ChangeTrustOp is an XDR Struct defines as:

struct ChangeTrustOp
 {
     ChangeTrustAsset line;

     // if limit is set to 0, deletes the trust line
     int64 limit;
 };

func (*ChangeTrustOp) DecodeFrom

func (s *ChangeTrustOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ChangeTrustOp) EncodeTo

func (s *ChangeTrustOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ChangeTrustOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ChangeTrustOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ChangeTrustResult

type ChangeTrustResult struct {
	Code ChangeTrustResultCode
}

ChangeTrustResult is an XDR Union defines as:

union ChangeTrustResult switch (ChangeTrustResultCode code)
 {
 case CHANGE_TRUST_SUCCESS:
     void;
 default:
     void;
 };

func NewChangeTrustResult

func NewChangeTrustResult(code ChangeTrustResultCode, value interface{}) (result ChangeTrustResult, err error)

NewChangeTrustResult creates a new ChangeTrustResult.

func (ChangeTrustResult) ArmForSwitch

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

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

func (*ChangeTrustResult) DecodeFrom

func (u *ChangeTrustResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ChangeTrustResult) EncodeTo

func (u ChangeTrustResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ChangeTrustResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ChangeTrustResult) SwitchFieldName

func (u ChangeTrustResult) SwitchFieldName() string

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

func (*ChangeTrustResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ChangeTrustResultCode

type ChangeTrustResultCode int32

ChangeTrustResultCode is an XDR Enum defines as:

enum ChangeTrustResultCode
 {
     // codes considered as "success" for the operation
     CHANGE_TRUST_SUCCESS = 0,
     // codes considered as "failure" for the operation
     CHANGE_TRUST_MALFORMED = -1,     // bad input
     CHANGE_TRUST_NO_ISSUER = -2,     // could not find issuer
     CHANGE_TRUST_INVALID_LIMIT = -3, // cannot drop limit below balance
                                      // cannot create with a limit of 0
     CHANGE_TRUST_LOW_RESERVE =
         -4, // not enough funds to create a new trust line,
     CHANGE_TRUST_SELF_NOT_ALLOWED = -5,   // trusting self is not allowed
     CHANGE_TRUST_TRUST_LINE_MISSING = -6, // Asset trustline is missing for pool
     CHANGE_TRUST_CANNOT_DELETE =
         -7, // Asset trustline is still referenced in a pool
     CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES =
         -8 // Asset trustline is deauthorized
 };
const (
	ChangeTrustResultCodeChangeTrustSuccess                    ChangeTrustResultCode = 0
	ChangeTrustResultCodeChangeTrustMalformed                  ChangeTrustResultCode = -1
	ChangeTrustResultCodeChangeTrustNoIssuer                   ChangeTrustResultCode = -2
	ChangeTrustResultCodeChangeTrustInvalidLimit               ChangeTrustResultCode = -3
	ChangeTrustResultCodeChangeTrustLowReserve                 ChangeTrustResultCode = -4
	ChangeTrustResultCodeChangeTrustSelfNotAllowed             ChangeTrustResultCode = -5
	ChangeTrustResultCodeChangeTrustTrustLineMissing           ChangeTrustResultCode = -6
	ChangeTrustResultCodeChangeTrustCannotDelete               ChangeTrustResultCode = -7
	ChangeTrustResultCodeChangeTrustNotAuthMaintainLiabilities ChangeTrustResultCode = -8
)

func (*ChangeTrustResultCode) DecodeFrom

func (e *ChangeTrustResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ChangeTrustResultCode) EncodeTo

func (e ChangeTrustResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ChangeTrustResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ChangeTrustResultCode) String

func (e ChangeTrustResultCode) String() string

String returns the name of `e`

func (*ChangeTrustResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ChangeTrustResultCode) ValidEnum

func (e ChangeTrustResultCode) ValidEnum(v int32) bool

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

type ClaimAtom

type ClaimAtom struct {
	Type          ClaimAtomType
	V0            *ClaimOfferAtomV0
	OrderBook     *ClaimOfferAtom
	LiquidityPool *ClaimLiquidityAtom
}

ClaimAtom is an XDR Union defines as:

union ClaimAtom switch (ClaimAtomType type)
 {
 case CLAIM_ATOM_TYPE_V0:
     ClaimOfferAtomV0 v0;
 case CLAIM_ATOM_TYPE_ORDER_BOOK:
     ClaimOfferAtom orderBook;
 case CLAIM_ATOM_TYPE_LIQUIDITY_POOL:
     ClaimLiquidityAtom liquidityPool;
 };

func NewClaimAtom

func NewClaimAtom(aType ClaimAtomType, value interface{}) (result ClaimAtom, err error)

NewClaimAtom creates a new ClaimAtom.

func (ClaimAtom) AmountBought

func (a ClaimAtom) AmountBought() Int64

func (ClaimAtom) AmountSold

func (a ClaimAtom) AmountSold() Int64

func (ClaimAtom) ArmForSwitch

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

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

func (ClaimAtom) AssetBought

func (a ClaimAtom) AssetBought() Asset

func (ClaimAtom) AssetSold

func (a ClaimAtom) AssetSold() Asset

func (*ClaimAtom) DecodeFrom

func (u *ClaimAtom) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClaimAtom) EncodeTo

func (u ClaimAtom) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimAtom) GetLiquidityPool

func (u ClaimAtom) GetLiquidityPool() (result ClaimLiquidityAtom, ok bool)

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

func (ClaimAtom) GetOrderBook

func (u ClaimAtom) GetOrderBook() (result ClaimOfferAtom, ok bool)

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

func (ClaimAtom) GetV0

func (u ClaimAtom) GetV0() (result ClaimOfferAtomV0, ok bool)

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

func (ClaimAtom) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimAtom) MustLiquidityPool

func (u ClaimAtom) MustLiquidityPool() ClaimLiquidityAtom

MustLiquidityPool retrieves the LiquidityPool value from the union, panicing if the value is not set.

func (ClaimAtom) MustOrderBook

func (u ClaimAtom) MustOrderBook() ClaimOfferAtom

MustOrderBook retrieves the OrderBook value from the union, panicing if the value is not set.

func (ClaimAtom) MustV0

func (u ClaimAtom) MustV0() ClaimOfferAtomV0

MustV0 retrieves the V0 value from the union, panicing if the value is not set.

func (ClaimAtom) OfferId

func (a ClaimAtom) OfferId() Int64

func (ClaimAtom) SellerId

func (a ClaimAtom) SellerId() AccountId

func (ClaimAtom) SwitchFieldName

func (u ClaimAtom) SwitchFieldName() string

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

func (*ClaimAtom) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimAtomType

type ClaimAtomType int32

ClaimAtomType is an XDR Enum defines as:

enum ClaimAtomType
 {
     CLAIM_ATOM_TYPE_V0 = 0,
     CLAIM_ATOM_TYPE_ORDER_BOOK = 1,
     CLAIM_ATOM_TYPE_LIQUIDITY_POOL = 2
 };
const (
	ClaimAtomTypeClaimAtomTypeV0            ClaimAtomType = 0
	ClaimAtomTypeClaimAtomTypeOrderBook     ClaimAtomType = 1
	ClaimAtomTypeClaimAtomTypeLiquidityPool ClaimAtomType = 2
)

func (*ClaimAtomType) DecodeFrom

func (e *ClaimAtomType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClaimAtomType) EncodeTo

func (e ClaimAtomType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimAtomType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimAtomType) String

func (e ClaimAtomType) String() string

String returns the name of `e`

func (*ClaimAtomType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimAtomType) ValidEnum

func (e ClaimAtomType) ValidEnum(v int32) bool

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

type ClaimClaimableBalanceOp

type ClaimClaimableBalanceOp struct {
	BalanceId ClaimableBalanceId
}

ClaimClaimableBalanceOp is an XDR Struct defines as:

struct ClaimClaimableBalanceOp
 {
     ClaimableBalanceID balanceID;
 };

func (*ClaimClaimableBalanceOp) DecodeFrom

func (s *ClaimClaimableBalanceOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ClaimClaimableBalanceOp) EncodeTo

func (s *ClaimClaimableBalanceOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimClaimableBalanceOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimClaimableBalanceOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimClaimableBalanceResult

type ClaimClaimableBalanceResult struct {
	Code ClaimClaimableBalanceResultCode
}

ClaimClaimableBalanceResult is an XDR Union defines as:

union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code)
 {
 case CLAIM_CLAIMABLE_BALANCE_SUCCESS:
     void;
 default:
     void;
 };

func NewClaimClaimableBalanceResult

func NewClaimClaimableBalanceResult(code ClaimClaimableBalanceResultCode, value interface{}) (result ClaimClaimableBalanceResult, err error)

NewClaimClaimableBalanceResult creates a new ClaimClaimableBalanceResult.

func (ClaimClaimableBalanceResult) ArmForSwitch

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

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

func (*ClaimClaimableBalanceResult) DecodeFrom

func (u *ClaimClaimableBalanceResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClaimClaimableBalanceResult) EncodeTo

func (u ClaimClaimableBalanceResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimClaimableBalanceResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimClaimableBalanceResult) SwitchFieldName

func (u ClaimClaimableBalanceResult) SwitchFieldName() string

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

func (*ClaimClaimableBalanceResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimClaimableBalanceResultCode

type ClaimClaimableBalanceResultCode int32

ClaimClaimableBalanceResultCode is an XDR Enum defines as:

enum ClaimClaimableBalanceResultCode
 {
     CLAIM_CLAIMABLE_BALANCE_SUCCESS = 0,
     CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST = -1,
     CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM = -2,
     CLAIM_CLAIMABLE_BALANCE_LINE_FULL = -3,
     CLAIM_CLAIMABLE_BALANCE_NO_TRUST = -4,
     CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED = -5

 };
const (
	ClaimClaimableBalanceResultCodeClaimClaimableBalanceSuccess       ClaimClaimableBalanceResultCode = 0
	ClaimClaimableBalanceResultCodeClaimClaimableBalanceDoesNotExist  ClaimClaimableBalanceResultCode = -1
	ClaimClaimableBalanceResultCodeClaimClaimableBalanceCannotClaim   ClaimClaimableBalanceResultCode = -2
	ClaimClaimableBalanceResultCodeClaimClaimableBalanceLineFull      ClaimClaimableBalanceResultCode = -3
	ClaimClaimableBalanceResultCodeClaimClaimableBalanceNoTrust       ClaimClaimableBalanceResultCode = -4
	ClaimClaimableBalanceResultCodeClaimClaimableBalanceNotAuthorized ClaimClaimableBalanceResultCode = -5
)

func (*ClaimClaimableBalanceResultCode) DecodeFrom

func (e *ClaimClaimableBalanceResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClaimClaimableBalanceResultCode) EncodeTo

func (e ClaimClaimableBalanceResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimClaimableBalanceResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimClaimableBalanceResultCode) String

String returns the name of `e`

func (*ClaimClaimableBalanceResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimClaimableBalanceResultCode) ValidEnum

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

type ClaimLiquidityAtom

type ClaimLiquidityAtom struct {
	LiquidityPoolId PoolId
	AssetSold       Asset
	AmountSold      Int64
	AssetBought     Asset
	AmountBought    Int64
}

ClaimLiquidityAtom is an XDR Struct defines as:

struct ClaimLiquidityAtom
 {
     PoolID liquidityPoolID;

     // amount and asset taken from the pool
     Asset assetSold;
     int64 amountSold;

     // amount and asset sent to the pool
     Asset assetBought;
     int64 amountBought;
 };

func (*ClaimLiquidityAtom) DecodeFrom

func (s *ClaimLiquidityAtom) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ClaimLiquidityAtom) EncodeTo

func (s *ClaimLiquidityAtom) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimLiquidityAtom) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimLiquidityAtom) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimOfferAtom

type ClaimOfferAtom struct {
	SellerId     AccountId
	OfferId      Int64
	AssetSold    Asset
	AmountSold   Int64
	AssetBought  Asset
	AmountBought Int64
}

ClaimOfferAtom is an XDR Struct defines as:

struct ClaimOfferAtom
 {
     // emitted to identify the offer
     AccountID sellerID; // Account that owns the offer
     int64 offerID;

     // amount and asset taken from the owner
     Asset assetSold;
     int64 amountSold;

     // amount and asset sent to the owner
     Asset assetBought;
     int64 amountBought;
 };

func (*ClaimOfferAtom) DecodeFrom

func (s *ClaimOfferAtom) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ClaimOfferAtom) EncodeTo

func (s *ClaimOfferAtom) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimOfferAtom) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimOfferAtom) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimOfferAtomV0

type ClaimOfferAtomV0 struct {
	SellerEd25519 Uint256
	OfferId       Int64
	AssetSold     Asset
	AmountSold    Int64
	AssetBought   Asset
	AmountBought  Int64
}

ClaimOfferAtomV0 is an XDR Struct defines as:

struct ClaimOfferAtomV0
 {
     // emitted to identify the offer
     uint256 sellerEd25519; // Account that owns the offer
     int64 offerID;

     // amount and asset taken from the owner
     Asset assetSold;
     int64 amountSold;

     // amount and asset sent to the owner
     Asset assetBought;
     int64 amountBought;
 };

func (*ClaimOfferAtomV0) DecodeFrom

func (s *ClaimOfferAtomV0) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ClaimOfferAtomV0) EncodeTo

func (s *ClaimOfferAtomV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimOfferAtomV0) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimOfferAtomV0) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimPredicate

type ClaimPredicate struct {
	Type          ClaimPredicateType
	AndPredicates *[]ClaimPredicate `xdrmaxsize:"2"`
	OrPredicates  *[]ClaimPredicate `xdrmaxsize:"2"`
	NotPredicate  **ClaimPredicate
	AbsBefore     *Int64
	RelBefore     *Int64
}

ClaimPredicate is an XDR Union defines as:

union ClaimPredicate switch (ClaimPredicateType type)
 {
 case CLAIM_PREDICATE_UNCONDITIONAL:
     void;
 case CLAIM_PREDICATE_AND:
     ClaimPredicate andPredicates<2>;
 case CLAIM_PREDICATE_OR:
     ClaimPredicate orPredicates<2>;
 case CLAIM_PREDICATE_NOT:
     ClaimPredicate* notPredicate;
 case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME:
     int64 absBefore; // Predicate will be true if closeTime < absBefore
 case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME:
     int64 relBefore; // Seconds since closeTime of the ledger in which the
                      // ClaimableBalanceEntry was created
 };

func NewClaimPredicate

func NewClaimPredicate(aType ClaimPredicateType, value interface{}) (result ClaimPredicate, err error)

NewClaimPredicate creates a new ClaimPredicate.

func (ClaimPredicate) ArmForSwitch

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

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

func (*ClaimPredicate) DecodeFrom

func (u *ClaimPredicate) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClaimPredicate) EncodeTo

func (u ClaimPredicate) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimPredicate) GetAbsBefore

func (u ClaimPredicate) GetAbsBefore() (result Int64, ok bool)

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

func (ClaimPredicate) GetAndPredicates

func (u ClaimPredicate) GetAndPredicates() (result []ClaimPredicate, ok bool)

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

func (ClaimPredicate) GetNotPredicate

func (u ClaimPredicate) GetNotPredicate() (result *ClaimPredicate, ok bool)

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

func (ClaimPredicate) GetOrPredicates

func (u ClaimPredicate) GetOrPredicates() (result []ClaimPredicate, ok bool)

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

func (ClaimPredicate) GetRelBefore

func (u ClaimPredicate) GetRelBefore() (result Int64, ok bool)

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

func (ClaimPredicate) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimPredicate) MarshalJSON

func (c ClaimPredicate) MarshalJSON() ([]byte, error)

func (ClaimPredicate) MustAbsBefore

func (u ClaimPredicate) MustAbsBefore() Int64

MustAbsBefore retrieves the AbsBefore value from the union, panicing if the value is not set.

func (ClaimPredicate) MustAndPredicates

func (u ClaimPredicate) MustAndPredicates() []ClaimPredicate

MustAndPredicates retrieves the AndPredicates value from the union, panicing if the value is not set.

func (ClaimPredicate) MustNotPredicate

func (u ClaimPredicate) MustNotPredicate() *ClaimPredicate

MustNotPredicate retrieves the NotPredicate value from the union, panicing if the value is not set.

func (ClaimPredicate) MustOrPredicates

func (u ClaimPredicate) MustOrPredicates() []ClaimPredicate

MustOrPredicates retrieves the OrPredicates value from the union, panicing if the value is not set.

func (ClaimPredicate) MustRelBefore

func (u ClaimPredicate) MustRelBefore() Int64

MustRelBefore retrieves the RelBefore value from the union, panicing if the value is not set.

func (*ClaimPredicate) Scan

func (c *ClaimPredicate) Scan(src interface{}) error

Scan reads from src into a ClaimPredicate

func (ClaimPredicate) SwitchFieldName

func (u ClaimPredicate) SwitchFieldName() string

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

func (*ClaimPredicate) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (*ClaimPredicate) UnmarshalJSON

func (c *ClaimPredicate) UnmarshalJSON(b []byte) error

func (ClaimPredicate) Value

func (c ClaimPredicate) Value() (driver.Value, error)

Value implements the database/sql/driver Valuer interface.

type ClaimPredicateType

type ClaimPredicateType int32

ClaimPredicateType is an XDR Enum defines as:

enum ClaimPredicateType
 {
     CLAIM_PREDICATE_UNCONDITIONAL = 0,
     CLAIM_PREDICATE_AND = 1,
     CLAIM_PREDICATE_OR = 2,
     CLAIM_PREDICATE_NOT = 3,
     CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME = 4,
     CLAIM_PREDICATE_BEFORE_RELATIVE_TIME = 5
 };
const (
	ClaimPredicateTypeClaimPredicateUnconditional      ClaimPredicateType = 0
	ClaimPredicateTypeClaimPredicateAnd                ClaimPredicateType = 1
	ClaimPredicateTypeClaimPredicateOr                 ClaimPredicateType = 2
	ClaimPredicateTypeClaimPredicateNot                ClaimPredicateType = 3
	ClaimPredicateTypeClaimPredicateBeforeAbsoluteTime ClaimPredicateType = 4
	ClaimPredicateTypeClaimPredicateBeforeRelativeTime ClaimPredicateType = 5
)

func (*ClaimPredicateType) DecodeFrom

func (e *ClaimPredicateType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClaimPredicateType) EncodeTo

func (e ClaimPredicateType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimPredicateType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimPredicateType) String

func (e ClaimPredicateType) String() string

String returns the name of `e`

func (*ClaimPredicateType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimPredicateType) ValidEnum

func (e ClaimPredicateType) ValidEnum(v int32) bool

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

type ClaimableBalanceEntry

type ClaimableBalanceEntry struct {
	BalanceId ClaimableBalanceId
	Claimants []Claimant `xdrmaxsize:"10"`
	Asset     Asset
	Amount    Int64
	Ext       ClaimableBalanceEntryExt
}

ClaimableBalanceEntry is an XDR Struct defines as:

struct ClaimableBalanceEntry
 {
     // Unique identifier for this ClaimableBalanceEntry
     ClaimableBalanceID balanceID;

     // List of claimants with associated predicate
     Claimant claimants<10>;

     // Any asset including native
     Asset asset;

     // Amount of asset
     int64 amount;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     case 1:
         ClaimableBalanceEntryExtensionV1 v1;
     }
     ext;
 };

func (*ClaimableBalanceEntry) DecodeFrom

func (s *ClaimableBalanceEntry) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ClaimableBalanceEntry) EncodeTo

func (s *ClaimableBalanceEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*ClaimableBalanceEntry) Flags

func (ClaimableBalanceEntry) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimableBalanceEntry) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimableBalanceEntryExt

type ClaimableBalanceEntryExt struct {
	V  int32
	V1 *ClaimableBalanceEntryExtensionV1
}

ClaimableBalanceEntryExt is an XDR NestedUnion defines as:

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

func NewClaimableBalanceEntryExt

func NewClaimableBalanceEntryExt(v int32, value interface{}) (result ClaimableBalanceEntryExt, err error)

NewClaimableBalanceEntryExt creates a new ClaimableBalanceEntryExt.

func (ClaimableBalanceEntryExt) ArmForSwitch

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

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

func (*ClaimableBalanceEntryExt) DecodeFrom

func (u *ClaimableBalanceEntryExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClaimableBalanceEntryExt) EncodeTo

func (u ClaimableBalanceEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimableBalanceEntryExt) GetV1

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

func (ClaimableBalanceEntryExt) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimableBalanceEntryExt) MustV1

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

func (ClaimableBalanceEntryExt) SwitchFieldName

func (u ClaimableBalanceEntryExt) SwitchFieldName() string

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

func (*ClaimableBalanceEntryExt) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimableBalanceEntryExtensionV1

type ClaimableBalanceEntryExtensionV1 struct {
	Ext   ClaimableBalanceEntryExtensionV1Ext
	Flags Uint32
}

ClaimableBalanceEntryExtensionV1 is an XDR Struct defines as:

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

     uint32 flags; // see ClaimableBalanceFlags
 };

func (*ClaimableBalanceEntryExtensionV1) DecodeFrom

func (s *ClaimableBalanceEntryExtensionV1) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ClaimableBalanceEntryExtensionV1) EncodeTo

func (s *ClaimableBalanceEntryExtensionV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimableBalanceEntryExtensionV1) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimableBalanceEntryExtensionV1) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimableBalanceEntryExtensionV1Ext

type ClaimableBalanceEntryExtensionV1Ext struct {
	V int32
}

ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defines as:

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

func NewClaimableBalanceEntryExtensionV1Ext

func NewClaimableBalanceEntryExtensionV1Ext(v int32, value interface{}) (result ClaimableBalanceEntryExtensionV1Ext, err error)

NewClaimableBalanceEntryExtensionV1Ext creates a new ClaimableBalanceEntryExtensionV1Ext.

func (ClaimableBalanceEntryExtensionV1Ext) ArmForSwitch

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

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

func (*ClaimableBalanceEntryExtensionV1Ext) DecodeFrom

func (u *ClaimableBalanceEntryExtensionV1Ext) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClaimableBalanceEntryExtensionV1Ext) EncodeTo

func (u ClaimableBalanceEntryExtensionV1Ext) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimableBalanceEntryExtensionV1Ext) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimableBalanceEntryExtensionV1Ext) SwitchFieldName

func (u ClaimableBalanceEntryExtensionV1Ext) SwitchFieldName() string

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

func (*ClaimableBalanceEntryExtensionV1Ext) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimableBalanceFlags

type ClaimableBalanceFlags int32

ClaimableBalanceFlags is an XDR Enum defines as:

enum ClaimableBalanceFlags
 {
     // If set, the issuer account of the asset held by the claimable balance may
     // clawback the claimable balance
     CLAIMABLE_BALANCE_CLAWBACK_ENABLED_FLAG = 0x1
 };
const (
	ClaimableBalanceFlagsClaimableBalanceClawbackEnabledFlag ClaimableBalanceFlags = 1
)

func (*ClaimableBalanceFlags) DecodeFrom

func (e *ClaimableBalanceFlags) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClaimableBalanceFlags) EncodeTo

func (e ClaimableBalanceFlags) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimableBalanceFlags) IsClawbackEnabled

func (cbFlags ClaimableBalanceFlags) IsClawbackEnabled() bool

IsClawbackEnabled returns true if the claimable balance has the "CLAWBACK_ENABLED" option turned on.

func (ClaimableBalanceFlags) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimableBalanceFlags) String

func (e ClaimableBalanceFlags) String() string

String returns the name of `e`

func (*ClaimableBalanceFlags) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimableBalanceFlags) ValidEnum

func (e ClaimableBalanceFlags) ValidEnum(v int32) bool

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

type ClaimableBalanceId

type ClaimableBalanceId struct {
	Type ClaimableBalanceIdType
	V0   *Hash
}

ClaimableBalanceId is an XDR Union defines as:

union ClaimableBalanceID switch (ClaimableBalanceIDType type)
 {
 case CLAIMABLE_BALANCE_ID_TYPE_V0:
     Hash v0;
 };

func NewClaimableBalanceId

func NewClaimableBalanceId(aType ClaimableBalanceIdType, value interface{}) (result ClaimableBalanceId, err error)

NewClaimableBalanceId creates a new ClaimableBalanceId.

func (ClaimableBalanceId) ArmForSwitch

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

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

func (*ClaimableBalanceId) DecodeFrom

func (u *ClaimableBalanceId) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClaimableBalanceId) EncodeTo

func (u ClaimableBalanceId) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimableBalanceId) GetV0

func (u ClaimableBalanceId) GetV0() (result Hash, ok bool)

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

func (ClaimableBalanceId) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimableBalanceId) MustV0

func (u ClaimableBalanceId) MustV0() Hash

MustV0 retrieves the V0 value from the union, panicing if the value is not set.

func (ClaimableBalanceId) SwitchFieldName

func (u ClaimableBalanceId) SwitchFieldName() string

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

func (*ClaimableBalanceId) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimableBalanceIdType

type ClaimableBalanceIdType int32

ClaimableBalanceIdType is an XDR Enum defines as:

enum ClaimableBalanceIDType
 {
     CLAIMABLE_BALANCE_ID_TYPE_V0 = 0
 };
const (
	ClaimableBalanceIdTypeClaimableBalanceIdTypeV0 ClaimableBalanceIdType = 0
)

func (*ClaimableBalanceIdType) DecodeFrom

func (e *ClaimableBalanceIdType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClaimableBalanceIdType) EncodeTo

func (e ClaimableBalanceIdType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimableBalanceIdType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimableBalanceIdType) String

func (e ClaimableBalanceIdType) String() string

String returns the name of `e`

func (*ClaimableBalanceIdType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimableBalanceIdType) ValidEnum

func (e ClaimableBalanceIdType) ValidEnum(v int32) bool

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

type Claimant

type Claimant struct {
	Type ClaimantType
	V0   *ClaimantV0
}

Claimant is an XDR Union defines as:

union Claimant switch (ClaimantType type)
 {
 case CLAIMANT_TYPE_V0:
     struct
     {
         AccountID destination;    // The account that can use this condition
         ClaimPredicate predicate; // Claimable if predicate is true
     } v0;
 };

func NewClaimant

func NewClaimant(aType ClaimantType, value interface{}) (result Claimant, err error)

NewClaimant creates a new Claimant.

func SortClaimantsByDestination

func SortClaimantsByDestination(claimants []Claimant) []Claimant

SortClaimantsByDestination returns a new []Claimant array sorted by destination.

func (Claimant) ArmForSwitch

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

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

func (*Claimant) DecodeFrom

func (u *Claimant) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Claimant) EncodeTo

func (u Claimant) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Claimant) GetV0

func (u Claimant) GetV0() (result ClaimantV0, ok bool)

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

func (Claimant) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (Claimant) MustV0

func (u Claimant) MustV0() ClaimantV0

MustV0 retrieves the V0 value from the union, panicing if the value is not set.

func (Claimant) SwitchFieldName

func (u Claimant) SwitchFieldName() string

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

func (*Claimant) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimantType

type ClaimantType int32

ClaimantType is an XDR Enum defines as:

enum ClaimantType
 {
     CLAIMANT_TYPE_V0 = 0
 };
const (
	ClaimantTypeClaimantTypeV0 ClaimantType = 0
)

func (*ClaimantType) DecodeFrom

func (e *ClaimantType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClaimantType) EncodeTo

func (e ClaimantType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimantType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimantType) String

func (e ClaimantType) String() string

String returns the name of `e`

func (*ClaimantType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimantType) ValidEnum

func (e ClaimantType) ValidEnum(v int32) bool

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

type ClaimantV0

type ClaimantV0 struct {
	Destination AccountId
	Predicate   ClaimPredicate
}

ClaimantV0 is an XDR NestedStruct defines as:

struct
     {
         AccountID destination;    // The account that can use this condition
         ClaimPredicate predicate; // Claimable if predicate is true
     }

func (*ClaimantV0) DecodeFrom

func (s *ClaimantV0) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ClaimantV0) EncodeTo

func (s *ClaimantV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClaimantV0) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimantV0) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClawbackClaimableBalanceOp

type ClawbackClaimableBalanceOp struct {
	BalanceId ClaimableBalanceId
}

ClawbackClaimableBalanceOp is an XDR Struct defines as:

struct ClawbackClaimableBalanceOp
 {
     ClaimableBalanceID balanceID;
 };

func (*ClawbackClaimableBalanceOp) DecodeFrom

func (s *ClawbackClaimableBalanceOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ClawbackClaimableBalanceOp) EncodeTo

func (s *ClawbackClaimableBalanceOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClawbackClaimableBalanceOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClawbackClaimableBalanceOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClawbackClaimableBalanceResult

type ClawbackClaimableBalanceResult struct {
	Code ClawbackClaimableBalanceResultCode
}

ClawbackClaimableBalanceResult is an XDR Union defines as:

union ClawbackClaimableBalanceResult switch (
     ClawbackClaimableBalanceResultCode code)
 {
 case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS:
     void;
 default:
     void;
 };

func NewClawbackClaimableBalanceResult

func NewClawbackClaimableBalanceResult(code ClawbackClaimableBalanceResultCode, value interface{}) (result ClawbackClaimableBalanceResult, err error)

NewClawbackClaimableBalanceResult creates a new ClawbackClaimableBalanceResult.

func (ClawbackClaimableBalanceResult) ArmForSwitch

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

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

func (*ClawbackClaimableBalanceResult) DecodeFrom

func (u *ClawbackClaimableBalanceResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClawbackClaimableBalanceResult) EncodeTo

func (u ClawbackClaimableBalanceResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClawbackClaimableBalanceResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClawbackClaimableBalanceResult) SwitchFieldName

func (u ClawbackClaimableBalanceResult) SwitchFieldName() string

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

func (*ClawbackClaimableBalanceResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClawbackClaimableBalanceResultCode

type ClawbackClaimableBalanceResultCode int32

ClawbackClaimableBalanceResultCode is an XDR Enum defines as:

enum ClawbackClaimableBalanceResultCode
 {
     // codes considered as "success" for the operation
     CLAWBACK_CLAIMABLE_BALANCE_SUCCESS = 0,

     // codes considered as "failure" for the operation
     CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST = -1,
     CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER = -2,
     CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED = -3
 };
const (
	ClawbackClaimableBalanceResultCodeClawbackClaimableBalanceSuccess            ClawbackClaimableBalanceResultCode = 0
	ClawbackClaimableBalanceResultCodeClawbackClaimableBalanceDoesNotExist       ClawbackClaimableBalanceResultCode = -1
	ClawbackClaimableBalanceResultCodeClawbackClaimableBalanceNotIssuer          ClawbackClaimableBalanceResultCode = -2
	ClawbackClaimableBalanceResultCodeClawbackClaimableBalanceNotClawbackEnabled ClawbackClaimableBalanceResultCode = -3
)

func (*ClawbackClaimableBalanceResultCode) DecodeFrom

func (e *ClawbackClaimableBalanceResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClawbackClaimableBalanceResultCode) EncodeTo

func (e ClawbackClaimableBalanceResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClawbackClaimableBalanceResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClawbackClaimableBalanceResultCode) String

String returns the name of `e`

func (*ClawbackClaimableBalanceResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClawbackClaimableBalanceResultCode) ValidEnum

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

type ClawbackOp

type ClawbackOp struct {
	Asset  Asset
	From   MuxedAccount
	Amount Int64
}

ClawbackOp is an XDR Struct defines as:

struct ClawbackOp
 {
     Asset asset;
     MuxedAccount from;
     int64 amount;
 };

func (*ClawbackOp) DecodeFrom

func (s *ClawbackOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ClawbackOp) EncodeTo

func (s *ClawbackOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClawbackOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClawbackOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClawbackResult

type ClawbackResult struct {
	Code ClawbackResultCode
}

ClawbackResult is an XDR Union defines as:

union ClawbackResult switch (ClawbackResultCode code)
 {
 case CLAWBACK_SUCCESS:
     void;
 default:
     void;
 };

func NewClawbackResult

func NewClawbackResult(code ClawbackResultCode, value interface{}) (result ClawbackResult, err error)

NewClawbackResult creates a new ClawbackResult.

func (ClawbackResult) ArmForSwitch

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

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

func (*ClawbackResult) DecodeFrom

func (u *ClawbackResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClawbackResult) EncodeTo

func (u ClawbackResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClawbackResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClawbackResult) SwitchFieldName

func (u ClawbackResult) SwitchFieldName() string

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

func (*ClawbackResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClawbackResultCode

type ClawbackResultCode int32

ClawbackResultCode is an XDR Enum defines as:

enum ClawbackResultCode
 {
     // codes considered as "success" for the operation
     CLAWBACK_SUCCESS = 0,

     // codes considered as "failure" for the operation
     CLAWBACK_MALFORMED = -1,
     CLAWBACK_NOT_CLAWBACK_ENABLED = -2,
     CLAWBACK_NO_TRUST = -3,
     CLAWBACK_UNDERFUNDED = -4
 };
const (
	ClawbackResultCodeClawbackSuccess            ClawbackResultCode = 0
	ClawbackResultCodeClawbackMalformed          ClawbackResultCode = -1
	ClawbackResultCodeClawbackNotClawbackEnabled ClawbackResultCode = -2
	ClawbackResultCodeClawbackNoTrust            ClawbackResultCode = -3
	ClawbackResultCodeClawbackUnderfunded        ClawbackResultCode = -4
)

func (*ClawbackResultCode) DecodeFrom

func (e *ClawbackResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ClawbackResultCode) EncodeTo

func (e ClawbackResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ClawbackResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClawbackResultCode) String

func (e ClawbackResultCode) String() string

String returns the name of `e`

func (*ClawbackResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClawbackResultCode) ValidEnum

func (e ClawbackResultCode) ValidEnum(v int32) bool

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

type CreateAccountOp

type CreateAccountOp struct {
	Destination     AccountId
	StartingBalance Int64
}

CreateAccountOp is an XDR Struct defines as:

struct CreateAccountOp
 {
     AccountID destination; // account to create
     int64 startingBalance; // amount they end up with
 };

func (*CreateAccountOp) DecodeFrom

func (s *CreateAccountOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*CreateAccountOp) EncodeTo

func (s *CreateAccountOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (CreateAccountOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*CreateAccountOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CreateAccountResult

type CreateAccountResult struct {
	Code CreateAccountResultCode
}

CreateAccountResult is an XDR Union defines as:

union CreateAccountResult switch (CreateAccountResultCode code)
 {
 case CREATE_ACCOUNT_SUCCESS:
     void;
 default:
     void;
 };

func NewCreateAccountResult

func NewCreateAccountResult(code CreateAccountResultCode, value interface{}) (result CreateAccountResult, err error)

NewCreateAccountResult creates a new CreateAccountResult.

func (CreateAccountResult) ArmForSwitch

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

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

func (*CreateAccountResult) DecodeFrom

func (u *CreateAccountResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (CreateAccountResult) EncodeTo

func (u CreateAccountResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (CreateAccountResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (CreateAccountResult) SwitchFieldName

func (u CreateAccountResult) SwitchFieldName() string

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

func (*CreateAccountResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CreateAccountResultCode

type CreateAccountResultCode int32

CreateAccountResultCode is an XDR Enum defines as:

enum CreateAccountResultCode
 {
     // codes considered as "success" for the operation
     CREATE_ACCOUNT_SUCCESS = 0, // account was created

     // codes considered as "failure" for the operation
     CREATE_ACCOUNT_MALFORMED = -1,   // invalid destination
     CREATE_ACCOUNT_UNDERFUNDED = -2, // not enough funds in source account
     CREATE_ACCOUNT_LOW_RESERVE =
         -3, // would create an account below the min reserve
     CREATE_ACCOUNT_ALREADY_EXIST = -4 // account already exists
 };
const (
	CreateAccountResultCodeCreateAccountSuccess      CreateAccountResultCode = 0
	CreateAccountResultCodeCreateAccountMalformed    CreateAccountResultCode = -1
	CreateAccountResultCodeCreateAccountUnderfunded  CreateAccountResultCode = -2
	CreateAccountResultCodeCreateAccountLowReserve   CreateAccountResultCode = -3
	CreateAccountResultCodeCreateAccountAlreadyExist CreateAccountResultCode = -4
)

func (*CreateAccountResultCode) DecodeFrom

func (e *CreateAccountResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (CreateAccountResultCode) EncodeTo

func (e CreateAccountResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (CreateAccountResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (CreateAccountResultCode) String

func (e CreateAccountResultCode) String() string

String returns the name of `e`

func (*CreateAccountResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (CreateAccountResultCode) ValidEnum

func (e CreateAccountResultCode) ValidEnum(v int32) bool

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

type CreateClaimableBalanceOp

type CreateClaimableBalanceOp struct {
	Asset     Asset
	Amount    Int64
	Claimants []Claimant `xdrmaxsize:"10"`
}

CreateClaimableBalanceOp is an XDR Struct defines as:

struct CreateClaimableBalanceOp
 {
     Asset asset;
     int64 amount;
     Claimant claimants<10>;
 };

func (*CreateClaimableBalanceOp) DecodeFrom

func (s *CreateClaimableBalanceOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*CreateClaimableBalanceOp) EncodeTo

func (s *CreateClaimableBalanceOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (CreateClaimableBalanceOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*CreateClaimableBalanceOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CreateClaimableBalanceResult

type CreateClaimableBalanceResult struct {
	Code      CreateClaimableBalanceResultCode
	BalanceId *ClaimableBalanceId
}

CreateClaimableBalanceResult is an XDR Union defines as:

union CreateClaimableBalanceResult switch (
     CreateClaimableBalanceResultCode code)
 {
 case CREATE_CLAIMABLE_BALANCE_SUCCESS:
     ClaimableBalanceID balanceID;
 default:
     void;
 };

func NewCreateClaimableBalanceResult

func NewCreateClaimableBalanceResult(code CreateClaimableBalanceResultCode, value interface{}) (result CreateClaimableBalanceResult, err error)

NewCreateClaimableBalanceResult creates a new CreateClaimableBalanceResult.

func (CreateClaimableBalanceResult) ArmForSwitch

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

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

func (*CreateClaimableBalanceResult) DecodeFrom

func (u *CreateClaimableBalanceResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (CreateClaimableBalanceResult) EncodeTo

func (u CreateClaimableBalanceResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (CreateClaimableBalanceResult) GetBalanceId

func (u CreateClaimableBalanceResult) GetBalanceId() (result ClaimableBalanceId, ok bool)

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

func (CreateClaimableBalanceResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (CreateClaimableBalanceResult) MustBalanceId

MustBalanceId retrieves the BalanceId value from the union, panicing if the value is not set.

func (CreateClaimableBalanceResult) SwitchFieldName

func (u CreateClaimableBalanceResult) SwitchFieldName() string

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

func (*CreateClaimableBalanceResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CreateClaimableBalanceResultCode

type CreateClaimableBalanceResultCode int32

CreateClaimableBalanceResultCode is an XDR Enum defines as:

enum CreateClaimableBalanceResultCode
 {
     CREATE_CLAIMABLE_BALANCE_SUCCESS = 0,
     CREATE_CLAIMABLE_BALANCE_MALFORMED = -1,
     CREATE_CLAIMABLE_BALANCE_LOW_RESERVE = -2,
     CREATE_CLAIMABLE_BALANCE_NO_TRUST = -3,
     CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED = -4,
     CREATE_CLAIMABLE_BALANCE_UNDERFUNDED = -5
 };
const (
	CreateClaimableBalanceResultCodeCreateClaimableBalanceSuccess       CreateClaimableBalanceResultCode = 0
	CreateClaimableBalanceResultCodeCreateClaimableBalanceMalformed     CreateClaimableBalanceResultCode = -1
	CreateClaimableBalanceResultCodeCreateClaimableBalanceLowReserve    CreateClaimableBalanceResultCode = -2
	CreateClaimableBalanceResultCodeCreateClaimableBalanceNoTrust       CreateClaimableBalanceResultCode = -3
	CreateClaimableBalanceResultCodeCreateClaimableBalanceNotAuthorized CreateClaimableBalanceResultCode = -4
	CreateClaimableBalanceResultCodeCreateClaimableBalanceUnderfunded   CreateClaimableBalanceResultCode = -5
)

func (*CreateClaimableBalanceResultCode) DecodeFrom

func (e *CreateClaimableBalanceResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (CreateClaimableBalanceResultCode) EncodeTo

func (e CreateClaimableBalanceResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (CreateClaimableBalanceResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (CreateClaimableBalanceResultCode) String

String returns the name of `e`

func (*CreateClaimableBalanceResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (CreateClaimableBalanceResultCode) ValidEnum

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

type CreatePassiveSellOfferOp

type CreatePassiveSellOfferOp struct {
	Selling Asset
	Buying  Asset
	Amount  Int64
	Price   Price
}

CreatePassiveSellOfferOp is an XDR Struct defines as:

struct CreatePassiveSellOfferOp
 {
     Asset selling; // A
     Asset buying;  // B
     int64 amount;  // amount taker gets
     Price price;   // cost of A in terms of B
 };

func (*CreatePassiveSellOfferOp) DecodeFrom

func (s *CreatePassiveSellOfferOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*CreatePassiveSellOfferOp) EncodeTo

func (s *CreatePassiveSellOfferOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (CreatePassiveSellOfferOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*CreatePassiveSellOfferOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CryptoKeyType

type CryptoKeyType int32

CryptoKeyType is an XDR Enum defines as:

enum CryptoKeyType
 {
     KEY_TYPE_ED25519 = 0,
     KEY_TYPE_PRE_AUTH_TX = 1,
     KEY_TYPE_HASH_X = 2,
     KEY_TYPE_ED25519_SIGNED_PAYLOAD = 3,
     // MUXED enum values for supported type are derived from the enum values
     // above by ORing them with 0x100
     KEY_TYPE_MUXED_ED25519 = 0x100
 };
const (
	CryptoKeyTypeKeyTypeEd25519              CryptoKeyType = 0
	CryptoKeyTypeKeyTypePreAuthTx            CryptoKeyType = 1
	CryptoKeyTypeKeyTypeHashX                CryptoKeyType = 2
	CryptoKeyTypeKeyTypeEd25519SignedPayload CryptoKeyType = 3
	CryptoKeyTypeKeyTypeMuxedEd25519         CryptoKeyType = 256
)

func (*CryptoKeyType) DecodeFrom

func (e *CryptoKeyType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (CryptoKeyType) EncodeTo

func (e CryptoKeyType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (CryptoKeyType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (CryptoKeyType) String

func (e CryptoKeyType) String() string

String returns the name of `e`

func (*CryptoKeyType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (CryptoKeyType) ValidEnum

func (e CryptoKeyType) ValidEnum(v int32) bool

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

type Curve25519Public

type Curve25519Public struct {
	Key [32]byte `xdrmaxsize:"32"`
}

Curve25519Public is an XDR Struct defines as:

struct Curve25519Public
 {
     opaque key[32];
 };

func (*Curve25519Public) DecodeFrom

func (s *Curve25519Public) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Curve25519Public) EncodeTo

func (s *Curve25519Public) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Curve25519Public) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Curve25519Public) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Curve25519Secret

type Curve25519Secret struct {
	Key [32]byte `xdrmaxsize:"32"`
}

Curve25519Secret is an XDR Struct defines as:

struct Curve25519Secret
 {
     opaque key[32];
 };

func (*Curve25519Secret) DecodeFrom

func (s *Curve25519Secret) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Curve25519Secret) EncodeTo

func (s *Curve25519Secret) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Curve25519Secret) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Curve25519Secret) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type DataEntry

type DataEntry struct {
	AccountId AccountId
	DataName  String64
	DataValue DataValue
	Ext       DataEntryExt
}

DataEntry is an XDR Struct defines as:

struct DataEntry
 {
     AccountID accountID; // account this data belongs to
     string64 dataName;
     DataValue dataValue;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*DataEntry) DecodeFrom

func (s *DataEntry) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*DataEntry) EncodeTo

func (s *DataEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (DataEntry) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*DataEntry) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type DataEntryExt

type DataEntryExt struct {
	V int32
}

DataEntryExt is an XDR NestedUnion defines as:

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

func NewDataEntryExt

func NewDataEntryExt(v int32, value interface{}) (result DataEntryExt, err error)

NewDataEntryExt creates a new DataEntryExt.

func (DataEntryExt) ArmForSwitch

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

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

func (*DataEntryExt) DecodeFrom

func (u *DataEntryExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (DataEntryExt) EncodeTo

func (u DataEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (DataEntryExt) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (DataEntryExt) SwitchFieldName

func (u DataEntryExt) SwitchFieldName() string

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

func (*DataEntryExt) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type DataValue

type DataValue []byte

DataValue is an XDR Typedef defines as:

typedef opaque DataValue<64>;

func (*DataValue) DecodeFrom

func (s *DataValue) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (DataValue) EncodeTo

func (s DataValue) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (DataValue) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*DataValue) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (DataValue) XDRMaxSize

func (e DataValue) XDRMaxSize() int

XDRMaxSize implements the Sized interface for DataValue

type DecoderFrom

type DecoderFrom interface {
	// contains filtered or unexported methods
}

type DecoratedSignature

type DecoratedSignature struct {
	Hint      SignatureHint
	Signature Signature
}

DecoratedSignature is an XDR Struct defines as:

struct DecoratedSignature
 {
     SignatureHint hint;  // last 4 bytes of the public key, used as a hint
     Signature signature; // actual signature
 };

func NewDecoratedSignature

func NewDecoratedSignature(sig []byte, hint [4]byte) DecoratedSignature

NewDecoratedSignature constructs a decorated signature structure directly from the given signature and hint. Note that the hint should correspond to the signer that created the signature, but this helper cannot ensure that.

func NewDecoratedSignatureForPayload

func NewDecoratedSignatureForPayload(
	sig []byte, keyHint [4]byte, payload []byte,
) DecoratedSignature

NewDecoratedSignatureForPayload creates a decorated signature with a hint that uses the key hint, the last four bytes of signature, and the last four bytes of the input that got signed. Note that the signature should be the signature of the payload via the key being hinted, but this construction method cannot ensure that.

func (*DecoratedSignature) DecodeFrom

func (s *DecoratedSignature) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*DecoratedSignature) EncodeTo

func (s *DecoratedSignature) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (DecoratedSignature) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*DecoratedSignature) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type DontHave

type DontHave struct {
	Type    MessageType
	ReqHash Uint256
}

DontHave is an XDR Struct defines as:

struct DontHave
 {
     MessageType type;
     uint256 reqHash;
 };

func (*DontHave) DecodeFrom

func (s *DontHave) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*DontHave) EncodeTo

func (s *DontHave) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (DontHave) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*DontHave) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Duration

type Duration Uint64

Duration is an XDR Typedef defines as:

typedef uint64 Duration;

func (*Duration) DecodeFrom

func (s *Duration) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Duration) EncodeTo

func (s Duration) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Duration) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Duration) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type EncoderTo

type EncoderTo interface {
	EncodeTo(e *xdr.Encoder) error
}

type EncodingBuffer

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

EncodingBuffer reuses internal buffers between invocations to minimize allocations. For that reason, it is not thread-safe. It intentionally only allows EncodeTo method arguments, to guarantee high performance encoding.

func NewEncodingBuffer

func NewEncodingBuffer() *EncodingBuffer

func (*EncodingBuffer) LedgerKeyUnsafeMarshalBinaryCompress

func (e *EncodingBuffer) LedgerKeyUnsafeMarshalBinaryCompress(key LedgerKey) ([]byte, error)

LedgerKeyUnsafeMarshalBinaryCompress marshals LedgerKey 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!

Optimizations: - Writes a single byte for union discriminants vs 4 bytes. - Removes type and code padding for Asset. - Removes padding for AccountIds

func (*EncodingBuffer) MarshalBase64

func (e *EncodingBuffer) MarshalBase64(encodable EncoderTo) (string, error)

func (*EncodingBuffer) MarshalBinary

func (e *EncodingBuffer) MarshalBinary(encodable EncoderTo) ([]byte, error)

func (*EncodingBuffer) MarshalHex

func (e *EncodingBuffer) MarshalHex(encodable EncoderTo) (string, error)

func (*EncodingBuffer) UnsafeMarshalBase64

func (e *EncodingBuffer) UnsafeMarshalBase64(encodable EncoderTo) ([]byte, error)

UnsafeMarshalBase64 is the base64 version of UnsafeMarshalBinary

func (*EncodingBuffer) UnsafeMarshalBinary

func (e *EncodingBuffer) UnsafeMarshalBinary(encodable EncoderTo) ([]byte, error)

UnsafeMarshalBinary marshals the input XDR binary, returning a slice pointing to the internal buffer. Handled with care this improveds performance since copying is not required. Subsequent calls to marshalling methods will overwrite the returned buffer.

func (*EncodingBuffer) UnsafeMarshalHex

func (e *EncodingBuffer) UnsafeMarshalHex(encodable EncoderTo) ([]byte, error)

UnsafeMarshalHex is the hex version of UnsafeMarshalBinary

type EncryptedBody

type EncryptedBody []byte

EncryptedBody is an XDR Typedef defines as:

typedef opaque EncryptedBody<64000>;

func (*EncryptedBody) DecodeFrom

func (s *EncryptedBody) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (EncryptedBody) EncodeTo

func (s EncryptedBody) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (EncryptedBody) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*EncryptedBody) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (EncryptedBody) XDRMaxSize

func (e EncryptedBody) XDRMaxSize() int

XDRMaxSize implements the Sized interface for EncryptedBody

type EndSponsoringFutureReservesResult

type EndSponsoringFutureReservesResult struct {
	Code EndSponsoringFutureReservesResultCode
}

EndSponsoringFutureReservesResult is an XDR Union defines as:

union EndSponsoringFutureReservesResult switch (
     EndSponsoringFutureReservesResultCode code)
 {
 case END_SPONSORING_FUTURE_RESERVES_SUCCESS:
     void;
 default:
     void;
 };

func NewEndSponsoringFutureReservesResult

func NewEndSponsoringFutureReservesResult(code EndSponsoringFutureReservesResultCode, value interface{}) (result EndSponsoringFutureReservesResult, err error)

NewEndSponsoringFutureReservesResult creates a new EndSponsoringFutureReservesResult.

func (EndSponsoringFutureReservesResult) ArmForSwitch

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

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

func (*EndSponsoringFutureReservesResult) DecodeFrom

func (u *EndSponsoringFutureReservesResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (EndSponsoringFutureReservesResult) EncodeTo

func (u EndSponsoringFutureReservesResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (EndSponsoringFutureReservesResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (EndSponsoringFutureReservesResult) SwitchFieldName

func (u EndSponsoringFutureReservesResult) SwitchFieldName() string

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

func (*EndSponsoringFutureReservesResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type EndSponsoringFutureReservesResultCode

type EndSponsoringFutureReservesResultCode int32

EndSponsoringFutureReservesResultCode is an XDR Enum defines as:

enum EndSponsoringFutureReservesResultCode
 {
     // codes considered as "success" for the operation
     END_SPONSORING_FUTURE_RESERVES_SUCCESS = 0,

     // codes considered as "failure" for the operation
     END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED = -1
 };
const (
	EndSponsoringFutureReservesResultCodeEndSponsoringFutureReservesSuccess      EndSponsoringFutureReservesResultCode = 0
	EndSponsoringFutureReservesResultCodeEndSponsoringFutureReservesNotSponsored EndSponsoringFutureReservesResultCode = -1
)

func (*EndSponsoringFutureReservesResultCode) DecodeFrom

func (e *EndSponsoringFutureReservesResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (EndSponsoringFutureReservesResultCode) EncodeTo

func (e EndSponsoringFutureReservesResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (EndSponsoringFutureReservesResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (EndSponsoringFutureReservesResultCode) String

String returns the name of `e`

func (*EndSponsoringFutureReservesResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (EndSponsoringFutureReservesResultCode) ValidEnum

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

type EnvelopeType

type EnvelopeType int32

EnvelopeType is an XDR Enum defines as:

enum EnvelopeType
 {
     ENVELOPE_TYPE_TX_V0 = 0,
     ENVELOPE_TYPE_SCP = 1,
     ENVELOPE_TYPE_TX = 2,
     ENVELOPE_TYPE_AUTH = 3,
     ENVELOPE_TYPE_SCPVALUE = 4,
     ENVELOPE_TYPE_TX_FEE_BUMP = 5,
     ENVELOPE_TYPE_OP_ID = 6,
     ENVELOPE_TYPE_POOL_REVOKE_OP_ID = 7
 };
const (
	EnvelopeTypeEnvelopeTypeTxV0           EnvelopeType = 0
	EnvelopeTypeEnvelopeTypeScp            EnvelopeType = 1
	EnvelopeTypeEnvelopeTypeTx             EnvelopeType = 2
	EnvelopeTypeEnvelopeTypeAuth           EnvelopeType = 3
	EnvelopeTypeEnvelopeTypeScpvalue       EnvelopeType = 4
	EnvelopeTypeEnvelopeTypeTxFeeBump      EnvelopeType = 5
	EnvelopeTypeEnvelopeTypeOpId           EnvelopeType = 6
	EnvelopeTypeEnvelopeTypePoolRevokeOpId EnvelopeType = 7
)

func (*EnvelopeType) DecodeFrom

func (e *EnvelopeType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (EnvelopeType) EncodeTo

func (e EnvelopeType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (EnvelopeType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (EnvelopeType) String

func (e EnvelopeType) String() string

String returns the name of `e`

func (*EnvelopeType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (EnvelopeType) ValidEnum

func (e EnvelopeType) ValidEnum(v int32) bool

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

type Error

type Error struct {
	Code ErrorCode
	Msg  string `xdrmaxsize:"100"`
}

Error is an XDR Struct defines as:

struct Error
 {
     ErrorCode code;
     string msg<100>;
 };

func (*Error) DecodeFrom

func (s *Error) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Error) EncodeTo

func (s *Error) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Error) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Error) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ErrorCode

type ErrorCode int32

ErrorCode is an XDR Enum defines as:

enum ErrorCode
 {
     ERR_MISC = 0, // Unspecific error
     ERR_DATA = 1, // Malformed data
     ERR_CONF = 2, // Misconfiguration error
     ERR_AUTH = 3, // Authentication failure
     ERR_LOAD = 4  // System overloaded
 };
const (
	ErrorCodeErrMisc ErrorCode = 0
	ErrorCodeErrData ErrorCode = 1
	ErrorCodeErrConf ErrorCode = 2
	ErrorCodeErrAuth ErrorCode = 3
	ErrorCodeErrLoad ErrorCode = 4
)

func (*ErrorCode) DecodeFrom

func (e *ErrorCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ErrorCode) EncodeTo

func (e ErrorCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ErrorCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ErrorCode) String

func (e ErrorCode) String() string

String returns the name of `e`

func (*ErrorCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ErrorCode) ValidEnum

func (e ErrorCode) ValidEnum(v int32) bool

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

type ExtensionPoint

type ExtensionPoint struct {
	V int32
}

ExtensionPoint is an XDR Union defines as:

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

func NewExtensionPoint

func NewExtensionPoint(v int32, value interface{}) (result ExtensionPoint, err error)

NewExtensionPoint creates a new ExtensionPoint.

func (ExtensionPoint) ArmForSwitch

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

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

func (*ExtensionPoint) DecodeFrom

func (u *ExtensionPoint) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ExtensionPoint) EncodeTo

func (u ExtensionPoint) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ExtensionPoint) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ExtensionPoint) SwitchFieldName

func (u ExtensionPoint) SwitchFieldName() string

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

func (*ExtensionPoint) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type FeeBumpTransaction

type FeeBumpTransaction struct {
	FeeSource MuxedAccount
	Fee       Int64
	InnerTx   FeeBumpTransactionInnerTx
	Ext       FeeBumpTransactionExt
}

FeeBumpTransaction is an XDR Struct defines as:

struct FeeBumpTransaction
 {
     MuxedAccount feeSource;
     int64 fee;
     union switch (EnvelopeType type)
     {
     case ENVELOPE_TYPE_TX:
         TransactionV1Envelope v1;
     }
     innerTx;
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*FeeBumpTransaction) DecodeFrom

func (s *FeeBumpTransaction) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*FeeBumpTransaction) EncodeTo

func (s *FeeBumpTransaction) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (FeeBumpTransaction) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*FeeBumpTransaction) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type FeeBumpTransactionEnvelope

type FeeBumpTransactionEnvelope struct {
	Tx         FeeBumpTransaction
	Signatures []DecoratedSignature `xdrmaxsize:"20"`
}

FeeBumpTransactionEnvelope is an XDR Struct defines as:

struct FeeBumpTransactionEnvelope
 {
     FeeBumpTransaction tx;
     /* Each decorated signature is a signature over the SHA256 hash of
      * a TransactionSignaturePayload */
     DecoratedSignature signatures<20>;
 };

func (*FeeBumpTransactionEnvelope) DecodeFrom

func (s *FeeBumpTransactionEnvelope) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*FeeBumpTransactionEnvelope) EncodeTo

func (s *FeeBumpTransactionEnvelope) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (FeeBumpTransactionEnvelope) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*FeeBumpTransactionEnvelope) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type FeeBumpTransactionExt

type FeeBumpTransactionExt struct {
	V int32
}

FeeBumpTransactionExt is an XDR NestedUnion defines as:

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

func NewFeeBumpTransactionExt

func NewFeeBumpTransactionExt(v int32, value interface{}) (result FeeBumpTransactionExt, err error)

NewFeeBumpTransactionExt creates a new FeeBumpTransactionExt.

func (FeeBumpTransactionExt) ArmForSwitch

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

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

func (*FeeBumpTransactionExt) DecodeFrom

func (u *FeeBumpTransactionExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (FeeBumpTransactionExt) EncodeTo

func (u FeeBumpTransactionExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (FeeBumpTransactionExt) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (FeeBumpTransactionExt) SwitchFieldName

func (u FeeBumpTransactionExt) SwitchFieldName() string

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

func (*FeeBumpTransactionExt) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type FeeBumpTransactionInnerTx

type FeeBumpTransactionInnerTx struct {
	Type EnvelopeType
	V1   *TransactionV1Envelope
}

FeeBumpTransactionInnerTx is an XDR NestedUnion defines as:

union switch (EnvelopeType type)
     {
     case ENVELOPE_TYPE_TX:
         TransactionV1Envelope v1;
     }

func NewFeeBumpTransactionInnerTx

func NewFeeBumpTransactionInnerTx(aType EnvelopeType, value interface{}) (result FeeBumpTransactionInnerTx, err error)

NewFeeBumpTransactionInnerTx creates a new FeeBumpTransactionInnerTx.

func (FeeBumpTransactionInnerTx) ArmForSwitch

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

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

func (*FeeBumpTransactionInnerTx) DecodeFrom

func (u *FeeBumpTransactionInnerTx) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (FeeBumpTransactionInnerTx) EncodeTo

func (u FeeBumpTransactionInnerTx) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (FeeBumpTransactionInnerTx) GetV1

func (u FeeBumpTransactionInnerTx) GetV1() (result TransactionV1Envelope, ok bool)

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

func (FeeBumpTransactionInnerTx) GoString

func (e FeeBumpTransactionInnerTx) GoString() string

GoString implements fmt.GoStringer.

func (FeeBumpTransactionInnerTx) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (FeeBumpTransactionInnerTx) MustV1

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

func (FeeBumpTransactionInnerTx) SwitchFieldName

func (u FeeBumpTransactionInnerTx) SwitchFieldName() string

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

func (*FeeBumpTransactionInnerTx) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Hash

type Hash [32]byte

Hash is an XDR Typedef defines as:

typedef opaque Hash[32];

func (*Hash) DecodeFrom

func (s *Hash) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Hash) EncodeTo

func (s *Hash) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Hash) HexString

func (h Hash) HexString() string

func (Hash) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Hash) Scan

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

Scan reads from a src into an xdr.Hash

func (*Hash) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (Hash) XDRMaxSize

func (e Hash) XDRMaxSize() int

XDRMaxSize implements the Sized interface for Hash

type HashIdPreimage

type HashIdPreimage struct {
	Type        EnvelopeType
	OperationId *HashIdPreimageOperationId
	RevokeId    *HashIdPreimageRevokeId
}

HashIdPreimage is an XDR Union defines as:

union HashIDPreimage switch (EnvelopeType type)
 {
 case ENVELOPE_TYPE_OP_ID:
     struct
     {
         AccountID sourceAccount;
         SequenceNumber seqNum;
         uint32 opNum;
     } operationID;
 case ENVELOPE_TYPE_POOL_REVOKE_OP_ID:
     struct
     {
         AccountID sourceAccount;
         SequenceNumber seqNum;
         uint32 opNum;
         PoolID liquidityPoolID;
         Asset asset;
     } revokeID;
 };

func NewHashIdPreimage

func NewHashIdPreimage(aType EnvelopeType, value interface{}) (result HashIdPreimage, err error)

NewHashIdPreimage creates a new HashIdPreimage.

func (HashIdPreimage) ArmForSwitch

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

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

func (*HashIdPreimage) DecodeFrom

func (u *HashIdPreimage) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (HashIdPreimage) EncodeTo

func (u HashIdPreimage) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (HashIdPreimage) GetOperationId

func (u HashIdPreimage) GetOperationId() (result HashIdPreimageOperationId, ok bool)

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

func (HashIdPreimage) GetRevokeId

func (u HashIdPreimage) GetRevokeId() (result HashIdPreimageRevokeId, ok bool)

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

func (HashIdPreimage) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (HashIdPreimage) MustOperationId

func (u HashIdPreimage) MustOperationId() HashIdPreimageOperationId

MustOperationId retrieves the OperationId value from the union, panicing if the value is not set.

func (HashIdPreimage) MustRevokeId

func (u HashIdPreimage) MustRevokeId() HashIdPreimageRevokeId

MustRevokeId retrieves the RevokeId value from the union, panicing if the value is not set.

func (HashIdPreimage) SwitchFieldName

func (u HashIdPreimage) SwitchFieldName() string

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

func (*HashIdPreimage) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type HashIdPreimageOperationId

type HashIdPreimageOperationId struct {
	SourceAccount AccountId
	SeqNum        SequenceNumber
	OpNum         Uint32
}

HashIdPreimageOperationId is an XDR NestedStruct defines as:

struct
     {
         AccountID sourceAccount;
         SequenceNumber seqNum;
         uint32 opNum;
     }

func (*HashIdPreimageOperationId) DecodeFrom

func (s *HashIdPreimageOperationId) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*HashIdPreimageOperationId) EncodeTo

func (s *HashIdPreimageOperationId) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (HashIdPreimageOperationId) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*HashIdPreimageOperationId) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type HashIdPreimageRevokeId

type HashIdPreimageRevokeId struct {
	SourceAccount   AccountId
	SeqNum          SequenceNumber
	OpNum           Uint32
	LiquidityPoolId PoolId
	Asset           Asset
}

HashIdPreimageRevokeId is an XDR NestedStruct defines as:

struct
     {
         AccountID sourceAccount;
         SequenceNumber seqNum;
         uint32 opNum;
         PoolID liquidityPoolID;
         Asset asset;
     }

func (*HashIdPreimageRevokeId) DecodeFrom

func (s *HashIdPreimageRevokeId) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*HashIdPreimageRevokeId) EncodeTo

func (s *HashIdPreimageRevokeId) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (HashIdPreimageRevokeId) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*HashIdPreimageRevokeId) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Hello

type Hello struct {
	LedgerVersion     Uint32
	OverlayVersion    Uint32
	OverlayMinVersion Uint32
	NetworkId         Hash
	VersionStr        string `xdrmaxsize:"100"`
	ListeningPort     int32
	PeerId            NodeId
	Cert              AuthCert
	Nonce             Uint256
}

Hello is an XDR Struct defines as:

struct Hello
 {
     uint32 ledgerVersion;
     uint32 overlayVersion;
     uint32 overlayMinVersion;
     Hash networkID;
     string versionStr<100>;
     int listeningPort;
     NodeID peerID;
     AuthCert cert;
     uint256 nonce;
 };

func (*Hello) DecodeFrom

func (s *Hello) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Hello) EncodeTo

func (s *Hello) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Hello) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Hello) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type HmacSha256Key

type HmacSha256Key struct {
	Key [32]byte `xdrmaxsize:"32"`
}

HmacSha256Key is an XDR Struct defines as:

struct HmacSha256Key
 {
     opaque key[32];
 };

func (*HmacSha256Key) DecodeFrom

func (s *HmacSha256Key) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*HmacSha256Key) EncodeTo

func (s *HmacSha256Key) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (HmacSha256Key) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*HmacSha256Key) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type HmacSha256Mac

type HmacSha256Mac struct {
	Mac [32]byte `xdrmaxsize:"32"`
}

HmacSha256Mac is an XDR Struct defines as:

struct HmacSha256Mac
 {
     opaque mac[32];
 };

func (*HmacSha256Mac) DecodeFrom

func (s *HmacSha256Mac) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*HmacSha256Mac) EncodeTo

func (s *HmacSha256Mac) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (HmacSha256Mac) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*HmacSha256Mac) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InflationPayout

type InflationPayout struct {
	Destination AccountId
	Amount      Int64
}

InflationPayout is an XDR Struct defines as:

struct InflationPayout // or use PaymentResultAtom to limit types?
 {
     AccountID destination;
     int64 amount;
 };

func (*InflationPayout) DecodeFrom

func (s *InflationPayout) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*InflationPayout) EncodeTo

func (s *InflationPayout) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InflationPayout) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*InflationPayout) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InflationResult

type InflationResult struct {
	Code    InflationResultCode
	Payouts *[]InflationPayout
}

InflationResult is an XDR Union defines as:

union InflationResult switch (InflationResultCode code)
 {
 case INFLATION_SUCCESS:
     InflationPayout payouts<>;
 default:
     void;
 };

func NewInflationResult

func NewInflationResult(code InflationResultCode, value interface{}) (result InflationResult, err error)

NewInflationResult creates a new InflationResult.

func (InflationResult) ArmForSwitch

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

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

func (*InflationResult) DecodeFrom

func (u *InflationResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (InflationResult) EncodeTo

func (u InflationResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InflationResult) GetPayouts

func (u InflationResult) GetPayouts() (result []InflationPayout, ok bool)

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

func (InflationResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (InflationResult) MustPayouts

func (u InflationResult) MustPayouts() []InflationPayout

MustPayouts retrieves the Payouts value from the union, panicing if the value is not set.

func (InflationResult) SwitchFieldName

func (u InflationResult) SwitchFieldName() string

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

func (*InflationResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InflationResultCode

type InflationResultCode int32

InflationResultCode is an XDR Enum defines as:

enum InflationResultCode
 {
     // codes considered as "success" for the operation
     INFLATION_SUCCESS = 0,
     // codes considered as "failure" for the operation
     INFLATION_NOT_TIME = -1
 };
const (
	InflationResultCodeInflationSuccess InflationResultCode = 0
	InflationResultCodeInflationNotTime InflationResultCode = -1
)

func (*InflationResultCode) DecodeFrom

func (e *InflationResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (InflationResultCode) EncodeTo

func (e InflationResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InflationResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (InflationResultCode) String

func (e InflationResultCode) String() string

String returns the name of `e`

func (*InflationResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (InflationResultCode) ValidEnum

func (e InflationResultCode) ValidEnum(v int32) bool

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

type InnerTransactionResult

type InnerTransactionResult struct {
	FeeCharged Int64
	Result     InnerTransactionResultResult
	Ext        InnerTransactionResultExt
}

InnerTransactionResult is an XDR Struct defines as:

struct InnerTransactionResult
 {
     // Always 0. Here for binary compatibility.
     int64 feeCharged;

     union switch (TransactionResultCode code)
     {
     // txFEE_BUMP_INNER_SUCCESS is not included
     case txSUCCESS:
     case txFAILED:
         OperationResult results<>;
     case txTOO_EARLY:
     case txTOO_LATE:
     case txMISSING_OPERATION:
     case txBAD_SEQ:
     case txBAD_AUTH:
     case txINSUFFICIENT_BALANCE:
     case txNO_ACCOUNT:
     case txINSUFFICIENT_FEE:
     case txBAD_AUTH_EXTRA:
     case txINTERNAL_ERROR:
     case txNOT_SUPPORTED:
     // txFEE_BUMP_INNER_FAILED is not included
     case txBAD_SPONSORSHIP:
     case txBAD_MIN_SEQ_AGE_OR_GAP:
     case txMALFORMED:
         void;
     }
     result;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*InnerTransactionResult) DecodeFrom

func (s *InnerTransactionResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*InnerTransactionResult) EncodeTo

func (s *InnerTransactionResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InnerTransactionResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*InnerTransactionResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InnerTransactionResultExt

type InnerTransactionResultExt struct {
	V int32
}

InnerTransactionResultExt is an XDR NestedUnion defines as:

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

func NewInnerTransactionResultExt

func NewInnerTransactionResultExt(v int32, value interface{}) (result InnerTransactionResultExt, err error)

NewInnerTransactionResultExt creates a new InnerTransactionResultExt.

func (InnerTransactionResultExt) ArmForSwitch

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

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

func (*InnerTransactionResultExt) DecodeFrom

func (u *InnerTransactionResultExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (InnerTransactionResultExt) EncodeTo

func (u InnerTransactionResultExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InnerTransactionResultExt) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (InnerTransactionResultExt) SwitchFieldName

func (u InnerTransactionResultExt) SwitchFieldName() string

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

func (*InnerTransactionResultExt) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InnerTransactionResultPair

type InnerTransactionResultPair struct {
	TransactionHash Hash
	Result          InnerTransactionResult
}

InnerTransactionResultPair is an XDR Struct defines as:

struct InnerTransactionResultPair
 {
     Hash transactionHash;          // hash of the inner transaction
     InnerTransactionResult result; // result for the inner transaction
 };

func (*InnerTransactionResultPair) DecodeFrom

func (s *InnerTransactionResultPair) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*InnerTransactionResultPair) EncodeTo

func (s *InnerTransactionResultPair) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InnerTransactionResultPair) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*InnerTransactionResultPair) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InnerTransactionResultResult

type InnerTransactionResultResult struct {
	Code    TransactionResultCode
	Results *[]OperationResult
}

InnerTransactionResultResult is an XDR NestedUnion defines as:

union switch (TransactionResultCode code)
     {
     // txFEE_BUMP_INNER_SUCCESS is not included
     case txSUCCESS:
     case txFAILED:
         OperationResult results<>;
     case txTOO_EARLY:
     case txTOO_LATE:
     case txMISSING_OPERATION:
     case txBAD_SEQ:
     case txBAD_AUTH:
     case txINSUFFICIENT_BALANCE:
     case txNO_ACCOUNT:
     case txINSUFFICIENT_FEE:
     case txBAD_AUTH_EXTRA:
     case txINTERNAL_ERROR:
     case txNOT_SUPPORTED:
     // txFEE_BUMP_INNER_FAILED is not included
     case txBAD_SPONSORSHIP:
     case txBAD_MIN_SEQ_AGE_OR_GAP:
     case txMALFORMED:
         void;
     }

func NewInnerTransactionResultResult

func NewInnerTransactionResultResult(code TransactionResultCode, value interface{}) (result InnerTransactionResultResult, err error)

NewInnerTransactionResultResult creates a new InnerTransactionResultResult.

func (InnerTransactionResultResult) ArmForSwitch

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

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

func (*InnerTransactionResultResult) DecodeFrom

func (u *InnerTransactionResultResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (InnerTransactionResultResult) EncodeTo

func (u InnerTransactionResultResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InnerTransactionResultResult) GetResults

func (u InnerTransactionResultResult) GetResults() (result []OperationResult, ok bool)

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

func (InnerTransactionResultResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (InnerTransactionResultResult) MustResults

MustResults retrieves the Results value from the union, panicing if the value is not set.

func (InnerTransactionResultResult) SwitchFieldName

func (u InnerTransactionResultResult) SwitchFieldName() string

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

func (*InnerTransactionResultResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Int32

type Int32 int32

Int32 is an XDR Typedef defines as:

typedef int int32;

func (*Int32) DecodeFrom

func (s *Int32) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Int32) EncodeTo

func (s Int32) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Int32) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Int32) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Int64

type Int64 int64

Int64 is an XDR Typedef defines as:

typedef hyper int64;

func (*Int64) DecodeFrom

func (s *Int64) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Int64) EncodeTo

func (s Int64) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Int64) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Int64) Scan

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

Scan reads from src into an Int64

func (*Int64) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type IpAddrType

type IpAddrType int32

IpAddrType is an XDR Enum defines as:

enum IPAddrType
 {
     IPv4 = 0,
     IPv6 = 1
 };
const (
	IpAddrTypeIPv4 IpAddrType = 0
	IpAddrTypeIPv6 IpAddrType = 1
)

func (*IpAddrType) DecodeFrom

func (e *IpAddrType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (IpAddrType) EncodeTo

func (e IpAddrType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (IpAddrType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (IpAddrType) String

func (e IpAddrType) String() string

String returns the name of `e`

func (*IpAddrType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (IpAddrType) ValidEnum

func (e IpAddrType) ValidEnum(v int32) bool

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

type Keyer

type Keyer interface {
	LedgerKey() LedgerKey
}

Keyer represents a type that can be converted into a LedgerKey

type LedgerBounds

type LedgerBounds struct {
	MinLedger Uint32
	MaxLedger Uint32
}

LedgerBounds is an XDR Struct defines as:

struct LedgerBounds
 {
     uint32 minLedger;
     uint32 maxLedger; // 0 here means no maxLedger
 };

func (*LedgerBounds) DecodeFrom

func (s *LedgerBounds) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerBounds) EncodeTo

func (s *LedgerBounds) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerBounds) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerBounds) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerCloseMeta

type LedgerCloseMeta struct {
	V  int32
	V0 *LedgerCloseMetaV0
}

LedgerCloseMeta is an XDR Union defines as:

union LedgerCloseMeta switch (int v)
 {
 case 0:
     LedgerCloseMetaV0 v0;
 };

func NewLedgerCloseMeta

func NewLedgerCloseMeta(v int32, value interface{}) (result LedgerCloseMeta, err error)

NewLedgerCloseMeta creates a new LedgerCloseMeta.

func (LedgerCloseMeta) ArmForSwitch

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

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

func (LedgerCloseMeta) BucketListHash

func (l LedgerCloseMeta) BucketListHash() Hash

func (*LedgerCloseMeta) DecodeFrom

func (u *LedgerCloseMeta) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerCloseMeta) EncodeTo

func (u LedgerCloseMeta) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerCloseMeta) GetV0

func (u LedgerCloseMeta) GetV0() (result LedgerCloseMetaV0, ok bool)

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

func (LedgerCloseMeta) LedgerHash

func (l LedgerCloseMeta) LedgerHash() Hash

func (LedgerCloseMeta) LedgerSequence

func (l LedgerCloseMeta) LedgerSequence() uint32

func (LedgerCloseMeta) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerCloseMeta) MustV0

MustV0 retrieves the V0 value from the union, panicing if the value is not set.

func (LedgerCloseMeta) PreviousLedgerHash

func (l LedgerCloseMeta) PreviousLedgerHash() Hash

func (LedgerCloseMeta) ProtocolVersion

func (l LedgerCloseMeta) ProtocolVersion() uint32

func (LedgerCloseMeta) SwitchFieldName

func (u LedgerCloseMeta) SwitchFieldName() string

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

func (*LedgerCloseMeta) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerCloseMetaV0

type LedgerCloseMetaV0 struct {
	LedgerHeader       LedgerHeaderHistoryEntry
	TxSet              TransactionSet
	TxProcessing       []TransactionResultMeta
	UpgradesProcessing []UpgradeEntryMeta
	ScpInfo            []ScpHistoryEntry
}

LedgerCloseMetaV0 is an XDR Struct defines as:

struct LedgerCloseMetaV0
 {
     LedgerHeaderHistoryEntry ledgerHeader;
     // NB: txSet is sorted in "Hash order"
     TransactionSet txSet;

     // NB: transactions are sorted in apply order here
     // fees for all transactions are processed first
     // followed by applying transactions
     TransactionResultMeta txProcessing<>;

     // upgrades are applied last
     UpgradeEntryMeta upgradesProcessing<>;

     // other misc information attached to the ledger close
     SCPHistoryEntry scpInfo<>;
 };

func (*LedgerCloseMetaV0) DecodeFrom

func (s *LedgerCloseMetaV0) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerCloseMetaV0) EncodeTo

func (s *LedgerCloseMetaV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerCloseMetaV0) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerCloseMetaV0) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerCloseValueSignature

type LedgerCloseValueSignature struct {
	NodeId    NodeId
	Signature Signature
}

LedgerCloseValueSignature is an XDR Struct defines as:

struct LedgerCloseValueSignature
 {
     NodeID nodeID;       // which node introduced the value
     Signature signature; // nodeID's signature
 };

func (*LedgerCloseValueSignature) DecodeFrom

func (s *LedgerCloseValueSignature) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerCloseValueSignature) EncodeTo

func (s *LedgerCloseValueSignature) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerCloseValueSignature) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerCloseValueSignature) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntry

type LedgerEntry struct {
	LastModifiedLedgerSeq Uint32
	Data                  LedgerEntryData
	Ext                   LedgerEntryExt
}

LedgerEntry is an XDR Struct defines as:

struct LedgerEntry
 {
     uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed

     union switch (LedgerEntryType type)
     {
     case ACCOUNT:
         AccountEntry account;
     case TRUSTLINE:
         TrustLineEntry trustLine;
     case OFFER:
         OfferEntry offer;
     case DATA:
         DataEntry data;
     case CLAIMABLE_BALANCE:
         ClaimableBalanceEntry claimableBalance;
     case LIQUIDITY_POOL:
         LiquidityPoolEntry liquidityPool;
     }
     data;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     case 1:
         LedgerEntryExtensionV1 v1;
     }
     ext;
 };

func (*LedgerEntry) DecodeFrom

func (s *LedgerEntry) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerEntry) EncodeTo

func (s *LedgerEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*LedgerEntry) LedgerKey

func (entry *LedgerEntry) LedgerKey() LedgerKey

LedgerKey implements the `Keyer` interface

func (LedgerEntry) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerEntry) Normalize

func (entry *LedgerEntry) Normalize() *LedgerEntry

Normalize overwrites LedgerEntry with all the extensions set to default values (if extension is not present). This is helpful to compare two ledger entries that are the same but for one of them extensions are not set. Returns the same entry.

func (*LedgerEntry) SponsoringID

func (entry *LedgerEntry) SponsoringID() SponsorshipDescriptor

SponsoringID return SponsorshipDescriptor for a given ledger entry

func (*LedgerEntry) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryChange

type LedgerEntryChange struct {
	Type    LedgerEntryChangeType
	Created *LedgerEntry
	Updated *LedgerEntry
	Removed *LedgerKey
	State   *LedgerEntry
}

LedgerEntryChange is an XDR Union defines as:

union LedgerEntryChange switch (LedgerEntryChangeType type)
 {
 case LEDGER_ENTRY_CREATED:
     LedgerEntry created;
 case LEDGER_ENTRY_UPDATED:
     LedgerEntry updated;
 case LEDGER_ENTRY_REMOVED:
     LedgerKey removed;
 case LEDGER_ENTRY_STATE:
     LedgerEntry state;
 };

func NewLedgerEntryChange

func NewLedgerEntryChange(aType LedgerEntryChangeType, value interface{}) (result LedgerEntryChange, err error)

NewLedgerEntryChange creates a new LedgerEntryChange.

func (LedgerEntryChange) ArmForSwitch

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

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

func (*LedgerEntryChange) DecodeFrom

func (u *LedgerEntryChange) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerEntryChange) EncodeTo

func (u LedgerEntryChange) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*LedgerEntryChange) EntryType

func (change *LedgerEntryChange) EntryType() LedgerEntryType

EntryType is a helper to get at the entry type for a change.

func (LedgerEntryChange) GetCreated

func (u LedgerEntryChange) GetCreated() (result LedgerEntry, ok bool)

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

func (*LedgerEntryChange) GetLedgerEntry

func (change *LedgerEntryChange) GetLedgerEntry() (LedgerEntry, bool)

GetLedgerEntry returns the ledger entry that was changed in `change`, along with a boolean indicating whether the entry value was valid.

func (LedgerEntryChange) GetRemoved

func (u LedgerEntryChange) GetRemoved() (result LedgerKey, ok bool)

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

func (LedgerEntryChange) GetState

func (u LedgerEntryChange) GetState() (result LedgerEntry, ok bool)

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

func (LedgerEntryChange) GetUpdated

func (u LedgerEntryChange) GetUpdated() (result LedgerEntry, ok bool)

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

func (*LedgerEntryChange) LedgerKey

func (change *LedgerEntryChange) LedgerKey() LedgerKey

LedgerKey returns the key for the ledger entry that was changed in `change`.

func (LedgerEntryChange) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryChange) MarshalBinaryBase64

func (change LedgerEntryChange) MarshalBinaryBase64() (string, error)

MarshalBinaryBase64 marshals XDR into a binary form and then encodes it using base64.

func (LedgerEntryChange) MustCreated

func (u LedgerEntryChange) MustCreated() LedgerEntry

MustCreated retrieves the Created value from the union, panicing if the value is not set.

func (LedgerEntryChange) MustRemoved

func (u LedgerEntryChange) MustRemoved() LedgerKey

MustRemoved retrieves the Removed value from the union, panicing if the value is not set.

func (LedgerEntryChange) MustState

func (u LedgerEntryChange) MustState() LedgerEntry

MustState retrieves the State value from the union, panicing if the value is not set.

func (LedgerEntryChange) MustUpdated

func (u LedgerEntryChange) MustUpdated() LedgerEntry

MustUpdated retrieves the Updated value from the union, panicing if the value is not set.

func (LedgerEntryChange) SwitchFieldName

func (u LedgerEntryChange) SwitchFieldName() string

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

func (*LedgerEntryChange) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryChangeType

type LedgerEntryChangeType int32

LedgerEntryChangeType is an XDR Enum defines as:

enum LedgerEntryChangeType
 {
     LEDGER_ENTRY_CREATED = 0, // entry was added to the ledger
     LEDGER_ENTRY_UPDATED = 1, // entry was modified in the ledger
     LEDGER_ENTRY_REMOVED = 2, // entry was removed from the ledger
     LEDGER_ENTRY_STATE = 3    // value of the entry
 };
const (
	LedgerEntryChangeTypeLedgerEntryCreated LedgerEntryChangeType = 0
	LedgerEntryChangeTypeLedgerEntryUpdated LedgerEntryChangeType = 1
	LedgerEntryChangeTypeLedgerEntryRemoved LedgerEntryChangeType = 2
	LedgerEntryChangeTypeLedgerEntryState   LedgerEntryChangeType = 3
)

func (*LedgerEntryChangeType) DecodeFrom

func (e *LedgerEntryChangeType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerEntryChangeType) EncodeTo

func (e LedgerEntryChangeType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerEntryChangeType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryChangeType) String

func (e LedgerEntryChangeType) String() string

String returns the name of `e`

func (*LedgerEntryChangeType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LedgerEntryChangeType) ValidEnum

func (e LedgerEntryChangeType) ValidEnum(v int32) bool

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

type LedgerEntryChanges

type LedgerEntryChanges []LedgerEntryChange

LedgerEntryChanges is an XDR Typedef defines as:

typedef LedgerEntryChange LedgerEntryChanges<>;

func (*LedgerEntryChanges) DecodeFrom

func (s *LedgerEntryChanges) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerEntryChanges) EncodeTo

func (s LedgerEntryChanges) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerEntryChanges) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerEntryChanges) Scan

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

Scan reads from src into an LedgerEntryChanges struct

func (*LedgerEntryChanges) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryData

type LedgerEntryData struct {
	Type             LedgerEntryType
	Account          *AccountEntry
	TrustLine        *TrustLineEntry
	Offer            *OfferEntry
	Data             *DataEntry
	ClaimableBalance *ClaimableBalanceEntry
	LiquidityPool    *LiquidityPoolEntry
}

LedgerEntryData is an XDR NestedUnion defines as:

union switch (LedgerEntryType type)
     {
     case ACCOUNT:
         AccountEntry account;
     case TRUSTLINE:
         TrustLineEntry trustLine;
     case OFFER:
         OfferEntry offer;
     case DATA:
         DataEntry data;
     case CLAIMABLE_BALANCE:
         ClaimableBalanceEntry claimableBalance;
     case LIQUIDITY_POOL:
         LiquidityPoolEntry liquidityPool;
     }

func NewLedgerEntryData

func NewLedgerEntryData(aType LedgerEntryType, value interface{}) (result LedgerEntryData, err error)

NewLedgerEntryData creates a new LedgerEntryData.

func (LedgerEntryData) ArmForSwitch

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

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

func (*LedgerEntryData) DecodeFrom

func (u *LedgerEntryData) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerEntryData) EncodeTo

func (u LedgerEntryData) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerEntryData) GetAccount

func (u LedgerEntryData) GetAccount() (result AccountEntry, ok bool)

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

func (LedgerEntryData) GetClaimableBalance

func (u LedgerEntryData) GetClaimableBalance() (result ClaimableBalanceEntry, ok bool)

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

func (LedgerEntryData) GetData

func (u LedgerEntryData) GetData() (result DataEntry, ok bool)

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

func (LedgerEntryData) GetLiquidityPool

func (u LedgerEntryData) GetLiquidityPool() (result LiquidityPoolEntry, ok bool)

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

func (LedgerEntryData) GetOffer

func (u LedgerEntryData) GetOffer() (result OfferEntry, ok bool)

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

func (LedgerEntryData) GetTrustLine

func (u LedgerEntryData) GetTrustLine() (result TrustLineEntry, ok bool)

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

func (LedgerEntryData) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryData) MustAccount

func (u LedgerEntryData) MustAccount() AccountEntry

MustAccount retrieves the Account value from the union, panicing if the value is not set.

func (LedgerEntryData) MustClaimableBalance

func (u LedgerEntryData) MustClaimableBalance() ClaimableBalanceEntry

MustClaimableBalance retrieves the ClaimableBalance value from the union, panicing if the value is not set.

func (LedgerEntryData) MustData

func (u LedgerEntryData) MustData() DataEntry

MustData retrieves the Data value from the union, panicing if the value is not set.

func (LedgerEntryData) MustLiquidityPool

func (u LedgerEntryData) MustLiquidityPool() LiquidityPoolEntry

MustLiquidityPool retrieves the LiquidityPool value from the union, panicing if the value is not set.

func (LedgerEntryData) MustOffer

func (u LedgerEntryData) MustOffer() OfferEntry

MustOffer retrieves the Offer value from the union, panicing if the value is not set.

func (LedgerEntryData) MustTrustLine

func (u LedgerEntryData) MustTrustLine() TrustLineEntry

MustTrustLine retrieves the TrustLine value from the union, panicing if the value is not set.

func (LedgerEntryData) SwitchFieldName

func (u LedgerEntryData) SwitchFieldName() string

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

func (*LedgerEntryData) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryExt

type LedgerEntryExt struct {
	V  int32
	V1 *LedgerEntryExtensionV1
}

LedgerEntryExt is an XDR NestedUnion defines as:

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

func NewLedgerEntryExt

func NewLedgerEntryExt(v int32, value interface{}) (result LedgerEntryExt, err error)

NewLedgerEntryExt creates a new LedgerEntryExt.

func (LedgerEntryExt) ArmForSwitch

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

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

func (*LedgerEntryExt) DecodeFrom

func (u *LedgerEntryExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerEntryExt) EncodeTo

func (u LedgerEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerEntryExt) GetV1

func (u LedgerEntryExt) GetV1() (result LedgerEntryExtensionV1, ok bool)

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

func (LedgerEntryExt) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryExt) MustV1

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

func (LedgerEntryExt) SwitchFieldName

func (u LedgerEntryExt) SwitchFieldName() string

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

func (*LedgerEntryExt) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryExtensionV1

type LedgerEntryExtensionV1 struct {
	SponsoringId SponsorshipDescriptor
	Ext          LedgerEntryExtensionV1Ext
}

LedgerEntryExtensionV1 is an XDR Struct defines as:

struct LedgerEntryExtensionV1
 {
     SponsorshipDescriptor sponsoringID;

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

func (*LedgerEntryExtensionV1) DecodeFrom

func (s *LedgerEntryExtensionV1) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerEntryExtensionV1) EncodeTo

func (s *LedgerEntryExtensionV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerEntryExtensionV1) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerEntryExtensionV1) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryExtensionV1Ext

type LedgerEntryExtensionV1Ext struct {
	V int32
}

LedgerEntryExtensionV1Ext is an XDR NestedUnion defines as:

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

func NewLedgerEntryExtensionV1Ext

func NewLedgerEntryExtensionV1Ext(v int32, value interface{}) (result LedgerEntryExtensionV1Ext, err error)

NewLedgerEntryExtensionV1Ext creates a new LedgerEntryExtensionV1Ext.

func (LedgerEntryExtensionV1Ext) ArmForSwitch

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

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

func (*LedgerEntryExtensionV1Ext) DecodeFrom

func (u *LedgerEntryExtensionV1Ext) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerEntryExtensionV1Ext) EncodeTo

func (u LedgerEntryExtensionV1Ext) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerEntryExtensionV1Ext) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryExtensionV1Ext) SwitchFieldName

func (u LedgerEntryExtensionV1Ext) SwitchFieldName() string

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

func (*LedgerEntryExtensionV1Ext) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryType

type LedgerEntryType int32

LedgerEntryType is an XDR Enum defines as:

enum LedgerEntryType
 {
     ACCOUNT = 0,
     TRUSTLINE = 1,
     OFFER = 2,
     DATA = 3,
     CLAIMABLE_BALANCE = 4,
     LIQUIDITY_POOL = 5
 };
const (
	LedgerEntryTypeAccount          LedgerEntryType = 0
	LedgerEntryTypeTrustline        LedgerEntryType = 1
	LedgerEntryTypeOffer            LedgerEntryType = 2
	LedgerEntryTypeData             LedgerEntryType = 3
	LedgerEntryTypeClaimableBalance LedgerEntryType = 4
	LedgerEntryTypeLiquidityPool    LedgerEntryType = 5
)

func (*LedgerEntryType) DecodeFrom

func (e *LedgerEntryType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerEntryType) EncodeTo

func (e LedgerEntryType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerEntryType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryType) String

func (e LedgerEntryType) String() string

String returns the name of `e`

func (*LedgerEntryType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LedgerEntryType) ValidEnum

func (e LedgerEntryType) ValidEnum(v int32) bool

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

type LedgerHeader

type LedgerHeader struct {
	LedgerVersion      Uint32
	PreviousLedgerHash Hash
	ScpValue           StellarValue
	TxSetResultHash    Hash
	BucketListHash     Hash
	LedgerSeq          Uint32
	TotalCoins         Int64
	FeePool            Int64
	InflationSeq       Uint32
	IdPool             Uint64
	BaseFee            Uint32
	BaseReserve        Uint32
	MaxTxSetSize       Uint32
	SkipList           [4]Hash
	Ext                LedgerHeaderExt
}

LedgerHeader is an XDR Struct defines as:

struct LedgerHeader
 {
     uint32 ledgerVersion;    // the protocol version of the ledger
     Hash previousLedgerHash; // hash of the previous ledger header
     StellarValue scpValue;   // what consensus agreed to
     Hash txSetResultHash;    // the TransactionResultSet that led to this ledger
     Hash bucketListHash;     // hash of the ledger state

     uint32 ledgerSeq; // sequence number of this ledger

     int64 totalCoins; // total number of stroops in existence.
                       // 10,000,000 stroops in 1 XLM

     int64 feePool;       // fees burned since last inflation run
     uint32 inflationSeq; // inflation sequence number

     uint64 idPool; // last used global ID, used for generating objects

     uint32 baseFee;     // base fee per operation in stroops
     uint32 baseReserve; // account base reserve in stroops

     uint32 maxTxSetSize; // maximum size a transaction set can be

     Hash skipList[4]; // hashes of ledgers in the past. allows you to jump back
                       // in time without walking the chain back ledger by ledger
                       // each slot contains the oldest ledger that is mod of
                       // either 50  5000  50000 or 500000 depending on index
                       // skipList[0] mod(50), skipList[1] mod(5000), etc

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     case 1:
         LedgerHeaderExtensionV1 v1;
     }
     ext;
 };

func (*LedgerHeader) DecodeFrom

func (s *LedgerHeader) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerHeader) EncodeTo

func (s *LedgerHeader) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerHeader) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerHeader) Scan

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

Scan reads from src into an LedgerHeader struct

func (*LedgerHeader) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerHeaderExt

type LedgerHeaderExt struct {
	V  int32
	V1 *LedgerHeaderExtensionV1
}

LedgerHeaderExt is an XDR NestedUnion defines as:

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

func NewLedgerHeaderExt

func NewLedgerHeaderExt(v int32, value interface{}) (result LedgerHeaderExt, err error)

NewLedgerHeaderExt creates a new LedgerHeaderExt.

func (LedgerHeaderExt) ArmForSwitch

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

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

func (*LedgerHeaderExt) DecodeFrom

func (u *LedgerHeaderExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerHeaderExt) EncodeTo

func (u LedgerHeaderExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerHeaderExt) GetV1

func (u LedgerHeaderExt) GetV1() (result LedgerHeaderExtensionV1, ok bool)

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

func (LedgerHeaderExt) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerHeaderExt) MustV1

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

func (LedgerHeaderExt) SwitchFieldName

func (u LedgerHeaderExt) SwitchFieldName() string

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

func (*LedgerHeaderExt) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerHeaderExtensionV1

type LedgerHeaderExtensionV1 struct {
	Flags Uint32
	Ext   LedgerHeaderExtensionV1Ext
}

LedgerHeaderExtensionV1 is an XDR Struct defines as:

struct LedgerHeaderExtensionV1
 {
     uint32 flags; // LedgerHeaderFlags

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

func (*LedgerHeaderExtensionV1) DecodeFrom

func (s *LedgerHeaderExtensionV1) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerHeaderExtensionV1) EncodeTo

func (s *LedgerHeaderExtensionV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerHeaderExtensionV1) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerHeaderExtensionV1) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerHeaderExtensionV1Ext

type LedgerHeaderExtensionV1Ext struct {
	V int32
}

LedgerHeaderExtensionV1Ext is an XDR NestedUnion defines as:

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

func NewLedgerHeaderExtensionV1Ext

func NewLedgerHeaderExtensionV1Ext(v int32, value interface{}) (result LedgerHeaderExtensionV1Ext, err error)

NewLedgerHeaderExtensionV1Ext creates a new LedgerHeaderExtensionV1Ext.

func (LedgerHeaderExtensionV1Ext) ArmForSwitch

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

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

func (*LedgerHeaderExtensionV1Ext) DecodeFrom

func (u *LedgerHeaderExtensionV1Ext) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerHeaderExtensionV1Ext) EncodeTo

func (u LedgerHeaderExtensionV1Ext) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerHeaderExtensionV1Ext) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerHeaderExtensionV1Ext) SwitchFieldName

func (u LedgerHeaderExtensionV1Ext) SwitchFieldName() string

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

func (*LedgerHeaderExtensionV1Ext) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerHeaderFlags

type LedgerHeaderFlags int32

LedgerHeaderFlags is an XDR Enum defines as:

enum LedgerHeaderFlags
 {
     DISABLE_LIQUIDITY_POOL_TRADING_FLAG = 0x1,
     DISABLE_LIQUIDITY_POOL_DEPOSIT_FLAG = 0x2,
     DISABLE_LIQUIDITY_POOL_WITHDRAWAL_FLAG = 0x4
 };
const (
	LedgerHeaderFlagsDisableLiquidityPoolTradingFlag    LedgerHeaderFlags = 1
	LedgerHeaderFlagsDisableLiquidityPoolDepositFlag    LedgerHeaderFlags = 2
	LedgerHeaderFlagsDisableLiquidityPoolWithdrawalFlag LedgerHeaderFlags = 4
)

func (*LedgerHeaderFlags) DecodeFrom

func (e *LedgerHeaderFlags) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerHeaderFlags) EncodeTo

func (e LedgerHeaderFlags) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerHeaderFlags) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerHeaderFlags) String

func (e LedgerHeaderFlags) String() string

String returns the name of `e`

func (*LedgerHeaderFlags) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LedgerHeaderFlags) ValidEnum

func (e LedgerHeaderFlags) ValidEnum(v int32) bool

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

type LedgerHeaderHistoryEntry

type LedgerHeaderHistoryEntry struct {
	Hash   Hash
	Header LedgerHeader
	Ext    LedgerHeaderHistoryEntryExt
}

LedgerHeaderHistoryEntry is an XDR Struct defines as:

struct LedgerHeaderHistoryEntry
 {
     Hash hash;
     LedgerHeader header;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*LedgerHeaderHistoryEntry) DecodeFrom

func (s *LedgerHeaderHistoryEntry) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerHeaderHistoryEntry) EncodeTo

func (s *LedgerHeaderHistoryEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerHeaderHistoryEntry) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerHeaderHistoryEntry) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerHeaderHistoryEntryExt

type LedgerHeaderHistoryEntryExt struct {
	V int32
}

LedgerHeaderHistoryEntryExt is an XDR NestedUnion defines as:

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

func NewLedgerHeaderHistoryEntryExt

func NewLedgerHeaderHistoryEntryExt(v int32, value interface{}) (result LedgerHeaderHistoryEntryExt, err error)

NewLedgerHeaderHistoryEntryExt creates a new LedgerHeaderHistoryEntryExt.

func (LedgerHeaderHistoryEntryExt) ArmForSwitch

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

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

func (*LedgerHeaderHistoryEntryExt) DecodeFrom

func (u *LedgerHeaderHistoryEntryExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerHeaderHistoryEntryExt) EncodeTo

func (u LedgerHeaderHistoryEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerHeaderHistoryEntryExt) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerHeaderHistoryEntryExt) SwitchFieldName

func (u LedgerHeaderHistoryEntryExt) SwitchFieldName() string

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

func (*LedgerHeaderHistoryEntryExt) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKey

type LedgerKey struct {
	Type             LedgerEntryType
	Account          *LedgerKeyAccount
	TrustLine        *LedgerKeyTrustLine
	Offer            *LedgerKeyOffer
	Data             *LedgerKeyData
	ClaimableBalance *LedgerKeyClaimableBalance
	LiquidityPool    *LedgerKeyLiquidityPool
}

LedgerKey is an XDR Union defines as:

union LedgerKey switch (LedgerEntryType type)
 {
 case ACCOUNT:
     struct
     {
         AccountID accountID;
     } account;

 case TRUSTLINE:
     struct
     {
         AccountID accountID;
         TrustLineAsset asset;
     } trustLine;

 case OFFER:
     struct
     {
         AccountID sellerID;
         int64 offerID;
     } offer;

 case DATA:
     struct
     {
         AccountID accountID;
         string64 dataName;
     } data;

 case CLAIMABLE_BALANCE:
     struct
     {
         ClaimableBalanceID balanceID;
     } claimableBalance;

 case LIQUIDITY_POOL:
     struct
     {
         PoolID liquidityPoolID;
     } liquidityPool;
 };

func NewLedgerKey

func NewLedgerKey(aType LedgerEntryType, value interface{}) (result LedgerKey, err error)

NewLedgerKey creates a new LedgerKey.

func (LedgerKey) ArmForSwitch

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

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

func (*LedgerKey) DecodeFrom

func (u *LedgerKey) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerKey) EncodeTo

func (u LedgerKey) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*LedgerKey) Equals

func (key *LedgerKey) Equals(other LedgerKey) bool

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

func (LedgerKey) GetAccount

func (u LedgerKey) GetAccount() (result LedgerKeyAccount, ok bool)

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

func (LedgerKey) GetClaimableBalance

func (u LedgerKey) GetClaimableBalance() (result LedgerKeyClaimableBalance, ok bool)

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

func (LedgerKey) GetData

func (u LedgerKey) GetData() (result LedgerKeyData, ok bool)

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

func (LedgerKey) GetLiquidityPool

func (u LedgerKey) GetLiquidityPool() (result LedgerKeyLiquidityPool, ok bool)

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

func (LedgerKey) GetOffer

func (u LedgerKey) GetOffer() (result LedgerKeyOffer, ok bool)

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

func (LedgerKey) GetTrustLine

func (u LedgerKey) GetTrustLine() (result LedgerKeyTrustLine, ok bool)

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

func (*LedgerKey) LedgerKey

func (key *LedgerKey) LedgerKey() LedgerKey

LedgerKey implements the `Keyer` interface

func (LedgerKey) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerKey) MarshalBinaryBase64

func (key LedgerKey) MarshalBinaryBase64() (string, error)

MarshalBinaryBase64 marshals XDR into a binary form and then encodes it using base64.

func (LedgerKey) MustAccount

func (u LedgerKey) MustAccount() LedgerKeyAccount

MustAccount retrieves the Account value from the union, panicing if the value is not set.

func (LedgerKey) MustClaimableBalance

func (u LedgerKey) MustClaimableBalance() LedgerKeyClaimableBalance

MustClaimableBalance retrieves the ClaimableBalance value from the union, panicing if the value is not set.

func (LedgerKey) MustData

func (u LedgerKey) MustData() LedgerKeyData

MustData retrieves the Data value from the union, panicing if the value is not set.

func (LedgerKey) MustLiquidityPool

func (u LedgerKey) MustLiquidityPool() LedgerKeyLiquidityPool

MustLiquidityPool retrieves the LiquidityPool value from the union, panicing if the value is not set.

func (LedgerKey) MustOffer

func (u LedgerKey) MustOffer() LedgerKeyOffer

MustOffer retrieves the Offer value from the union, panicing if the value is not set.

func (LedgerKey) MustTrustLine

func (u LedgerKey) MustTrustLine() LedgerKeyTrustLine

MustTrustLine retrieves the TrustLine value from the union, panicing if the value is not set.

func (*LedgerKey) SetAccount

func (key *LedgerKey) SetAccount(account AccountId) error

SetAccount mutates `key` such that it represents the identity of `account`

func (*LedgerKey) SetClaimableBalance

func (key *LedgerKey) SetClaimableBalance(balanceID ClaimableBalanceId) error

SetClaimableBalance mutates `key` such that it represents the identity of a claimable balance.

func (*LedgerKey) SetData

func (key *LedgerKey) SetData(account AccountId, name string) error

SetData mutates `key` such that it represents the identity of the data entry owned by `account` and for `name`.

func (*LedgerKey) SetLiquidityPool

func (key *LedgerKey) SetLiquidityPool(poolID PoolId) error

SetLiquidityPool mutates `key` such that it represents the identity of a liquidity pool.

func (*LedgerKey) SetOffer

func (key *LedgerKey) SetOffer(account AccountId, id uint64) error

SetOffer mutates `key` such that it represents the identity of the data entry owned by `account` and for offer `id`.

func (*LedgerKey) SetTrustline

func (key *LedgerKey) SetTrustline(account AccountId, line TrustLineAsset) error

SetTrustline mutates `key` such that it represents the identity of the trustline owned by `account` and for `asset`.

func (LedgerKey) SwitchFieldName

func (u LedgerKey) SwitchFieldName() string

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

func (*LedgerKey) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyAccount

type LedgerKeyAccount struct {
	AccountId AccountId
}

LedgerKeyAccount is an XDR NestedStruct defines as:

struct
     {
         AccountID accountID;
     }

func (*LedgerKeyAccount) DecodeFrom

func (s *LedgerKeyAccount) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyAccount) EncodeTo

func (s *LedgerKeyAccount) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyAccount) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyAccount) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyClaimableBalance

type LedgerKeyClaimableBalance struct {
	BalanceId ClaimableBalanceId
}

LedgerKeyClaimableBalance is an XDR NestedStruct defines as:

struct
     {
         ClaimableBalanceID balanceID;
     }

func (*LedgerKeyClaimableBalance) DecodeFrom

func (s *LedgerKeyClaimableBalance) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyClaimableBalance) EncodeTo

func (s *LedgerKeyClaimableBalance) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyClaimableBalance) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyClaimableBalance) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyData

type LedgerKeyData struct {
	AccountId AccountId
	DataName  String64
}

LedgerKeyData is an XDR NestedStruct defines as:

struct
     {
         AccountID accountID;
         string64 dataName;
     }

func (*LedgerKeyData) DecodeFrom

func (s *LedgerKeyData) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyData) EncodeTo

func (s *LedgerKeyData) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyData) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyData) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyLiquidityPool

type LedgerKeyLiquidityPool struct {
	LiquidityPoolId PoolId
}

LedgerKeyLiquidityPool is an XDR NestedStruct defines as:

struct
     {
         PoolID liquidityPoolID;
     }

func (*LedgerKeyLiquidityPool) DecodeFrom

func (s *LedgerKeyLiquidityPool) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyLiquidityPool) EncodeTo

func (s *LedgerKeyLiquidityPool) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyLiquidityPool) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyLiquidityPool) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyOffer

type LedgerKeyOffer struct {
	SellerId AccountId
	OfferId  Int64
}

LedgerKeyOffer is an XDR NestedStruct defines as:

struct
     {
         AccountID sellerID;
         int64 offerID;
     }

func (*LedgerKeyOffer) DecodeFrom

func (s *LedgerKeyOffer) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyOffer) EncodeTo

func (s *LedgerKeyOffer) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyOffer) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyOffer) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyTrustLine

type LedgerKeyTrustLine struct {
	AccountId AccountId
	Asset     TrustLineAsset
}

LedgerKeyTrustLine is an XDR NestedStruct defines as:

struct
     {
         AccountID accountID;
         TrustLineAsset asset;
     }

func (*LedgerKeyTrustLine) DecodeFrom

func (s *LedgerKeyTrustLine) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyTrustLine) EncodeTo

func (s *LedgerKeyTrustLine) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyTrustLine) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyTrustLine) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerScpMessages

type LedgerScpMessages struct {
	LedgerSeq Uint32
	Messages  []ScpEnvelope
}

LedgerScpMessages is an XDR Struct defines as:

struct LedgerSCPMessages
 {
     uint32 ledgerSeq;
     SCPEnvelope messages<>;
 };

func (*LedgerScpMessages) DecodeFrom

func (s *LedgerScpMessages) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerScpMessages) EncodeTo

func (s *LedgerScpMessages) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerScpMessages) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerScpMessages) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerUpgrade

type LedgerUpgrade struct {
	Type             LedgerUpgradeType
	NewLedgerVersion *Uint32
	NewBaseFee       *Uint32
	NewMaxTxSetSize  *Uint32
	NewBaseReserve   *Uint32
	NewFlags         *Uint32
}

LedgerUpgrade is an XDR Union defines as:

union LedgerUpgrade switch (LedgerUpgradeType type)
 {
 case LEDGER_UPGRADE_VERSION:
     uint32 newLedgerVersion; // update ledgerVersion
 case LEDGER_UPGRADE_BASE_FEE:
     uint32 newBaseFee; // update baseFee
 case LEDGER_UPGRADE_MAX_TX_SET_SIZE:
     uint32 newMaxTxSetSize; // update maxTxSetSize
 case LEDGER_UPGRADE_BASE_RESERVE:
     uint32 newBaseReserve; // update baseReserve
 case LEDGER_UPGRADE_FLAGS:
     uint32 newFlags; // update flags
 };

func NewLedgerUpgrade

func NewLedgerUpgrade(aType LedgerUpgradeType, value interface{}) (result LedgerUpgrade, err error)

NewLedgerUpgrade creates a new LedgerUpgrade.

func (LedgerUpgrade) ArmForSwitch

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

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

func (*LedgerUpgrade) DecodeFrom

func (u *LedgerUpgrade) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerUpgrade) EncodeTo

func (u LedgerUpgrade) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerUpgrade) GetNewBaseFee

func (u LedgerUpgrade) GetNewBaseFee() (result Uint32, ok bool)

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

func (LedgerUpgrade) GetNewBaseReserve

func (u LedgerUpgrade) GetNewBaseReserve() (result Uint32, ok bool)

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

func (LedgerUpgrade) GetNewFlags

func (u LedgerUpgrade) GetNewFlags() (result Uint32, ok bool)

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

func (LedgerUpgrade) GetNewLedgerVersion

func (u LedgerUpgrade) GetNewLedgerVersion() (result Uint32, ok bool)

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

func (LedgerUpgrade) GetNewMaxTxSetSize

func (u LedgerUpgrade) GetNewMaxTxSetSize() (result Uint32, ok bool)

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

func (LedgerUpgrade) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerUpgrade) MustNewBaseFee

func (u LedgerUpgrade) MustNewBaseFee() Uint32

MustNewBaseFee retrieves the NewBaseFee value from the union, panicing if the value is not set.

func (LedgerUpgrade) MustNewBaseReserve

func (u LedgerUpgrade) MustNewBaseReserve() Uint32

MustNewBaseReserve retrieves the NewBaseReserve value from the union, panicing if the value is not set.

func (LedgerUpgrade) MustNewFlags

func (u LedgerUpgrade) MustNewFlags() Uint32

MustNewFlags retrieves the NewFlags value from the union, panicing if the value is not set.

func (LedgerUpgrade) MustNewLedgerVersion

func (u LedgerUpgrade) MustNewLedgerVersion() Uint32

MustNewLedgerVersion retrieves the NewLedgerVersion value from the union, panicing if the value is not set.

func (LedgerUpgrade) MustNewMaxTxSetSize

func (u LedgerUpgrade) MustNewMaxTxSetSize() Uint32

MustNewMaxTxSetSize retrieves the NewMaxTxSetSize value from the union, panicing if the value is not set.

func (*LedgerUpgrade) Scan

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

Scan reads from src into an LedgerUpgrade struct

func (LedgerUpgrade) SwitchFieldName

func (u LedgerUpgrade) SwitchFieldName() string

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

func (*LedgerUpgrade) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerUpgradeType

type LedgerUpgradeType int32

LedgerUpgradeType is an XDR Enum defines as:

enum LedgerUpgradeType
 {
     LEDGER_UPGRADE_VERSION = 1,
     LEDGER_UPGRADE_BASE_FEE = 2,
     LEDGER_UPGRADE_MAX_TX_SET_SIZE = 3,
     LEDGER_UPGRADE_BASE_RESERVE = 4,
     LEDGER_UPGRADE_FLAGS = 5
 };
const (
	LedgerUpgradeTypeLedgerUpgradeVersion      LedgerUpgradeType = 1
	LedgerUpgradeTypeLedgerUpgradeBaseFee      LedgerUpgradeType = 2
	LedgerUpgradeTypeLedgerUpgradeMaxTxSetSize LedgerUpgradeType = 3
	LedgerUpgradeTypeLedgerUpgradeBaseReserve  LedgerUpgradeType = 4
	LedgerUpgradeTypeLedgerUpgradeFlags        LedgerUpgradeType = 5
)

func (*LedgerUpgradeType) DecodeFrom

func (e *LedgerUpgradeType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerUpgradeType) EncodeTo

func (e LedgerUpgradeType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerUpgradeType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerUpgradeType) String

func (e LedgerUpgradeType) String() string

String returns the name of `e`

func (*LedgerUpgradeType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LedgerUpgradeType) ValidEnum

func (e LedgerUpgradeType) ValidEnum(v int32) bool

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

type Liabilities

type Liabilities struct {
	Buying  Int64
	Selling Int64
}

Liabilities is an XDR Struct defines as:

struct Liabilities
 {
     int64 buying;
     int64 selling;
 };

func (*Liabilities) DecodeFrom

func (s *Liabilities) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Liabilities) EncodeTo

func (s *Liabilities) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Liabilities) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Liabilities) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolConstantProductParameters

type LiquidityPoolConstantProductParameters struct {
	AssetA Asset
	AssetB Asset
	Fee    Int32
}

LiquidityPoolConstantProductParameters is an XDR Struct defines as:

struct LiquidityPoolConstantProductParameters
 {
     Asset assetA; // assetA < assetB
     Asset assetB;
     int32 fee; // Fee is in basis points, so the actual rate is (fee/100)%
 };

func (*LiquidityPoolConstantProductParameters) DecodeFrom

func (s *LiquidityPoolConstantProductParameters) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LiquidityPoolConstantProductParameters) EncodeTo

func (s *LiquidityPoolConstantProductParameters) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolConstantProductParameters) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LiquidityPoolConstantProductParameters) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolDepositOp

type LiquidityPoolDepositOp struct {
	LiquidityPoolId PoolId
	MaxAmountA      Int64
	MaxAmountB      Int64
	MinPrice        Price
	MaxPrice        Price
}

LiquidityPoolDepositOp is an XDR Struct defines as:

struct LiquidityPoolDepositOp
 {
     PoolID liquidityPoolID;
     int64 maxAmountA; // maximum amount of first asset to deposit
     int64 maxAmountB; // maximum amount of second asset to deposit
     Price minPrice;   // minimum depositA/depositB
     Price maxPrice;   // maximum depositA/depositB
 };

func (*LiquidityPoolDepositOp) DecodeFrom

func (s *LiquidityPoolDepositOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LiquidityPoolDepositOp) EncodeTo

func (s *LiquidityPoolDepositOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolDepositOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LiquidityPoolDepositOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolDepositResult

type LiquidityPoolDepositResult struct {
	Code LiquidityPoolDepositResultCode
}

LiquidityPoolDepositResult is an XDR Union defines as:

union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code)
 {
 case LIQUIDITY_POOL_DEPOSIT_SUCCESS:
     void;
 default:
     void;
 };

func NewLiquidityPoolDepositResult

func NewLiquidityPoolDepositResult(code LiquidityPoolDepositResultCode, value interface{}) (result LiquidityPoolDepositResult, err error)

NewLiquidityPoolDepositResult creates a new LiquidityPoolDepositResult.

func (LiquidityPoolDepositResult) ArmForSwitch

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

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

func (*LiquidityPoolDepositResult) DecodeFrom

func (u *LiquidityPoolDepositResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LiquidityPoolDepositResult) EncodeTo

func (u LiquidityPoolDepositResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolDepositResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LiquidityPoolDepositResult) SwitchFieldName

func (u LiquidityPoolDepositResult) SwitchFieldName() string

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

func (*LiquidityPoolDepositResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolDepositResultCode

type LiquidityPoolDepositResultCode int32

LiquidityPoolDepositResultCode is an XDR Enum defines as:

enum LiquidityPoolDepositResultCode
 {
     // codes considered as "success" for the operation
     LIQUIDITY_POOL_DEPOSIT_SUCCESS = 0,

     // codes considered as "failure" for the operation
     LIQUIDITY_POOL_DEPOSIT_MALFORMED = -1,      // bad input
     LIQUIDITY_POOL_DEPOSIT_NO_TRUST = -2,       // no trust line for one of the
                                                 // assets
     LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED = -3, // not authorized for one of the
                                                 // assets
     LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED = -4,    // not enough balance for one of
                                                 // the assets
     LIQUIDITY_POOL_DEPOSIT_LINE_FULL = -5,      // pool share trust line doesn't
                                                 // have sufficient limit
     LIQUIDITY_POOL_DEPOSIT_BAD_PRICE = -6,      // deposit price outside bounds
     LIQUIDITY_POOL_DEPOSIT_POOL_FULL = -7       // pool reserves are full
 };
const (
	LiquidityPoolDepositResultCodeLiquidityPoolDepositSuccess       LiquidityPoolDepositResultCode = 0
	LiquidityPoolDepositResultCodeLiquidityPoolDepositMalformed     LiquidityPoolDepositResultCode = -1
	LiquidityPoolDepositResultCodeLiquidityPoolDepositNoTrust       LiquidityPoolDepositResultCode = -2
	LiquidityPoolDepositResultCodeLiquidityPoolDepositNotAuthorized LiquidityPoolDepositResultCode = -3
	LiquidityPoolDepositResultCodeLiquidityPoolDepositUnderfunded   LiquidityPoolDepositResultCode = -4
	LiquidityPoolDepositResultCodeLiquidityPoolDepositLineFull      LiquidityPoolDepositResultCode = -5
	LiquidityPoolDepositResultCodeLiquidityPoolDepositBadPrice      LiquidityPoolDepositResultCode = -6
	LiquidityPoolDepositResultCodeLiquidityPoolDepositPoolFull      LiquidityPoolDepositResultCode = -7
)

func (*LiquidityPoolDepositResultCode) DecodeFrom

func (e *LiquidityPoolDepositResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LiquidityPoolDepositResultCode) EncodeTo

func (e LiquidityPoolDepositResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolDepositResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LiquidityPoolDepositResultCode) String

String returns the name of `e`

func (*LiquidityPoolDepositResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LiquidityPoolDepositResultCode) ValidEnum

func (e LiquidityPoolDepositResultCode) ValidEnum(v int32) bool

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

type LiquidityPoolEntry

type LiquidityPoolEntry struct {
	LiquidityPoolId PoolId
	Body            LiquidityPoolEntryBody
}

LiquidityPoolEntry is an XDR Struct defines as:

struct LiquidityPoolEntry
 {
     PoolID liquidityPoolID;

     union switch (LiquidityPoolType type)
     {
     case LIQUIDITY_POOL_CONSTANT_PRODUCT:
         struct
         {
             LiquidityPoolConstantProductParameters params;

             int64 reserveA;        // amount of A in the pool
             int64 reserveB;        // amount of B in the pool
             int64 totalPoolShares; // total number of pool shares issued
             int64 poolSharesTrustLineCount; // number of trust lines for the
                                             // associated pool shares
         } constantProduct;
     }
     body;
 };

func (*LiquidityPoolEntry) DecodeFrom

func (s *LiquidityPoolEntry) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LiquidityPoolEntry) EncodeTo

func (s *LiquidityPoolEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolEntry) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LiquidityPoolEntry) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolEntryBody

type LiquidityPoolEntryBody struct {
	Type            LiquidityPoolType
	ConstantProduct *LiquidityPoolEntryConstantProduct
}

LiquidityPoolEntryBody is an XDR NestedUnion defines as:

union switch (LiquidityPoolType type)
     {
     case LIQUIDITY_POOL_CONSTANT_PRODUCT:
         struct
         {
             LiquidityPoolConstantProductParameters params;

             int64 reserveA;        // amount of A in the pool
             int64 reserveB;        // amount of B in the pool
             int64 totalPoolShares; // total number of pool shares issued
             int64 poolSharesTrustLineCount; // number of trust lines for the
                                             // associated pool shares
         } constantProduct;
     }

func NewLiquidityPoolEntryBody

func NewLiquidityPoolEntryBody(aType LiquidityPoolType, value interface{}) (result LiquidityPoolEntryBody, err error)

NewLiquidityPoolEntryBody creates a new LiquidityPoolEntryBody.

func (LiquidityPoolEntryBody) ArmForSwitch

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

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

func (*LiquidityPoolEntryBody) DecodeFrom

func (u *LiquidityPoolEntryBody) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LiquidityPoolEntryBody) EncodeTo

func (u LiquidityPoolEntryBody) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolEntryBody) GetConstantProduct

func (u LiquidityPoolEntryBody) GetConstantProduct() (result LiquidityPoolEntryConstantProduct, ok bool)

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

func (LiquidityPoolEntryBody) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LiquidityPoolEntryBody) MustConstantProduct

MustConstantProduct retrieves the ConstantProduct value from the union, panicing if the value is not set.

func (LiquidityPoolEntryBody) SwitchFieldName

func (u LiquidityPoolEntryBody) SwitchFieldName() string

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

func (*LiquidityPoolEntryBody) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolEntryConstantProduct

type LiquidityPoolEntryConstantProduct struct {
	Params                   LiquidityPoolConstantProductParameters
	ReserveA                 Int64
	ReserveB                 Int64
	TotalPoolShares          Int64
	PoolSharesTrustLineCount Int64
}

LiquidityPoolEntryConstantProduct is an XDR NestedStruct defines as:

struct
         {
             LiquidityPoolConstantProductParameters params;

             int64 reserveA;        // amount of A in the pool
             int64 reserveB;        // amount of B in the pool
             int64 totalPoolShares; // total number of pool shares issued
             int64 poolSharesTrustLineCount; // number of trust lines for the
                                             // associated pool shares
         }

func (*LiquidityPoolEntryConstantProduct) DecodeFrom

func (s *LiquidityPoolEntryConstantProduct) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LiquidityPoolEntryConstantProduct) EncodeTo

func (s *LiquidityPoolEntryConstantProduct) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolEntryConstantProduct) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LiquidityPoolEntryConstantProduct) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolParameters

type LiquidityPoolParameters struct {
	Type            LiquidityPoolType
	ConstantProduct *LiquidityPoolConstantProductParameters
}

LiquidityPoolParameters is an XDR Union defines as:

union LiquidityPoolParameters switch (LiquidityPoolType type)
 {
 case LIQUIDITY_POOL_CONSTANT_PRODUCT:
     LiquidityPoolConstantProductParameters constantProduct;
 };

func NewLiquidityPoolParameters

func NewLiquidityPoolParameters(aType LiquidityPoolType, value interface{}) (result LiquidityPoolParameters, err error)

NewLiquidityPoolParameters creates a new LiquidityPoolParameters.

func (LiquidityPoolParameters) ArmForSwitch

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

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

func (*LiquidityPoolParameters) DecodeFrom

func (u *LiquidityPoolParameters) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LiquidityPoolParameters) EncodeTo

func (u LiquidityPoolParameters) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolParameters) GetConstantProduct

func (u LiquidityPoolParameters) GetConstantProduct() (result LiquidityPoolConstantProductParameters, ok bool)

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

func (LiquidityPoolParameters) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LiquidityPoolParameters) MustConstantProduct

MustConstantProduct retrieves the ConstantProduct value from the union, panicing if the value is not set.

func (LiquidityPoolParameters) SwitchFieldName

func (u LiquidityPoolParameters) SwitchFieldName() string

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

func (*LiquidityPoolParameters) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolType

type LiquidityPoolType int32

LiquidityPoolType is an XDR Enum defines as:

enum LiquidityPoolType
 {
     LIQUIDITY_POOL_CONSTANT_PRODUCT = 0
 };
const (
	LiquidityPoolTypeLiquidityPoolConstantProduct LiquidityPoolType = 0
)

func (*LiquidityPoolType) DecodeFrom

func (e *LiquidityPoolType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LiquidityPoolType) EncodeTo

func (e LiquidityPoolType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LiquidityPoolType) String

func (e LiquidityPoolType) String() string

String returns the name of `e`

func (*LiquidityPoolType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LiquidityPoolType) ValidEnum

func (e LiquidityPoolType) ValidEnum(v int32) bool

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

type LiquidityPoolWithdrawOp

type LiquidityPoolWithdrawOp struct {
	LiquidityPoolId PoolId
	Amount          Int64
	MinAmountA      Int64
	MinAmountB      Int64
}

LiquidityPoolWithdrawOp is an XDR Struct defines as:

struct LiquidityPoolWithdrawOp
 {
     PoolID liquidityPoolID;
     int64 amount;     // amount of pool shares to withdraw
     int64 minAmountA; // minimum amount of first asset to withdraw
     int64 minAmountB; // minimum amount of second asset to withdraw
 };

func (*LiquidityPoolWithdrawOp) DecodeFrom

func (s *LiquidityPoolWithdrawOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LiquidityPoolWithdrawOp) EncodeTo

func (s *LiquidityPoolWithdrawOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolWithdrawOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LiquidityPoolWithdrawOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolWithdrawResult

type LiquidityPoolWithdrawResult struct {
	Code LiquidityPoolWithdrawResultCode
}

LiquidityPoolWithdrawResult is an XDR Union defines as:

union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code)
 {
 case LIQUIDITY_POOL_WITHDRAW_SUCCESS:
     void;
 default:
     void;
 };

func NewLiquidityPoolWithdrawResult

func NewLiquidityPoolWithdrawResult(code LiquidityPoolWithdrawResultCode, value interface{}) (result LiquidityPoolWithdrawResult, err error)

NewLiquidityPoolWithdrawResult creates a new LiquidityPoolWithdrawResult.

func (LiquidityPoolWithdrawResult) ArmForSwitch

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

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

func (*LiquidityPoolWithdrawResult) DecodeFrom

func (u *LiquidityPoolWithdrawResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LiquidityPoolWithdrawResult) EncodeTo

func (u LiquidityPoolWithdrawResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolWithdrawResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LiquidityPoolWithdrawResult) SwitchFieldName

func (u LiquidityPoolWithdrawResult) SwitchFieldName() string

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

func (*LiquidityPoolWithdrawResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolWithdrawResultCode

type LiquidityPoolWithdrawResultCode int32

LiquidityPoolWithdrawResultCode is an XDR Enum defines as:

enum LiquidityPoolWithdrawResultCode
 {
     // codes considered as "success" for the operation
     LIQUIDITY_POOL_WITHDRAW_SUCCESS = 0,

     // codes considered as "failure" for the operation
     LIQUIDITY_POOL_WITHDRAW_MALFORMED = -1,    // bad input
     LIQUIDITY_POOL_WITHDRAW_NO_TRUST = -2,     // no trust line for one of the
                                                // assets
     LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED = -3,  // not enough balance of the
                                                // pool share
     LIQUIDITY_POOL_WITHDRAW_LINE_FULL = -4,    // would go above limit for one
                                                // of the assets
     LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM = -5 // didn't withdraw enough
 };
const (
	LiquidityPoolWithdrawResultCodeLiquidityPoolWithdrawSuccess      LiquidityPoolWithdrawResultCode = 0
	LiquidityPoolWithdrawResultCodeLiquidityPoolWithdrawMalformed    LiquidityPoolWithdrawResultCode = -1
	LiquidityPoolWithdrawResultCodeLiquidityPoolWithdrawNoTrust      LiquidityPoolWithdrawResultCode = -2
	LiquidityPoolWithdrawResultCodeLiquidityPoolWithdrawUnderfunded  LiquidityPoolWithdrawResultCode = -3
	LiquidityPoolWithdrawResultCodeLiquidityPoolWithdrawLineFull     LiquidityPoolWithdrawResultCode = -4
	LiquidityPoolWithdrawResultCodeLiquidityPoolWithdrawUnderMinimum LiquidityPoolWithdrawResultCode = -5
)

func (*LiquidityPoolWithdrawResultCode) DecodeFrom

func (e *LiquidityPoolWithdrawResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LiquidityPoolWithdrawResultCode) EncodeTo

func (e LiquidityPoolWithdrawResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolWithdrawResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LiquidityPoolWithdrawResultCode) String

String returns the name of `e`

func (*LiquidityPoolWithdrawResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LiquidityPoolWithdrawResultCode) ValidEnum

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

type ManageBuyOfferOp

type ManageBuyOfferOp struct {
	Selling   Asset
	Buying    Asset
	BuyAmount Int64
	Price     Price
	OfferId   Int64
}

ManageBuyOfferOp is an XDR Struct defines as:

struct ManageBuyOfferOp
 {
     Asset selling;
     Asset buying;
     int64 buyAmount; // amount being bought. if set to 0, delete the offer
     Price price;     // price of thing being bought in terms of what you are
                      // selling

     // 0=create a new offer, otherwise edit an existing offer
     int64 offerID;
 };

func (*ManageBuyOfferOp) DecodeFrom

func (s *ManageBuyOfferOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ManageBuyOfferOp) EncodeTo

func (s *ManageBuyOfferOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageBuyOfferOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ManageBuyOfferOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageBuyOfferResult

type ManageBuyOfferResult struct {
	Code    ManageBuyOfferResultCode
	Success *ManageOfferSuccessResult
}

ManageBuyOfferResult is an XDR Union defines as:

union ManageBuyOfferResult switch (ManageBuyOfferResultCode code)
 {
 case MANAGE_BUY_OFFER_SUCCESS:
     ManageOfferSuccessResult success;
 default:
     void;
 };

func NewManageBuyOfferResult

func NewManageBuyOfferResult(code ManageBuyOfferResultCode, value interface{}) (result ManageBuyOfferResult, err error)

NewManageBuyOfferResult creates a new ManageBuyOfferResult.

func (ManageBuyOfferResult) ArmForSwitch

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

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

func (*ManageBuyOfferResult) DecodeFrom

func (u *ManageBuyOfferResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageBuyOfferResult) EncodeTo

func (u ManageBuyOfferResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageBuyOfferResult) GetSuccess

func (u ManageBuyOfferResult) GetSuccess() (result ManageOfferSuccessResult, ok bool)

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

func (ManageBuyOfferResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageBuyOfferResult) MustSuccess

MustSuccess retrieves the Success value from the union, panicing if the value is not set.

func (ManageBuyOfferResult) SwitchFieldName

func (u ManageBuyOfferResult) SwitchFieldName() string

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

func (*ManageBuyOfferResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageBuyOfferResultCode

type ManageBuyOfferResultCode int32

ManageBuyOfferResultCode is an XDR Enum defines as:

enum ManageBuyOfferResultCode
 {
     // codes considered as "success" for the operation
     MANAGE_BUY_OFFER_SUCCESS = 0,

     // codes considered as "failure" for the operation
     MANAGE_BUY_OFFER_MALFORMED = -1,     // generated offer would be invalid
     MANAGE_BUY_OFFER_SELL_NO_TRUST = -2, // no trust line for what we're selling
     MANAGE_BUY_OFFER_BUY_NO_TRUST = -3,  // no trust line for what we're buying
     MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED = -4, // not authorized to sell
     MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED = -5,  // not authorized to buy
     MANAGE_BUY_OFFER_LINE_FULL = -6,   // can't receive more of what it's buying
     MANAGE_BUY_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell
     MANAGE_BUY_OFFER_CROSS_SELF = -8, // would cross an offer from the same user
     MANAGE_BUY_OFFER_SELL_NO_ISSUER = -9, // no issuer for what we're selling
     MANAGE_BUY_OFFER_BUY_NO_ISSUER = -10, // no issuer for what we're buying

     // update errors
     MANAGE_BUY_OFFER_NOT_FOUND =
         -11, // offerID does not match an existing offer

     MANAGE_BUY_OFFER_LOW_RESERVE = -12 // not enough funds to create a new Offer
 };
const (
	ManageBuyOfferResultCodeManageBuyOfferSuccess           ManageBuyOfferResultCode = 0
	ManageBuyOfferResultCodeManageBuyOfferMalformed         ManageBuyOfferResultCode = -1
	ManageBuyOfferResultCodeManageBuyOfferSellNoTrust       ManageBuyOfferResultCode = -2
	ManageBuyOfferResultCodeManageBuyOfferBuyNoTrust        ManageBuyOfferResultCode = -3
	ManageBuyOfferResultCodeManageBuyOfferSellNotAuthorized ManageBuyOfferResultCode = -4
	ManageBuyOfferResultCodeManageBuyOfferBuyNotAuthorized  ManageBuyOfferResultCode = -5
	ManageBuyOfferResultCodeManageBuyOfferLineFull          ManageBuyOfferResultCode = -6
	ManageBuyOfferResultCodeManageBuyOfferUnderfunded       ManageBuyOfferResultCode = -7
	ManageBuyOfferResultCodeManageBuyOfferCrossSelf         ManageBuyOfferResultCode = -8
	ManageBuyOfferResultCodeManageBuyOfferSellNoIssuer      ManageBuyOfferResultCode = -9
	ManageBuyOfferResultCodeManageBuyOfferBuyNoIssuer       ManageBuyOfferResultCode = -10
	ManageBuyOfferResultCodeManageBuyOfferNotFound          ManageBuyOfferResultCode = -11
	ManageBuyOfferResultCodeManageBuyOfferLowReserve        ManageBuyOfferResultCode = -12
)

func (*ManageBuyOfferResultCode) DecodeFrom

func (e *ManageBuyOfferResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageBuyOfferResultCode) EncodeTo

func (e ManageBuyOfferResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageBuyOfferResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageBuyOfferResultCode) String

func (e ManageBuyOfferResultCode) String() string

String returns the name of `e`

func (*ManageBuyOfferResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ManageBuyOfferResultCode) ValidEnum

func (e ManageBuyOfferResultCode) ValidEnum(v int32) bool

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

type ManageDataOp

type ManageDataOp struct {
	DataName  String64
	DataValue *DataValue
}

ManageDataOp is an XDR Struct defines as:

struct ManageDataOp
 {
     string64 dataName;
     DataValue* dataValue; // set to null to clear
 };

func (*ManageDataOp) DecodeFrom

func (s *ManageDataOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ManageDataOp) EncodeTo

func (s *ManageDataOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageDataOp) GoString

func (s ManageDataOp) GoString() string

GoString implements fmt.GoStringer.

func (ManageDataOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ManageDataOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageDataResult

type ManageDataResult struct {
	Code ManageDataResultCode
}

ManageDataResult is an XDR Union defines as:

union ManageDataResult switch (ManageDataResultCode code)
 {
 case MANAGE_DATA_SUCCESS:
     void;
 default:
     void;
 };

func NewManageDataResult

func NewManageDataResult(code ManageDataResultCode, value interface{}) (result ManageDataResult, err error)

NewManageDataResult creates a new ManageDataResult.

func (ManageDataResult) ArmForSwitch

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

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

func (*ManageDataResult) DecodeFrom

func (u *ManageDataResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageDataResult) EncodeTo

func (u ManageDataResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageDataResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageDataResult) SwitchFieldName

func (u ManageDataResult) SwitchFieldName() string

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

func (*ManageDataResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageDataResultCode

type ManageDataResultCode int32

ManageDataResultCode is an XDR Enum defines as:

enum ManageDataResultCode
 {
     // codes considered as "success" for the operation
     MANAGE_DATA_SUCCESS = 0,
     // codes considered as "failure" for the operation
     MANAGE_DATA_NOT_SUPPORTED_YET =
         -1, // The network hasn't moved to this protocol change yet
     MANAGE_DATA_NAME_NOT_FOUND =
         -2, // Trying to remove a Data Entry that isn't there
     MANAGE_DATA_LOW_RESERVE = -3, // not enough funds to create a new Data Entry
     MANAGE_DATA_INVALID_NAME = -4 // Name not a valid string
 };
const (
	ManageDataResultCodeManageDataSuccess         ManageDataResultCode = 0
	ManageDataResultCodeManageDataNotSupportedYet ManageDataResultCode = -1
	ManageDataResultCodeManageDataNameNotFound    ManageDataResultCode = -2
	ManageDataResultCodeManageDataLowReserve      ManageDataResultCode = -3
	ManageDataResultCodeManageDataInvalidName     ManageDataResultCode = -4
)

func (*ManageDataResultCode) DecodeFrom

func (e *ManageDataResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageDataResultCode) EncodeTo

func (e ManageDataResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageDataResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageDataResultCode) String

func (e ManageDataResultCode) String() string

String returns the name of `e`

func (*ManageDataResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ManageDataResultCode) ValidEnum

func (e ManageDataResultCode) ValidEnum(v int32) bool

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

type ManageOfferEffect

type ManageOfferEffect int32

ManageOfferEffect is an XDR Enum defines as:

enum ManageOfferEffect
 {
     MANAGE_OFFER_CREATED = 0,
     MANAGE_OFFER_UPDATED = 1,
     MANAGE_OFFER_DELETED = 2
 };
const (
	ManageOfferEffectManageOfferCreated ManageOfferEffect = 0
	ManageOfferEffectManageOfferUpdated ManageOfferEffect = 1
	ManageOfferEffectManageOfferDeleted ManageOfferEffect = 2
)

func (*ManageOfferEffect) DecodeFrom

func (e *ManageOfferEffect) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageOfferEffect) EncodeTo

func (e ManageOfferEffect) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageOfferEffect) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageOfferEffect) String

func (e ManageOfferEffect) String() string

String returns the name of `e`

func (*ManageOfferEffect) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ManageOfferEffect) ValidEnum

func (e ManageOfferEffect) ValidEnum(v int32) bool

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

type ManageOfferSuccessResult

type ManageOfferSuccessResult struct {
	OffersClaimed []ClaimAtom
	Offer         ManageOfferSuccessResultOffer
}

ManageOfferSuccessResult is an XDR Struct defines as:

struct ManageOfferSuccessResult
 {
     // offers that got claimed while creating this offer
     ClaimAtom offersClaimed<>;

     union switch (ManageOfferEffect effect)
     {
     case MANAGE_OFFER_CREATED:
     case MANAGE_OFFER_UPDATED:
         OfferEntry offer;
     default:
         void;
     }
     offer;
 };

func (*ManageOfferSuccessResult) DecodeFrom

func (s *ManageOfferSuccessResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ManageOfferSuccessResult) EncodeTo

func (s *ManageOfferSuccessResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageOfferSuccessResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ManageOfferSuccessResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageOfferSuccessResultOffer

type ManageOfferSuccessResultOffer struct {
	Effect ManageOfferEffect
	Offer  *OfferEntry
}

ManageOfferSuccessResultOffer is an XDR NestedUnion defines as:

union switch (ManageOfferEffect effect)
     {
     case MANAGE_OFFER_CREATED:
     case MANAGE_OFFER_UPDATED:
         OfferEntry offer;
     default:
         void;
     }

func NewManageOfferSuccessResultOffer

func NewManageOfferSuccessResultOffer(effect ManageOfferEffect, value interface{}) (result ManageOfferSuccessResultOffer, err error)

NewManageOfferSuccessResultOffer creates a new ManageOfferSuccessResultOffer.

func (ManageOfferSuccessResultOffer) ArmForSwitch

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

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

func (*ManageOfferSuccessResultOffer) DecodeFrom

func (u *ManageOfferSuccessResultOffer) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageOfferSuccessResultOffer) EncodeTo

func (u ManageOfferSuccessResultOffer) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageOfferSuccessResultOffer) GetOffer

func (u ManageOfferSuccessResultOffer) GetOffer() (result OfferEntry, ok bool)

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

func (ManageOfferSuccessResultOffer) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageOfferSuccessResultOffer) MustOffer

MustOffer retrieves the Offer value from the union, panicing if the value is not set.

func (ManageOfferSuccessResultOffer) SwitchFieldName

func (u ManageOfferSuccessResultOffer) SwitchFieldName() string

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

func (*ManageOfferSuccessResultOffer) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageSellOfferOp

type ManageSellOfferOp struct {
	Selling Asset
	Buying  Asset
	Amount  Int64
	Price   Price
	OfferId Int64
}

ManageSellOfferOp is an XDR Struct defines as:

struct ManageSellOfferOp
 {
     Asset selling;
     Asset buying;
     int64 amount; // amount being sold. if set to 0, delete the offer
     Price price;  // price of thing being sold in terms of what you are buying

     // 0=create a new offer, otherwise edit an existing offer
     int64 offerID;
 };

func (*ManageSellOfferOp) DecodeFrom

func (s *ManageSellOfferOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ManageSellOfferOp) EncodeTo

func (s *ManageSellOfferOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageSellOfferOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ManageSellOfferOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageSellOfferResult

type ManageSellOfferResult struct {
	Code    ManageSellOfferResultCode
	Success *ManageOfferSuccessResult
}

ManageSellOfferResult is an XDR Union defines as:

union ManageSellOfferResult switch (ManageSellOfferResultCode code)
 {
 case MANAGE_SELL_OFFER_SUCCESS:
     ManageOfferSuccessResult success;
 default:
     void;
 };

func NewManageSellOfferResult

func NewManageSellOfferResult(code ManageSellOfferResultCode, value interface{}) (result ManageSellOfferResult, err error)

NewManageSellOfferResult creates a new ManageSellOfferResult.

func (ManageSellOfferResult) ArmForSwitch

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

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

func (*ManageSellOfferResult) DecodeFrom

func (u *ManageSellOfferResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageSellOfferResult) EncodeTo

func (u ManageSellOfferResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageSellOfferResult) GetSuccess

func (u ManageSellOfferResult) GetSuccess() (result ManageOfferSuccessResult, ok bool)

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

func (ManageSellOfferResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageSellOfferResult) MustSuccess

MustSuccess retrieves the Success value from the union, panicing if the value is not set.

func (ManageSellOfferResult) SwitchFieldName

func (u ManageSellOfferResult) SwitchFieldName() string

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

func (*ManageSellOfferResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageSellOfferResultCode

type ManageSellOfferResultCode int32

ManageSellOfferResultCode is an XDR Enum defines as:

enum ManageSellOfferResultCode
 {
     // codes considered as "success" for the operation
     MANAGE_SELL_OFFER_SUCCESS = 0,

     // codes considered as "failure" for the operation
     MANAGE_SELL_OFFER_MALFORMED = -1, // generated offer would be invalid
     MANAGE_SELL_OFFER_SELL_NO_TRUST =
         -2,                              // no trust line for what we're selling
     MANAGE_SELL_OFFER_BUY_NO_TRUST = -3, // no trust line for what we're buying
     MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED = -4, // not authorized to sell
     MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED = -5,  // not authorized to buy
     MANAGE_SELL_OFFER_LINE_FULL = -6, // can't receive more of what it's buying
     MANAGE_SELL_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell
     MANAGE_SELL_OFFER_CROSS_SELF =
         -8, // would cross an offer from the same user
     MANAGE_SELL_OFFER_SELL_NO_ISSUER = -9, // no issuer for what we're selling
     MANAGE_SELL_OFFER_BUY_NO_ISSUER = -10, // no issuer for what we're buying

     // update errors
     MANAGE_SELL_OFFER_NOT_FOUND =
         -11, // offerID does not match an existing offer

     MANAGE_SELL_OFFER_LOW_RESERVE =
         -12 // not enough funds to create a new Offer
 };
const (
	ManageSellOfferResultCodeManageSellOfferSuccess           ManageSellOfferResultCode = 0
	ManageSellOfferResultCodeManageSellOfferMalformed         ManageSellOfferResultCode = -1
	ManageSellOfferResultCodeManageSellOfferSellNoTrust       ManageSellOfferResultCode = -2
	ManageSellOfferResultCodeManageSellOfferBuyNoTrust        ManageSellOfferResultCode = -3
	ManageSellOfferResultCodeManageSellOfferSellNotAuthorized ManageSellOfferResultCode = -4
	ManageSellOfferResultCodeManageSellOfferBuyNotAuthorized  ManageSellOfferResultCode = -5
	ManageSellOfferResultCodeManageSellOfferLineFull          ManageSellOfferResultCode = -6
	ManageSellOfferResultCodeManageSellOfferUnderfunded       ManageSellOfferResultCode = -7
	ManageSellOfferResultCodeManageSellOfferCrossSelf         ManageSellOfferResultCode = -8
	ManageSellOfferResultCodeManageSellOfferSellNoIssuer      ManageSellOfferResultCode = -9
	ManageSellOfferResultCodeManageSellOfferBuyNoIssuer       ManageSellOfferResultCode = -10
	ManageSellOfferResultCodeManageSellOfferNotFound          ManageSellOfferResultCode = -11
	ManageSellOfferResultCodeManageSellOfferLowReserve        ManageSellOfferResultCode = -12
)

func (*ManageSellOfferResultCode) DecodeFrom

func (e *ManageSellOfferResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageSellOfferResultCode) EncodeTo

func (e ManageSellOfferResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageSellOfferResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageSellOfferResultCode) String

func (e ManageSellOfferResultCode) String() string

String returns the name of `e`

func (*ManageSellOfferResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ManageSellOfferResultCode) ValidEnum

func (e ManageSellOfferResultCode) ValidEnum(v int32) bool

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

type Memo

type Memo struct {
	Type     MemoType
	Text     *string `xdrmaxsize:"28"`
	Id       *Uint64
	Hash     *Hash
	RetHash  *Hash
	Text1024 *string `xdrmaxsize:"1024"`
	Text2048 *string `xdrmaxsize:"2048"`
	Text4096 *string `xdrmaxsize:"4096"`
}

Memo is an XDR Union defines as:

union Memo switch (MemoType type)
 {
 case MEMO_NONE:
     void;
 case MEMO_TEXT:
     string text<28>;
 case MEMO_ID:
     uint64 id;
 case MEMO_HASH:
     Hash hash; // the hash of what to pull from the content server
 case MEMO_RETURN:
     Hash retHash; // the hash of the tx you are rejecting
 case MEMO_TEXT_1024B:
     string text1024<1024>;
 case MEMO_TEXT_2048B:
     string text2048<2048>;
 case MEMO_TEXT_4096B:
     string text4096<4096>;
 };

func MemoHash

func MemoHash(hash Hash) Memo

func MemoID

func MemoID(id uint64) Memo

func MemoRetHash

func MemoRetHash(hash Hash) Memo

func MemoText

func MemoText(text string) Memo

func MemoText1024B

func MemoText1024B(text string) Memo

func MemoText2048B

func MemoText2048B(text string) Memo

func MemoText4096B

func MemoText4096B(text string) Memo

func NewMemo

func NewMemo(aType MemoType, value interface{}) (result Memo, err error)

NewMemo creates a new Memo.

func (Memo) ArmForSwitch

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

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

func (*Memo) DecodeFrom

func (u *Memo) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Memo) EncodeTo

func (u Memo) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Memo) GetHash

func (u Memo) GetHash() (result Hash, ok bool)

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

func (Memo) GetId

func (u Memo) GetId() (result Uint64, ok bool)

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

func (Memo) GetRetHash

func (u Memo) GetRetHash() (result Hash, ok bool)

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

func (Memo) GetText

func (u Memo) GetText() (result string, ok bool)

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

func (Memo) GetText1024

func (u Memo) GetText1024() (result string, ok bool)

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

func (Memo) GetText2048

func (u Memo) GetText2048() (result string, ok bool)

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

func (Memo) GetText4096

func (u Memo) GetText4096() (result string, ok bool)

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

func (Memo) GoString

func (m Memo) GoString() string

GoString implements fmt.GoStringer.

func (Memo) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (Memo) MustHash

func (u Memo) MustHash() Hash

MustHash retrieves the Hash value from the union, panicing if the value is not set.

func (Memo) MustId

func (u Memo) MustId() Uint64

MustId retrieves the Id value from the union, panicing if the value is not set.

func (Memo) MustRetHash

func (u Memo) MustRetHash() Hash

MustRetHash retrieves the RetHash value from the union, panicing if the value is not set.

func (Memo) MustText

func (u Memo) MustText() string

MustText retrieves the Text value from the union, panicing if the value is not set.

func (Memo) MustText1024

func (u Memo) MustText1024() string

MustText1024 retrieves the Text1024 value from the union, panicing if the value is not set.

func (Memo) MustText2048

func (u Memo) MustText2048() string

MustText2048 retrieves the Text2048 value from the union, panicing if the value is not set.

func (Memo) MustText4096

func (u Memo) MustText4096() string

MustText4096 retrieves the Text4096 value from the union, panicing if the value is not set.

func (Memo) SwitchFieldName

func (u Memo) SwitchFieldName() string

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

func (*Memo) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type MemoType

type MemoType int32

MemoType is an XDR Enum defines as:

enum MemoType
 {
     MEMO_NONE = 0,
     MEMO_TEXT = 1,
     MEMO_ID = 2,
     MEMO_HASH = 3,
     MEMO_RETURN = 4,
     MEMO_TEXT_1024B = 110,
     MEMO_TEXT_2048B = 120,
     MEMO_TEXT_4096B = 130
 };
const (
	MemoTypeMemoNone      MemoType = 0
	MemoTypeMemoText      MemoType = 1
	MemoTypeMemoId        MemoType = 2
	MemoTypeMemoHash      MemoType = 3
	MemoTypeMemoReturn    MemoType = 4
	MemoTypeMemoText1024B MemoType = 110
	MemoTypeMemoText2048B MemoType = 120
	MemoTypeMemoText4096B MemoType = 130
)

func (*MemoType) DecodeFrom

func (e *MemoType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (MemoType) EncodeTo

func (e MemoType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (MemoType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (MemoType) String

func (e MemoType) String() string

String returns the name of `e`

func (*MemoType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (MemoType) ValidEnum

func (e MemoType) ValidEnum(v int32) bool

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

type MessageType

type MessageType int32

MessageType is an XDR Enum defines as:

enum MessageType
 {
     ERROR_MSG = 0,
     AUTH = 2,
     DONT_HAVE = 3,

     GET_PEERS = 4, // gets a list of peers this guy knows about
     PEERS = 5,

     GET_TX_SET = 6, // gets a particular txset by hash
     TX_SET = 7,

     TRANSACTION = 8, // pass on a tx you have heard about

     // SCP
     GET_SCP_QUORUMSET = 9,
     SCP_QUORUMSET = 10,
     SCP_MESSAGE = 11,
     GET_SCP_STATE = 12,

     // new messages
     HELLO = 13,

     SURVEY_REQUEST = 14,
     SURVEY_RESPONSE = 15,

     SEND_MORE = 16
 };
const (
	MessageTypeErrorMsg        MessageType = 0
	MessageTypeAuth            MessageType = 2
	MessageTypeDontHave        MessageType = 3
	MessageTypeGetPeers        MessageType = 4
	MessageTypePeers           MessageType = 5
	MessageTypeGetTxSet        MessageType = 6
	MessageTypeTxSet           MessageType = 7
	MessageTypeTransaction     MessageType = 8
	MessageTypeGetScpQuorumset MessageType = 9
	MessageTypeScpQuorumset    MessageType = 10
	MessageTypeScpMessage      MessageType = 11
	MessageTypeGetScpState     MessageType = 12
	MessageTypeHello           MessageType = 13
	MessageTypeSurveyRequest   MessageType = 14
	MessageTypeSurveyResponse  MessageType = 15
	MessageTypeSendMore        MessageType = 16
)

func (*MessageType) DecodeFrom

func (e *MessageType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (MessageType) EncodeTo

func (e MessageType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (MessageType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (MessageType) String

func (e MessageType) String() string

String returns the name of `e`

func (*MessageType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (MessageType) ValidEnum

func (e MessageType) ValidEnum(v int32) bool

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

type MuxedAccount

type MuxedAccount struct {
	Type     CryptoKeyType
	Ed25519  *Uint256
	Med25519 *MuxedAccountMed25519
}

MuxedAccount is an XDR Union defines as:

union MuxedAccount switch (CryptoKeyType type)
 {
 case KEY_TYPE_ED25519:
     uint256 ed25519;
 case KEY_TYPE_MUXED_ED25519:
     struct
     {
         uint64 id;
         uint256 ed25519;
     } med25519;
 };

func AddressToMuxedAccount

func AddressToMuxedAccount(address string) (MuxedAccount, error)

AddressToMuxedAccount returns an MuxedAccount for a given address string or SEP23 M-address. If the address is not valid the error returned will not be nil

func MustMuxedAddress

func MustMuxedAddress(address string) MuxedAccount

func MustMuxedAddressPtr

func MustMuxedAddressPtr(address string) *MuxedAccount

func MuxedAccountFromAccountId

func MuxedAccountFromAccountId(gAddress string, id uint64) (MuxedAccount, error)

func NewMuxedAccount

func NewMuxedAccount(aType CryptoKeyType, value interface{}) (result MuxedAccount, err error)

NewMuxedAccount creates a new MuxedAccount.

func (*MuxedAccount) Address

func (m *MuxedAccount) Address() string

Address returns the strkey-encoded form of this MuxedAccount. In particular, it will return an M- strkey representation for CryptoKeyTypeKeyTypeMuxedEd25519 variants of the account (according to SEP23). This method will panic if the MuxedAccount is backed by a public key of an unknown type.

func (MuxedAccount) ArmForSwitch

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

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

func (*MuxedAccount) DecodeFrom

func (u *MuxedAccount) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (MuxedAccount) EncodeTo

func (u MuxedAccount) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*MuxedAccount) GetAddress

func (m *MuxedAccount) GetAddress() (string, error)

GetAddress returns the strkey-encoded form of this MuxedAccount. In particular, it will return an M-strkey representation for CryptoKeyTypeKeyTypeMuxedEd25519 variants of the account (according to SEP23). In addition it will return an error if the MuxedAccount is backed by a public key of an unknown type.

func (MuxedAccount) GetEd25519

func (u MuxedAccount) 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 (*MuxedAccount) GetId

func (m *MuxedAccount) GetId() (uint64, error)

GetId retrieves the underlying memo ID if this is a fully muxed account. It will return an error if the muxed account does not have a memo ID (i.e it's of the key type Ed25519).

func (MuxedAccount) GetMed25519

func (u MuxedAccount) GetMed25519() (result MuxedAccountMed25519, ok bool)

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

func (MuxedAccount) GoString

func (m MuxedAccount) GoString() string

GoString implements fmt.GoStringer.

func (MuxedAccount) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (MuxedAccount) MustEd25519

func (u MuxedAccount) MustEd25519() Uint256

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

func (MuxedAccount) MustMed25519

func (u MuxedAccount) MustMed25519() MuxedAccountMed25519

MustMed25519 retrieves the Med25519 value from the union, panicing if the value is not set.

func (*MuxedAccount) SetAddress

func (m *MuxedAccount) SetAddress(address string) error

SetAddress modifies the receiver, setting it's value to the MuxedAccount form of the provided strkey G-address or M-address, as described in SEP23.

func (*MuxedAccount) SetEd25519Address

func (m *MuxedAccount) SetEd25519Address(address string) error

SetEd25519Address modifies the receiver, setting it's value to the MuxedAccount form of the provided G-address. Unlike SetAddress(), it only supports G-addresses.

func (MuxedAccount) SwitchFieldName

func (u MuxedAccount) SwitchFieldName() string

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

func (MuxedAccount) ToAccountId

func (m MuxedAccount) ToAccountId() AccountId

ToAccountId transforms a MuxedAccount to an AccountId, dropping the memo Id if necessary

func (*MuxedAccount) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type MuxedAccountMed25519

type MuxedAccountMed25519 struct {
	Id      Uint64
	Ed25519 Uint256
}

MuxedAccountMed25519 is an XDR NestedStruct defines as:

struct
     {
         uint64 id;
         uint256 ed25519;
     }

func (*MuxedAccountMed25519) DecodeFrom

func (s *MuxedAccountMed25519) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*MuxedAccountMed25519) EncodeTo

func (s *MuxedAccountMed25519) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (MuxedAccountMed25519) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*MuxedAccountMed25519) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type NodeId

type NodeId PublicKey

NodeId is an XDR Typedef defines as:

typedef PublicKey NodeID;

func NewNodeId

func NewNodeId(aType PublicKeyType, value interface{}) (result NodeId, err error)

NewNodeId creates a new NodeId.

func (NodeId) ArmForSwitch

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

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

func (*NodeId) DecodeFrom

func (s *NodeId) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (NodeId) EncodeTo

func (s NodeId) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (NodeId) GetEd25519

func (u NodeId) 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 (NodeId) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (NodeId) MustEd25519

func (u NodeId) MustEd25519() Uint256

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

func (NodeId) SwitchFieldName

func (u NodeId) SwitchFieldName() string

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

func (*NodeId) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OfferEntry

type OfferEntry struct {
	SellerId AccountId
	OfferId  Int64
	Selling  Asset
	Buying   Asset
	Amount   Int64
	Price    Price
	Flags    Uint32
	Ext      OfferEntryExt
}

OfferEntry is an XDR Struct defines as:

struct OfferEntry
 {
     AccountID sellerID;
     int64 offerID;
     Asset selling; // A
     Asset buying;  // B
     int64 amount;  // amount of A

     /* price for this offer:
         price of A in terms of B
         price=AmountB/AmountA=priceNumerator/priceDenominator
         price is after fees
     */
     Price price;
     uint32 flags; // see OfferEntryFlags

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*OfferEntry) DecodeFrom

func (s *OfferEntry) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*OfferEntry) EncodeTo

func (s *OfferEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OfferEntry) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*OfferEntry) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OfferEntryExt

type OfferEntryExt struct {
	V int32
}

OfferEntryExt is an XDR NestedUnion defines as:

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

func NewOfferEntryExt

func NewOfferEntryExt(v int32, value interface{}) (result OfferEntryExt, err error)

NewOfferEntryExt creates a new OfferEntryExt.

func (OfferEntryExt) ArmForSwitch

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

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

func (*OfferEntryExt) DecodeFrom

func (u *OfferEntryExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (OfferEntryExt) EncodeTo

func (u OfferEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OfferEntryExt) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (OfferEntryExt) SwitchFieldName

func (u OfferEntryExt) SwitchFieldName() string

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

func (*OfferEntryExt) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OfferEntryFlags

type OfferEntryFlags int32

OfferEntryFlags is an XDR Enum defines as:

enum OfferEntryFlags
 {
     // an offer with this flag will not act on and take a reverse offer of equal
     // price
     PASSIVE_FLAG = 1
 };
const (
	OfferEntryFlagsPassiveFlag OfferEntryFlags = 1
)

func (*OfferEntryFlags) DecodeFrom

func (e *OfferEntryFlags) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (OfferEntryFlags) EncodeTo

func (e OfferEntryFlags) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OfferEntryFlags) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (OfferEntryFlags) String

func (e OfferEntryFlags) String() string

String returns the name of `e`

func (*OfferEntryFlags) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (OfferEntryFlags) ValidEnum

func (e OfferEntryFlags) ValidEnum(v int32) bool

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

type Operation

type Operation struct {
	SourceAccount *MuxedAccount
	Body          OperationBody
}

Operation is an XDR Struct defines as:

struct Operation
 {
     // sourceAccount is the account used to run the operation
     // if not set, the runtime defaults to "sourceAccount" specified at
     // the transaction level
     MuxedAccount* sourceAccount;

     union switch (OperationType type)
     {
     case CREATE_ACCOUNT:
         CreateAccountOp createAccountOp;
     case PAYMENT:
         PaymentOp paymentOp;
     case PATH_PAYMENT_STRICT_RECEIVE:
         PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp;
     case MANAGE_SELL_OFFER:
         ManageSellOfferOp manageSellOfferOp;
     case CREATE_PASSIVE_SELL_OFFER:
         CreatePassiveSellOfferOp createPassiveSellOfferOp;
     case SET_OPTIONS:
         SetOptionsOp setOptionsOp;
     case CHANGE_TRUST:
         ChangeTrustOp changeTrustOp;
     case ALLOW_TRUST:
         AllowTrustOp allowTrustOp;
     case ACCOUNT_MERGE:
         MuxedAccount destination;
     case INFLATION:
         void;
     case MANAGE_DATA:
         ManageDataOp manageDataOp;
     case BUMP_SEQUENCE:
         BumpSequenceOp bumpSequenceOp;
     case MANAGE_BUY_OFFER:
         ManageBuyOfferOp manageBuyOfferOp;
     case PATH_PAYMENT_STRICT_SEND:
         PathPaymentStrictSendOp pathPaymentStrictSendOp;
     case CREATE_CLAIMABLE_BALANCE:
         CreateClaimableBalanceOp createClaimableBalanceOp;
     case CLAIM_CLAIMABLE_BALANCE:
         ClaimClaimableBalanceOp claimClaimableBalanceOp;
     case BEGIN_SPONSORING_FUTURE_RESERVES:
         BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp;
     case END_SPONSORING_FUTURE_RESERVES:
         void;
     case REVOKE_SPONSORSHIP:
         RevokeSponsorshipOp revokeSponsorshipOp;
     case CLAWBACK:
         ClawbackOp clawbackOp;
     case CLAWBACK_CLAIMABLE_BALANCE:
         ClawbackClaimableBalanceOp clawbackClaimableBalanceOp;
     case SET_TRUST_LINE_FLAGS:
         SetTrustLineFlagsOp setTrustLineFlagsOp;
     case LIQUIDITY_POOL_DEPOSIT:
         LiquidityPoolDepositOp liquidityPoolDepositOp;
     case LIQUIDITY_POOL_WITHDRAW:
         LiquidityPoolWithdrawOp liquidityPoolWithdrawOp;
     }
     body;
 };

func (*Operation) DecodeFrom

func (s *Operation) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Operation) EncodeTo

func (s *Operation) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Operation) GoString

func (o Operation) GoString() string

GoString implements fmt.GoStringer.

func (Operation) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Operation) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OperationBody

type OperationBody struct {
	Type                            OperationType
	CreateAccountOp                 *CreateAccountOp
	PaymentOp                       *PaymentOp
	PathPaymentStrictReceiveOp      *PathPaymentStrictReceiveOp
	ManageSellOfferOp               *ManageSellOfferOp
	CreatePassiveSellOfferOp        *CreatePassiveSellOfferOp
	SetOptionsOp                    *SetOptionsOp
	ChangeTrustOp                   *ChangeTrustOp
	AllowTrustOp                    *AllowTrustOp
	Destination                     *MuxedAccount
	ManageDataOp                    *ManageDataOp
	BumpSequenceOp                  *BumpSequenceOp
	ManageBuyOfferOp                *ManageBuyOfferOp
	PathPaymentStrictSendOp         *PathPaymentStrictSendOp
	CreateClaimableBalanceOp        *CreateClaimableBalanceOp
	ClaimClaimableBalanceOp         *ClaimClaimableBalanceOp
	BeginSponsoringFutureReservesOp *BeginSponsoringFutureReservesOp
	RevokeSponsorshipOp             *RevokeSponsorshipOp
	ClawbackOp                      *ClawbackOp
	ClawbackClaimableBalanceOp      *ClawbackClaimableBalanceOp
	SetTrustLineFlagsOp             *SetTrustLineFlagsOp
	LiquidityPoolDepositOp          *LiquidityPoolDepositOp
	LiquidityPoolWithdrawOp         *LiquidityPoolWithdrawOp
}

OperationBody is an XDR NestedUnion defines as:

union switch (OperationType type)
     {
     case CREATE_ACCOUNT:
         CreateAccountOp createAccountOp;
     case PAYMENT:
         PaymentOp paymentOp;
     case PATH_PAYMENT_STRICT_RECEIVE:
         PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp;
     case MANAGE_SELL_OFFER:
         ManageSellOfferOp manageSellOfferOp;
     case CREATE_PASSIVE_SELL_OFFER:
         CreatePassiveSellOfferOp createPassiveSellOfferOp;
     case SET_OPTIONS:
         SetOptionsOp setOptionsOp;
     case CHANGE_TRUST:
         ChangeTrustOp changeTrustOp;
     case ALLOW_TRUST:
         AllowTrustOp allowTrustOp;
     case ACCOUNT_MERGE:
         MuxedAccount destination;
     case INFLATION:
         void;
     case MANAGE_DATA:
         ManageDataOp manageDataOp;
     case BUMP_SEQUENCE:
         BumpSequenceOp bumpSequenceOp;
     case MANAGE_BUY_OFFER:
         ManageBuyOfferOp manageBuyOfferOp;
     case PATH_PAYMENT_STRICT_SEND:
         PathPaymentStrictSendOp pathPaymentStrictSendOp;
     case CREATE_CLAIMABLE_BALANCE:
         CreateClaimableBalanceOp createClaimableBalanceOp;
     case CLAIM_CLAIMABLE_BALANCE:
         ClaimClaimableBalanceOp claimClaimableBalanceOp;
     case BEGIN_SPONSORING_FUTURE_RESERVES:
         BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp;
     case END_SPONSORING_FUTURE_RESERVES:
         void;
     case REVOKE_SPONSORSHIP:
         RevokeSponsorshipOp revokeSponsorshipOp;
     case CLAWBACK:
         ClawbackOp clawbackOp;
     case CLAWBACK_CLAIMABLE_BALANCE:
         ClawbackClaimableBalanceOp clawbackClaimableBalanceOp;
     case SET_TRUST_LINE_FLAGS:
         SetTrustLineFlagsOp setTrustLineFlagsOp;
     case LIQUIDITY_POOL_DEPOSIT:
         LiquidityPoolDepositOp liquidityPoolDepositOp;
     case LIQUIDITY_POOL_WITHDRAW:
         LiquidityPoolWithdrawOp liquidityPoolWithdrawOp;
     }

func NewOperationBody

func NewOperationBody(aType OperationType, value interface{}) (result OperationBody, err error)

NewOperationBody creates a new OperationBody.

func (OperationBody) ArmForSwitch

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

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

func (*OperationBody) DecodeFrom

func (u *OperationBody) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (OperationBody) EncodeTo

func (u OperationBody) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OperationBody) GetAllowTrustOp

func (u OperationBody) GetAllowTrustOp() (result AllowTrustOp, ok bool)

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

func (OperationBody) GetBeginSponsoringFutureReservesOp

func (u OperationBody) GetBeginSponsoringFutureReservesOp() (result BeginSponsoringFutureReservesOp, ok bool)

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

func (OperationBody) GetBumpSequenceOp

func (u OperationBody) GetBumpSequenceOp() (result BumpSequenceOp, ok bool)

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

func (OperationBody) GetChangeTrustOp

func (u OperationBody) GetChangeTrustOp() (result ChangeTrustOp, ok bool)

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

func (OperationBody) GetClaimClaimableBalanceOp

func (u OperationBody) GetClaimClaimableBalanceOp() (result ClaimClaimableBalanceOp, ok bool)

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

func (OperationBody) GetClawbackClaimableBalanceOp

func (u OperationBody) GetClawbackClaimableBalanceOp() (result ClawbackClaimableBalanceOp, ok bool)

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

func (OperationBody) GetClawbackOp

func (u OperationBody) GetClawbackOp() (result ClawbackOp, ok bool)

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

func (OperationBody) GetCreateAccountOp

func (u OperationBody) GetCreateAccountOp() (result CreateAccountOp, ok bool)

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

func (OperationBody) GetCreateClaimableBalanceOp

func (u OperationBody) GetCreateClaimableBalanceOp() (result CreateClaimableBalanceOp, ok bool)

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

func (OperationBody) GetCreatePassiveSellOfferOp

func (u OperationBody) GetCreatePassiveSellOfferOp() (result CreatePassiveSellOfferOp, ok bool)

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

func (OperationBody) GetDestination

func (u OperationBody) GetDestination() (result MuxedAccount, ok bool)

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

func (OperationBody) GetLiquidityPoolDepositOp

func (u OperationBody) GetLiquidityPoolDepositOp() (result LiquidityPoolDepositOp, ok bool)

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

func (OperationBody) GetLiquidityPoolWithdrawOp

func (u OperationBody) GetLiquidityPoolWithdrawOp() (result LiquidityPoolWithdrawOp, ok bool)

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

func (OperationBody) GetManageBuyOfferOp

func (u OperationBody) GetManageBuyOfferOp() (result ManageBuyOfferOp, ok bool)

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

func (OperationBody) GetManageDataOp

func (u OperationBody) GetManageDataOp() (result ManageDataOp, ok bool)

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

func (OperationBody) GetManageSellOfferOp

func (u OperationBody) GetManageSellOfferOp() (result ManageSellOfferOp, ok bool)

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

func (OperationBody) GetPathPaymentStrictReceiveOp

func (u OperationBody) GetPathPaymentStrictReceiveOp() (result PathPaymentStrictReceiveOp, ok bool)

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

func (OperationBody) GetPathPaymentStrictSendOp

func (u OperationBody) GetPathPaymentStrictSendOp() (result PathPaymentStrictSendOp, ok bool)

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

func (OperationBody) GetPaymentOp

func (u OperationBody) GetPaymentOp() (result PaymentOp, ok bool)

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

func (OperationBody) GetRevokeSponsorshipOp

func (u OperationBody) GetRevokeSponsorshipOp() (result RevokeSponsorshipOp, ok bool)

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

func (OperationBody) GetSetOptionsOp

func (u OperationBody) GetSetOptionsOp() (result SetOptionsOp, ok bool)

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

func (OperationBody) GetSetTrustLineFlagsOp

func (u OperationBody) GetSetTrustLineFlagsOp() (result SetTrustLineFlagsOp, ok bool)

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

func (OperationBody) GoString

func (o OperationBody) GoString() string

GoString implements fmt.GoStringer.

func (OperationBody) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (OperationBody) MustAllowTrustOp

func (u OperationBody) MustAllowTrustOp() AllowTrustOp

MustAllowTrustOp retrieves the AllowTrustOp value from the union, panicing if the value is not set.

func (OperationBody) MustBeginSponsoringFutureReservesOp

func (u OperationBody) MustBeginSponsoringFutureReservesOp() BeginSponsoringFutureReservesOp

MustBeginSponsoringFutureReservesOp retrieves the BeginSponsoringFutureReservesOp value from the union, panicing if the value is not set.

func (OperationBody) MustBumpSequenceOp

func (u OperationBody) MustBumpSequenceOp() BumpSequenceOp

MustBumpSequenceOp retrieves the BumpSequenceOp value from the union, panicing if the value is not set.

func (OperationBody) MustChangeTrustOp

func (u OperationBody) MustChangeTrustOp() ChangeTrustOp

MustChangeTrustOp retrieves the ChangeTrustOp value from the union, panicing if the value is not set.

func (OperationBody) MustClaimClaimableBalanceOp

func (u OperationBody) MustClaimClaimableBalanceOp() ClaimClaimableBalanceOp

MustClaimClaimableBalanceOp retrieves the ClaimClaimableBalanceOp value from the union, panicing if the value is not set.

func (OperationBody) MustClawbackClaimableBalanceOp

func (u OperationBody) MustClawbackClaimableBalanceOp() ClawbackClaimableBalanceOp

MustClawbackClaimableBalanceOp retrieves the ClawbackClaimableBalanceOp value from the union, panicing if the value is not set.

func (OperationBody) MustClawbackOp

func (u OperationBody) MustClawbackOp() ClawbackOp

MustClawbackOp retrieves the ClawbackOp value from the union, panicing if the value is not set.

func (OperationBody) MustCreateAccountOp

func (u OperationBody) MustCreateAccountOp() CreateAccountOp

MustCreateAccountOp retrieves the CreateAccountOp value from the union, panicing if the value is not set.

func (OperationBody) MustCreateClaimableBalanceOp

func (u OperationBody) MustCreateClaimableBalanceOp() CreateClaimableBalanceOp

MustCreateClaimableBalanceOp retrieves the CreateClaimableBalanceOp value from the union, panicing if the value is not set.

func (OperationBody) MustCreatePassiveSellOfferOp

func (u OperationBody) MustCreatePassiveSellOfferOp() CreatePassiveSellOfferOp

MustCreatePassiveSellOfferOp retrieves the CreatePassiveSellOfferOp value from the union, panicing if the value is not set.

func (OperationBody) MustDestination

func (u OperationBody) MustDestination() MuxedAccount

MustDestination retrieves the Destination value from the union, panicing if the value is not set.

func (OperationBody) MustLiquidityPoolDepositOp

func (u OperationBody) MustLiquidityPoolDepositOp() LiquidityPoolDepositOp

MustLiquidityPoolDepositOp retrieves the LiquidityPoolDepositOp value from the union, panicing if the value is not set.

func (OperationBody) MustLiquidityPoolWithdrawOp

func (u OperationBody) MustLiquidityPoolWithdrawOp() LiquidityPoolWithdrawOp

MustLiquidityPoolWithdrawOp retrieves the LiquidityPoolWithdrawOp value from the union, panicing if the value is not set.

func (OperationBody) MustManageBuyOfferOp

func (u OperationBody) MustManageBuyOfferOp() ManageBuyOfferOp

MustManageBuyOfferOp retrieves the ManageBuyOfferOp value from the union, panicing if the value is not set.

func (OperationBody) MustManageDataOp

func (u OperationBody) MustManageDataOp() ManageDataOp

MustManageDataOp retrieves the ManageDataOp value from the union, panicing if the value is not set.

func (OperationBody) MustManageSellOfferOp

func (u OperationBody) MustManageSellOfferOp() ManageSellOfferOp

MustManageSellOfferOp retrieves the ManageSellOfferOp value from the union, panicing if the value is not set.

func (OperationBody) MustPathPaymentStrictReceiveOp

func (u OperationBody) MustPathPaymentStrictReceiveOp() PathPaymentStrictReceiveOp

MustPathPaymentStrictReceiveOp retrieves the PathPaymentStrictReceiveOp value from the union, panicing if the value is not set.

func (OperationBody) MustPathPaymentStrictSendOp

func (u OperationBody) MustPathPaymentStrictSendOp() PathPaymentStrictSendOp

MustPathPaymentStrictSendOp retrieves the PathPaymentStrictSendOp value from the union, panicing if the value is not set.

func (OperationBody) MustPaymentOp

func (u OperationBody) MustPaymentOp() PaymentOp

MustPaymentOp retrieves the PaymentOp value from the union, panicing if the value is not set.

func (OperationBody) MustRevokeSponsorshipOp

func (u OperationBody) MustRevokeSponsorshipOp() RevokeSponsorshipOp

MustRevokeSponsorshipOp retrieves the RevokeSponsorshipOp value from the union, panicing if the value is not set.

func (OperationBody) MustSetOptionsOp

func (u OperationBody) MustSetOptionsOp() SetOptionsOp

MustSetOptionsOp retrieves the SetOptionsOp value from the union, panicing if the value is not set.

func (OperationBody) MustSetTrustLineFlagsOp

func (u OperationBody) MustSetTrustLineFlagsOp() SetTrustLineFlagsOp

MustSetTrustLineFlagsOp retrieves the SetTrustLineFlagsOp value from the union, panicing if the value is not set.

func (OperationBody) SwitchFieldName

func (u OperationBody) SwitchFieldName() string

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

func (*OperationBody) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OperationMeta

type OperationMeta struct {
	Changes LedgerEntryChanges
}

OperationMeta is an XDR Struct defines as:

struct OperationMeta
 {
     LedgerEntryChanges changes;
 };

func (*OperationMeta) DecodeFrom

func (s *OperationMeta) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*OperationMeta) EncodeTo

func (s *OperationMeta) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OperationMeta) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*OperationMeta) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OperationResult

type OperationResult struct {
	Code OperationResultCode
	Tr   *OperationResultTr
}

OperationResult is an XDR Union defines as:

union OperationResult switch (OperationResultCode code)
 {
 case opINNER:
     union switch (OperationType type)
     {
     case CREATE_ACCOUNT:
         CreateAccountResult createAccountResult;
     case PAYMENT:
         PaymentResult paymentResult;
     case PATH_PAYMENT_STRICT_RECEIVE:
         PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult;
     case MANAGE_SELL_OFFER:
         ManageSellOfferResult manageSellOfferResult;
     case CREATE_PASSIVE_SELL_OFFER:
         ManageSellOfferResult createPassiveSellOfferResult;
     case SET_OPTIONS:
         SetOptionsResult setOptionsResult;
     case CHANGE_TRUST:
         ChangeTrustResult changeTrustResult;
     case ALLOW_TRUST:
         AllowTrustResult allowTrustResult;
     case ACCOUNT_MERGE:
         AccountMergeResult accountMergeResult;
     case INFLATION:
         InflationResult inflationResult;
     case MANAGE_DATA:
         ManageDataResult manageDataResult;
     case BUMP_SEQUENCE:
         BumpSequenceResult bumpSeqResult;
     case MANAGE_BUY_OFFER:
         ManageBuyOfferResult manageBuyOfferResult;
     case PATH_PAYMENT_STRICT_SEND:
         PathPaymentStrictSendResult pathPaymentStrictSendResult;
     case CREATE_CLAIMABLE_BALANCE:
         CreateClaimableBalanceResult createClaimableBalanceResult;
     case CLAIM_CLAIMABLE_BALANCE:
         ClaimClaimableBalanceResult claimClaimableBalanceResult;
     case BEGIN_SPONSORING_FUTURE_RESERVES:
         BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult;
     case END_SPONSORING_FUTURE_RESERVES:
         EndSponsoringFutureReservesResult endSponsoringFutureReservesResult;
     case REVOKE_SPONSORSHIP:
         RevokeSponsorshipResult revokeSponsorshipResult;
     case CLAWBACK:
         ClawbackResult clawbackResult;
     case CLAWBACK_CLAIMABLE_BALANCE:
         ClawbackClaimableBalanceResult clawbackClaimableBalanceResult;
     case SET_TRUST_LINE_FLAGS:
         SetTrustLineFlagsResult setTrustLineFlagsResult;
     case LIQUIDITY_POOL_DEPOSIT:
         LiquidityPoolDepositResult liquidityPoolDepositResult;
     case LIQUIDITY_POOL_WITHDRAW:
         LiquidityPoolWithdrawResult liquidityPoolWithdrawResult;
     }
     tr;
 default:
     void;
 };

func NewOperationResult

func NewOperationResult(code OperationResultCode, value interface{}) (result OperationResult, err error)

NewOperationResult creates a new OperationResult.

func (OperationResult) ArmForSwitch

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

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

func (*OperationResult) DecodeFrom

func (u *OperationResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (OperationResult) EncodeTo

func (u OperationResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OperationResult) GetTr

func (u OperationResult) GetTr() (result OperationResultTr, ok bool)

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

func (OperationResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (OperationResult) MustTr

MustTr retrieves the Tr value from the union, panicing if the value is not set.

func (OperationResult) SwitchFieldName

func (u OperationResult) SwitchFieldName() string

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

func (*OperationResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OperationResultCode

type OperationResultCode int32

OperationResultCode is an XDR Enum defines as:

enum OperationResultCode
 {
     opINNER = 0, // inner object result is valid

     opBAD_AUTH = -1,            // too few valid signatures / wrong network
     opNO_ACCOUNT = -2,          // source account was not found
     opNOT_SUPPORTED = -3,       // operation not supported at this time
     opTOO_MANY_SUBENTRIES = -4, // max number of subentries already reached
     opEXCEEDED_WORK_LIMIT = -5, // operation did too much work
     opTOO_MANY_SPONSORING = -6  // account is sponsoring too many entries
 };
const (
	OperationResultCodeOpInner             OperationResultCode = 0
	OperationResultCodeOpBadAuth           OperationResultCode = -1
	OperationResultCodeOpNoAccount         OperationResultCode = -2
	OperationResultCodeOpNotSupported      OperationResultCode = -3
	OperationResultCodeOpTooManySubentries OperationResultCode = -4
	OperationResultCodeOpExceededWorkLimit OperationResultCode = -5
	OperationResultCodeOpTooManySponsoring OperationResultCode = -6
)

func (*OperationResultCode) DecodeFrom

func (e *OperationResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (OperationResultCode) EncodeTo

func (e OperationResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OperationResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (OperationResultCode) String

func (e OperationResultCode) String() string

String returns the name of `e`

func (*OperationResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (OperationResultCode) ValidEnum

func (e OperationResultCode) ValidEnum(v int32) bool

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

type OperationResultTr

type OperationResultTr struct {
	Type                                OperationType
	CreateAccountResult                 *CreateAccountResult
	PaymentResult                       *PaymentResult
	PathPaymentStrictReceiveResult      *PathPaymentStrictReceiveResult
	ManageSellOfferResult               *ManageSellOfferResult
	CreatePassiveSellOfferResult        *ManageSellOfferResult
	SetOptionsResult                    *SetOptionsResult
	ChangeTrustResult                   *ChangeTrustResult
	AllowTrustResult                    *AllowTrustResult
	AccountMergeResult                  *AccountMergeResult
	InflationResult                     *InflationResult
	ManageDataResult                    *ManageDataResult
	BumpSeqResult                       *BumpSequenceResult
	ManageBuyOfferResult                *ManageBuyOfferResult
	PathPaymentStrictSendResult         *PathPaymentStrictSendResult
	CreateClaimableBalanceResult        *CreateClaimableBalanceResult
	ClaimClaimableBalanceResult         *ClaimClaimableBalanceResult
	BeginSponsoringFutureReservesResult *BeginSponsoringFutureReservesResult
	EndSponsoringFutureReservesResult   *EndSponsoringFutureReservesResult
	RevokeSponsorshipResult             *RevokeSponsorshipResult
	ClawbackResult                      *ClawbackResult
	ClawbackClaimableBalanceResult      *ClawbackClaimableBalanceResult
	SetTrustLineFlagsResult             *SetTrustLineFlagsResult
	LiquidityPoolDepositResult          *LiquidityPoolDepositResult
	LiquidityPoolWithdrawResult         *LiquidityPoolWithdrawResult
}

OperationResultTr is an XDR NestedUnion defines as:

union switch (OperationType type)
     {
     case CREATE_ACCOUNT:
         CreateAccountResult createAccountResult;
     case PAYMENT:
         PaymentResult paymentResult;
     case PATH_PAYMENT_STRICT_RECEIVE:
         PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult;
     case MANAGE_SELL_OFFER:
         ManageSellOfferResult manageSellOfferResult;
     case CREATE_PASSIVE_SELL_OFFER:
         ManageSellOfferResult createPassiveSellOfferResult;
     case SET_OPTIONS:
         SetOptionsResult setOptionsResult;
     case CHANGE_TRUST:
         ChangeTrustResult changeTrustResult;
     case ALLOW_TRUST:
         AllowTrustResult allowTrustResult;
     case ACCOUNT_MERGE:
         AccountMergeResult accountMergeResult;
     case INFLATION:
         InflationResult inflationResult;
     case MANAGE_DATA:
         ManageDataResult manageDataResult;
     case BUMP_SEQUENCE:
         BumpSequenceResult bumpSeqResult;
     case MANAGE_BUY_OFFER:
         ManageBuyOfferResult manageBuyOfferResult;
     case PATH_PAYMENT_STRICT_SEND:
         PathPaymentStrictSendResult pathPaymentStrictSendResult;
     case CREATE_CLAIMABLE_BALANCE:
         CreateClaimableBalanceResult createClaimableBalanceResult;
     case CLAIM_CLAIMABLE_BALANCE:
         ClaimClaimableBalanceResult claimClaimableBalanceResult;
     case BEGIN_SPONSORING_FUTURE_RESERVES:
         BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult;
     case END_SPONSORING_FUTURE_RESERVES:
         EndSponsoringFutureReservesResult endSponsoringFutureReservesResult;
     case REVOKE_SPONSORSHIP:
         RevokeSponsorshipResult revokeSponsorshipResult;
     case CLAWBACK:
         ClawbackResult clawbackResult;
     case CLAWBACK_CLAIMABLE_BALANCE:
         ClawbackClaimableBalanceResult clawbackClaimableBalanceResult;
     case SET_TRUST_LINE_FLAGS:
         SetTrustLineFlagsResult setTrustLineFlagsResult;
     case LIQUIDITY_POOL_DEPOSIT:
         LiquidityPoolDepositResult liquidityPoolDepositResult;
     case LIQUIDITY_POOL_WITHDRAW:
         LiquidityPoolWithdrawResult liquidityPoolWithdrawResult;
     }

func NewOperationResultTr

func NewOperationResultTr(aType OperationType, value interface{}) (result OperationResultTr, err error)

NewOperationResultTr creates a new OperationResultTr.

func (OperationResultTr) ArmForSwitch

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

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

func (*OperationResultTr) DecodeFrom

func (u *OperationResultTr) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (OperationResultTr) EncodeTo

func (u OperationResultTr) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OperationResultTr) GetAccountMergeResult

func (u OperationResultTr) GetAccountMergeResult() (result AccountMergeResult, ok bool)

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

func (OperationResultTr) GetAllowTrustResult

func (u OperationResultTr) GetAllowTrustResult() (result AllowTrustResult, ok bool)

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

func (OperationResultTr) GetBeginSponsoringFutureReservesResult

func (u OperationResultTr) GetBeginSponsoringFutureReservesResult() (result BeginSponsoringFutureReservesResult, ok bool)

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

func (OperationResultTr) GetBumpSeqResult

func (u OperationResultTr) GetBumpSeqResult() (result BumpSequenceResult, ok bool)

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

func (OperationResultTr) GetChangeTrustResult

func (u OperationResultTr) GetChangeTrustResult() (result ChangeTrustResult, ok bool)

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

func (OperationResultTr) GetClaimClaimableBalanceResult

func (u OperationResultTr) GetClaimClaimableBalanceResult() (result ClaimClaimableBalanceResult, ok bool)

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

func (OperationResultTr) GetClawbackClaimableBalanceResult

func (u OperationResultTr) GetClawbackClaimableBalanceResult() (result ClawbackClaimableBalanceResult, ok bool)

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

func (OperationResultTr) GetClawbackResult

func (u OperationResultTr) GetClawbackResult() (result ClawbackResult, ok bool)

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

func (OperationResultTr) GetCreateAccountResult

func (u OperationResultTr) GetCreateAccountResult() (result CreateAccountResult, ok bool)

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

func (OperationResultTr) GetCreateClaimableBalanceResult

func (u OperationResultTr) GetCreateClaimableBalanceResult() (result CreateClaimableBalanceResult, ok bool)

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

func (OperationResultTr) GetCreatePassiveSellOfferResult

func (u OperationResultTr) GetCreatePassiveSellOfferResult() (result ManageSellOfferResult, ok bool)

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

func (OperationResultTr) GetEndSponsoringFutureReservesResult

func (u OperationResultTr) GetEndSponsoringFutureReservesResult() (result EndSponsoringFutureReservesResult, ok bool)

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

func (OperationResultTr) GetInflationResult

func (u OperationResultTr) GetInflationResult() (result InflationResult, ok bool)

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

func (OperationResultTr) GetLiquidityPoolDepositResult

func (u OperationResultTr) GetLiquidityPoolDepositResult() (result LiquidityPoolDepositResult, ok bool)

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

func (OperationResultTr) GetLiquidityPoolWithdrawResult

func (u OperationResultTr) GetLiquidityPoolWithdrawResult() (result LiquidityPoolWithdrawResult, ok bool)

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

func (OperationResultTr) GetManageBuyOfferResult

func (u OperationResultTr) GetManageBuyOfferResult() (result ManageBuyOfferResult, ok bool)

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

func (OperationResultTr) GetManageDataResult

func (u OperationResultTr) GetManageDataResult() (result ManageDataResult, ok bool)

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

func (OperationResultTr) GetManageSellOfferResult

func (u OperationResultTr) GetManageSellOfferResult() (result ManageSellOfferResult, ok bool)

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

func (OperationResultTr) GetPathPaymentStrictReceiveResult

func (u OperationResultTr) GetPathPaymentStrictReceiveResult() (result PathPaymentStrictReceiveResult, ok bool)

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

func (OperationResultTr) GetPathPaymentStrictSendResult

func (u OperationResultTr) GetPathPaymentStrictSendResult() (result PathPaymentStrictSendResult, ok bool)

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

func (OperationResultTr) GetPaymentResult

func (u OperationResultTr) GetPaymentResult() (result PaymentResult, ok bool)

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

func (OperationResultTr) GetRevokeSponsorshipResult

func (u OperationResultTr) GetRevokeSponsorshipResult() (result RevokeSponsorshipResult, ok bool)

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

func (OperationResultTr) GetSetOptionsResult

func (u OperationResultTr) GetSetOptionsResult() (result SetOptionsResult, ok bool)

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

func (OperationResultTr) GetSetTrustLineFlagsResult

func (u OperationResultTr) GetSetTrustLineFlagsResult() (result SetTrustLineFlagsResult, ok bool)

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

func (OperationResultTr) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (OperationResultTr) MustAccountMergeResult

func (u OperationResultTr) MustAccountMergeResult() AccountMergeResult

MustAccountMergeResult retrieves the AccountMergeResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustAllowTrustResult

func (u OperationResultTr) MustAllowTrustResult() AllowTrustResult

MustAllowTrustResult retrieves the AllowTrustResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustBeginSponsoringFutureReservesResult

func (u OperationResultTr) MustBeginSponsoringFutureReservesResult() BeginSponsoringFutureReservesResult

MustBeginSponsoringFutureReservesResult retrieves the BeginSponsoringFutureReservesResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustBumpSeqResult

func (u OperationResultTr) MustBumpSeqResult() BumpSequenceResult

MustBumpSeqResult retrieves the BumpSeqResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustChangeTrustResult

func (u OperationResultTr) MustChangeTrustResult() ChangeTrustResult

MustChangeTrustResult retrieves the ChangeTrustResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustClaimClaimableBalanceResult

func (u OperationResultTr) MustClaimClaimableBalanceResult() ClaimClaimableBalanceResult

MustClaimClaimableBalanceResult retrieves the ClaimClaimableBalanceResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustClawbackClaimableBalanceResult

func (u OperationResultTr) MustClawbackClaimableBalanceResult() ClawbackClaimableBalanceResult

MustClawbackClaimableBalanceResult retrieves the ClawbackClaimableBalanceResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustClawbackResult

func (u OperationResultTr) MustClawbackResult() ClawbackResult

MustClawbackResult retrieves the ClawbackResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustCreateAccountResult

func (u OperationResultTr) MustCreateAccountResult() CreateAccountResult

MustCreateAccountResult retrieves the CreateAccountResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustCreateClaimableBalanceResult

func (u OperationResultTr) MustCreateClaimableBalanceResult() CreateClaimableBalanceResult

MustCreateClaimableBalanceResult retrieves the CreateClaimableBalanceResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustCreatePassiveSellOfferResult

func (u OperationResultTr) MustCreatePassiveSellOfferResult() ManageSellOfferResult

MustCreatePassiveSellOfferResult retrieves the CreatePassiveSellOfferResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustEndSponsoringFutureReservesResult

func (u OperationResultTr) MustEndSponsoringFutureReservesResult() EndSponsoringFutureReservesResult

MustEndSponsoringFutureReservesResult retrieves the EndSponsoringFutureReservesResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustInflationResult

func (u OperationResultTr) MustInflationResult() InflationResult

MustInflationResult retrieves the InflationResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustLiquidityPoolDepositResult

func (u OperationResultTr) MustLiquidityPoolDepositResult() LiquidityPoolDepositResult

MustLiquidityPoolDepositResult retrieves the LiquidityPoolDepositResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustLiquidityPoolWithdrawResult

func (u OperationResultTr) MustLiquidityPoolWithdrawResult() LiquidityPoolWithdrawResult

MustLiquidityPoolWithdrawResult retrieves the LiquidityPoolWithdrawResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustManageBuyOfferResult

func (u OperationResultTr) MustManageBuyOfferResult() ManageBuyOfferResult

MustManageBuyOfferResult retrieves the ManageBuyOfferResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustManageDataResult

func (u OperationResultTr) MustManageDataResult() ManageDataResult

MustManageDataResult retrieves the ManageDataResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustManageSellOfferResult

func (u OperationResultTr) MustManageSellOfferResult() ManageSellOfferResult

MustManageSellOfferResult retrieves the ManageSellOfferResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustPathPaymentStrictReceiveResult

func (u OperationResultTr) MustPathPaymentStrictReceiveResult() PathPaymentStrictReceiveResult

MustPathPaymentStrictReceiveResult retrieves the PathPaymentStrictReceiveResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustPathPaymentStrictSendResult

func (u OperationResultTr) MustPathPaymentStrictSendResult() PathPaymentStrictSendResult

MustPathPaymentStrictSendResult retrieves the PathPaymentStrictSendResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustPaymentResult

func (u OperationResultTr) MustPaymentResult() PaymentResult

MustPaymentResult retrieves the PaymentResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustRevokeSponsorshipResult

func (u OperationResultTr) MustRevokeSponsorshipResult() RevokeSponsorshipResult

MustRevokeSponsorshipResult retrieves the RevokeSponsorshipResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustSetOptionsResult

func (u OperationResultTr) MustSetOptionsResult() SetOptionsResult

MustSetOptionsResult retrieves the SetOptionsResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustSetTrustLineFlagsResult

func (u OperationResultTr) MustSetTrustLineFlagsResult() SetTrustLineFlagsResult

MustSetTrustLineFlagsResult retrieves the SetTrustLineFlagsResult value from the union, panicing if the value is not set.

func (OperationResultTr) SwitchFieldName

func (u OperationResultTr) SwitchFieldName() string

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

func (*OperationResultTr) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OperationType

type OperationType int32

OperationType is an XDR Enum defines as:

enum OperationType
 {
     CREATE_ACCOUNT = 0,
     PAYMENT = 1,
     PATH_PAYMENT_STRICT_RECEIVE = 2,
     MANAGE_SELL_OFFER = 3,
     CREATE_PASSIVE_SELL_OFFER = 4,
     SET_OPTIONS = 5,
     CHANGE_TRUST = 6,
     ALLOW_TRUST = 7,
     ACCOUNT_MERGE = 8,
     INFLATION = 9,
     MANAGE_DATA = 10,
     BUMP_SEQUENCE = 11,
     MANAGE_BUY_OFFER = 12,
     PATH_PAYMENT_STRICT_SEND = 13,
     CREATE_CLAIMABLE_BALANCE = 14,
     CLAIM_CLAIMABLE_BALANCE = 15,
     BEGIN_SPONSORING_FUTURE_RESERVES = 16,
     END_SPONSORING_FUTURE_RESERVES = 17,
     REVOKE_SPONSORSHIP = 18,
     CLAWBACK = 19,
     CLAWBACK_CLAIMABLE_BALANCE = 20,
     SET_TRUST_LINE_FLAGS = 21,
     LIQUIDITY_POOL_DEPOSIT = 22,
     LIQUIDITY_POOL_WITHDRAW = 23
 };
const (
	OperationTypeCreateAccount                 OperationType = 0
	OperationTypePayment                       OperationType = 1
	OperationTypePathPaymentStrictReceive      OperationType = 2
	OperationTypeManageSellOffer               OperationType = 3
	OperationTypeCreatePassiveSellOffer        OperationType = 4
	OperationTypeSetOptions                    OperationType = 5
	OperationTypeChangeTrust                   OperationType = 6
	OperationTypeAllowTrust                    OperationType = 7
	OperationTypeAccountMerge                  OperationType = 8
	OperationTypeInflation                     OperationType = 9
	OperationTypeManageData                    OperationType = 10
	OperationTypeBumpSequence                  OperationType = 11
	OperationTypeManageBuyOffer                OperationType = 12
	OperationTypePathPaymentStrictSend         OperationType = 13
	OperationTypeCreateClaimableBalance        OperationType = 14
	OperationTypeClaimClaimableBalance         OperationType = 15
	OperationTypeBeginSponsoringFutureReserves OperationType = 16
	OperationTypeEndSponsoringFutureReserves   OperationType = 17
	OperationTypeRevokeSponsorship             OperationType = 18
	OperationTypeClawback                      OperationType = 19
	OperationTypeClawbackClaimableBalance      OperationType = 20
	OperationTypeSetTrustLineFlags             OperationType = 21
	OperationTypeLiquidityPoolDeposit          OperationType = 22
	OperationTypeLiquidityPoolWithdraw         OperationType = 23
)

func (*OperationType) DecodeFrom

func (e *OperationType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (OperationType) EncodeTo

func (e OperationType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OperationType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (OperationType) String

func (e OperationType) String() string

String returns the name of `e`

func (*OperationType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (OperationType) ValidEnum

func (e OperationType) ValidEnum(v int32) bool

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

type PathPaymentStrictReceiveOp

type PathPaymentStrictReceiveOp struct {
	SendAsset   Asset
	SendMax     Int64
	Destination MuxedAccount
	DestAsset   Asset
	DestAmount  Int64
	Path        []Asset `xdrmaxsize:"5"`
}

PathPaymentStrictReceiveOp is an XDR Struct defines as:

struct PathPaymentStrictReceiveOp
 {
     Asset sendAsset; // asset we pay with
     int64 sendMax;   // the maximum amount of sendAsset to
                      // send (excluding fees).
                      // The operation will fail if can't be met

     MuxedAccount destination; // recipient of the payment
     Asset destAsset;          // what they end up with
     int64 destAmount;         // amount they end up with

     Asset path<5>; // additional hops it must go through to get there
 };

func (*PathPaymentStrictReceiveOp) DecodeFrom

func (s *PathPaymentStrictReceiveOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PathPaymentStrictReceiveOp) EncodeTo

func (s *PathPaymentStrictReceiveOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictReceiveOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*PathPaymentStrictReceiveOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PathPaymentStrictReceiveResult

type PathPaymentStrictReceiveResult struct {
	Code     PathPaymentStrictReceiveResultCode
	Success  *PathPaymentStrictReceiveResultSuccess
	NoIssuer *Asset
}

PathPaymentStrictReceiveResult is an XDR Union defines as:

union PathPaymentStrictReceiveResult switch (
     PathPaymentStrictReceiveResultCode code)
 {
 case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS:
     struct
     {
         ClaimAtom offers<>;
         SimplePaymentResult last;
     } success;
 case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER:
     Asset noIssuer; // the asset that caused the error
 default:
     void;
 };

func NewPathPaymentStrictReceiveResult

func NewPathPaymentStrictReceiveResult(code PathPaymentStrictReceiveResultCode, value interface{}) (result PathPaymentStrictReceiveResult, err error)

NewPathPaymentStrictReceiveResult creates a new PathPaymentStrictReceiveResult.

func (PathPaymentStrictReceiveResult) ArmForSwitch

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

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

func (*PathPaymentStrictReceiveResult) DecodeFrom

func (u *PathPaymentStrictReceiveResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PathPaymentStrictReceiveResult) EncodeTo

func (u PathPaymentStrictReceiveResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictReceiveResult) GetNoIssuer

func (u PathPaymentStrictReceiveResult) GetNoIssuer() (result Asset, ok bool)

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

func (PathPaymentStrictReceiveResult) GetSuccess

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

func (PathPaymentStrictReceiveResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (PathPaymentStrictReceiveResult) MustNoIssuer

func (u PathPaymentStrictReceiveResult) MustNoIssuer() Asset

MustNoIssuer retrieves the NoIssuer value from the union, panicing if the value is not set.

func (PathPaymentStrictReceiveResult) MustSuccess

MustSuccess retrieves the Success value from the union, panicing if the value is not set.

func (*PathPaymentStrictReceiveResult) SendAmount

func (pr *PathPaymentStrictReceiveResult) SendAmount() Int64

SendAmount returns the amount spent, denominated in the source asset, in the course of this path payment

func (PathPaymentStrictReceiveResult) SwitchFieldName

func (u PathPaymentStrictReceiveResult) SwitchFieldName() string

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

func (*PathPaymentStrictReceiveResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PathPaymentStrictReceiveResultCode

type PathPaymentStrictReceiveResultCode int32

PathPaymentStrictReceiveResultCode is an XDR Enum defines as:

enum PathPaymentStrictReceiveResultCode
 {
     // codes considered as "success" for the operation
     PATH_PAYMENT_STRICT_RECEIVE_SUCCESS = 0, // success

     // codes considered as "failure" for the operation
     PATH_PAYMENT_STRICT_RECEIVE_MALFORMED = -1, // bad input
     PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED =
         -2, // not enough funds in source account
     PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST =
         -3, // no trust line on source account
     PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED =
         -4, // source not authorized to transfer
     PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION =
         -5, // destination account does not exist
     PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST =
         -6, // dest missing a trust line for asset
     PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED =
         -7, // dest not authorized to hold asset
     PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL =
         -8, // dest would go above their limit
     PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER = -9, // missing issuer on one asset
     PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS =
         -10, // not enough offers to satisfy path
     PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF =
         -11, // would cross one of its own offers
     PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX = -12 // could not satisfy sendmax
 };
const (
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveSuccess          PathPaymentStrictReceiveResultCode = 0
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveMalformed        PathPaymentStrictReceiveResultCode = -1
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveUnderfunded      PathPaymentStrictReceiveResultCode = -2
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveSrcNoTrust       PathPaymentStrictReceiveResultCode = -3
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveSrcNotAuthorized PathPaymentStrictReceiveResultCode = -4
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveNoDestination    PathPaymentStrictReceiveResultCode = -5
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveNoTrust          PathPaymentStrictReceiveResultCode = -6
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveNotAuthorized    PathPaymentStrictReceiveResultCode = -7
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveLineFull         PathPaymentStrictReceiveResultCode = -8
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveNoIssuer         PathPaymentStrictReceiveResultCode = -9
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveTooFewOffers     PathPaymentStrictReceiveResultCode = -10
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveOfferCrossSelf   PathPaymentStrictReceiveResultCode = -11
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveOverSendmax      PathPaymentStrictReceiveResultCode = -12
)

func (*PathPaymentStrictReceiveResultCode) DecodeFrom

func (e *PathPaymentStrictReceiveResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PathPaymentStrictReceiveResultCode) EncodeTo

func (e PathPaymentStrictReceiveResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictReceiveResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (PathPaymentStrictReceiveResultCode) String

String returns the name of `e`

func (*PathPaymentStrictReceiveResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (PathPaymentStrictReceiveResultCode) ValidEnum

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

type PathPaymentStrictReceiveResultSuccess

type PathPaymentStrictReceiveResultSuccess struct {
	Offers []ClaimAtom
	Last   SimplePaymentResult
}

PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defines as:

struct
     {
         ClaimAtom offers<>;
         SimplePaymentResult last;
     }

func (*PathPaymentStrictReceiveResultSuccess) DecodeFrom

func (s *PathPaymentStrictReceiveResultSuccess) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PathPaymentStrictReceiveResultSuccess) EncodeTo

func (s *PathPaymentStrictReceiveResultSuccess) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictReceiveResultSuccess) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*PathPaymentStrictReceiveResultSuccess) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PathPaymentStrictSendOp

type PathPaymentStrictSendOp struct {
	SendAsset   Asset
	SendAmount  Int64
	Destination MuxedAccount
	DestAsset   Asset
	DestMin     Int64
	Path        []Asset `xdrmaxsize:"5"`
}

PathPaymentStrictSendOp is an XDR Struct defines as:

struct PathPaymentStrictSendOp
 {
     Asset sendAsset;  // asset we pay with
     int64 sendAmount; // amount of sendAsset to send (excluding fees)

     MuxedAccount destination; // recipient of the payment
     Asset destAsset;          // what they end up with
     int64 destMin;            // the minimum amount of dest asset to
                               // be received
                               // The operation will fail if it can't be met

     Asset path<5>; // additional hops it must go through to get there
 };

func (*PathPaymentStrictSendOp) DecodeFrom

func (s *PathPaymentStrictSendOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PathPaymentStrictSendOp) EncodeTo

func (s *PathPaymentStrictSendOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictSendOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*PathPaymentStrictSendOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PathPaymentStrictSendResult

type PathPaymentStrictSendResult struct {
	Code     PathPaymentStrictSendResultCode
	Success  *PathPaymentStrictSendResultSuccess
	NoIssuer *Asset
}

PathPaymentStrictSendResult is an XDR Union defines as:

union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code)
 {
 case PATH_PAYMENT_STRICT_SEND_SUCCESS:
     struct
     {
         ClaimAtom offers<>;
         SimplePaymentResult last;
     } success;
 case PATH_PAYMENT_STRICT_SEND_NO_ISSUER:
     Asset noIssuer; // the asset that caused the error
 default:
     void;
 };

func NewPathPaymentStrictSendResult

func NewPathPaymentStrictSendResult(code PathPaymentStrictSendResultCode, value interface{}) (result PathPaymentStrictSendResult, err error)

NewPathPaymentStrictSendResult creates a new PathPaymentStrictSendResult.

func (PathPaymentStrictSendResult) ArmForSwitch

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

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

func (*PathPaymentStrictSendResult) DecodeFrom

func (u *PathPaymentStrictSendResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PathPaymentStrictSendResult) DestAmount

func (pr *PathPaymentStrictSendResult) DestAmount() Int64

DestAmount returns the amount received, denominated in the destination asset, in the course of this path payment

func (PathPaymentStrictSendResult) EncodeTo

func (u PathPaymentStrictSendResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictSendResult) GetNoIssuer

func (u PathPaymentStrictSendResult) GetNoIssuer() (result Asset, ok bool)

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

func (PathPaymentStrictSendResult) GetSuccess

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

func (PathPaymentStrictSendResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (PathPaymentStrictSendResult) MustNoIssuer

func (u PathPaymentStrictSendResult) MustNoIssuer() Asset

MustNoIssuer retrieves the NoIssuer value from the union, panicing if the value is not set.

func (PathPaymentStrictSendResult) MustSuccess

MustSuccess retrieves the Success value from the union, panicing if the value is not set.

func (PathPaymentStrictSendResult) SwitchFieldName

func (u PathPaymentStrictSendResult) SwitchFieldName() string

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

func (*PathPaymentStrictSendResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PathPaymentStrictSendResultCode

type PathPaymentStrictSendResultCode int32

PathPaymentStrictSendResultCode is an XDR Enum defines as:

enum PathPaymentStrictSendResultCode
 {
     // codes considered as "success" for the operation
     PATH_PAYMENT_STRICT_SEND_SUCCESS = 0, // success

     // codes considered as "failure" for the operation
     PATH_PAYMENT_STRICT_SEND_MALFORMED = -1, // bad input
     PATH_PAYMENT_STRICT_SEND_UNDERFUNDED =
         -2, // not enough funds in source account
     PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST =
         -3, // no trust line on source account
     PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED =
         -4, // source not authorized to transfer
     PATH_PAYMENT_STRICT_SEND_NO_DESTINATION =
         -5, // destination account does not exist
     PATH_PAYMENT_STRICT_SEND_NO_TRUST =
         -6, // dest missing a trust line for asset
     PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED =
         -7, // dest not authorized to hold asset
     PATH_PAYMENT_STRICT_SEND_LINE_FULL = -8, // dest would go above their limit
     PATH_PAYMENT_STRICT_SEND_NO_ISSUER = -9, // missing issuer on one asset
     PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS =
         -10, // not enough offers to satisfy path
     PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF =
         -11, // would cross one of its own offers
     PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN = -12 // could not satisfy destMin
 };
const (
	PathPaymentStrictSendResultCodePathPaymentStrictSendSuccess          PathPaymentStrictSendResultCode = 0
	PathPaymentStrictSendResultCodePathPaymentStrictSendMalformed        PathPaymentStrictSendResultCode = -1
	PathPaymentStrictSendResultCodePathPaymentStrictSendUnderfunded      PathPaymentStrictSendResultCode = -2
	PathPaymentStrictSendResultCodePathPaymentStrictSendSrcNoTrust       PathPaymentStrictSendResultCode = -3
	PathPaymentStrictSendResultCodePathPaymentStrictSendSrcNotAuthorized PathPaymentStrictSendResultCode = -4
	PathPaymentStrictSendResultCodePathPaymentStrictSendNoDestination    PathPaymentStrictSendResultCode = -5
	PathPaymentStrictSendResultCodePathPaymentStrictSendNoTrust          PathPaymentStrictSendResultCode = -6
	PathPaymentStrictSendResultCodePathPaymentStrictSendNotAuthorized    PathPaymentStrictSendResultCode = -7
	PathPaymentStrictSendResultCodePathPaymentStrictSendLineFull         PathPaymentStrictSendResultCode = -8
	PathPaymentStrictSendResultCodePathPaymentStrictSendNoIssuer         PathPaymentStrictSendResultCode = -9
	PathPaymentStrictSendResultCodePathPaymentStrictSendTooFewOffers     PathPaymentStrictSendResultCode = -10
	PathPaymentStrictSendResultCodePathPaymentStrictSendOfferCrossSelf   PathPaymentStrictSendResultCode = -11
	PathPaymentStrictSendResultCodePathPaymentStrictSendUnderDestmin     PathPaymentStrictSendResultCode = -12
)

func (*PathPaymentStrictSendResultCode) DecodeFrom

func (e *PathPaymentStrictSendResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PathPaymentStrictSendResultCode) EncodeTo

func (e PathPaymentStrictSendResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictSendResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (PathPaymentStrictSendResultCode) String

String returns the name of `e`

func (*PathPaymentStrictSendResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (PathPaymentStrictSendResultCode) ValidEnum

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

type PathPaymentStrictSendResultSuccess

type PathPaymentStrictSendResultSuccess struct {
	Offers []ClaimAtom
	Last   SimplePaymentResult
}

PathPaymentStrictSendResultSuccess is an XDR NestedStruct defines as:

struct
     {
         ClaimAtom offers<>;
         SimplePaymentResult last;
     }

func (*PathPaymentStrictSendResultSuccess) DecodeFrom

func (s *PathPaymentStrictSendResultSuccess) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PathPaymentStrictSendResultSuccess) EncodeTo

func (s *PathPaymentStrictSendResultSuccess) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictSendResultSuccess) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*PathPaymentStrictSendResultSuccess) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PaymentOp

type PaymentOp struct {
	Destination MuxedAccount
	Asset       Asset
	Amount      Int64
}

PaymentOp is an XDR Struct defines as:

struct PaymentOp
 {
     MuxedAccount destination; // recipient of the payment
     Asset asset;              // what they end up with
     int64 amount;             // amount they end up with
 };

func (*PaymentOp) DecodeFrom

func (s *PaymentOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PaymentOp) EncodeTo

func (s *PaymentOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PaymentOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*PaymentOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PaymentResult

type PaymentResult struct {
	Code PaymentResultCode
}

PaymentResult is an XDR Union defines as:

union PaymentResult switch (PaymentResultCode code)
 {
 case PAYMENT_SUCCESS:
     void;
 default:
     void;
 };

func NewPaymentResult

func NewPaymentResult(code PaymentResultCode, value interface{}) (result PaymentResult, err error)

NewPaymentResult creates a new PaymentResult.

func (PaymentResult) ArmForSwitch

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

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

func (*PaymentResult) DecodeFrom

func (u *PaymentResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PaymentResult) EncodeTo

func (u PaymentResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PaymentResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (PaymentResult) SwitchFieldName

func (u PaymentResult) SwitchFieldName() string

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

func (*PaymentResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PaymentResultCode

type PaymentResultCode int32

PaymentResultCode is an XDR Enum defines as:

enum PaymentResultCode
 {
     // codes considered as "success" for the operation
     PAYMENT_SUCCESS = 0, // payment successfully completed

     // codes considered as "failure" for the operation
     PAYMENT_MALFORMED = -1,          // bad input
     PAYMENT_UNDERFUNDED = -2,        // not enough funds in source account
     PAYMENT_SRC_NO_TRUST = -3,       // no trust line on source account
     PAYMENT_SRC_NOT_AUTHORIZED = -4, // source not authorized to transfer
     PAYMENT_NO_DESTINATION = -5,     // destination account does not exist
     PAYMENT_NO_TRUST = -6,       // destination missing a trust line for asset
     PAYMENT_NOT_AUTHORIZED = -7, // destination not authorized to hold asset
     PAYMENT_LINE_FULL = -8,      // destination would go above their limit
     PAYMENT_NO_ISSUER = -9       // missing issuer on asset
 };
const (
	PaymentResultCodePaymentSuccess          PaymentResultCode = 0
	PaymentResultCodePaymentMalformed        PaymentResultCode = -1
	PaymentResultCodePaymentUnderfunded      PaymentResultCode = -2
	PaymentResultCodePaymentSrcNoTrust       PaymentResultCode = -3
	PaymentResultCodePaymentSrcNotAuthorized PaymentResultCode = -4
	PaymentResultCodePaymentNoDestination    PaymentResultCode = -5
	PaymentResultCodePaymentNoTrust          PaymentResultCode = -6
	PaymentResultCodePaymentNotAuthorized    PaymentResultCode = -7
	PaymentResultCodePaymentLineFull         PaymentResultCode = -8
	PaymentResultCodePaymentNoIssuer         PaymentResultCode = -9
)

func (*PaymentResultCode) DecodeFrom

func (e *PaymentResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PaymentResultCode) EncodeTo

func (e PaymentResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PaymentResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (PaymentResultCode) String

func (e PaymentResultCode) String() string

String returns the name of `e`

func (*PaymentResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (PaymentResultCode) ValidEnum

func (e PaymentResultCode) ValidEnum(v int32) bool

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

type PeerAddress

type PeerAddress struct {
	Ip          PeerAddressIp
	Port        Uint32
	NumFailures Uint32
}

PeerAddress is an XDR Struct defines as:

struct PeerAddress
 {
     union switch (IPAddrType type)
     {
     case IPv4:
         opaque ipv4[4];
     case IPv6:
         opaque ipv6[16];
     }
     ip;
     uint32 port;
     uint32 numFailures;
 };

func (*PeerAddress) DecodeFrom

func (s *PeerAddress) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PeerAddress) EncodeTo

func (s *PeerAddress) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PeerAddress) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*PeerAddress) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PeerAddressIp

type PeerAddressIp struct {
	Type IpAddrType
	Ipv4 *[4]byte  `xdrmaxsize:"4"`
	Ipv6 *[16]byte `xdrmaxsize:"16"`
}

PeerAddressIp is an XDR NestedUnion defines as:

union switch (IPAddrType type)
     {
     case IPv4:
         opaque ipv4[4];
     case IPv6:
         opaque ipv6[16];
     }

func NewPeerAddressIp

func NewPeerAddressIp(aType IpAddrType, value interface{}) (result PeerAddressIp, err error)

NewPeerAddressIp creates a new PeerAddressIp.

func (PeerAddressIp) ArmForSwitch

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

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

func (*PeerAddressIp) DecodeFrom

func (u *PeerAddressIp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PeerAddressIp) EncodeTo

func (u PeerAddressIp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PeerAddressIp) GetIpv4

func (u PeerAddressIp) GetIpv4() (result [4]byte, ok bool)

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

func (PeerAddressIp) GetIpv6

func (u PeerAddressIp) GetIpv6() (result [16]byte, ok bool)

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

func (PeerAddressIp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (PeerAddressIp) MustIpv4

func (u PeerAddressIp) MustIpv4() [4]byte

MustIpv4 retrieves the Ipv4 value from the union, panicing if the value is not set.

func (PeerAddressIp) MustIpv6

func (u PeerAddressIp) MustIpv6() [16]byte

MustIpv6 retrieves the Ipv6 value from the union, panicing if the value is not set.

func (PeerAddressIp) SwitchFieldName

func (u PeerAddressIp) SwitchFieldName() string

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

func (*PeerAddressIp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PeerStatList

type PeerStatList []PeerStats

PeerStatList is an XDR Typedef defines as:

typedef PeerStats PeerStatList<25>;

func (*PeerStatList) DecodeFrom

func (s *PeerStatList) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PeerStatList) EncodeTo

func (s PeerStatList) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PeerStatList) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*PeerStatList) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (PeerStatList) XDRMaxSize

func (e PeerStatList) XDRMaxSize() int

XDRMaxSize implements the Sized interface for PeerStatList

type PeerStats

type PeerStats struct {
	Id                        NodeId
	VersionStr                string `xdrmaxsize:"100"`
	MessagesRead              Uint64
	MessagesWritten           Uint64
	BytesRead                 Uint64
	BytesWritten              Uint64
	SecondsConnected          Uint64
	UniqueFloodBytesRecv      Uint64
	DuplicateFloodBytesRecv   Uint64
	UniqueFetchBytesRecv      Uint64
	DuplicateFetchBytesRecv   Uint64
	UniqueFloodMessageRecv    Uint64
	DuplicateFloodMessageRecv Uint64
	UniqueFetchMessageRecv    Uint64
	DuplicateFetchMessageRecv Uint64
}

PeerStats is an XDR Struct defines as:

struct PeerStats
 {
     NodeID id;
     string versionStr<100>;
     uint64 messagesRead;
     uint64 messagesWritten;
     uint64 bytesRead;
     uint64 bytesWritten;
     uint64 secondsConnected;

     uint64 uniqueFloodBytesRecv;
     uint64 duplicateFloodBytesRecv;
     uint64 uniqueFetchBytesRecv;
     uint64 duplicateFetchBytesRecv;

     uint64 uniqueFloodMessageRecv;
     uint64 duplicateFloodMessageRecv;
     uint64 uniqueFetchMessageRecv;
     uint64 duplicateFetchMessageRecv;
 };

func (*PeerStats) DecodeFrom

func (s *PeerStats) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PeerStats) EncodeTo

func (s *PeerStats) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PeerStats) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*PeerStats) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PoolId

type PoolId Hash

PoolId is an XDR Typedef defines as:

typedef Hash PoolID;

func NewPoolId

func NewPoolId(a, b Asset, fee Int32) (PoolId, error)

func (*PoolId) DecodeFrom

func (s *PoolId) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PoolId) EncodeTo

func (s *PoolId) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PoolId) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*PoolId) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PreconditionType

type PreconditionType int32

PreconditionType is an XDR Enum defines as:

enum PreconditionType
 {
     PRECOND_NONE = 0,
     PRECOND_TIME = 1,
     PRECOND_V2 = 2
 };
const (
	PreconditionTypePrecondNone PreconditionType = 0
	PreconditionTypePrecondTime PreconditionType = 1
	PreconditionTypePrecondV2   PreconditionType = 2
)

func (*PreconditionType) DecodeFrom

func (e *PreconditionType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PreconditionType) EncodeTo

func (e PreconditionType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PreconditionType) GoString

func (pt PreconditionType) GoString() string

GoString implements fmt.GoStringer.

func (PreconditionType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (PreconditionType) String

func (e PreconditionType) String() string

String returns the name of `e`

func (*PreconditionType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (PreconditionType) ValidEnum

func (e PreconditionType) ValidEnum(v int32) bool

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

type Preconditions

type Preconditions struct {
	Type       PreconditionType
	TimeBounds *TimeBounds
	V2         *PreconditionsV2
}

Preconditions is an XDR Union defines as:

union Preconditions switch (PreconditionType type)
 {
 case PRECOND_NONE:
     void;
 case PRECOND_TIME:
     TimeBounds timeBounds;
 case PRECOND_V2:
     PreconditionsV2 v2;
 };

func NewPreconditions

func NewPreconditions(aType PreconditionType, value interface{}) (result Preconditions, err error)

NewPreconditions creates a new Preconditions.

func NewPreconditionsWithTimeBounds

func NewPreconditionsWithTimeBounds(timebounds *TimeBounds) Preconditions

NewPreconditionsWithTimebounds constructs the simplest possible `Preconditions` instance given the (possibly empty) timebounds.

func (Preconditions) ArmForSwitch

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

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

func (*Preconditions) DecodeFrom

func (u *Preconditions) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Preconditions) EncodeTo

func (u Preconditions) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Preconditions) GetTimeBounds

func (u Preconditions) GetTimeBounds() (result TimeBounds, ok bool)

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

func (Preconditions) GetV2

func (u Preconditions) GetV2() (result PreconditionsV2, ok bool)

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

func (Preconditions) GoString

func (p Preconditions) GoString() string

GoString implements fmt.GoStringer.

func (Preconditions) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (Preconditions) MustTimeBounds

func (u Preconditions) MustTimeBounds() TimeBounds

MustTimeBounds retrieves the TimeBounds value from the union, panicing if the value is not set.

func (Preconditions) MustV2

func (u Preconditions) MustV2() PreconditionsV2

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

func (Preconditions) SwitchFieldName

func (u Preconditions) SwitchFieldName() string

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

func (*Preconditions) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PreconditionsV2

type PreconditionsV2 struct {
	TimeBounds      *TimeBounds
	LedgerBounds    *LedgerBounds
	MinSeqNum       *SequenceNumber
	MinSeqAge       Duration
	MinSeqLedgerGap Uint32
	ExtraSigners    []SignerKey `xdrmaxsize:"2"`
}

PreconditionsV2 is an XDR Struct defines as:

struct PreconditionsV2
 {
     TimeBounds* timeBounds;

     // Transaction only valid for ledger numbers n such that
     // minLedger <= n < maxLedger (if maxLedger == 0, then
     // only minLedger is checked)
     LedgerBounds* ledgerBounds;

     // If NULL, only valid when sourceAccount's sequence number
     // is seqNum - 1.  Otherwise, valid when sourceAccount's
     // sequence number n satisfies minSeqNum <= n < tx.seqNum.
     // Note that after execution the account's sequence number
     // is always raised to tx.seqNum, and a transaction is not
     // valid if tx.seqNum is too high to ensure replay protection.
     SequenceNumber* minSeqNum;

     // For the transaction to be valid, the current ledger time must
     // be at least minSeqAge greater than sourceAccount's seqTime.
     Duration minSeqAge;

     // For the transaction to be valid, the current ledger number
     // must be at least minSeqLedgerGap greater than sourceAccount's
     // seqLedger.
     uint32 minSeqLedgerGap;

     // For the transaction to be valid, there must be a signature
     // corresponding to every Signer in this array, even if the
     // signature is not otherwise required by the sourceAccount or
     // operations.
     SignerKey extraSigners<2>;
 };

func (*PreconditionsV2) DecodeFrom

func (s *PreconditionsV2) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PreconditionsV2) EncodeTo

func (s *PreconditionsV2) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PreconditionsV2) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*PreconditionsV2) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Price

type Price struct {
	N Int32
	D Int32
}

Price is an XDR Struct defines as:

struct Price
 {
     int32 n; // numerator
     int32 d; // denominator
 };

func (Price) Cheaper

func (p Price) Cheaper(q Price) bool

Cheaper indicates if the Price's value is lower, taking into account denormalized representation (e.g. Price{1, 2}.Cheaper(Price{2,4}) == false )

func (*Price) DecodeFrom

func (s *Price) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Price) EncodeTo

func (s *Price) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Price) Equal

func (p Price) Equal(q Price) bool

Equal returns whether the price's value is the same, taking into account denormalized representation (e.g. Price{1, 2}.EqualValue(Price{2,4}) == true )

func (*Price) Invert

func (p *Price) Invert()

Invert inverts Price.

func (Price) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Price) Normalize

func (p *Price) Normalize()

Normalize sets Price to its rational canonical form

func (Price) String

func (p Price) String() string

String returns a string represenation of `p`

func (*Price) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PublicKey

type PublicKey struct {
	Type    PublicKeyType
	Ed25519 *Uint256
}

PublicKey is an XDR Union defines as:

union PublicKey switch (PublicKeyType type)
 {
 case PUBLIC_KEY_TYPE_ED25519:
     uint256 ed25519;
 };

func NewPublicKey

func NewPublicKey(aType PublicKeyType, value interface{}) (result PublicKey, err error)

NewPublicKey creates a new PublicKey.

func (PublicKey) ArmForSwitch

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

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

func (*PublicKey) DecodeFrom

func (u *PublicKey) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PublicKey) EncodeTo

func (u PublicKey) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PublicKey) GetEd25519

func (u PublicKey) 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 (PublicKey) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (PublicKey) MustEd25519

func (u PublicKey) MustEd25519() Uint256

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

func (PublicKey) SwitchFieldName

func (u PublicKey) SwitchFieldName() string

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

func (*PublicKey) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PublicKeyType

type PublicKeyType int32

PublicKeyType is an XDR Enum defines as:

enum PublicKeyType
 {
     PUBLIC_KEY_TYPE_ED25519 = KEY_TYPE_ED25519
 };
const (
	PublicKeyTypePublicKeyTypeEd25519 PublicKeyType = 0
)

func (*PublicKeyType) DecodeFrom

func (e *PublicKeyType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PublicKeyType) EncodeTo

func (e PublicKeyType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PublicKeyType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (PublicKeyType) String

func (e PublicKeyType) String() string

String returns the name of `e`

func (*PublicKeyType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (PublicKeyType) ValidEnum

func (e PublicKeyType) ValidEnum(v int32) bool

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

type RevokeSponsorshipOp

type RevokeSponsorshipOp struct {
	Type      RevokeSponsorshipType
	LedgerKey *LedgerKey
	Signer    *RevokeSponsorshipOpSigner
}

RevokeSponsorshipOp is an XDR Union defines as:

union RevokeSponsorshipOp switch (RevokeSponsorshipType type)
 {
 case REVOKE_SPONSORSHIP_LEDGER_ENTRY:
     LedgerKey ledgerKey;
 case REVOKE_SPONSORSHIP_SIGNER:
     struct
     {
         AccountID accountID;
         SignerKey signerKey;
     } signer;
 };

func NewRevokeSponsorshipOp

func NewRevokeSponsorshipOp(aType RevokeSponsorshipType, value interface{}) (result RevokeSponsorshipOp, err error)

NewRevokeSponsorshipOp creates a new RevokeSponsorshipOp.

func (RevokeSponsorshipOp) ArmForSwitch

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

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

func (*RevokeSponsorshipOp) DecodeFrom

func (u *RevokeSponsorshipOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (RevokeSponsorshipOp) EncodeTo

func (u RevokeSponsorshipOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (RevokeSponsorshipOp) GetLedgerKey

func (u RevokeSponsorshipOp) GetLedgerKey() (result LedgerKey, ok bool)

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

func (RevokeSponsorshipOp) GetSigner

func (u RevokeSponsorshipOp) GetSigner() (result RevokeSponsorshipOpSigner, ok bool)

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

func (RevokeSponsorshipOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (RevokeSponsorshipOp) MustLedgerKey

func (u RevokeSponsorshipOp) MustLedgerKey() LedgerKey

MustLedgerKey retrieves the LedgerKey value from the union, panicing if the value is not set.

func (RevokeSponsorshipOp) MustSigner

MustSigner retrieves the Signer value from the union, panicing if the value is not set.

func (RevokeSponsorshipOp) SwitchFieldName

func (u RevokeSponsorshipOp) SwitchFieldName() string

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

func (*RevokeSponsorshipOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type RevokeSponsorshipOpSigner

type RevokeSponsorshipOpSigner struct {
	AccountId AccountId
	SignerKey SignerKey
}

RevokeSponsorshipOpSigner is an XDR NestedStruct defines as:

struct
     {
         AccountID accountID;
         SignerKey signerKey;
     }

func (*RevokeSponsorshipOpSigner) DecodeFrom

func (s *RevokeSponsorshipOpSigner) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*RevokeSponsorshipOpSigner) EncodeTo

func (s *RevokeSponsorshipOpSigner) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (RevokeSponsorshipOpSigner) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*RevokeSponsorshipOpSigner) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type RevokeSponsorshipResult

type RevokeSponsorshipResult struct {
	Code RevokeSponsorshipResultCode
}

RevokeSponsorshipResult is an XDR Union defines as:

union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code)
 {
 case REVOKE_SPONSORSHIP_SUCCESS:
     void;
 default:
     void;
 };

func NewRevokeSponsorshipResult

func NewRevokeSponsorshipResult(code RevokeSponsorshipResultCode, value interface{}) (result RevokeSponsorshipResult, err error)

NewRevokeSponsorshipResult creates a new RevokeSponsorshipResult.

func (RevokeSponsorshipResult) ArmForSwitch

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

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

func (*RevokeSponsorshipResult) DecodeFrom

func (u *RevokeSponsorshipResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (RevokeSponsorshipResult) EncodeTo

func (u RevokeSponsorshipResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (RevokeSponsorshipResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (RevokeSponsorshipResult) SwitchFieldName

func (u RevokeSponsorshipResult) SwitchFieldName() string

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

func (*RevokeSponsorshipResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type RevokeSponsorshipResultCode

type RevokeSponsorshipResultCode int32

RevokeSponsorshipResultCode is an XDR Enum defines as:

enum RevokeSponsorshipResultCode
 {
     // codes considered as "success" for the operation
     REVOKE_SPONSORSHIP_SUCCESS = 0,

     // codes considered as "failure" for the operation
     REVOKE_SPONSORSHIP_DOES_NOT_EXIST = -1,
     REVOKE_SPONSORSHIP_NOT_SPONSOR = -2,
     REVOKE_SPONSORSHIP_LOW_RESERVE = -3,
     REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE = -4,
     REVOKE_SPONSORSHIP_MALFORMED = -5
 };
const (
	RevokeSponsorshipResultCodeRevokeSponsorshipSuccess          RevokeSponsorshipResultCode = 0
	RevokeSponsorshipResultCodeRevokeSponsorshipDoesNotExist     RevokeSponsorshipResultCode = -1
	RevokeSponsorshipResultCodeRevokeSponsorshipNotSponsor       RevokeSponsorshipResultCode = -2
	RevokeSponsorshipResultCodeRevokeSponsorshipLowReserve       RevokeSponsorshipResultCode = -3
	RevokeSponsorshipResultCodeRevokeSponsorshipOnlyTransferable RevokeSponsorshipResultCode = -4
	RevokeSponsorshipResultCodeRevokeSponsorshipMalformed        RevokeSponsorshipResultCode = -5
)

func (*RevokeSponsorshipResultCode) DecodeFrom

func (e *RevokeSponsorshipResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (RevokeSponsorshipResultCode) EncodeTo

func (e RevokeSponsorshipResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (RevokeSponsorshipResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (RevokeSponsorshipResultCode) String

String returns the name of `e`

func (*RevokeSponsorshipResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (RevokeSponsorshipResultCode) ValidEnum

func (e RevokeSponsorshipResultCode) ValidEnum(v int32) bool

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

type RevokeSponsorshipType

type RevokeSponsorshipType int32

RevokeSponsorshipType is an XDR Enum defines as:

enum RevokeSponsorshipType
 {
     REVOKE_SPONSORSHIP_LEDGER_ENTRY = 0,
     REVOKE_SPONSORSHIP_SIGNER = 1
 };
const (
	RevokeSponsorshipTypeRevokeSponsorshipLedgerEntry RevokeSponsorshipType = 0
	RevokeSponsorshipTypeRevokeSponsorshipSigner      RevokeSponsorshipType = 1
)

func (*RevokeSponsorshipType) DecodeFrom

func (e *RevokeSponsorshipType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (RevokeSponsorshipType) EncodeTo

func (e RevokeSponsorshipType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (RevokeSponsorshipType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (RevokeSponsorshipType) String

func (e RevokeSponsorshipType) String() string

String returns the name of `e`

func (*RevokeSponsorshipType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (RevokeSponsorshipType) ValidEnum

func (e RevokeSponsorshipType) ValidEnum(v int32) bool

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

type ScpBallot

type ScpBallot struct {
	Counter Uint32
	Value   Value
}

ScpBallot is an XDR Struct defines as:

struct SCPBallot
 {
     uint32 counter; // n
     Value value;    // x
 };

func (*ScpBallot) DecodeFrom

func (s *ScpBallot) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpBallot) EncodeTo

func (s *ScpBallot) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpBallot) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpBallot) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpEnvelope

type ScpEnvelope struct {
	Statement ScpStatement
	Signature Signature
}

ScpEnvelope is an XDR Struct defines as:

struct SCPEnvelope
 {
     SCPStatement statement;
     Signature signature;
 };

func (*ScpEnvelope) DecodeFrom

func (s *ScpEnvelope) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpEnvelope) EncodeTo

func (s *ScpEnvelope) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpEnvelope) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpEnvelope) Scan

func (t *ScpEnvelope) Scan(src interface{}) error

Scan reads from src into an ScpEnvelope struct

func (*ScpEnvelope) UnmarshalBinary

func (s *ScpEnvelope) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpHistoryEntry

type ScpHistoryEntry struct {
	V  int32
	V0 *ScpHistoryEntryV0
}

ScpHistoryEntry is an XDR Union defines as:

union SCPHistoryEntry switch (int v)
 {
 case 0:
     SCPHistoryEntryV0 v0;
 };

func NewScpHistoryEntry

func NewScpHistoryEntry(v int32, value interface{}) (result ScpHistoryEntry, err error)

NewScpHistoryEntry creates a new ScpHistoryEntry.

func (ScpHistoryEntry) ArmForSwitch

func (u ScpHistoryEntry) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ScpHistoryEntry

func (*ScpHistoryEntry) DecodeFrom

func (u *ScpHistoryEntry) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScpHistoryEntry) EncodeTo

func (u ScpHistoryEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpHistoryEntry) GetV0

func (u ScpHistoryEntry) GetV0() (result ScpHistoryEntryV0, ok bool)

GetV0 retrieves the V0 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScpHistoryEntry) MarshalBinary

func (s ScpHistoryEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScpHistoryEntry) MustV0

MustV0 retrieves the V0 value from the union, panicing if the value is not set.

func (ScpHistoryEntry) SwitchFieldName

func (u ScpHistoryEntry) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ScpHistoryEntry) UnmarshalBinary

func (s *ScpHistoryEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpHistoryEntryV0

type ScpHistoryEntryV0 struct {
	QuorumSets     []ScpQuorumSet
	LedgerMessages LedgerScpMessages
}

ScpHistoryEntryV0 is an XDR Struct defines as:

struct SCPHistoryEntryV0
 {
     SCPQuorumSet quorumSets<>; // additional quorum sets used by ledgerMessages
     LedgerSCPMessages ledgerMessages;
 };

func (*ScpHistoryEntryV0) DecodeFrom

func (s *ScpHistoryEntryV0) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpHistoryEntryV0) EncodeTo

func (s *ScpHistoryEntryV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpHistoryEntryV0) MarshalBinary

func (s ScpHistoryEntryV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpHistoryEntryV0) UnmarshalBinary

func (s *ScpHistoryEntryV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpNomination

type ScpNomination struct {
	QuorumSetHash Hash
	Votes         []Value
	Accepted      []Value
}

ScpNomination is an XDR Struct defines as:

struct SCPNomination
 {
     Hash quorumSetHash; // D
     Value votes<>;      // X
     Value accepted<>;   // Y
 };

func (*ScpNomination) DecodeFrom

func (s *ScpNomination) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpNomination) EncodeTo

func (s *ScpNomination) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpNomination) MarshalBinary

func (s ScpNomination) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpNomination) UnmarshalBinary

func (s *ScpNomination) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpQuorumSet

type ScpQuorumSet struct {
	Threshold  Uint32
	Validators []NodeId
	InnerSets  []ScpQuorumSet
}

ScpQuorumSet is an XDR Struct defines as:

struct SCPQuorumSet
 {
     uint32 threshold;
     NodeID validators<>;
     SCPQuorumSet innerSets<>;
 };

func (*ScpQuorumSet) DecodeFrom

func (s *ScpQuorumSet) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpQuorumSet) EncodeTo

func (s *ScpQuorumSet) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpQuorumSet) MarshalBinary

func (s ScpQuorumSet) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpQuorumSet) Scan

func (t *ScpQuorumSet) Scan(src interface{}) error

Scan reads from src into an ScpEnvelope struct

func (*ScpQuorumSet) UnmarshalBinary

func (s *ScpQuorumSet) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpStatement

type ScpStatement struct {
	NodeId    NodeId
	SlotIndex Uint64
	Pledges   ScpStatementPledges
}

ScpStatement is an XDR Struct defines as:

struct SCPStatement
 {
     NodeID nodeID;    // v
     uint64 slotIndex; // i

     union switch (SCPStatementType type)
     {
     case SCP_ST_PREPARE:
         struct
         {
             Hash quorumSetHash;       // D
             SCPBallot ballot;         // b
             SCPBallot* prepared;      // p
             SCPBallot* preparedPrime; // p'
             uint32 nC;                // c.n
             uint32 nH;                // h.n
         } prepare;
     case SCP_ST_CONFIRM:
         struct
         {
             SCPBallot ballot;   // b
             uint32 nPrepared;   // p.n
             uint32 nCommit;     // c.n
             uint32 nH;          // h.n
             Hash quorumSetHash; // D
         } confirm;
     case SCP_ST_EXTERNALIZE:
         struct
         {
             SCPBallot commit;         // c
             uint32 nH;                // h.n
             Hash commitQuorumSetHash; // D used before EXTERNALIZE
         } externalize;
     case SCP_ST_NOMINATE:
         SCPNomination nominate;
     }
     pledges;
 };

func (*ScpStatement) DecodeFrom

func (s *ScpStatement) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpStatement) EncodeTo

func (s *ScpStatement) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpStatement) MarshalBinary

func (s ScpStatement) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpStatement) UnmarshalBinary

func (s *ScpStatement) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpStatementConfirm

type ScpStatementConfirm struct {
	Ballot        ScpBallot
	NPrepared     Uint32
	NCommit       Uint32
	NH            Uint32
	QuorumSetHash Hash
}

ScpStatementConfirm is an XDR NestedStruct defines as:

struct
         {
             SCPBallot ballot;   // b
             uint32 nPrepared;   // p.n
             uint32 nCommit;     // c.n
             uint32 nH;          // h.n
             Hash quorumSetHash; // D
         }

func (*ScpStatementConfirm) DecodeFrom

func (s *ScpStatementConfirm) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpStatementConfirm) EncodeTo

func (s *ScpStatementConfirm) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpStatementConfirm) MarshalBinary

func (s ScpStatementConfirm) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpStatementConfirm) UnmarshalBinary

func (s *ScpStatementConfirm) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpStatementExternalize

type ScpStatementExternalize struct {
	Commit              ScpBallot
	NH                  Uint32
	CommitQuorumSetHash Hash
}

ScpStatementExternalize is an XDR NestedStruct defines as:

struct
         {
             SCPBallot commit;         // c
             uint32 nH;                // h.n
             Hash commitQuorumSetHash; // D used before EXTERNALIZE
         }

func (*ScpStatementExternalize) DecodeFrom

func (s *ScpStatementExternalize) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpStatementExternalize) EncodeTo

func (s *ScpStatementExternalize) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpStatementExternalize) MarshalBinary

func (s ScpStatementExternalize) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpStatementExternalize) UnmarshalBinary

func (s *ScpStatementExternalize) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpStatementPledges

type ScpStatementPledges struct {
	Type        ScpStatementType
	Prepare     *ScpStatementPrepare
	Confirm     *ScpStatementConfirm
	Externalize *ScpStatementExternalize
	Nominate    *ScpNomination
}

ScpStatementPledges is an XDR NestedUnion defines as:

union switch (SCPStatementType type)
     {
     case SCP_ST_PREPARE:
         struct
         {
             Hash quorumSetHash;       // D
             SCPBallot ballot;         // b
             SCPBallot* prepared;      // p
             SCPBallot* preparedPrime; // p'
             uint32 nC;                // c.n
             uint32 nH;                // h.n
         } prepare;
     case SCP_ST_CONFIRM:
         struct
         {
             SCPBallot ballot;   // b
             uint32 nPrepared;   // p.n
             uint32 nCommit;     // c.n
             uint32 nH;          // h.n
             Hash quorumSetHash; // D
         } confirm;
     case SCP_ST_EXTERNALIZE:
         struct
         {
             SCPBallot commit;         // c
             uint32 nH;                // h.n
             Hash commitQuorumSetHash; // D used before EXTERNALIZE
         } externalize;
     case SCP_ST_NOMINATE:
         SCPNomination nominate;
     }

func NewScpStatementPledges

func NewScpStatementPledges(aType ScpStatementType, value interface{}) (result ScpStatementPledges, err error)

NewScpStatementPledges creates a new ScpStatementPledges.

func (ScpStatementPledges) ArmForSwitch

func (u ScpStatementPledges) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ScpStatementPledges

func (*ScpStatementPledges) DecodeFrom

func (u *ScpStatementPledges) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScpStatementPledges) EncodeTo

func (u ScpStatementPledges) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpStatementPledges) GetConfirm

func (u ScpStatementPledges) GetConfirm() (result ScpStatementConfirm, ok bool)

GetConfirm retrieves the Confirm value from the union, returning ok if the union's switch indicated the value is valid.

func (ScpStatementPledges) GetExternalize

func (u ScpStatementPledges) GetExternalize() (result ScpStatementExternalize, ok bool)

GetExternalize retrieves the Externalize value from the union, returning ok if the union's switch indicated the value is valid.

func (ScpStatementPledges) GetNominate

func (u ScpStatementPledges) GetNominate() (result ScpNomination, ok bool)

GetNominate retrieves the Nominate value from the union, returning ok if the union's switch indicated the value is valid.

func (ScpStatementPledges) GetPrepare

func (u ScpStatementPledges) GetPrepare() (result ScpStatementPrepare, ok bool)

GetPrepare retrieves the Prepare value from the union, returning ok if the union's switch indicated the value is valid.

func (ScpStatementPledges) MarshalBinary

func (s ScpStatementPledges) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScpStatementPledges) MustConfirm

func (u ScpStatementPledges) MustConfirm() ScpStatementConfirm

MustConfirm retrieves the Confirm value from the union, panicing if the value is not set.

func (ScpStatementPledges) MustExternalize

func (u ScpStatementPledges) MustExternalize() ScpStatementExternalize

MustExternalize retrieves the Externalize value from the union, panicing if the value is not set.

func (ScpStatementPledges) MustNominate

func (u ScpStatementPledges) MustNominate() ScpNomination

MustNominate retrieves the Nominate value from the union, panicing if the value is not set.

func (ScpStatementPledges) MustPrepare

func (u ScpStatementPledges) MustPrepare() ScpStatementPrepare

MustPrepare retrieves the Prepare value from the union, panicing if the value is not set.

func (ScpStatementPledges) SwitchFieldName

func (u ScpStatementPledges) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ScpStatementPledges) UnmarshalBinary

func (s *ScpStatementPledges) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpStatementPrepare

type ScpStatementPrepare struct {
	QuorumSetHash Hash
	Ballot        ScpBallot
	Prepared      *ScpBallot
	PreparedPrime *ScpBallot
	NC            Uint32
	NH            Uint32
}

ScpStatementPrepare is an XDR NestedStruct defines as:

struct
         {
             Hash quorumSetHash;       // D
             SCPBallot ballot;         // b
             SCPBallot* prepared;      // p
             SCPBallot* preparedPrime; // p'
             uint32 nC;                // c.n
             uint32 nH;                // h.n
         }

func (*ScpStatementPrepare) DecodeFrom

func (s *ScpStatementPrepare) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpStatementPrepare) EncodeTo

func (s *ScpStatementPrepare) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpStatementPrepare) MarshalBinary

func (s ScpStatementPrepare) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpStatementPrepare) UnmarshalBinary

func (s *ScpStatementPrepare) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpStatementType

type ScpStatementType int32

ScpStatementType is an XDR Enum defines as:

enum SCPStatementType
 {
     SCP_ST_PREPARE = 0,
     SCP_ST_CONFIRM = 1,
     SCP_ST_EXTERNALIZE = 2,
     SCP_ST_NOMINATE = 3
 };
const (
	ScpStatementTypeScpStPrepare     ScpStatementType = 0
	ScpStatementTypeScpStConfirm     ScpStatementType = 1
	ScpStatementTypeScpStExternalize ScpStatementType = 2
	ScpStatementTypeScpStNominate    ScpStatementType = 3
)

func (*ScpStatementType) DecodeFrom

func (e *ScpStatementType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScpStatementType) EncodeTo

func (e ScpStatementType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpStatementType) MarshalBinary

func (s ScpStatementType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScpStatementType) String

func (e ScpStatementType) String() string

String returns the name of `e`

func (*ScpStatementType) UnmarshalBinary

func (s *ScpStatementType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ScpStatementType) ValidEnum

func (e ScpStatementType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ScpStatementType

type SendMore

type SendMore struct {
	NumMessages Uint32
}

SendMore is an XDR Struct defines as:

struct SendMore
 {
     uint32 numMessages;
 };

func (*SendMore) DecodeFrom

func (s *SendMore) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SendMore) EncodeTo

func (s *SendMore) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SendMore) MarshalBinary

func (s SendMore) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SendMore) UnmarshalBinary

func (s *SendMore) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SequenceNumber

type SequenceNumber Int64

SequenceNumber is an XDR Typedef defines as:

typedef int64 SequenceNumber;

func (*SequenceNumber) DecodeFrom

func (s *SequenceNumber) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SequenceNumber) EncodeTo

func (s SequenceNumber) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SequenceNumber) MarshalBinary

func (s SequenceNumber) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SequenceNumber) UnmarshalBinary

func (s *SequenceNumber) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SetOptionsOp

type SetOptionsOp struct {
	InflationDest *AccountId
	ClearFlags    *Uint32
	SetFlags      *Uint32
	MasterWeight  *Uint32
	LowThreshold  *Uint32
	MedThreshold  *Uint32
	HighThreshold *Uint32
	HomeDomain    *String32
	Signer        *Signer
}

SetOptionsOp is an XDR Struct defines as:

struct SetOptionsOp
 {
     AccountID* inflationDest; // sets the inflation destination

     uint32* clearFlags; // which flags to clear
     uint32* setFlags;   // which flags to set

     // account threshold manipulation
     uint32* masterWeight; // weight of the master account
     uint32* lowThreshold;
     uint32* medThreshold;
     uint32* highThreshold;

     string32* homeDomain; // sets the home domain

     // Add, update or remove a signer for the account
     // signer is deleted if the weight is 0
     Signer* signer;
 };

func (*SetOptionsOp) DecodeFrom

func (s *SetOptionsOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SetOptionsOp) EncodeTo

func (s *SetOptionsOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SetOptionsOp) GoString

func (s SetOptionsOp) GoString() string

GoString implements fmt.GoStringer.

func (SetOptionsOp) MarshalBinary

func (s SetOptionsOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SetOptionsOp) UnmarshalBinary

func (s *SetOptionsOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SetOptionsResult

type SetOptionsResult struct {
	Code SetOptionsResultCode
}

SetOptionsResult is an XDR Union defines as:

union SetOptionsResult switch (SetOptionsResultCode code)
 {
 case SET_OPTIONS_SUCCESS:
     void;
 default:
     void;
 };

func NewSetOptionsResult

func NewSetOptionsResult(code SetOptionsResultCode, value interface{}) (result SetOptionsResult, err error)

NewSetOptionsResult creates a new SetOptionsResult.

func (SetOptionsResult) ArmForSwitch

func (u SetOptionsResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of SetOptionsResult

func (*SetOptionsResult) DecodeFrom

func (u *SetOptionsResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SetOptionsResult) EncodeTo

func (u SetOptionsResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SetOptionsResult) MarshalBinary

func (s SetOptionsResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SetOptionsResult) SwitchFieldName

func (u SetOptionsResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*SetOptionsResult) UnmarshalBinary

func (s *SetOptionsResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SetOptionsResultCode

type SetOptionsResultCode int32

SetOptionsResultCode is an XDR Enum defines as:

enum SetOptionsResultCode
 {
     // codes considered as "success" for the operation
     SET_OPTIONS_SUCCESS = 0,
     // codes considered as "failure" for the operation
     SET_OPTIONS_LOW_RESERVE = -1,      // not enough funds to add a signer
     SET_OPTIONS_TOO_MANY_SIGNERS = -2, // max number of signers already reached
     SET_OPTIONS_BAD_FLAGS = -3,        // invalid combination of clear/set flags
     SET_OPTIONS_INVALID_INFLATION = -4,      // inflation account does not exist
     SET_OPTIONS_CANT_CHANGE = -5,            // can no longer change this option
     SET_OPTIONS_UNKNOWN_FLAG = -6,           // can't set an unknown flag
     SET_OPTIONS_THRESHOLD_OUT_OF_RANGE = -7, // bad value for weight/threshold
     SET_OPTIONS_BAD_SIGNER = -8,             // signer cannot be masterkey
     SET_OPTIONS_INVALID_HOME_DOMAIN = -9,    // malformed home domain
     SET_OPTIONS_AUTH_REVOCABLE_REQUIRED =
         -10 // auth revocable is required for clawback
 };
const (
	SetOptionsResultCodeSetOptionsSuccess               SetOptionsResultCode = 0
	SetOptionsResultCodeSetOptionsLowReserve            SetOptionsResultCode = -1
	SetOptionsResultCodeSetOptionsTooManySigners        SetOptionsResultCode = -2
	SetOptionsResultCodeSetOptionsBadFlags              SetOptionsResultCode = -3
	SetOptionsResultCodeSetOptionsInvalidInflation      SetOptionsResultCode = -4
	SetOptionsResultCodeSetOptionsCantChange            SetOptionsResultCode = -5
	SetOptionsResultCodeSetOptionsUnknownFlag           SetOptionsResultCode = -6
	SetOptionsResultCodeSetOptionsThresholdOutOfRange   SetOptionsResultCode = -7
	SetOptionsResultCodeSetOptionsBadSigner             SetOptionsResultCode = -8
	SetOptionsResultCodeSetOptionsInvalidHomeDomain     SetOptionsResultCode = -9
	SetOptionsResultCodeSetOptionsAuthRevocableRequired SetOptionsResultCode = -10
)

func (*SetOptionsResultCode) DecodeFrom

func (e *SetOptionsResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SetOptionsResultCode) EncodeTo

func (e SetOptionsResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SetOptionsResultCode) MarshalBinary

func (s SetOptionsResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SetOptionsResultCode) String

func (e SetOptionsResultCode) String() string

String returns the name of `e`

func (*SetOptionsResultCode) UnmarshalBinary

func (s *SetOptionsResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (SetOptionsResultCode) ValidEnum

func (e SetOptionsResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for SetOptionsResultCode

type SetTrustLineFlagsOp

type SetTrustLineFlagsOp struct {
	Trustor    AccountId
	Asset      Asset
	ClearFlags Uint32
	SetFlags   Uint32
}

SetTrustLineFlagsOp is an XDR Struct defines as:

struct SetTrustLineFlagsOp
 {
     AccountID trustor;
     Asset asset;

     uint32 clearFlags; // which flags to clear
     uint32 setFlags;   // which flags to set
 };

func (*SetTrustLineFlagsOp) DecodeFrom

func (s *SetTrustLineFlagsOp) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SetTrustLineFlagsOp) EncodeTo

func (s *SetTrustLineFlagsOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SetTrustLineFlagsOp) MarshalBinary

func (s SetTrustLineFlagsOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SetTrustLineFlagsOp) UnmarshalBinary

func (s *SetTrustLineFlagsOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SetTrustLineFlagsResult

type SetTrustLineFlagsResult struct {
	Code SetTrustLineFlagsResultCode
}

SetTrustLineFlagsResult is an XDR Union defines as:

union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code)
 {
 case SET_TRUST_LINE_FLAGS_SUCCESS:
     void;
 default:
     void;
 };

func NewSetTrustLineFlagsResult

func NewSetTrustLineFlagsResult(code SetTrustLineFlagsResultCode, value interface{}) (result SetTrustLineFlagsResult, err error)

NewSetTrustLineFlagsResult creates a new SetTrustLineFlagsResult.

func (SetTrustLineFlagsResult) ArmForSwitch

func (u SetTrustLineFlagsResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of SetTrustLineFlagsResult

func (*SetTrustLineFlagsResult) DecodeFrom

func (u *SetTrustLineFlagsResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SetTrustLineFlagsResult) EncodeTo

func (u SetTrustLineFlagsResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SetTrustLineFlagsResult) MarshalBinary

func (s SetTrustLineFlagsResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SetTrustLineFlagsResult) SwitchFieldName

func (u SetTrustLineFlagsResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*SetTrustLineFlagsResult) UnmarshalBinary

func (s *SetTrustLineFlagsResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SetTrustLineFlagsResultCode

type SetTrustLineFlagsResultCode int32

SetTrustLineFlagsResultCode is an XDR Enum defines as:

enum SetTrustLineFlagsResultCode
 {
     // codes considered as "success" for the operation
     SET_TRUST_LINE_FLAGS_SUCCESS = 0,

     // codes considered as "failure" for the operation
     SET_TRUST_LINE_FLAGS_MALFORMED = -1,
     SET_TRUST_LINE_FLAGS_NO_TRUST_LINE = -2,
     SET_TRUST_LINE_FLAGS_CANT_REVOKE = -3,
     SET_TRUST_LINE_FLAGS_INVALID_STATE = -4,
     SET_TRUST_LINE_FLAGS_LOW_RESERVE = -5 // claimable balances can't be created
                                           // on revoke due to low reserves
 };
const (
	SetTrustLineFlagsResultCodeSetTrustLineFlagsSuccess      SetTrustLineFlagsResultCode = 0
	SetTrustLineFlagsResultCodeSetTrustLineFlagsMalformed    SetTrustLineFlagsResultCode = -1
	SetTrustLineFlagsResultCodeSetTrustLineFlagsNoTrustLine  SetTrustLineFlagsResultCode = -2
	SetTrustLineFlagsResultCodeSetTrustLineFlagsCantRevoke   SetTrustLineFlagsResultCode = -3
	SetTrustLineFlagsResultCodeSetTrustLineFlagsInvalidState SetTrustLineFlagsResultCode = -4
	SetTrustLineFlagsResultCodeSetTrustLineFlagsLowReserve   SetTrustLineFlagsResultCode = -5
)

func (*SetTrustLineFlagsResultCode) DecodeFrom

func (e *SetTrustLineFlagsResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SetTrustLineFlagsResultCode) EncodeTo

func (e SetTrustLineFlagsResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SetTrustLineFlagsResultCode) MarshalBinary

func (s SetTrustLineFlagsResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SetTrustLineFlagsResultCode) String

String returns the name of `e`

func (*SetTrustLineFlagsResultCode) UnmarshalBinary

func (s *SetTrustLineFlagsResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (SetTrustLineFlagsResultCode) ValidEnum

func (e SetTrustLineFlagsResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for SetTrustLineFlagsResultCode

type Signature

type Signature []byte

Signature is an XDR Typedef defines as:

typedef opaque Signature<64>;

func (*Signature) DecodeFrom

func (s *Signature) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Signature) EncodeTo

func (s Signature) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Signature) MarshalBinary

func (s Signature) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Signature) UnmarshalBinary

func (s *Signature) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (Signature) XDRMaxSize

func (e Signature) XDRMaxSize() int

XDRMaxSize implements the Sized interface for Signature

type SignatureHint

type SignatureHint [4]byte

SignatureHint is an XDR Typedef defines as:

typedef opaque SignatureHint[4];

func (*SignatureHint) DecodeFrom

func (s *SignatureHint) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SignatureHint) EncodeTo

func (s *SignatureHint) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SignatureHint) MarshalBinary

func (s SignatureHint) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SignatureHint) UnmarshalBinary

func (s *SignatureHint) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (SignatureHint) XDRMaxSize

func (e SignatureHint) XDRMaxSize() int

XDRMaxSize implements the Sized interface for SignatureHint

type SignedSurveyRequestMessage

type SignedSurveyRequestMessage struct {
	RequestSignature Signature
	Request          SurveyRequestMessage
}

SignedSurveyRequestMessage is an XDR Struct defines as:

struct SignedSurveyRequestMessage
 {
     Signature requestSignature;
     SurveyRequestMessage request;
 };

func (*SignedSurveyRequestMessage) DecodeFrom

func (s *SignedSurveyRequestMessage) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SignedSurveyRequestMessage) EncodeTo

func (s *SignedSurveyRequestMessage) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SignedSurveyRequestMessage) MarshalBinary

func (s SignedSurveyRequestMessage) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SignedSurveyRequestMessage) UnmarshalBinary

func (s *SignedSurveyRequestMessage) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SignedSurveyResponseMessage

type SignedSurveyResponseMessage struct {
	ResponseSignature Signature
	Response          SurveyResponseMessage
}

SignedSurveyResponseMessage is an XDR Struct defines as:

struct SignedSurveyResponseMessage
 {
     Signature responseSignature;
     SurveyResponseMessage response;
 };

func (*SignedSurveyResponseMessage) DecodeFrom

func (s *SignedSurveyResponseMessage) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SignedSurveyResponseMessage) EncodeTo

func (s *SignedSurveyResponseMessage) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SignedSurveyResponseMessage) MarshalBinary

func (s SignedSurveyResponseMessage) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SignedSurveyResponseMessage) UnmarshalBinary

func (s *SignedSurveyResponseMessage) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Signer

type Signer struct {
	Key    SignerKey
	Weight Uint32
}

Signer is an XDR Struct defines as:

struct Signer
 {
     SignerKey key;
     uint32 weight; // really only need 1 byte
 };

func SortSignersByKey

func SortSignersByKey(signers []Signer) []Signer

SortSignersByKey returns a new []Signer array sorted by signer key.

func (*Signer) DecodeFrom

func (s *Signer) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Signer) EncodeTo

func (s *Signer) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Signer) GoString

func (s Signer) GoString() string

GoString implements fmt.GoStringer.

func (Signer) MarshalBinary

func (s Signer) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Signer) UnmarshalBinary

func (s *Signer) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SignerKey

type SignerKey struct {
	Type                 SignerKeyType
	Ed25519              *Uint256
	PreAuthTx            *Uint256
	HashX                *Uint256
	Ed25519SignedPayload *SignerKeyEd25519SignedPayload
}

SignerKey is an XDR Union defines as:

union SignerKey switch (SignerKeyType type)
 {
 case SIGNER_KEY_TYPE_ED25519:
     uint256 ed25519;
 case SIGNER_KEY_TYPE_PRE_AUTH_TX:
     /* SHA-256 Hash of TransactionSignaturePayload structure */
     uint256 preAuthTx;
 case SIGNER_KEY_TYPE_HASH_X:
     /* Hash of random 256 bit preimage X */
     uint256 hashX;
 case SIGNER_KEY_TYPE_ED25519_SIGNED_PAYLOAD:
     struct
     {
         /* Public key that must sign the payload. */
         uint256 ed25519;
         /* Payload to be raw signed by ed25519. */
         opaque payload<64>;
     } ed25519SignedPayload;
 };

func MustSigner

func MustSigner(address string) SignerKey

func NewSignerKey

func NewSignerKey(aType SignerKeyType, value interface{}) (result SignerKey, err error)

NewSignerKey creates a new SignerKey.

func (*SignerKey) Address

func (skey *SignerKey) Address() string

Address returns the strkey encoded form of this signer key. This method will panic if the SignerKey is of an unknown type.

func (SignerKey) ArmForSwitch

func (u SignerKey) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of SignerKey

func (*SignerKey) DecodeFrom

func (u *SignerKey) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SignerKey) EncodeTo

func (u SignerKey) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*SignerKey) Equals

func (skey *SignerKey) Equals(other SignerKey) bool

Equals returns true if `other` is equivalent to `skey`

func (*SignerKey) GetAddress

func (skey *SignerKey) GetAddress() (string, error)

GetAddress returns the strkey encoded form of this signer key, and an error if the SignerKey is of an unknown type.

func (SignerKey) GetEd25519

func (u SignerKey) 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 (SignerKey) GetEd25519SignedPayload

func (u SignerKey) GetEd25519SignedPayload() (result SignerKeyEd25519SignedPayload, ok bool)

GetEd25519SignedPayload retrieves the Ed25519SignedPayload value from the union, returning ok if the union's switch indicated the value is valid.

func (SignerKey) GetHashX

func (u SignerKey) GetHashX() (result Uint256, ok bool)

GetHashX retrieves the HashX value from the union, returning ok if the union's switch indicated the value is valid.

func (SignerKey) GetPreAuthTx

func (u SignerKey) GetPreAuthTx() (result Uint256, ok bool)

GetPreAuthTx retrieves the PreAuthTx value from the union, returning ok if the union's switch indicated the value is valid.

func (SignerKey) MarshalBinary

func (s SignerKey) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SignerKey) MustEd25519

func (u SignerKey) MustEd25519() Uint256

MustEd25519 retrieves the Ed25519 value from the union, panicing if the value is not set.

func (SignerKey) MustEd25519SignedPayload

func (u SignerKey) MustEd25519SignedPayload() SignerKeyEd25519SignedPayload

MustEd25519SignedPayload retrieves the Ed25519SignedPayload value from the union, panicing if the value is not set.

func (SignerKey) MustHashX

func (u SignerKey) MustHashX() Uint256

MustHashX retrieves the HashX value from the union, panicing if the value is not set.

func (SignerKey) MustPreAuthTx

func (u SignerKey) MustPreAuthTx() Uint256

MustPreAuthTx retrieves the PreAuthTx value from the union, panicing if the value is not set.

func (*SignerKey) SetAddress

func (skey *SignerKey) SetAddress(address string) error

SetAddress modifies the receiver, setting it's value to the SignerKey form of the provided address.

func (SignerKey) SwitchFieldName

func (u SignerKey) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*SignerKey) UnmarshalBinary

func (s *SignerKey) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SignerKeyEd25519SignedPayload

type SignerKeyEd25519SignedPayload struct {
	Ed25519 Uint256
	Payload []byte `xdrmaxsize:"64"`
}

SignerKeyEd25519SignedPayload is an XDR NestedStruct defines as:

struct
     {
         /* Public key that must sign the payload. */
         uint256 ed25519;
         /* Payload to be raw signed by ed25519. */
         opaque payload<64>;
     }

func (*SignerKeyEd25519SignedPayload) DecodeFrom

func (s *SignerKeyEd25519SignedPayload) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SignerKeyEd25519SignedPayload) EncodeTo

func (s *SignerKeyEd25519SignedPayload) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SignerKeyEd25519SignedPayload) MarshalBinary

func (s SignerKeyEd25519SignedPayload) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SignerKeyEd25519SignedPayload) UnmarshalBinary

func (s *SignerKeyEd25519SignedPayload) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SignerKeyType

type SignerKeyType int32

SignerKeyType is an XDR Enum defines as:

enum SignerKeyType
 {
     SIGNER_KEY_TYPE_ED25519 = KEY_TYPE_ED25519,
     SIGNER_KEY_TYPE_PRE_AUTH_TX = KEY_TYPE_PRE_AUTH_TX,
     SIGNER_KEY_TYPE_HASH_X = KEY_TYPE_HASH_X,
     SIGNER_KEY_TYPE_ED25519_SIGNED_PAYLOAD = KEY_TYPE_ED25519_SIGNED_PAYLOAD
 };
const (
	SignerKeyTypeSignerKeyTypeEd25519              SignerKeyType = 0
	SignerKeyTypeSignerKeyTypePreAuthTx            SignerKeyType = 1
	SignerKeyTypeSignerKeyTypeHashX                SignerKeyType = 2
	SignerKeyTypeSignerKeyTypeEd25519SignedPayload SignerKeyType = 3
)

func (*SignerKeyType) DecodeFrom

func (e *SignerKeyType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SignerKeyType) EncodeTo

func (e SignerKeyType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SignerKeyType) MarshalBinary

func (s SignerKeyType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SignerKeyType) String

func (e SignerKeyType) String() string

String returns the name of `e`

func (*SignerKeyType) UnmarshalBinary

func (s *SignerKeyType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (SignerKeyType) ValidEnum

func (e SignerKeyType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for SignerKeyType

type SimplePaymentResult

type SimplePaymentResult struct {
	Destination AccountId
	Asset       Asset
	Amount      Int64
}

SimplePaymentResult is an XDR Struct defines as:

struct SimplePaymentResult
 {
     AccountID destination;
     Asset asset;
     int64 amount;
 };

func (*SimplePaymentResult) DecodeFrom

func (s *SimplePaymentResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SimplePaymentResult) EncodeTo

func (s *SimplePaymentResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SimplePaymentResult) MarshalBinary

func (s SimplePaymentResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SimplePaymentResult) UnmarshalBinary

func (s *SimplePaymentResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SponsorshipDescriptor

type SponsorshipDescriptor = *AccountId

SponsorshipDescriptor is an XDR Typedef defines as:

typedef AccountID* SponsorshipDescriptor;

type StellarMessage

type StellarMessage struct {
	Type                        MessageType
	Error                       *Error
	Hello                       *Hello
	Auth                        *Auth
	DontHave                    *DontHave
	Peers                       *[]PeerAddress `xdrmaxsize:"100"`
	TxSetHash                   *Uint256
	TxSet                       *TransactionSet
	Transaction                 *TransactionEnvelope
	SignedSurveyRequestMessage  *SignedSurveyRequestMessage
	SignedSurveyResponseMessage *SignedSurveyResponseMessage
	QSetHash                    *Uint256
	QSet                        *ScpQuorumSet
	Envelope                    *ScpEnvelope
	GetScpLedgerSeq             *Uint32
	SendMoreMessage             *SendMore
}

StellarMessage is an XDR Union defines as:

union StellarMessage switch (MessageType type)
 {
 case ERROR_MSG:
     Error error;
 case HELLO:
     Hello hello;
 case AUTH:
     Auth auth;
 case DONT_HAVE:
     DontHave dontHave;
 case GET_PEERS:
     void;
 case PEERS:
     PeerAddress peers<100>;

 case GET_TX_SET:
     uint256 txSetHash;
 case TX_SET:
     TransactionSet txSet;

 case TRANSACTION:
     TransactionEnvelope transaction;

 case SURVEY_REQUEST:
     SignedSurveyRequestMessage signedSurveyRequestMessage;

 case SURVEY_RESPONSE:
     SignedSurveyResponseMessage signedSurveyResponseMessage;

 // SCP
 case GET_SCP_QUORUMSET:
     uint256 qSetHash;
 case SCP_QUORUMSET:
     SCPQuorumSet qSet;
 case SCP_MESSAGE:
     SCPEnvelope envelope;
 case GET_SCP_STATE:
     uint32 getSCPLedgerSeq; // ledger seq requested ; if 0, requests the latest
 case SEND_MORE:
     SendMore sendMoreMessage;
 };

func NewStellarMessage

func NewStellarMessage(aType MessageType, value interface{}) (result StellarMessage, err error)

NewStellarMessage creates a new StellarMessage.

func (StellarMessage) ArmForSwitch

func (u StellarMessage) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of StellarMessage

func (*StellarMessage) DecodeFrom

func (u *StellarMessage) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (StellarMessage) EncodeTo

func (u StellarMessage) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (StellarMessage) GetAuth

func (u StellarMessage) GetAuth() (result Auth, ok bool)

GetAuth retrieves the Auth value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetDontHave

func (u StellarMessage) GetDontHave() (result DontHave, ok bool)

GetDontHave retrieves the DontHave value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetEnvelope

func (u StellarMessage) GetEnvelope() (result ScpEnvelope, ok bool)

GetEnvelope retrieves the Envelope value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetError

func (u StellarMessage) GetError() (result Error, ok bool)

GetError retrieves the Error value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetGetScpLedgerSeq

func (u StellarMessage) GetGetScpLedgerSeq() (result Uint32, ok bool)

GetGetScpLedgerSeq retrieves the GetScpLedgerSeq value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetHello

func (u StellarMessage) GetHello() (result Hello, ok bool)

GetHello retrieves the Hello value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetPeers

func (u StellarMessage) GetPeers() (result []PeerAddress, ok bool)

GetPeers retrieves the Peers value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetQSet

func (u StellarMessage) GetQSet() (result ScpQuorumSet, ok bool)

GetQSet retrieves the QSet value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetQSetHash

func (u StellarMessage) GetQSetHash() (result Uint256, ok bool)

GetQSetHash retrieves the QSetHash value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetSendMoreMessage

func (u StellarMessage) GetSendMoreMessage() (result SendMore, ok bool)

GetSendMoreMessage retrieves the SendMoreMessage value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetSignedSurveyRequestMessage

func (u StellarMessage) GetSignedSurveyRequestMessage() (result SignedSurveyRequestMessage, ok bool)

GetSignedSurveyRequestMessage retrieves the SignedSurveyRequestMessage value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetSignedSurveyResponseMessage

func (u StellarMessage) GetSignedSurveyResponseMessage() (result SignedSurveyResponseMessage, ok bool)

GetSignedSurveyResponseMessage retrieves the SignedSurveyResponseMessage value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetTransaction

func (u StellarMessage) GetTransaction() (result TransactionEnvelope, ok bool)

GetTransaction retrieves the Transaction value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetTxSet

func (u StellarMessage) GetTxSet() (result TransactionSet, ok bool)

GetTxSet retrieves the TxSet value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetTxSetHash

func (u StellarMessage) GetTxSetHash() (result Uint256, ok bool)

GetTxSetHash retrieves the TxSetHash value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) MarshalBinary

func (s StellarMessage) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (StellarMessage) MustAuth

func (u StellarMessage) MustAuth() Auth

MustAuth retrieves the Auth value from the union, panicing if the value is not set.

func (StellarMessage) MustDontHave

func (u StellarMessage) MustDontHave() DontHave

MustDontHave retrieves the DontHave value from the union, panicing if the value is not set.

func (StellarMessage) MustEnvelope

func (u StellarMessage) MustEnvelope() ScpEnvelope

MustEnvelope retrieves the Envelope value from the union, panicing if the value is not set.

func (StellarMessage) MustError

func (u StellarMessage) MustError() Error

MustError retrieves the Error value from the union, panicing if the value is not set.

func (StellarMessage) MustGetScpLedgerSeq

func (u StellarMessage) MustGetScpLedgerSeq() Uint32

MustGetScpLedgerSeq retrieves the GetScpLedgerSeq value from the union, panicing if the value is not set.

func (StellarMessage) MustHello

func (u StellarMessage) MustHello() Hello

MustHello retrieves the Hello value from the union, panicing if the value is not set.

func (StellarMessage) MustPeers

func (u StellarMessage) MustPeers() []PeerAddress

MustPeers retrieves the Peers value from the union, panicing if the value is not set.

func (StellarMessage) MustQSet

func (u StellarMessage) MustQSet() ScpQuorumSet

MustQSet retrieves the QSet value from the union, panicing if the value is not set.

func (StellarMessage) MustQSetHash

func (u StellarMessage) MustQSetHash() Uint256

MustQSetHash retrieves the QSetHash value from the union, panicing if the value is not set.

func (StellarMessage) MustSendMoreMessage

func (u StellarMessage) MustSendMoreMessage() SendMore

MustSendMoreMessage retrieves the SendMoreMessage value from the union, panicing if the value is not set.

func (StellarMessage) MustSignedSurveyRequestMessage

func (u StellarMessage) MustSignedSurveyRequestMessage() SignedSurveyRequestMessage

MustSignedSurveyRequestMessage retrieves the SignedSurveyRequestMessage value from the union, panicing if the value is not set.

func (StellarMessage) MustSignedSurveyResponseMessage

func (u StellarMessage) MustSignedSurveyResponseMessage() SignedSurveyResponseMessage

MustSignedSurveyResponseMessage retrieves the SignedSurveyResponseMessage value from the union, panicing if the value is not set.

func (StellarMessage) MustTransaction

func (u StellarMessage) MustTransaction() TransactionEnvelope

MustTransaction retrieves the Transaction value from the union, panicing if the value is not set.

func (StellarMessage) MustTxSet

func (u StellarMessage) MustTxSet() TransactionSet

MustTxSet retrieves the TxSet value from the union, panicing if the value is not set.

func (StellarMessage) MustTxSetHash

func (u StellarMessage) MustTxSetHash() Uint256

MustTxSetHash retrieves the TxSetHash value from the union, panicing if the value is not set.

func (StellarMessage) SwitchFieldName

func (u StellarMessage) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*StellarMessage) UnmarshalBinary

func (s *StellarMessage) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type StellarValue

type StellarValue struct {
	TxSetHash Hash
	CloseTime TimePoint
	Upgrades  []UpgradeType `xdrmaxsize:"6"`
	Ext       StellarValueExt
}

StellarValue is an XDR Struct defines as:

struct StellarValue
 {
     Hash txSetHash;      // transaction set to apply to previous ledger
     TimePoint closeTime; // network close time

     // upgrades to apply to the previous ledger (usually empty)
     // this is a vector of encoded 'LedgerUpgrade' so that nodes can drop
     // unknown steps during consensus if needed.
     // see notes below on 'LedgerUpgrade' for more detail
     // max size is dictated by number of upgrade types (+ room for future)
     UpgradeType upgrades<6>;

     // reserved for future use
     union switch (StellarValueType v)
     {
     case STELLAR_VALUE_BASIC:
         void;
     case STELLAR_VALUE_SIGNED:
         LedgerCloseValueSignature lcValueSignature;
     }
     ext;
 };

func (*StellarValue) DecodeFrom

func (s *StellarValue) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*StellarValue) EncodeTo

func (s *StellarValue) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (StellarValue) MarshalBinary

func (s StellarValue) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*StellarValue) UnmarshalBinary

func (s *StellarValue) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type StellarValueExt

type StellarValueExt struct {
	V                StellarValueType
	LcValueSignature *LedgerCloseValueSignature
}

StellarValueExt is an XDR NestedUnion defines as:

union switch (StellarValueType v)
     {
     case STELLAR_VALUE_BASIC:
         void;
     case STELLAR_VALUE_SIGNED:
         LedgerCloseValueSignature lcValueSignature;
     }

func NewStellarValueExt

func NewStellarValueExt(v StellarValueType, value interface{}) (result StellarValueExt, err error)

NewStellarValueExt creates a new StellarValueExt.

func (StellarValueExt) ArmForSwitch

func (u StellarValueExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of StellarValueExt

func (*StellarValueExt) DecodeFrom

func (u *StellarValueExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (StellarValueExt) EncodeTo

func (u StellarValueExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (StellarValueExt) GetLcValueSignature

func (u StellarValueExt) GetLcValueSignature() (result LedgerCloseValueSignature, ok bool)

GetLcValueSignature retrieves the LcValueSignature value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarValueExt) MarshalBinary

func (s StellarValueExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (StellarValueExt) MustLcValueSignature

func (u StellarValueExt) MustLcValueSignature() LedgerCloseValueSignature

MustLcValueSignature retrieves the LcValueSignature value from the union, panicing if the value is not set.

func (StellarValueExt) SwitchFieldName

func (u StellarValueExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*StellarValueExt) UnmarshalBinary

func (s *StellarValueExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type StellarValueType

type StellarValueType int32

StellarValueType is an XDR Enum defines as:

enum StellarValueType
 {
     STELLAR_VALUE_BASIC = 0,
     STELLAR_VALUE_SIGNED = 1
 };
const (
	StellarValueTypeStellarValueBasic  StellarValueType = 0
	StellarValueTypeStellarValueSigned StellarValueType = 1
)

func (*StellarValueType) DecodeFrom

func (e *StellarValueType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (StellarValueType) EncodeTo

func (e StellarValueType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (StellarValueType) MarshalBinary

func (s StellarValueType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (StellarValueType) String

func (e StellarValueType) String() string

String returns the name of `e`

func (*StellarValueType) UnmarshalBinary

func (s *StellarValueType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (StellarValueType) ValidEnum

func (e StellarValueType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for StellarValueType

type String32

type String32 string

String32 is an XDR Typedef defines as:

typedef string string32<32>;

func String32Ptr

func String32Ptr(val string) *String32

func (*String32) DecodeFrom

func (s *String32) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (String32) EncodeTo

func (s String32) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (String32) MarshalBinary

func (s String32) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*String32) UnmarshalBinary

func (s *String32) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (String32) XDRMaxSize

func (e String32) XDRMaxSize() int

XDRMaxSize implements the Sized interface for String32

type String64

type String64 string

String64 is an XDR Typedef defines as:

typedef string string64<64>;

func (*String64) DecodeFrom

func (s *String64) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (String64) EncodeTo

func (s String64) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (String64) MarshalBinary

func (s String64) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*String64) UnmarshalBinary

func (s *String64) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (String64) XDRMaxSize

func (e String64) XDRMaxSize() int

XDRMaxSize implements the Sized interface for String64

type SurveyMessageCommandType

type SurveyMessageCommandType int32

SurveyMessageCommandType is an XDR Enum defines as:

enum SurveyMessageCommandType
 {
     SURVEY_TOPOLOGY = 0
 };
const (
	SurveyMessageCommandTypeSurveyTopology SurveyMessageCommandType = 0
)

func (*SurveyMessageCommandType) DecodeFrom

func (e *SurveyMessageCommandType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SurveyMessageCommandType) EncodeTo

func (e SurveyMessageCommandType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SurveyMessageCommandType) MarshalBinary

func (s SurveyMessageCommandType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SurveyMessageCommandType) String

func (e SurveyMessageCommandType) String() string

String returns the name of `e`

func (*SurveyMessageCommandType) UnmarshalBinary

func (s *SurveyMessageCommandType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (SurveyMessageCommandType) ValidEnum

func (e SurveyMessageCommandType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for SurveyMessageCommandType

type SurveyRequestMessage

type SurveyRequestMessage struct {
	SurveyorPeerId NodeId
	SurveyedPeerId NodeId
	LedgerNum      Uint32
	EncryptionKey  Curve25519Public
	CommandType    SurveyMessageCommandType
}

SurveyRequestMessage is an XDR Struct defines as:

struct SurveyRequestMessage
 {
     NodeID surveyorPeerID;
     NodeID surveyedPeerID;
     uint32 ledgerNum;
     Curve25519Public encryptionKey;
     SurveyMessageCommandType commandType;
 };

func (*SurveyRequestMessage) DecodeFrom

func (s *SurveyRequestMessage) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SurveyRequestMessage) EncodeTo

func (s *SurveyRequestMessage) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SurveyRequestMessage) MarshalBinary

func (s SurveyRequestMessage) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SurveyRequestMessage) UnmarshalBinary

func (s *SurveyRequestMessage) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SurveyResponseBody

type SurveyResponseBody struct {
	Type                 SurveyMessageCommandType
	TopologyResponseBody *TopologyResponseBody
}

SurveyResponseBody is an XDR Union defines as:

union SurveyResponseBody switch (SurveyMessageCommandType type)
 {
 case SURVEY_TOPOLOGY:
     TopologyResponseBody topologyResponseBody;
 };

func NewSurveyResponseBody

func NewSurveyResponseBody(aType SurveyMessageCommandType, value interface{}) (result SurveyResponseBody, err error)

NewSurveyResponseBody creates a new SurveyResponseBody.

func (SurveyResponseBody) ArmForSwitch

func (u SurveyResponseBody) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of SurveyResponseBody

func (*SurveyResponseBody) DecodeFrom

func (u *SurveyResponseBody) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SurveyResponseBody) EncodeTo

func (u SurveyResponseBody) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SurveyResponseBody) GetTopologyResponseBody

func (u SurveyResponseBody) GetTopologyResponseBody() (result TopologyResponseBody, ok bool)

GetTopologyResponseBody retrieves the TopologyResponseBody value from the union, returning ok if the union's switch indicated the value is valid.

func (SurveyResponseBody) MarshalBinary

func (s SurveyResponseBody) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SurveyResponseBody) MustTopologyResponseBody

func (u SurveyResponseBody) MustTopologyResponseBody() TopologyResponseBody

MustTopologyResponseBody retrieves the TopologyResponseBody value from the union, panicing if the value is not set.

func (SurveyResponseBody) SwitchFieldName

func (u SurveyResponseBody) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*SurveyResponseBody) UnmarshalBinary

func (s *SurveyResponseBody) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SurveyResponseMessage

type SurveyResponseMessage struct {
	SurveyorPeerId NodeId
	SurveyedPeerId NodeId
	LedgerNum      Uint32
	CommandType    SurveyMessageCommandType
	EncryptedBody  EncryptedBody
}

SurveyResponseMessage is an XDR Struct defines as:

struct SurveyResponseMessage
 {
     NodeID surveyorPeerID;
     NodeID surveyedPeerID;
     uint32 ledgerNum;
     SurveyMessageCommandType commandType;
     EncryptedBody encryptedBody;
 };

func (*SurveyResponseMessage) DecodeFrom

func (s *SurveyResponseMessage) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SurveyResponseMessage) EncodeTo

func (s *SurveyResponseMessage) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SurveyResponseMessage) MarshalBinary

func (s SurveyResponseMessage) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SurveyResponseMessage) UnmarshalBinary

func (s *SurveyResponseMessage) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ThresholdIndexes

type ThresholdIndexes int32

ThresholdIndexes is an XDR Enum defines as:

enum ThresholdIndexes
 {
     THRESHOLD_MASTER_WEIGHT = 0,
     THRESHOLD_LOW = 1,
     THRESHOLD_MED = 2,
     THRESHOLD_HIGH = 3
 };
const (
	ThresholdIndexesThresholdMasterWeight ThresholdIndexes = 0
	ThresholdIndexesThresholdLow          ThresholdIndexes = 1
	ThresholdIndexesThresholdMed          ThresholdIndexes = 2
	ThresholdIndexesThresholdHigh         ThresholdIndexes = 3
)

func (*ThresholdIndexes) DecodeFrom

func (e *ThresholdIndexes) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ThresholdIndexes) EncodeTo

func (e ThresholdIndexes) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ThresholdIndexes) MarshalBinary

func (s ThresholdIndexes) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ThresholdIndexes) String

func (e ThresholdIndexes) String() string

String returns the name of `e`

func (*ThresholdIndexes) UnmarshalBinary

func (s *ThresholdIndexes) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ThresholdIndexes) ValidEnum

func (e ThresholdIndexes) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ThresholdIndexes

type Thresholds

type Thresholds [4]byte

Thresholds is an XDR Typedef defines as:

typedef opaque Thresholds[4];

func NewThreshold

func NewThreshold(masterKey, low, medium, high byte) Thresholds

func (*Thresholds) DecodeFrom

func (s *Thresholds) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Thresholds) EncodeTo

func (s *Thresholds) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Thresholds) MarshalBinary

func (s Thresholds) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (Thresholds) MasterKeyWeight

func (t Thresholds) MasterKeyWeight() byte

func (*Thresholds) Scan

func (t *Thresholds) Scan(src interface{}) error

Scan reads from src into an Thresholds struct

func (Thresholds) ThresholdHigh

func (t Thresholds) ThresholdHigh() byte

func (Thresholds) ThresholdLow

func (t Thresholds) ThresholdLow() byte

func (Thresholds) ThresholdMedium

func (t Thresholds) ThresholdMedium() byte

func (*Thresholds) UnmarshalBinary

func (s *Thresholds) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (Thresholds) XDRMaxSize

func (e Thresholds) XDRMaxSize() int

XDRMaxSize implements the Sized interface for Thresholds

type TimeBounds

type TimeBounds struct {
	MinTime TimePoint
	MaxTime TimePoint
}

TimeBounds is an XDR Struct defines as:

struct TimeBounds
 {
     TimePoint minTime;
     TimePoint maxTime; // 0 here means no maxTime
 };

func (*TimeBounds) DecodeFrom

func (s *TimeBounds) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TimeBounds) EncodeTo

func (s *TimeBounds) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*TimeBounds) GoString

func (t *TimeBounds) GoString() string

GoString implements fmt.GoStringer.

func (TimeBounds) MarshalBinary

func (s TimeBounds) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TimeBounds) UnmarshalBinary

func (s *TimeBounds) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TimePoint

type TimePoint Uint64

TimePoint is an XDR Typedef defines as:

typedef uint64 TimePoint;

func (*TimePoint) DecodeFrom

func (s *TimePoint) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TimePoint) EncodeTo

func (s TimePoint) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TimePoint) MarshalBinary

func (s TimePoint) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TimePoint) UnmarshalBinary

func (s *TimePoint) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TopologyResponseBody

type TopologyResponseBody struct {
	InboundPeers           PeerStatList
	OutboundPeers          PeerStatList
	TotalInboundPeerCount  Uint32
	TotalOutboundPeerCount Uint32
}

TopologyResponseBody is an XDR Struct defines as:

struct TopologyResponseBody
 {
     PeerStatList inboundPeers;
     PeerStatList outboundPeers;

     uint32 totalInboundPeerCount;
     uint32 totalOutboundPeerCount;
 };

func (*TopologyResponseBody) DecodeFrom

func (s *TopologyResponseBody) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TopologyResponseBody) EncodeTo

func (s *TopologyResponseBody) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TopologyResponseBody) MarshalBinary

func (s TopologyResponseBody) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TopologyResponseBody) UnmarshalBinary

func (s *TopologyResponseBody) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Transaction

type Transaction struct {
	SourceAccount MuxedAccount
	Fee           Uint32
	SeqNum        SequenceNumber
	Cond          Preconditions
	Memo          Memo
	Operations    []Operation `xdrmaxsize:"100"`
	Ext           TransactionExt
}

Transaction is an XDR Struct defines as:

struct Transaction
 {
     // account used to run the transaction
     MuxedAccount sourceAccount;

     // the fee the sourceAccount will pay
     uint32 fee;

     // sequence number to consume in the account
     SequenceNumber seqNum;

     // validity conditions
     Preconditions cond;

     Memo memo;

     Operation operations<MAX_OPS_PER_TX>;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*Transaction) DecodeFrom

func (s *Transaction) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Transaction) EncodeTo

func (s *Transaction) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*Transaction) ExtraSigners

func (tx *Transaction) ExtraSigners() []SignerKey

ExtraSigners extracts the extra signers (if any) from the transaction's Preconditions.

func (*Transaction) LedgerBounds

func (tx *Transaction) LedgerBounds() *LedgerBounds

LedgerBounds extracts the ledgerbounds (if any) from the transaction's Preconditions.

func (Transaction) MarshalBinary

func (s Transaction) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Transaction) MinSeqAge

func (tx *Transaction) MinSeqAge() *Duration

MinSeqAge extracts the min seq age (if any) from the transaction's Preconditions.

func (*Transaction) MinSeqLedgerGap

func (tx *Transaction) MinSeqLedgerGap() *Uint32

MinSeqLedgerGap extracts the min seq ledger gap (if any) from the transaction's Preconditions.

func (*Transaction) MinSeqNum

func (tx *Transaction) MinSeqNum() *SequenceNumber

MinSeqNum extracts the min seq number (if any) from the transaction's Preconditions.

func (*Transaction) TimeBounds

func (tx *Transaction) TimeBounds() *TimeBounds

TimeBounds extracts the timebounds (if any) from the transaction's Preconditions.

func (*Transaction) UnmarshalBinary

func (s *Transaction) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionEnvelope

type TransactionEnvelope struct {
	Type    EnvelopeType
	V0      *TransactionV0Envelope
	V1      *TransactionV1Envelope
	FeeBump *FeeBumpTransactionEnvelope
}

TransactionEnvelope is an XDR Union defines as:

union TransactionEnvelope switch (EnvelopeType type)
 {
 case ENVELOPE_TYPE_TX_V0:
     TransactionV0Envelope v0;
 case ENVELOPE_TYPE_TX:
     TransactionV1Envelope v1;
 case ENVELOPE_TYPE_TX_FEE_BUMP:
     FeeBumpTransactionEnvelope feeBump;
 };

func NewTransactionEnvelope

func NewTransactionEnvelope(aType EnvelopeType, value interface{}) (result TransactionEnvelope, err error)

NewTransactionEnvelope creates a new TransactionEnvelope.

func (TransactionEnvelope) ArmForSwitch

func (u TransactionEnvelope) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionEnvelope

func (*TransactionEnvelope) DecodeFrom

func (u *TransactionEnvelope) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionEnvelope) EncodeTo

func (u TransactionEnvelope) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionEnvelope) ExtraSigners

func (e TransactionEnvelope) ExtraSigners() []SignerKey

ExtraSigners returns the extra signers set in the transaction envelope. Note for fee bump transactions, ExtraSigners() returns the field from the inner transaction

func (TransactionEnvelope) Fee

func (e TransactionEnvelope) Fee() uint32

Fee returns the fee defined for the transaction envelope If the transaction envelope is for a fee bump transaction, Fee() returns the fee defined in the inner transaction

func (TransactionEnvelope) FeeBumpAccount

func (e TransactionEnvelope) FeeBumpAccount() MuxedAccount

FeeBumpAccount returns the account paying for the fee bump transaction

func (TransactionEnvelope) FeeBumpFee

func (e TransactionEnvelope) FeeBumpFee() int64

FeeBumpFee returns the fee defined for the fee bump transaction

func (TransactionEnvelope) FeeBumpSignatures

func (e TransactionEnvelope) FeeBumpSignatures() []DecoratedSignature

FeeBumpSignatures returns the list of signatures for the fee bump transaction

func (TransactionEnvelope) GetFeeBump

func (u TransactionEnvelope) GetFeeBump() (result FeeBumpTransactionEnvelope, ok bool)

GetFeeBump retrieves the FeeBump value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionEnvelope) GetV0

func (u TransactionEnvelope) GetV0() (result TransactionV0Envelope, ok bool)

GetV0 retrieves the V0 value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionEnvelope) GetV1

func (u TransactionEnvelope) GetV1() (result TransactionV1Envelope, ok bool)

GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionEnvelope) GoString

func (e TransactionEnvelope) GoString() string

GoString implements fmt.GoStringer.

func (TransactionEnvelope) IsFeeBump

func (e TransactionEnvelope) IsFeeBump() bool

IsFeeBump returns true if the transaction envelope is a fee bump transaction

func (TransactionEnvelope) LedgerBounds

func (e TransactionEnvelope) LedgerBounds() *LedgerBounds

LedgerBounds returns the ledger bounds set in the transaction envelope. Note for fee bump transactions, LedgerBounds() returns the ledger bounds of the inner transaction

func (TransactionEnvelope) MarshalBinary

func (s TransactionEnvelope) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionEnvelope) Memo

func (e TransactionEnvelope) Memo() Memo

Memo returns the memo set in the transaction envelope Note for fee bump transactions, Memo() returns the memo of the inner transaction

func (TransactionEnvelope) MinSeqAge

func (e TransactionEnvelope) MinSeqAge() *Duration

MinSeqAge returns the min seq age set in the transaction envelope. Note for fee bump transactions, MinSeqAge() returns the field from the inner transaction

func (TransactionEnvelope) MinSeqLedgerGap

func (e TransactionEnvelope) MinSeqLedgerGap() *Uint32

MinSeqLedgerGap returns the min seq ledger gap set in the transaction. envelope. Note for fee bump transactions, MinSeqLedgerGap() returns the field from the inner transaction

func (TransactionEnvelope) MinSeqNum

func (e TransactionEnvelope) MinSeqNum() *int64

MinSeqNum returns the minimum sequence number set in the transaction envelope

Note for fee bump transactions, MinSeqNum() returns the sequence number of the inner transaction

func (TransactionEnvelope) MustFeeBump

MustFeeBump retrieves the FeeBump value from the union, panicing if the value is not set.

func (TransactionEnvelope) MustV0

MustV0 retrieves the V0 value from the union, panicing if the value is not set.

func (TransactionEnvelope) MustV1

MustV1 retrieves the V1 value from the union, panicing if the value is not set.

func (TransactionEnvelope) Operations

func (e TransactionEnvelope) Operations() []Operation

Operations returns the operations set in the transaction envelope Note for fee bump transactions, Operations() returns the operations of the inner transaction

func (TransactionEnvelope) Preconditions

func (e TransactionEnvelope) Preconditions() Preconditions

Preconditions returns the preconditions on the transaction. If the transaction is a V0 envelope (aka before preconditions existed), this returns a new precondition (timebound if present, empty otherwise). If the transaction is a fee bump, it returns the preconditions of the *inner* transaction.

func (*TransactionEnvelope) Scan

func (t *TransactionEnvelope) Scan(src interface{}) error

Scan reads from src into an TransactionEnvelope struct

func (TransactionEnvelope) SeqNum

func (e TransactionEnvelope) SeqNum() int64

SeqNum returns the sequence number set in the transaction envelope Note for fee bump transactions, SeqNum() returns the sequence number of the inner transaction

func (TransactionEnvelope) Signatures

func (e TransactionEnvelope) Signatures() []DecoratedSignature

Signatures returns the list of signatures included in the transaction envelope If the transaction envelope is for a fee bump transaction, Signatures() returns the signatures for the inner transaction

func (TransactionEnvelope) SourceAccount

func (e TransactionEnvelope) SourceAccount() MuxedAccount

SourceAccount returns the source account for the transaction If the transaction envelope is for a fee bump transaction, SourceAccount() returns the source account of the inner transaction

func (TransactionEnvelope) SwitchFieldName

func (u TransactionEnvelope) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (TransactionEnvelope) TimeBounds

func (e TransactionEnvelope) TimeBounds() *TimeBounds

TimeBounds returns the time bounds set in the transaction envelope Note for fee bump transactions, TimeBounds() returns the time bounds of the inner transaction

func (*TransactionEnvelope) UnmarshalBinary

func (s *TransactionEnvelope) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionExt

type TransactionExt struct {
	V int32
}

TransactionExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewTransactionExt

func NewTransactionExt(v int32, value interface{}) (result TransactionExt, err error)

NewTransactionExt creates a new TransactionExt.

func (TransactionExt) ArmForSwitch

func (u TransactionExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionExt

func (*TransactionExt) DecodeFrom

func (u *TransactionExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionExt) EncodeTo

func (u TransactionExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionExt) MarshalBinary

func (s TransactionExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionExt) SwitchFieldName

func (u TransactionExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionExt) UnmarshalBinary

func (s *TransactionExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionHistoryEntry

type TransactionHistoryEntry struct {
	LedgerSeq Uint32
	TxSet     TransactionSet
	Ext       TransactionHistoryEntryExt
}

TransactionHistoryEntry is an XDR Struct defines as:

struct TransactionHistoryEntry
 {
     uint32 ledgerSeq;
     TransactionSet txSet;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*TransactionHistoryEntry) DecodeFrom

func (s *TransactionHistoryEntry) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionHistoryEntry) EncodeTo

func (s *TransactionHistoryEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionHistoryEntry) MarshalBinary

func (s TransactionHistoryEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionHistoryEntry) UnmarshalBinary

func (s *TransactionHistoryEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionHistoryEntryExt

type TransactionHistoryEntryExt struct {
	V int32
}

TransactionHistoryEntryExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewTransactionHistoryEntryExt

func NewTransactionHistoryEntryExt(v int32, value interface{}) (result TransactionHistoryEntryExt, err error)

NewTransactionHistoryEntryExt creates a new TransactionHistoryEntryExt.

func (TransactionHistoryEntryExt) ArmForSwitch

func (u TransactionHistoryEntryExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionHistoryEntryExt

func (*TransactionHistoryEntryExt) DecodeFrom

func (u *TransactionHistoryEntryExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionHistoryEntryExt) EncodeTo

func (u TransactionHistoryEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionHistoryEntryExt) MarshalBinary

func (s TransactionHistoryEntryExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionHistoryEntryExt) SwitchFieldName

func (u TransactionHistoryEntryExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionHistoryEntryExt) UnmarshalBinary

func (s *TransactionHistoryEntryExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionHistoryResultEntry

type TransactionHistoryResultEntry struct {
	LedgerSeq   Uint32
	TxResultSet TransactionResultSet
	Ext         TransactionHistoryResultEntryExt
}

TransactionHistoryResultEntry is an XDR Struct defines as:

struct TransactionHistoryResultEntry
 {
     uint32 ledgerSeq;
     TransactionResultSet txResultSet;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*TransactionHistoryResultEntry) DecodeFrom

func (s *TransactionHistoryResultEntry) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionHistoryResultEntry) EncodeTo

func (s *TransactionHistoryResultEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionHistoryResultEntry) MarshalBinary

func (s TransactionHistoryResultEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionHistoryResultEntry) UnmarshalBinary

func (s *TransactionHistoryResultEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionHistoryResultEntryExt

type TransactionHistoryResultEntryExt struct {
	V int32
}

TransactionHistoryResultEntryExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewTransactionHistoryResultEntryExt

func NewTransactionHistoryResultEntryExt(v int32, value interface{}) (result TransactionHistoryResultEntryExt, err error)

NewTransactionHistoryResultEntryExt creates a new TransactionHistoryResultEntryExt.

func (TransactionHistoryResultEntryExt) ArmForSwitch

func (u TransactionHistoryResultEntryExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionHistoryResultEntryExt

func (*TransactionHistoryResultEntryExt) DecodeFrom

func (u *TransactionHistoryResultEntryExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionHistoryResultEntryExt) EncodeTo

func (u TransactionHistoryResultEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionHistoryResultEntryExt) MarshalBinary

func (s TransactionHistoryResultEntryExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionHistoryResultEntryExt) SwitchFieldName

func (u TransactionHistoryResultEntryExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionHistoryResultEntryExt) UnmarshalBinary

func (s *TransactionHistoryResultEntryExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionMeta

type TransactionMeta struct {
	V          int32
	Operations *[]OperationMeta
	V1         *TransactionMetaV1
	V2         *TransactionMetaV2
}

TransactionMeta is an XDR Union defines as:

union TransactionMeta switch (int v)
 {
 case 0:
     OperationMeta operations<>;
 case 1:
     TransactionMetaV1 v1;
 case 2:
     TransactionMetaV2 v2;
 };

func NewTransactionMeta

func NewTransactionMeta(v int32, value interface{}) (result TransactionMeta, err error)

NewTransactionMeta creates a new TransactionMeta.

func (TransactionMeta) ArmForSwitch

func (u TransactionMeta) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionMeta

func (*TransactionMeta) DecodeFrom

func (u *TransactionMeta) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionMeta) EncodeTo

func (u TransactionMeta) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionMeta) GetOperations

func (u TransactionMeta) GetOperations() (result []OperationMeta, ok bool)

GetOperations retrieves the Operations value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionMeta) GetV1

func (u TransactionMeta) GetV1() (result TransactionMetaV1, ok bool)

GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionMeta) GetV2

func (u TransactionMeta) GetV2() (result TransactionMetaV2, ok bool)

GetV2 retrieves the V2 value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionMeta) MarshalBinary

func (s TransactionMeta) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionMeta) MustOperations

func (u TransactionMeta) MustOperations() []OperationMeta

MustOperations retrieves the Operations value from the union, panicing if the value is not set.

func (TransactionMeta) MustV1

MustV1 retrieves the V1 value from the union, panicing if the value is not set.

func (TransactionMeta) MustV2

MustV2 retrieves the V2 value from the union, panicing if the value is not set.

func (*TransactionMeta) OperationsMeta

func (transactionMeta *TransactionMeta) OperationsMeta() []OperationMeta

Operations is a helper on TransactionMeta that returns operations meta from `TransactionMeta.Operations` or `TransactionMeta.V1.Operations`.

func (*TransactionMeta) Scan

func (t *TransactionMeta) Scan(src interface{}) error

Scan reads from src into an TransactionMeta struct

func (TransactionMeta) SwitchFieldName

func (u TransactionMeta) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionMeta) UnmarshalBinary

func (s *TransactionMeta) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionMetaV1

type TransactionMetaV1 struct {
	TxChanges  LedgerEntryChanges
	Operations []OperationMeta
}

TransactionMetaV1 is an XDR Struct defines as:

struct TransactionMetaV1
 {
     LedgerEntryChanges txChanges; // tx level changes if any
     OperationMeta operations<>;   // meta for each operation
 };

func (*TransactionMetaV1) DecodeFrom

func (s *TransactionMetaV1) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionMetaV1) EncodeTo

func (s *TransactionMetaV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionMetaV1) MarshalBinary

func (s TransactionMetaV1) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionMetaV1) UnmarshalBinary

func (s *TransactionMetaV1) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionMetaV2

type TransactionMetaV2 struct {
	TxChangesBefore LedgerEntryChanges
	Operations      []OperationMeta
	TxChangesAfter  LedgerEntryChanges
}

TransactionMetaV2 is an XDR Struct defines as:

struct TransactionMetaV2
 {
     LedgerEntryChanges txChangesBefore; // tx level changes before operations
                                         // are applied if any
     OperationMeta operations<>;         // meta for each operation
     LedgerEntryChanges txChangesAfter;  // tx level changes after operations are
                                         // applied if any
 };

func (*TransactionMetaV2) DecodeFrom

func (s *TransactionMetaV2) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionMetaV2) EncodeTo

func (s *TransactionMetaV2) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionMetaV2) MarshalBinary

func (s TransactionMetaV2) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionMetaV2) UnmarshalBinary

func (s *TransactionMetaV2) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionResult

type TransactionResult struct {
	FeeCharged Int64
	Result     TransactionResultResult
	Ext        TransactionResultExt
}

TransactionResult is an XDR Struct defines as:

struct TransactionResult
 {
     int64 feeCharged; // actual fee charged for the transaction

     union switch (TransactionResultCode code)
     {
     case txFEE_BUMP_INNER_SUCCESS:
     case txFEE_BUMP_INNER_FAILED:
         InnerTransactionResultPair innerResultPair;
     case txSUCCESS:
     case txFAILED:
         OperationResult results<>;
     default:
         void;
     }
     result;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*TransactionResult) DecodeFrom

func (s *TransactionResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionResult) EncodeTo

func (s *TransactionResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionResult) ExtractBalanceID

func (r TransactionResult) ExtractBalanceID(opIndex int) (*ClaimableBalanceId, error)

ExtractBalanceID will parse the operation result at `opIndex` within the given `txResult`, returning the internal XDR structure for the claimable balance ID.

If the specified operation index does not point to a successful `CreateClaimableBalance` operation result, this function panics.

func (TransactionResult) ExtractBalanceIDHex

func (r TransactionResult) ExtractBalanceIDHex(opIndex int) (string, error)

ExtractBalanceIDHex works like `ExtractBalanceID`, but will return the hex encoding of the resulting value.

func (TransactionResult) MarshalBinary

func (s TransactionResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionResult) OperationResults

func (r TransactionResult) OperationResults() ([]OperationResult, bool)

OperationResults returns the operation results for the transaction

func (*TransactionResult) Scan

func (t *TransactionResult) Scan(src interface{}) error

Scan reads from src into an TransactionResult struct

func (TransactionResult) Successful

func (r TransactionResult) Successful() bool

Successful returns true if the transaction succeeded

func (*TransactionResult) UnmarshalBinary

func (s *TransactionResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionResultCode

type TransactionResultCode int32

TransactionResultCode is an XDR Enum defines as:

enum TransactionResultCode
 {
     txFEE_BUMP_INNER_SUCCESS = 1, // fee bump inner transaction succeeded
     txSUCCESS = 0,                // all operations succeeded

     txFAILED = -1, // one of the operations failed (none were applied)

     txTOO_EARLY = -2,         // ledger closeTime before minTime
     txTOO_LATE = -3,          // ledger closeTime after maxTime
     txMISSING_OPERATION = -4, // no operation was specified
     txBAD_SEQ = -5,           // sequence number does not match source account

     txBAD_AUTH = -6,             // too few valid signatures / wrong network
     txINSUFFICIENT_BALANCE = -7, // fee would bring account below reserve
     txNO_ACCOUNT = -8,           // source account not found
     txINSUFFICIENT_FEE = -9,     // fee is too small
     txBAD_AUTH_EXTRA = -10,      // unused signatures attached to transaction
     txINTERNAL_ERROR = -11,      // an unknown error occurred

     txNOT_SUPPORTED = -12,         // transaction type not supported
     txFEE_BUMP_INNER_FAILED = -13, // fee bump inner transaction failed
     txBAD_SPONSORSHIP = -14,       // sponsorship not confirmed
     txBAD_MIN_SEQ_AGE_OR_GAP =
         -15, // minSeqAge or minSeqLedgerGap conditions not met
     txMALFORMED = -16 // precondition is invalid
 };
const (
	TransactionResultCodeTxFeeBumpInnerSuccess TransactionResultCode = 1
	TransactionResultCodeTxSuccess             TransactionResultCode = 0
	TransactionResultCodeTxFailed              TransactionResultCode = -1
	TransactionResultCodeTxTooEarly            TransactionResultCode = -2
	TransactionResultCodeTxTooLate             TransactionResultCode = -3
	TransactionResultCodeTxMissingOperation    TransactionResultCode = -4
	TransactionResultCodeTxBadSeq              TransactionResultCode = -5
	TransactionResultCodeTxBadAuth             TransactionResultCode = -6
	TransactionResultCodeTxInsufficientBalance TransactionResultCode = -7
	TransactionResultCodeTxNoAccount           TransactionResultCode = -8
	TransactionResultCodeTxInsufficientFee     TransactionResultCode = -9
	TransactionResultCodeTxBadAuthExtra        TransactionResultCode = -10
	TransactionResultCodeTxInternalError       TransactionResultCode = -11
	TransactionResultCodeTxNotSupported        TransactionResultCode = -12
	TransactionResultCodeTxFeeBumpInnerFailed  TransactionResultCode = -13
	TransactionResultCodeTxBadSponsorship      TransactionResultCode = -14
	TransactionResultCodeTxBadMinSeqAgeOrGap   TransactionResultCode = -15
	TransactionResultCodeTxMalformed           TransactionResultCode = -16
)

func (*TransactionResultCode) DecodeFrom

func (e *TransactionResultCode) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionResultCode) EncodeTo

func (e TransactionResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionResultCode) MarshalBinary

func (s TransactionResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionResultCode) String

func (e TransactionResultCode) String() string

String returns the name of `e`

func (*TransactionResultCode) UnmarshalBinary

func (s *TransactionResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (TransactionResultCode) ValidEnum

func (e TransactionResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for TransactionResultCode

type TransactionResultExt

type TransactionResultExt struct {
	V int32
}

TransactionResultExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewTransactionResultExt

func NewTransactionResultExt(v int32, value interface{}) (result TransactionResultExt, err error)

NewTransactionResultExt creates a new TransactionResultExt.

func (TransactionResultExt) ArmForSwitch

func (u TransactionResultExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionResultExt

func (*TransactionResultExt) DecodeFrom

func (u *TransactionResultExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionResultExt) EncodeTo

func (u TransactionResultExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionResultExt) MarshalBinary

func (s TransactionResultExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionResultExt) SwitchFieldName

func (u TransactionResultExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionResultExt) UnmarshalBinary

func (s *TransactionResultExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionResultMeta

type TransactionResultMeta struct {
	Result            TransactionResultPair
	FeeProcessing     LedgerEntryChanges
	TxApplyProcessing TransactionMeta
}

TransactionResultMeta is an XDR Struct defines as:

struct TransactionResultMeta
 {
     TransactionResultPair result;
     LedgerEntryChanges feeProcessing;
     TransactionMeta txApplyProcessing;
 };

func (*TransactionResultMeta) DecodeFrom

func (s *TransactionResultMeta) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionResultMeta) EncodeTo

func (s *TransactionResultMeta) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionResultMeta) MarshalBinary

func (s TransactionResultMeta) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionResultMeta) UnmarshalBinary

func (s *TransactionResultMeta) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionResultPair

type TransactionResultPair struct {
	TransactionHash Hash
	Result          TransactionResult
}

TransactionResultPair is an XDR Struct defines as:

struct TransactionResultPair
 {
     Hash transactionHash;
     TransactionResult result; // result for the transaction
 };

func (*TransactionResultPair) DecodeFrom

func (s *TransactionResultPair) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionResultPair) EncodeTo

func (s *TransactionResultPair) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionResultPair) InnerHash

func (r TransactionResultPair) InnerHash() Hash

InnerHash returns the hash of the inner transaction. This function can only be called on fee bump transactions.

func (TransactionResultPair) MarshalBinary

func (s TransactionResultPair) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionResultPair) OperationResults

func (r TransactionResultPair) OperationResults() ([]OperationResult, bool)

OperationResults returns the operation results for the transaction

func (*TransactionResultPair) Scan

func (t *TransactionResultPair) Scan(src interface{}) error

Scan reads from src into an TransactionResultPair struct

func (TransactionResultPair) Successful

func (r TransactionResultPair) Successful() bool

Successful returns true if the transaction succeeded

func (*TransactionResultPair) UnmarshalBinary

func (s *TransactionResultPair) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionResultResult

type TransactionResultResult struct {
	Code            TransactionResultCode
	InnerResultPair *InnerTransactionResultPair
	Results         *[]OperationResult
}

TransactionResultResult is an XDR NestedUnion defines as:

union switch (TransactionResultCode code)
     {
     case txFEE_BUMP_INNER_SUCCESS:
     case txFEE_BUMP_INNER_FAILED:
         InnerTransactionResultPair innerResultPair;
     case txSUCCESS:
     case txFAILED:
         OperationResult results<>;
     default:
         void;
     }

func NewTransactionResultResult

func NewTransactionResultResult(code TransactionResultCode, value interface{}) (result TransactionResultResult, err error)

NewTransactionResultResult creates a new TransactionResultResult.

func (TransactionResultResult) ArmForSwitch

func (u TransactionResultResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionResultResult

func (*TransactionResultResult) DecodeFrom

func (u *TransactionResultResult) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionResultResult) EncodeTo

func (u TransactionResultResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionResultResult) GetInnerResultPair

func (u TransactionResultResult) GetInnerResultPair() (result InnerTransactionResultPair, ok bool)

GetInnerResultPair retrieves the InnerResultPair value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionResultResult) GetResults

func (u TransactionResultResult) GetResults() (result []OperationResult, ok bool)

GetResults retrieves the Results value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionResultResult) MarshalBinary

func (s TransactionResultResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionResultResult) MustInnerResultPair

func (u TransactionResultResult) MustInnerResultPair() InnerTransactionResultPair

MustInnerResultPair retrieves the InnerResultPair value from the union, panicing if the value is not set.

func (TransactionResultResult) MustResults

func (u TransactionResultResult) MustResults() []OperationResult

MustResults retrieves the Results value from the union, panicing if the value is not set.

func (TransactionResultResult) SwitchFieldName

func (u TransactionResultResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionResultResult) UnmarshalBinary

func (s *TransactionResultResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionResultSet

type TransactionResultSet struct {
	Results []TransactionResultPair
}

TransactionResultSet is an XDR Struct defines as:

struct TransactionResultSet
 {
     TransactionResultPair results<>;
 };

func (*TransactionResultSet) DecodeFrom

func (s *TransactionResultSet) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionResultSet) EncodeTo

func (s *TransactionResultSet) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionResultSet) MarshalBinary

func (s TransactionResultSet) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionResultSet) UnmarshalBinary

func (s *TransactionResultSet) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionSet

type TransactionSet struct {
	PreviousLedgerHash Hash
	Txs                []TransactionEnvelope
}

TransactionSet is an XDR Struct defines as:

struct TransactionSet
 {
     Hash previousLedgerHash;
     TransactionEnvelope txs<>;
 };

func (*TransactionSet) DecodeFrom

func (s *TransactionSet) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionSet) EncodeTo

func (s *TransactionSet) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionSet) MarshalBinary

func (s TransactionSet) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionSet) UnmarshalBinary

func (s *TransactionSet) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionSignaturePayload

type TransactionSignaturePayload struct {
	NetworkId         Hash
	TaggedTransaction TransactionSignaturePayloadTaggedTransaction
}

TransactionSignaturePayload is an XDR Struct defines as:

struct TransactionSignaturePayload
 {
     Hash networkId;
     union switch (EnvelopeType type)
     {
     // Backwards Compatibility: Use ENVELOPE_TYPE_TX to sign ENVELOPE_TYPE_TX_V0
     case ENVELOPE_TYPE_TX:
         Transaction tx;
     case ENVELOPE_TYPE_TX_FEE_BUMP:
         FeeBumpTransaction feeBump;
     }
     taggedTransaction;
 };

func (*TransactionSignaturePayload) DecodeFrom

func (s *TransactionSignaturePayload) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionSignaturePayload) EncodeTo

func (s *TransactionSignaturePayload) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionSignaturePayload) MarshalBinary

func (s TransactionSignaturePayload) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionSignaturePayload) UnmarshalBinary

func (s *TransactionSignaturePayload) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionSignaturePayloadTaggedTransaction

type TransactionSignaturePayloadTaggedTransaction struct {
	Type    EnvelopeType
	Tx      *Transaction
	FeeBump *FeeBumpTransaction
}

TransactionSignaturePayloadTaggedTransaction is an XDR NestedUnion defines as:

union switch (EnvelopeType type)
     {
     // Backwards Compatibility: Use ENVELOPE_TYPE_TX to sign ENVELOPE_TYPE_TX_V0
     case ENVELOPE_TYPE_TX:
         Transaction tx;
     case ENVELOPE_TYPE_TX_FEE_BUMP:
         FeeBumpTransaction feeBump;
     }

func NewTransactionSignaturePayloadTaggedTransaction

func NewTransactionSignaturePayloadTaggedTransaction(aType EnvelopeType, value interface{}) (result TransactionSignaturePayloadTaggedTransaction, err error)

NewTransactionSignaturePayloadTaggedTransaction creates a new TransactionSignaturePayloadTaggedTransaction.

func (TransactionSignaturePayloadTaggedTransaction) ArmForSwitch

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionSignaturePayloadTaggedTransaction

func (*TransactionSignaturePayloadTaggedTransaction) DecodeFrom

func (u *TransactionSignaturePayloadTaggedTransaction) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionSignaturePayloadTaggedTransaction) EncodeTo

func (u TransactionSignaturePayloadTaggedTransaction) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionSignaturePayloadTaggedTransaction) GetFeeBump

GetFeeBump retrieves the FeeBump value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionSignaturePayloadTaggedTransaction) GetTx

GetTx retrieves the Tx value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionSignaturePayloadTaggedTransaction) MarshalBinary

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionSignaturePayloadTaggedTransaction) MustFeeBump

MustFeeBump retrieves the FeeBump value from the union, panicing if the value is not set.

func (TransactionSignaturePayloadTaggedTransaction) MustTx

MustTx retrieves the Tx value from the union, panicing if the value is not set.

func (TransactionSignaturePayloadTaggedTransaction) SwitchFieldName

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionSignaturePayloadTaggedTransaction) UnmarshalBinary

func (s *TransactionSignaturePayloadTaggedTransaction) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionV0

type TransactionV0 struct {
	SourceAccountEd25519 Uint256
	Fee                  Uint32
	SeqNum               SequenceNumber
	TimeBounds           *TimeBounds
	Memo                 Memo
	Operations           []Operation `xdrmaxsize:"100"`
	Ext                  TransactionV0Ext
}

TransactionV0 is an XDR Struct defines as:

struct TransactionV0
 {
     uint256 sourceAccountEd25519;
     uint32 fee;
     SequenceNumber seqNum;
     TimeBounds* timeBounds;
     Memo memo;
     Operation operations<MAX_OPS_PER_TX>;
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*TransactionV0) DecodeFrom

func (s *TransactionV0) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionV0) EncodeTo

func (s *TransactionV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionV0) MarshalBinary

func (s TransactionV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionV0) UnmarshalBinary

func (s *TransactionV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionV0Envelope

type TransactionV0Envelope struct {
	Tx         TransactionV0
	Signatures []DecoratedSignature `xdrmaxsize:"20"`
}

TransactionV0Envelope is an XDR Struct defines as:

struct TransactionV0Envelope
 {
     TransactionV0 tx;
     /* Each decorated signature is a signature over the SHA256 hash of
      * a TransactionSignaturePayload */
     DecoratedSignature signatures<20>;
 };

func (*TransactionV0Envelope) DecodeFrom

func (s *TransactionV0Envelope) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionV0Envelope) EncodeTo

func (s *TransactionV0Envelope) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionV0Envelope) MarshalBinary

func (s TransactionV0Envelope) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionV0Envelope) UnmarshalBinary

func (s *TransactionV0Envelope) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionV0Ext

type TransactionV0Ext struct {
	V int32
}

TransactionV0Ext is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewTransactionV0Ext

func NewTransactionV0Ext(v int32, value interface{}) (result TransactionV0Ext, err error)

NewTransactionV0Ext creates a new TransactionV0Ext.

func (TransactionV0Ext) ArmForSwitch

func (u TransactionV0Ext) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionV0Ext

func (*TransactionV0Ext) DecodeFrom

func (u *TransactionV0Ext) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionV0Ext) EncodeTo

func (u TransactionV0Ext) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionV0Ext) MarshalBinary

func (s TransactionV0Ext) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionV0Ext) SwitchFieldName

func (u TransactionV0Ext) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionV0Ext) UnmarshalBinary

func (s *TransactionV0Ext) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionV1Envelope

type TransactionV1Envelope struct {
	Tx         Transaction
	Signatures []DecoratedSignature `xdrmaxsize:"20"`
}

TransactionV1Envelope is an XDR Struct defines as:

struct TransactionV1Envelope
 {
     Transaction tx;
     /* Each decorated signature is a signature over the SHA256 hash of
      * a TransactionSignaturePayload */
     DecoratedSignature signatures<20>;
 };

func (*TransactionV1Envelope) DecodeFrom

func (s *TransactionV1Envelope) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionV1Envelope) EncodeTo

func (s *TransactionV1Envelope) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionV1Envelope) MarshalBinary

func (s TransactionV1Envelope) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionV1Envelope) UnmarshalBinary

func (s *TransactionV1Envelope) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineAsset

type TrustLineAsset struct {
	Type            AssetType
	AlphaNum4       *AlphaNum4
	AlphaNum12      *AlphaNum12
	LiquidityPoolId *PoolId
}

TrustLineAsset is an XDR Union defines as:

union TrustLineAsset switch (AssetType type)
 {
 case ASSET_TYPE_NATIVE: // Not credit
     void;

 case ASSET_TYPE_CREDIT_ALPHANUM4:
     AlphaNum4 alphaNum4;

 case ASSET_TYPE_CREDIT_ALPHANUM12:
     AlphaNum12 alphaNum12;

 case ASSET_TYPE_POOL_SHARE:
     PoolID liquidityPoolID;

     // add other asset types here in the future
 };

func NewTrustLineAsset

func NewTrustLineAsset(aType AssetType, value interface{}) (result TrustLineAsset, err error)

NewTrustLineAsset creates a new TrustLineAsset.

func (TrustLineAsset) ArmForSwitch

func (u TrustLineAsset) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TrustLineAsset

func (*TrustLineAsset) DecodeFrom

func (u *TrustLineAsset) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TrustLineAsset) EncodeTo

func (u TrustLineAsset) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrustLineAsset) Equals

func (a TrustLineAsset) Equals(other TrustLineAsset) bool

func (TrustLineAsset) Extract

func (a TrustLineAsset) Extract(typ interface{}, code interface{}, issuer interface{}) error

MustExtract behaves as Extract, but panics if an error occurs.

func (TrustLineAsset) GetAlphaNum12

func (u TrustLineAsset) GetAlphaNum12() (result AlphaNum12, ok bool)

GetAlphaNum12 retrieves the AlphaNum12 value from the union, returning ok if the union's switch indicated the value is valid.

func (TrustLineAsset) GetAlphaNum4

func (u TrustLineAsset) GetAlphaNum4() (result AlphaNum4, ok bool)

GetAlphaNum4 retrieves the AlphaNum4 value from the union, returning ok if the union's switch indicated the value is valid.

func (TrustLineAsset) GetLiquidityPoolId

func (u TrustLineAsset) GetLiquidityPoolId() (result PoolId, ok bool)

GetLiquidityPoolId retrieves the LiquidityPoolId value from the union, returning ok if the union's switch indicated the value is valid.

func (TrustLineAsset) MarshalBinary

func (s TrustLineAsset) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TrustLineAsset) MustAlphaNum12

func (u TrustLineAsset) MustAlphaNum12() AlphaNum12

MustAlphaNum12 retrieves the AlphaNum12 value from the union, panicing if the value is not set.

func (TrustLineAsset) MustAlphaNum4

func (u TrustLineAsset) MustAlphaNum4() AlphaNum4

MustAlphaNum4 retrieves the AlphaNum4 value from the union, panicing if the value is not set.

func (TrustLineAsset) MustExtract

func (a TrustLineAsset) MustExtract(typ interface{}, code interface{}, issuer interface{})

MustExtract behaves as Extract, but panics if an error occurs.

func (TrustLineAsset) MustLiquidityPoolId

func (u TrustLineAsset) MustLiquidityPoolId() PoolId

MustLiquidityPoolId retrieves the LiquidityPoolId value from the union, panicing if the value is not set.

func (TrustLineAsset) SwitchFieldName

func (u TrustLineAsset) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (TrustLineAsset) ToAsset

func (tla TrustLineAsset) ToAsset() Asset

ToAsset converts TrustLineAsset to Asset. Panics on type other than AssetTypeAssetTypeNative, AssetTypeAssetTypeCreditAlphanum4 or AssetTypeAssetTypeCreditAlphanum12.

func (*TrustLineAsset) UnmarshalBinary

func (s *TrustLineAsset) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineEntry

type TrustLineEntry struct {
	AccountId AccountId
	Asset     TrustLineAsset
	Balance   Int64
	Limit     Int64
	Flags     Uint32
	Ext       TrustLineEntryExt
}

TrustLineEntry is an XDR Struct defines as:

struct TrustLineEntry
 {
     AccountID accountID;  // account this trustline belongs to
     TrustLineAsset asset; // type of asset (with issuer)
     int64 balance;        // how much of this asset the user has.
                           // Asset defines the unit for this;

     int64 limit;  // balance cannot be above this
     uint32 flags; // see TrustLineFlags

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     case 1:
         struct
         {
             Liabilities liabilities;

             union switch (int v)
             {
             case 0:
                 void;
             case 2:
                 TrustLineEntryExtensionV2 v2;
             }
             ext;
         } v1;
     }
     ext;
 };

func (*TrustLineEntry) DecodeFrom

func (s *TrustLineEntry) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TrustLineEntry) EncodeTo

func (s *TrustLineEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*TrustLineEntry) Liabilities

func (trustLine *TrustLineEntry) Liabilities() Liabilities

Liabilities returns TrustLineEntry's liabilities

func (TrustLineEntry) MarshalBinary

func (s TrustLineEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TrustLineEntry) UnmarshalBinary

func (s *TrustLineEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineEntryExt

type TrustLineEntryExt struct {
	V  int32
	V1 *TrustLineEntryV1
}

TrustLineEntryExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     case 1:
         struct
         {
             Liabilities liabilities;

             union switch (int v)
             {
             case 0:
                 void;
             case 2:
                 TrustLineEntryExtensionV2 v2;
             }
             ext;
         } v1;
     }

func NewTrustLineEntryExt

func NewTrustLineEntryExt(v int32, value interface{}) (result TrustLineEntryExt, err error)

NewTrustLineEntryExt creates a new TrustLineEntryExt.

func (TrustLineEntryExt) ArmForSwitch

func (u TrustLineEntryExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TrustLineEntryExt

func (*TrustLineEntryExt) DecodeFrom

func (u *TrustLineEntryExt) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TrustLineEntryExt) EncodeTo

func (u TrustLineEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrustLineEntryExt) GetV1

func (u TrustLineEntryExt) GetV1() (result TrustLineEntryV1, ok bool)

GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.

func (TrustLineEntryExt) MarshalBinary

func (s TrustLineEntryExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TrustLineEntryExt) MustV1

MustV1 retrieves the V1 value from the union, panicing if the value is not set.

func (TrustLineEntryExt) SwitchFieldName

func (u TrustLineEntryExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TrustLineEntryExt) UnmarshalBinary

func (s *TrustLineEntryExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineEntryExtensionV2

type TrustLineEntryExtensionV2 struct {
	LiquidityPoolUseCount Int32
	Ext                   TrustLineEntryExtensionV2Ext
}

TrustLineEntryExtensionV2 is an XDR Struct defines as:

struct TrustLineEntryExtensionV2
 {
     int32 liquidityPoolUseCount;

     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*TrustLineEntryExtensionV2) DecodeFrom

func (s *TrustLineEntryExtensionV2) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TrustLineEntryExtensionV2) EncodeTo

func (s *TrustLineEntryExtensionV2) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrustLineEntryExtensionV2) MarshalBinary

func (s TrustLineEntryExtensionV2) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TrustLineEntryExtensionV2) UnmarshalBinary

func (s *TrustLineEntryExtensionV2) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineEntryExtensionV2Ext

type TrustLineEntryExtensionV2Ext struct {
	V int32
}

TrustLineEntryExtensionV2Ext is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewTrustLineEntryExtensionV2Ext

func NewTrustLineEntryExtensionV2Ext(v int32, value interface{}) (result TrustLineEntryExtensionV2Ext, err error)

NewTrustLineEntryExtensionV2Ext creates a new TrustLineEntryExtensionV2Ext.

func (TrustLineEntryExtensionV2Ext) ArmForSwitch

func (u TrustLineEntryExtensionV2Ext) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TrustLineEntryExtensionV2Ext

func (*TrustLineEntryExtensionV2Ext) DecodeFrom

func (u *TrustLineEntryExtensionV2Ext) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TrustLineEntryExtensionV2Ext) EncodeTo

func (u TrustLineEntryExtensionV2Ext) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrustLineEntryExtensionV2Ext) MarshalBinary

func (s TrustLineEntryExtensionV2Ext) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TrustLineEntryExtensionV2Ext) SwitchFieldName

func (u TrustLineEntryExtensionV2Ext) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TrustLineEntryExtensionV2Ext) UnmarshalBinary

func (s *TrustLineEntryExtensionV2Ext) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineEntryV1

type TrustLineEntryV1 struct {
	Liabilities Liabilities
	Ext         TrustLineEntryV1Ext
}

TrustLineEntryV1 is an XDR NestedStruct defines as:

struct
         {
             Liabilities liabilities;

             union switch (int v)
             {
             case 0:
                 void;
             case 2:
                 TrustLineEntryExtensionV2 v2;
             }
             ext;
         }

func (*TrustLineEntryV1) DecodeFrom

func (s *TrustLineEntryV1) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TrustLineEntryV1) EncodeTo

func (s *TrustLineEntryV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrustLineEntryV1) MarshalBinary

func (s TrustLineEntryV1) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TrustLineEntryV1) UnmarshalBinary

func (s *TrustLineEntryV1) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineEntryV1Ext

type TrustLineEntryV1Ext struct {
	V  int32
	V2 *TrustLineEntryExtensionV2
}

TrustLineEntryV1Ext is an XDR NestedUnion defines as:

union switch (int v)
             {
             case 0:
                 void;
             case 2:
                 TrustLineEntryExtensionV2 v2;
             }

func NewTrustLineEntryV1Ext

func NewTrustLineEntryV1Ext(v int32, value interface{}) (result TrustLineEntryV1Ext, err error)

NewTrustLineEntryV1Ext creates a new TrustLineEntryV1Ext.

func (TrustLineEntryV1Ext) ArmForSwitch

func (u TrustLineEntryV1Ext) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TrustLineEntryV1Ext

func (*TrustLineEntryV1Ext) DecodeFrom

func (u *TrustLineEntryV1Ext) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TrustLineEntryV1Ext) EncodeTo

func (u TrustLineEntryV1Ext) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrustLineEntryV1Ext) GetV2

func (u TrustLineEntryV1Ext) GetV2() (result TrustLineEntryExtensionV2, ok bool)

GetV2 retrieves the V2 value from the union, returning ok if the union's switch indicated the value is valid.

func (TrustLineEntryV1Ext) MarshalBinary

func (s TrustLineEntryV1Ext) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TrustLineEntryV1Ext) MustV2

MustV2 retrieves the V2 value from the union, panicing if the value is not set.

func (TrustLineEntryV1Ext) SwitchFieldName

func (u TrustLineEntryV1Ext) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TrustLineEntryV1Ext) UnmarshalBinary

func (s *TrustLineEntryV1Ext) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineFlags

type TrustLineFlags int32

TrustLineFlags is an XDR Enum defines as:

enum TrustLineFlags
 {
     // issuer has authorized account to perform transactions with its credit
     AUTHORIZED_FLAG = 1,
     // issuer has authorized account to maintain and reduce liabilities for its
     // credit
     AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG = 2,
     // issuer has specified that it may clawback its credit, and that claimable
     // balances created with its credit may also be clawed back
     TRUSTLINE_CLAWBACK_ENABLED_FLAG = 4
 };
const (
	TrustLineFlagsAuthorizedFlag                      TrustLineFlags = 1
	TrustLineFlagsAuthorizedToMaintainLiabilitiesFlag TrustLineFlags = 2
	TrustLineFlagsTrustlineClawbackEnabledFlag        TrustLineFlags = 4
)

func (*TrustLineFlags) DecodeFrom

func (e *TrustLineFlags) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TrustLineFlags) EncodeTo

func (e TrustLineFlags) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrustLineFlags) IsAuthorized

func (e TrustLineFlags) IsAuthorized() bool

IsAuthorized returns true if issuer has authorized account to perform transactions with its credit

func (TrustLineFlags) IsAuthorizedToMaintainLiabilitiesFlag

func (e TrustLineFlags) IsAuthorizedToMaintainLiabilitiesFlag() bool

IsAuthorizedToMaintainLiabilitiesFlag returns true if the issuer has authorized the account to maintain and reduce liabilities for its credit

func (TrustLineFlags) IsClawbackEnabledFlag

func (e TrustLineFlags) IsClawbackEnabledFlag() bool

IsClawbackEnabledFlag returns true if the issuer has authorized the account to claw assets back

func (TrustLineFlags) MarshalBinary

func (s TrustLineFlags) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TrustLineFlags) String

func (e TrustLineFlags) String() string

String returns the name of `e`

func (*TrustLineFlags) UnmarshalBinary

func (s *TrustLineFlags) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (TrustLineFlags) ValidEnum

func (e TrustLineFlags) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for TrustLineFlags

type Uint256

type Uint256 [32]byte

Uint256 is an XDR Typedef defines as:

typedef opaque uint256[32];

func (*Uint256) DecodeFrom

func (s *Uint256) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Uint256) EncodeTo

func (s *Uint256) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Uint256) MarshalBinary

func (s Uint256) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Uint256) UnmarshalBinary

func (s *Uint256) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (Uint256) XDRMaxSize

func (e Uint256) XDRMaxSize() int

XDRMaxSize implements the Sized interface for Uint256

type Uint32

type Uint32 uint32

Uint32 is an XDR Typedef defines as:

typedef unsigned int uint32;

func (*Uint32) DecodeFrom

func (s *Uint32) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Uint32) EncodeTo

func (s Uint32) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Uint32) GoString

func (u Uint32) GoString() string

GoString prints Uint32 as decimal instead of hexadecimal numbers.

func (Uint32) MarshalBinary

func (s Uint32) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Uint32) UnmarshalBinary

func (s *Uint32) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Uint64

type Uint64 uint64

Uint64 is an XDR Typedef defines as:

typedef unsigned hyper uint64;

func (*Uint64) DecodeFrom

func (s *Uint64) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Uint64) EncodeTo

func (s Uint64) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Uint64) MarshalBinary

func (s Uint64) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Uint64) UnmarshalBinary

func (s *Uint64) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type UpgradeEntryMeta

type UpgradeEntryMeta struct {
	Upgrade LedgerUpgrade
	Changes LedgerEntryChanges
}

UpgradeEntryMeta is an XDR Struct defines as:

struct UpgradeEntryMeta
 {
     LedgerUpgrade upgrade;
     LedgerEntryChanges changes;
 };

func (*UpgradeEntryMeta) DecodeFrom

func (s *UpgradeEntryMeta) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*UpgradeEntryMeta) EncodeTo

func (s *UpgradeEntryMeta) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (UpgradeEntryMeta) MarshalBinary

func (s UpgradeEntryMeta) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*UpgradeEntryMeta) UnmarshalBinary

func (s *UpgradeEntryMeta) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type UpgradeType

type UpgradeType []byte

UpgradeType is an XDR Typedef defines as:

typedef opaque UpgradeType<128>;

func (*UpgradeType) DecodeFrom

func (s *UpgradeType) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (UpgradeType) EncodeTo

func (s UpgradeType) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (UpgradeType) MarshalBinary

func (s UpgradeType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*UpgradeType) UnmarshalBinary

func (s *UpgradeType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (UpgradeType) XDRMaxSize

func (e UpgradeType) XDRMaxSize() int

XDRMaxSize implements the Sized interface for UpgradeType

type Value

type Value []byte

Value is an XDR Typedef defines as:

typedef opaque Value<>;

func (*Value) DecodeFrom

func (s *Value) DecodeFrom(d *xdr.Decoder) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Value) EncodeTo

func (s Value) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Value) MarshalBinary

func (s Value) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Value) UnmarshalBinary

func (s *Value) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL