go: github.com/stellar/go/xdr Index | Examples | Files

package xdr

import "github.com/stellar/go/xdr"

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

lint:file-ignore S1005 The issue should be fixed in xdrgen. Unfortunately, there's no way to ignore a single file in staticcheck. lint:file-ignore U1000 fmtTest is not needed anywhere, should be removed in xdrgen. Package xdr is generated from:

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

DO NOT EDIT or your changes may be overwritten

Index

Examples

Package Files

account_entry.go account_flags.go account_id.go account_thresholds.go allow_trust_op_asset.go asset.go claimable_balance_id.go claimant.go db.go go_string.go json.go ledger_close_meta.go ledger_entry.go ledger_entry_change.go ledger_key.go main.go memo.go muxed_account.go path_payment_result.go price.go signer_key.go signers.go string.go transaction_envelope.go transaction_meta.go transaction_result.go trust_line_entry.go trust_line_flags.go xdr_generated.go

Constants

const MaskAccountFlags = 0x7

MaskAccountFlags is an XDR Const defines as:

const MASK_ACCOUNT_FLAGS = 0x7;
const MaskOfferentryFlags = 1

MaskOfferentryFlags is an XDR Const defines as:

const MASK_OFFERENTRY_FLAGS = 1;
const MaskTrustlineFlags = 1

MaskTrustlineFlags is an XDR Const defines as:

const MASK_TRUSTLINE_FLAGS = 1;
const MaskTrustlineFlagsV13 = 3

MaskTrustlineFlagsV13 is an XDR Const defines as:

const MASK_TRUSTLINE_FLAGS_V13 = 3;
const MaxOpsPerTx = 100

MaxOpsPerTx is an XDR Const defines as:

const MAX_OPS_PER_TX = 100;
const MaxSigners = 20

MaxSigners is an XDR Const defines as:

const MAX_SIGNERS = 20;

Variables

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

AssetTypeToString maps an xdr.AssetType to its string representation

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

StringToAssetType maps an strings to its xdr.AssetType representation

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

func Marshal Uses

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

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

func MarshalBase64 Uses

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

func MarshalFramed Uses

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

func MarshalHex Uses

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

func SafeUnmarshal Uses

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 Uses

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 Uses

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 Uses

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

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

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

Code:

package main

import (
    "encoding/base64"
    "fmt"
    "log"
    "strings"
    "testing"

    . "github.com/onsi/ginkgo"
    . "github.com/onsi/gomega"
    "github.com/stretchr/testify/assert"
)

// ExampleUnmarshal shows the lowest-level process to decode a base64
// envelope encoded in base64.
func main() {
    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))
}

func TestSafeUnmarshalHex(t *testing.T) {
    accountID := MustAddress("GC3C4AKRBQLHOJ45U4XG35ESVWRDECWO5XLDGYADO6DPR3L7KIDVUMML")
    hex, err := MarshalHex(accountID)
    assert.NoError(t, err)
    assert.Equal(t, "00000000b62e01510c1677279da72e6df492ada2320aceedd63360037786f8ed7f52075a", hex)
    var parsed AccountId
    err = SafeUnmarshalHex(hex, &parsed)
    assert.NoError(t, err)
    assert.True(t, accountID.Equals(parsed))
}

var _ = Describe("xdr.SafeUnmarshal", func() {
    var (
        result int32
        data   []byte
        err    error
    )

    JustBeforeEach(func() {
        err = SafeUnmarshal(data, &result)
    })

    Context("input data is a single xdr value", func() {
        BeforeEach(func() {
            data = []byte{0x00, 0x00, 0x00, 0x01}
        })

        It("succeeds", func() {
            Expect(err).To(BeNil())
        })

        It("decodes the data correctly", func() {
            Expect(result).To(Equal(int32(1)))
        })
    })

    Context("when the input data contains more than one encoded struct", func() {
        BeforeEach(func() {
            data = []byte{
                0x00, 0x00, 0x00, 0x01,
                0x00, 0x00, 0x00, 0x01,
            }
        })
        It("errors", func() {
            Expect(err).ToNot(BeNil())
        })
    })
})

var _ = Describe("xdr.SafeUnmarshalBase64", func() {
    var (
        result int32
        data   string
        err    error
    )

    JustBeforeEach(func() {
        err = SafeUnmarshalBase64(data, &result)
    })

    Context("input data is a single xdr value", func() {
        BeforeEach(func() {
            data = "AAAAAQ=="
        })

        It("succeeds", func() {
            Expect(err).To(BeNil())
        })

        It("decodes the data correctly", func() {
            Expect(result).To(Equal(int32(1)))
        })
    })

    Context("when the input data contains more than one encoded struct", func() {
        BeforeEach(func() {
            data = "AAAAAQAAAAI="
        })
        It("errors", func() {
            Expect(err).ToNot(BeNil())
        })
    })
})

func UnmarshalFramed Uses

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

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

type AccountEntry Uses

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

AccountEntry is an XDR Struct defines as:

struct AccountEntry
 {
     AccountID accountID;      // master public key for this account
     int64 balance;            // in stroops
     SequenceNumber seqNum;    // last sequence number used for this account
     uint32 numSubEntries;     // number of sub-entries this account has
                               // drives the reserve
     AccountID* inflationDest; // Account to vote for during inflation
     uint32 flags;             // see AccountFlags

     string32 homeDomain; // can be used for reverse federation and memo lookup

     // fields used for signatures
     // thresholds stores unsigned bytes: [weight of master|low|medium|high]
     Thresholds thresholds;

     Signer signers<MAX_SIGNERS>; // possible signers for this account

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

func (*AccountEntry) Liabilities Uses

func (account *AccountEntry) Liabilities() Liabilities

Liabilities returns AccountEntry's liabilities

func (AccountEntry) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AccountEntry) MasterKeyWeight Uses

func (account *AccountEntry) MasterKeyWeight() byte

func (*AccountEntry) NumSponsored Uses

func (account *AccountEntry) NumSponsored() Uint32

NumSponsored returns NumSponsored value for account.

func (*AccountEntry) NumSponsoring Uses

func (account *AccountEntry) NumSponsoring() Uint32

NumSponsoring returns NumSponsoring value for account.

func (*AccountEntry) SignerSponsoringIDs Uses

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 Uses

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

func (*AccountEntry) SponsorPerSigner Uses

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

SponsorPerSigner returns a mapping of signer to its sponsor

func (*AccountEntry) ThresholdHigh Uses

func (account *AccountEntry) ThresholdHigh() byte

func (*AccountEntry) ThresholdLow Uses

func (account *AccountEntry) ThresholdLow() byte

func (*AccountEntry) ThresholdMedium Uses

func (account *AccountEntry) ThresholdMedium() byte

func (*AccountEntry) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountEntryExt Uses

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 Uses

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

NewAccountEntryExt creates a new AccountEntryExt.

func (AccountEntryExt) ArmForSwitch Uses

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

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

func (AccountEntryExt) GetV1 Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AccountEntryExt) MustV1 Uses

func (u AccountEntryExt) MustV1() AccountEntryExtensionV1

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

func (AccountEntryExt) SwitchFieldName Uses

func (u AccountEntryExt) SwitchFieldName() string

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

func (*AccountEntryExt) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountEntryExtensionV1 Uses

type AccountEntryExtensionV1 struct {
    Liabilities Liabilities
    Ext         AccountEntryExtensionV1Ext
}

AccountEntryExtensionV1 is an XDR Struct defines as:

struct AccountEntryExtensionV1
 {
     Liabilities liabilities;

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

func (AccountEntryExtensionV1) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AccountEntryExtensionV1) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountEntryExtensionV1Ext Uses

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 Uses

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

NewAccountEntryExtensionV1Ext creates a new AccountEntryExtensionV1Ext.

func (AccountEntryExtensionV1Ext) ArmForSwitch Uses

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

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

func (AccountEntryExtensionV1Ext) GetV2 Uses

func (u AccountEntryExtensionV1Ext) GetV2() (result AccountEntryExtensionV2, ok bool)

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

func (AccountEntryExtensionV1Ext) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AccountEntryExtensionV1Ext) MustV2 Uses

func (u AccountEntryExtensionV1Ext) MustV2() AccountEntryExtensionV2

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

func (AccountEntryExtensionV1Ext) SwitchFieldName Uses

func (u AccountEntryExtensionV1Ext) SwitchFieldName() string

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

func (*AccountEntryExtensionV1Ext) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountEntryExtensionV2 Uses

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

AccountEntryExtensionV2 is an XDR Struct defines as:

struct AccountEntryExtensionV2
 {
     uint32 numSponsored;
     uint32 numSponsoring;
     SponsorshipDescriptor signerSponsoringIDs<MAX_SIGNERS>;

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

func (AccountEntryExtensionV2) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AccountEntryExtensionV2) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountEntryExtensionV2Ext Uses

type AccountEntryExtensionV2Ext struct {
    V int32
}

AccountEntryExtensionV2Ext is an XDR NestedUnion defines as:

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

func NewAccountEntryExtensionV2Ext Uses

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

NewAccountEntryExtensionV2Ext creates a new AccountEntryExtensionV2Ext.

func (AccountEntryExtensionV2Ext) ArmForSwitch Uses

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

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

func (AccountEntryExtensionV2Ext) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AccountEntryExtensionV2Ext) SwitchFieldName Uses

func (u AccountEntryExtensionV2Ext) SwitchFieldName() string

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

func (*AccountEntryExtensionV2Ext) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountFlags Uses

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
 };
const (
    AccountFlagsAuthRequiredFlag  AccountFlags = 1
    AccountFlagsAuthRevocableFlag AccountFlags = 2
    AccountFlagsAuthImmutableFlag AccountFlags = 4
)

func (AccountFlags) IsAuthImmutable Uses

func (accountFlags AccountFlags) IsAuthImmutable() bool

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

func (AccountFlags) IsAuthRequired Uses

func (accountFlags AccountFlags) IsAuthRequired() bool

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

func (AccountFlags) IsAuthRevocable Uses

func (accountFlags AccountFlags) IsAuthRevocable() bool

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

func (AccountFlags) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AccountFlags) Scan Uses

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

Scan reads from src into an AccountFlags

func (AccountFlags) String Uses

func (e AccountFlags) String() string

String returns the name of `e`

func (*AccountFlags) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AccountFlags) ValidEnum Uses

func (e AccountFlags) ValidEnum(v int32) bool

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

type AccountId Uses

type AccountId PublicKey

AccountId is an XDR Typedef defines as:

typedef PublicKey AccountID;

func AddressToAccountId Uses

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 Uses

func MustAddress(address string) AccountId

func MustAddressPtr Uses

func MustAddressPtr(address string) *AccountId

func NewAccountId Uses

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

NewAccountId creates a new AccountId.

func (*AccountId) Address Uses

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 Uses

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

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

func (*AccountId) Equals Uses

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

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

func (*AccountId) GetAddress Uses

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 Uses

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 Uses

func (a AccountId) GoString() string

GoString implements fmt.GoStringer.

func (*AccountId) LedgerKey Uses

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

LedgerKey implements the `Keyer` interface

func (AccountId) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AccountId) MarshalBinaryCompress Uses

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

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

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

func (AccountId) MustEd25519 Uses

func (u AccountId) MustEd25519() Uint256

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

func (*AccountId) SetAddress Uses

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 Uses

func (u AccountId) SwitchFieldName() string

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

func (*AccountId) ToMuxedAccount Uses

func (aid *AccountId) ToMuxedAccount() MuxedAccount

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

func (*AccountId) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountMergeResult Uses

type AccountMergeResult struct {
    Code                 AccountMergeResultCode
    SourceAccountBalance *Int64
}

AccountMergeResult is an XDR Union defines as:

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

func NewAccountMergeResult Uses

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

NewAccountMergeResult creates a new AccountMergeResult.

func (AccountMergeResult) ArmForSwitch Uses

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

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

func (AccountMergeResult) GetSourceAccountBalance Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AccountMergeResult) MustSourceAccountBalance Uses

func (u AccountMergeResult) MustSourceAccountBalance() Int64

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

func (AccountMergeResult) SwitchFieldName Uses

func (u AccountMergeResult) SwitchFieldName() string

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

func (*AccountMergeResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountMergeResultCode Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AccountMergeResultCode) String Uses

func (e AccountMergeResultCode) String() string

String returns the name of `e`

func (*AccountMergeResultCode) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AccountMergeResultCode) ValidEnum Uses

func (e AccountMergeResultCode) ValidEnum(v int32) bool

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

type AllowTrustOp Uses

type AllowTrustOp struct {
    Trustor   AccountId
    Asset     AllowTrustOpAsset
    Authorize Uint32
}

AllowTrustOp is an XDR Struct defines as:

struct AllowTrustOp
 {
     AccountID trustor;
     union switch (AssetType type)
     {
     // ASSET_TYPE_NATIVE is not allowed
     case ASSET_TYPE_CREDIT_ALPHANUM4:
         AssetCode4 assetCode4;

     case ASSET_TYPE_CREDIT_ALPHANUM12:
         AssetCode12 assetCode12;

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

     // 0, or any bitwise combination of TrustLineFlags
     uint32 authorize;
 };

func (AllowTrustOp) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AllowTrustOp) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AllowTrustOpAsset Uses

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

AllowTrustOpAsset is an XDR NestedUnion defines as:

union switch (AssetType type)
     {
     // ASSET_TYPE_NATIVE is not allowed
     case ASSET_TYPE_CREDIT_ALPHANUM4:
         AssetCode4 assetCode4;

     case ASSET_TYPE_CREDIT_ALPHANUM12:
         AssetCode12 assetCode12;

         // add other asset types here in the future
     }

func MustNewAllowTrustAsset Uses

func MustNewAllowTrustAsset(code string) AllowTrustOpAsset

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

func NewAllowTrustAsset Uses

func NewAllowTrustAsset(code string) (AllowTrustOpAsset, error)

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

func NewAllowTrustOpAsset Uses

func NewAllowTrustOpAsset(aType AssetType, value interface{}) (result AllowTrustOpAsset, err error)

NewAllowTrustOpAsset creates a new AllowTrustOpAsset.

func (AllowTrustOpAsset) ArmForSwitch Uses

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

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

func (AllowTrustOpAsset) GetAssetCode12 Uses

func (u AllowTrustOpAsset) 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 (AllowTrustOpAsset) GetAssetCode4 Uses

func (u AllowTrustOpAsset) 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 (AllowTrustOpAsset) GoString Uses

func (s AllowTrustOpAsset) GoString() string

GoString implements fmt.GoStringer.

func (AllowTrustOpAsset) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AllowTrustOpAsset) MustAssetCode12 Uses

func (u AllowTrustOpAsset) MustAssetCode12() AssetCode12

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

func (AllowTrustOpAsset) MustAssetCode4 Uses

func (u AllowTrustOpAsset) MustAssetCode4() AssetCode4

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

func (AllowTrustOpAsset) SwitchFieldName Uses

func (u AllowTrustOpAsset) SwitchFieldName() string

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

func (AllowTrustOpAsset) ToAsset Uses

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

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

func (*AllowTrustOpAsset) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AllowTrustResult Uses

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 Uses

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

NewAllowTrustResult creates a new AllowTrustResult.

func (AllowTrustResult) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AllowTrustResult) SwitchFieldName Uses

func (u AllowTrustResult) SwitchFieldName() string

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

func (*AllowTrustResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AllowTrustResultCode Uses

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
 };
const (
    AllowTrustResultCodeAllowTrustSuccess          AllowTrustResultCode = 0
    AllowTrustResultCodeAllowTrustMalformed        AllowTrustResultCode = -1
    AllowTrustResultCodeAllowTrustNoTrustLine      AllowTrustResultCode = -2
    AllowTrustResultCodeAllowTrustTrustNotRequired AllowTrustResultCode = -3
    AllowTrustResultCodeAllowTrustCantRevoke       AllowTrustResultCode = -4
    AllowTrustResultCodeAllowTrustSelfNotAllowed   AllowTrustResultCode = -5
)

func (AllowTrustResultCode) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AllowTrustResultCode) String Uses

func (e AllowTrustResultCode) String() string

String returns the name of `e`

func (*AllowTrustResultCode) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AllowTrustResultCode) ValidEnum Uses

func (e AllowTrustResultCode) ValidEnum(v int32) bool

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

type Asset Uses

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

Asset is an XDR Union defines as:

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

 case ASSET_TYPE_CREDIT_ALPHANUM4:
     struct
     {
         AssetCode4 assetCode;
         AccountID issuer;
     } alphaNum4;

 case ASSET_TYPE_CREDIT_ALPHANUM12:
     struct
     {
         AssetCode12 assetCode;
         AccountID issuer;
     } alphaNum12;

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

func BuildAsset Uses

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 Uses

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 Uses

func MustNewCreditAsset(code string, issuer string) Asset

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

func MustNewNativeAsset Uses

func MustNewNativeAsset() Asset

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

func NewAsset Uses

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

NewAsset creates a new Asset.

func NewCreditAsset Uses

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

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

func (Asset) ArmForSwitch Uses

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) Equals Uses

func (a Asset) Equals(other Asset) bool

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

func (Asset) Extract Uses

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 Uses

func (u Asset) GetAlphaNum12() (result AssetAlphaNum12, 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 Uses

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

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

func (Asset) GoString Uses

func (a Asset) GoString() string

GoString implements fmt.GoStringer.

func (Asset) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (Asset) MarshalBinaryCompress Uses

func (a Asset) MarshalBinaryCompress() ([]byte, error)

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

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

func (Asset) MustAlphaNum12 Uses

func (u Asset) MustAlphaNum12() AssetAlphaNum12

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

func (Asset) MustAlphaNum4 Uses

func (u Asset) MustAlphaNum4() AssetAlphaNum4

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

func (Asset) MustExtract Uses

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

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

func (*Asset) Scan Uses

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

Scan reads from src into an Asset

func (*Asset) SetCredit Uses

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 Uses

func (a *Asset) SetNative() error

SetNative overwrites `a` with the native asset type

func (Asset) String Uses

func (a Asset) String() string

String returns a display friendly form of the asset

func (Asset) StringCanonical Uses

func (a Asset) StringCanonical() string

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

func (Asset) SwitchFieldName Uses

func (u Asset) SwitchFieldName() string

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

func (*Asset) ToAllowTrustOpAsset Uses

func (a *Asset) ToAllowTrustOpAsset(code string) (AllowTrustOpAsset, error)

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

func (*Asset) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (Asset) Value Uses

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

Value implements the database/sql/driver Valuer interface.

type AssetAlphaNum12 Uses

type AssetAlphaNum12 struct {
    AssetCode AssetCode12
    Issuer    AccountId
}

AssetAlphaNum12 is an XDR NestedStruct defines as:

struct
     {
         AssetCode12 assetCode;
         AccountID issuer;
     }

func (AssetAlphaNum12) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AssetAlphaNum12) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AssetAlphaNum4 Uses

type AssetAlphaNum4 struct {
    AssetCode AssetCode4
    Issuer    AccountId
}

AssetAlphaNum4 is an XDR NestedStruct defines as:

struct
     {
         AssetCode4 assetCode;
         AccountID issuer;
     }

func (AssetAlphaNum4) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AssetAlphaNum4) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AssetCode12 Uses

type AssetCode12 [12]byte

AssetCode12 is an XDR Typedef defines as:

typedef opaque AssetCode12[12];

func (AssetCode12) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AssetCode12) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AssetCode12) XDRMaxSize Uses

func (e AssetCode12) XDRMaxSize() int

XDRMaxSize implements the Sized interface for AssetCode12

type AssetCode4 Uses

type AssetCode4 [4]byte

AssetCode4 is an XDR Typedef defines as:

typedef opaque AssetCode4[4];

func (AssetCode4) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AssetCode4) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AssetCode4) XDRMaxSize Uses

func (e AssetCode4) XDRMaxSize() int

XDRMaxSize implements the Sized interface for AssetCode4

type AssetType Uses

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
 };
const (
    AssetTypeAssetTypeNative           AssetType = 0
    AssetTypeAssetTypeCreditAlphanum4  AssetType = 1
    AssetTypeAssetTypeCreditAlphanum12 AssetType = 2
)

func (AssetType) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AssetType) Scan Uses

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

Scan reads from src into an AssetType

func (AssetType) String Uses

func (e AssetType) String() string

String returns the name of `e`

func (*AssetType) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AssetType) ValidEnum Uses

func (e AssetType) ValidEnum(v int32) bool

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

type Auth Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Auth) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AuthCert Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AuthCert) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AuthenticatedMessage Uses

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 Uses

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

NewAuthenticatedMessage creates a new AuthenticatedMessage.

func (AuthenticatedMessage) ArmForSwitch Uses

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) GetV0 Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AuthenticatedMessage) MustV0 Uses

func (u AuthenticatedMessage) MustV0() AuthenticatedMessageV0

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

func (AuthenticatedMessage) SwitchFieldName Uses

func (u AuthenticatedMessage) SwitchFieldName() string

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

func (*AuthenticatedMessage) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AuthenticatedMessageV0 Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AuthenticatedMessageV0) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BeginSponsoringFutureReservesOp Uses

type BeginSponsoringFutureReservesOp struct {
    SponsoredId AccountId
}

BeginSponsoringFutureReservesOp is an XDR Struct defines as:

struct BeginSponsoringFutureReservesOp
 {
     AccountID sponsoredID;
 };

func (BeginSponsoringFutureReservesOp) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*BeginSponsoringFutureReservesOp) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BeginSponsoringFutureReservesResult Uses

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 Uses

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

NewBeginSponsoringFutureReservesResult creates a new BeginSponsoringFutureReservesResult.

func (BeginSponsoringFutureReservesResult) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BeginSponsoringFutureReservesResult) SwitchFieldName Uses

func (u BeginSponsoringFutureReservesResult) SwitchFieldName() string

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

func (*BeginSponsoringFutureReservesResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BeginSponsoringFutureReservesResultCode Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BeginSponsoringFutureReservesResultCode) String Uses

func (e BeginSponsoringFutureReservesResultCode) String() string

String returns the name of `e`

func (*BeginSponsoringFutureReservesResultCode) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (BeginSponsoringFutureReservesResultCode) ValidEnum Uses

func (e BeginSponsoringFutureReservesResultCode) ValidEnum(v int32) bool

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

type BucketEntry Uses

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 Uses

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

NewBucketEntry creates a new BucketEntry.

func (BucketEntry) ArmForSwitch Uses

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) GetDeadEntry Uses

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 Uses

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 Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BucketEntry) MustDeadEntry Uses

func (u BucketEntry) MustDeadEntry() LedgerKey

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

func (BucketEntry) MustLiveEntry Uses

func (u BucketEntry) MustLiveEntry() LedgerEntry

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

func (BucketEntry) MustMetaEntry Uses

func (u BucketEntry) MustMetaEntry() BucketMetadata

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

func (BucketEntry) SwitchFieldName Uses

func (u BucketEntry) SwitchFieldName() string

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

func (*BucketEntry) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BucketEntryType Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BucketEntryType) String Uses

func (e BucketEntryType) String() string

String returns the name of `e`

func (*BucketEntryType) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (BucketEntryType) ValidEnum Uses

func (e BucketEntryType) ValidEnum(v int32) bool

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

type BucketMetadata Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*BucketMetadata) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BucketMetadataExt Uses

type BucketMetadataExt struct {
    V int32
}

BucketMetadataExt is an XDR NestedUnion defines as:

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

func NewBucketMetadataExt Uses

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

NewBucketMetadataExt creates a new BucketMetadataExt.

func (BucketMetadataExt) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BucketMetadataExt) SwitchFieldName Uses

func (u BucketMetadataExt) SwitchFieldName() string

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

func (*BucketMetadataExt) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BumpSequenceOp Uses

type BumpSequenceOp struct {
    BumpTo SequenceNumber
}

BumpSequenceOp is an XDR Struct defines as:

struct BumpSequenceOp
 {
     SequenceNumber bumpTo;
 };

func (BumpSequenceOp) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*BumpSequenceOp) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BumpSequenceResult Uses

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 Uses

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

NewBumpSequenceResult creates a new BumpSequenceResult.

func (BumpSequenceResult) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BumpSequenceResult) SwitchFieldName Uses

func (u BumpSequenceResult) SwitchFieldName() string

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

func (*BumpSequenceResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BumpSequenceResultCode Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BumpSequenceResultCode) String Uses

func (e BumpSequenceResultCode) String() string

String returns the name of `e`

func (*BumpSequenceResultCode) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (BumpSequenceResultCode) ValidEnum Uses

func (e BumpSequenceResultCode) ValidEnum(v int32) bool

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

type ChangeTrustOp Uses

type ChangeTrustOp struct {
    Line  Asset
    Limit Int64
}

ChangeTrustOp is an XDR Struct defines as:

struct ChangeTrustOp
 {
     Asset line;

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

func (ChangeTrustOp) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ChangeTrustOp) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ChangeTrustResult Uses

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 Uses

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

NewChangeTrustResult creates a new ChangeTrustResult.

func (ChangeTrustResult) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ChangeTrustResult) SwitchFieldName Uses

func (u ChangeTrustResult) SwitchFieldName() string

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

func (*ChangeTrustResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ChangeTrustResultCode Uses

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
 };
const (
    ChangeTrustResultCodeChangeTrustSuccess        ChangeTrustResultCode = 0
    ChangeTrustResultCodeChangeTrustMalformed      ChangeTrustResultCode = -1
    ChangeTrustResultCodeChangeTrustNoIssuer       ChangeTrustResultCode = -2
    ChangeTrustResultCodeChangeTrustInvalidLimit   ChangeTrustResultCode = -3
    ChangeTrustResultCodeChangeTrustLowReserve     ChangeTrustResultCode = -4
    ChangeTrustResultCodeChangeTrustSelfNotAllowed ChangeTrustResultCode = -5
)

func (ChangeTrustResultCode) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ChangeTrustResultCode) String Uses

func (e ChangeTrustResultCode) String() string

String returns the name of `e`

func (*ChangeTrustResultCode) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ChangeTrustResultCode) ValidEnum Uses

func (e ChangeTrustResultCode) ValidEnum(v int32) bool

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

type ClaimClaimableBalanceOp Uses

type ClaimClaimableBalanceOp struct {
    BalanceId ClaimableBalanceId
}

ClaimClaimableBalanceOp is an XDR Struct defines as:

struct ClaimClaimableBalanceOp
 {
     ClaimableBalanceID balanceID;
 };

func (ClaimClaimableBalanceOp) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimClaimableBalanceOp) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimClaimableBalanceResult Uses

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 Uses

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

NewClaimClaimableBalanceResult creates a new ClaimClaimableBalanceResult.

func (ClaimClaimableBalanceResult) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimClaimableBalanceResult) SwitchFieldName Uses

func (u ClaimClaimableBalanceResult) SwitchFieldName() string

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

func (*ClaimClaimableBalanceResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimClaimableBalanceResultCode Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimClaimableBalanceResultCode) String Uses

func (e ClaimClaimableBalanceResultCode) String() string

String returns the name of `e`

func (*ClaimClaimableBalanceResultCode) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimClaimableBalanceResultCode) ValidEnum Uses

func (e ClaimClaimableBalanceResultCode) ValidEnum(v int32) bool

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

type ClaimOfferAtom Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimOfferAtom) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimPredicate Uses

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 Uses

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

NewClaimPredicate creates a new ClaimPredicate.

func (ClaimPredicate) ArmForSwitch Uses

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) GetAbsBefore Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimPredicate) MarshalJSON Uses

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

func (ClaimPredicate) MustAbsBefore Uses

func (u ClaimPredicate) MustAbsBefore() Int64

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

func (ClaimPredicate) MustAndPredicates Uses

func (u ClaimPredicate) MustAndPredicates() []ClaimPredicate

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

func (ClaimPredicate) MustNotPredicate Uses

func (u ClaimPredicate) MustNotPredicate() *ClaimPredicate

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

func (ClaimPredicate) MustOrPredicates Uses

func (u ClaimPredicate) MustOrPredicates() []ClaimPredicate

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

func (ClaimPredicate) MustRelBefore Uses

func (u ClaimPredicate) MustRelBefore() Int64

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

func (*ClaimPredicate) Scan Uses

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

Scan reads from src into a ClaimPredicate

func (ClaimPredicate) SwitchFieldName Uses

func (u ClaimPredicate) SwitchFieldName() string

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

func (*ClaimPredicate) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (*ClaimPredicate) UnmarshalJSON Uses

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

func (ClaimPredicate) Value Uses

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

Value implements the database/sql/driver Valuer interface.

type ClaimPredicateType Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimPredicateType) String Uses

func (e ClaimPredicateType) String() string

String returns the name of `e`

func (*ClaimPredicateType) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimPredicateType) ValidEnum Uses

func (e ClaimPredicateType) ValidEnum(v int32) bool

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

type ClaimableBalanceEntry Uses

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;
     }
     ext;
 };

func (ClaimableBalanceEntry) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimableBalanceEntry) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimableBalanceEntryExt Uses

type ClaimableBalanceEntryExt struct {
    V int32
}

ClaimableBalanceEntryExt is an XDR NestedUnion defines as:

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

func NewClaimableBalanceEntryExt Uses

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

NewClaimableBalanceEntryExt creates a new ClaimableBalanceEntryExt.

func (ClaimableBalanceEntryExt) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimableBalanceEntryExt) SwitchFieldName Uses

func (u ClaimableBalanceEntryExt) SwitchFieldName() string

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

func (*ClaimableBalanceEntryExt) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimableBalanceId Uses

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 Uses

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

NewClaimableBalanceId creates a new ClaimableBalanceId.

func (ClaimableBalanceId) ArmForSwitch Uses

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) GetV0 Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimableBalanceId) MarshalBinaryCompress Uses

func (cb ClaimableBalanceId) MarshalBinaryCompress() ([]byte, error)

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

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

func (ClaimableBalanceId) MustV0 Uses

func (u ClaimableBalanceId) MustV0() Hash

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

func (*ClaimableBalanceId) Scan Uses

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

Scan reads from src into a ClaimableBalanceId

func (ClaimableBalanceId) SwitchFieldName Uses

func (u ClaimableBalanceId) SwitchFieldName() string

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

func (*ClaimableBalanceId) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimableBalanceId) Value Uses

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

Value implements the database/sql/driver Valuer interface.

type ClaimableBalanceIdType Uses

type ClaimableBalanceIdType int32

ClaimableBalanceIdType is an XDR Enum defines as:

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

func (ClaimableBalanceIdType) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimableBalanceIdType) String Uses

func (e ClaimableBalanceIdType) String() string

String returns the name of `e`

func (*ClaimableBalanceIdType) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimableBalanceIdType) ValidEnum Uses

func (e ClaimableBalanceIdType) ValidEnum(v int32) bool

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

type Claimant Uses

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 Uses

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

NewClaimant creates a new Claimant.

func SortClaimantsByDestination Uses

func SortClaimantsByDestination(claimants []Claimant) []Claimant

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

func (Claimant) ArmForSwitch Uses

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) GetV0 Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (Claimant) MustV0 Uses

func (u Claimant) MustV0() ClaimantV0

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

func (Claimant) SwitchFieldName Uses

func (u Claimant) SwitchFieldName() string

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

func (*Claimant) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimantType Uses

type ClaimantType int32

ClaimantType is an XDR Enum defines as:

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

func (ClaimantType) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimantType) String Uses

func (e ClaimantType) String() string

String returns the name of `e`

func (*ClaimantType) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimantType) ValidEnum Uses

func (e ClaimantType) ValidEnum(v int32) bool

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

type ClaimantV0 Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimantV0) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CreateAccountOp Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*CreateAccountOp) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CreateAccountResult Uses

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 Uses

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

NewCreateAccountResult creates a new CreateAccountResult.

func (CreateAccountResult) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (CreateAccountResult) SwitchFieldName Uses

func (u CreateAccountResult) SwitchFieldName() string

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

func (*CreateAccountResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CreateAccountResultCode Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (CreateAccountResultCode) String Uses

func (e CreateAccountResultCode) String() string

String returns the name of `e`

func (*CreateAccountResultCode) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (CreateAccountResultCode) ValidEnum Uses

func (e CreateAccountResultCode) ValidEnum(v int32) bool

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

type CreateClaimableBalanceOp Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*CreateClaimableBalanceOp) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CreateClaimableBalanceResult Uses

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 Uses

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

NewCreateClaimableBalanceResult creates a new CreateClaimableBalanceResult.

func (CreateClaimableBalanceResult) ArmForSwitch Uses

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) GetBalanceId Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (CreateClaimableBalanceResult) MustBalanceId Uses

func (u CreateClaimableBalanceResult) MustBalanceId() ClaimableBalanceId

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

func (CreateClaimableBalanceResult) SwitchFieldName Uses

func (u CreateClaimableBalanceResult) SwitchFieldName() string

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

func (*CreateClaimableBalanceResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CreateClaimableBalanceResultCode Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (CreateClaimableBalanceResultCode) String Uses

func (e CreateClaimableBalanceResultCode) String() string

String returns the name of `e`

func (*CreateClaimableBalanceResultCode) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (CreateClaimableBalanceResultCode) ValidEnum Uses

func (e CreateClaimableBalanceResultCode) ValidEnum(v int32) bool

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

type CreatePassiveSellOfferOp Uses

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. if set to 0, delete the offer
     Price price;   // cost of A in terms of B
 };

func (CreatePassiveSellOfferOp) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*CreatePassiveSellOfferOp) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CryptoKeyType Uses

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,
     // 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
    CryptoKeyTypeKeyTypeMuxedEd25519 CryptoKeyType = 256
)

func (CryptoKeyType) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (CryptoKeyType) String Uses

func (e CryptoKeyType) String() string

String returns the name of `e`

func (*CryptoKeyType) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (CryptoKeyType) ValidEnum Uses

func (e CryptoKeyType) ValidEnum(v int32) bool

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

type Curve25519Public Uses

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

Curve25519Public is an XDR Struct defines as:

struct Curve25519Public
 {
     opaque key[32];
 };

func (Curve25519Public) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Curve25519Public) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Curve25519Secret Uses

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

Curve25519Secret is an XDR Struct defines as:

struct Curve25519Secret
 {
     opaque key[32];
 };

func (Curve25519Secret) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Curve25519Secret) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type DataEntry Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*DataEntry) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type DataEntryExt Uses

type DataEntryExt struct {
    V int32
}

DataEntryExt is an XDR NestedUnion defines as:

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

func NewDataEntryExt Uses

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

NewDataEntryExt creates a new DataEntryExt.

func (DataEntryExt) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (DataEntryExt) SwitchFieldName Uses

func (u DataEntryExt) SwitchFieldName() string

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

func (*DataEntryExt) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type DataValue Uses

type DataValue []byte

DataValue is an XDR Typedef defines as:

typedef opaque DataValue<64>;

func (DataValue) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*DataValue) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (DataValue) XDRMaxSize Uses

func (e DataValue) XDRMaxSize() int

XDRMaxSize implements the Sized interface for DataValue

type DecoratedSignature Uses

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 (DecoratedSignature) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*DecoratedSignature) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type DontHave Uses

type DontHave struct {
    Type    MessageType
    ReqHash Uint256
}

DontHave is an XDR Struct defines as:

struct DontHave
 {
     MessageType type;
     uint256 reqHash;
 };

func (DontHave) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*DontHave) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type EncryptedBody Uses

type EncryptedBody []byte

EncryptedBody is an XDR Typedef defines as:

typedef opaque EncryptedBody<64000>;

func (EncryptedBody) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*EncryptedBody) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (EncryptedBody) XDRMaxSize Uses

func (e EncryptedBody) XDRMaxSize() int

XDRMaxSize implements the Sized interface for EncryptedBody

type EndSponsoringFutureReservesResult Uses

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 Uses

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

NewEndSponsoringFutureReservesResult creates a new EndSponsoringFutureReservesResult.

func (EndSponsoringFutureReservesResult) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (EndSponsoringFutureReservesResult) SwitchFieldName Uses

func (u EndSponsoringFutureReservesResult) SwitchFieldName() string

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

func (*EndSponsoringFutureReservesResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type EndSponsoringFutureReservesResultCode Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (EndSponsoringFutureReservesResultCode) String Uses

func (e EndSponsoringFutureReservesResultCode) String() string

String returns the name of `e`

func (*EndSponsoringFutureReservesResultCode) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (EndSponsoringFutureReservesResultCode) ValidEnum Uses

func (e EndSponsoringFutureReservesResultCode) ValidEnum(v int32) bool

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

type EnvelopeType Uses

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
 };
const (
    EnvelopeTypeEnvelopeTypeTxV0      EnvelopeType = 0
    EnvelopeTypeEnvelopeTypeScp       EnvelopeType = 1
    EnvelopeTypeEnvelopeTypeTx        EnvelopeType = 2
    EnvelopeTypeEnvelopeTypeAuth      EnvelopeType = 3
    EnvelopeTypeEnvelopeTypeScpvalue  EnvelopeType = 4
    EnvelopeTypeEnvelopeTypeTxFeeBump EnvelopeType = 5
    EnvelopeTypeEnvelopeTypeOpId      EnvelopeType = 6
)

func (EnvelopeType) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (EnvelopeType) String Uses

func (e EnvelopeType) String() string

String returns the name of `e`

func (*EnvelopeType) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (EnvelopeType) ValidEnum Uses

func (e EnvelopeType) ValidEnum(v int32) bool

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

type Error Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Error) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ErrorCode Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ErrorCode) String Uses

func (e ErrorCode) String() string

String returns the name of `e`

func (*ErrorCode) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ErrorCode) ValidEnum Uses

func (e ErrorCode) ValidEnum(v int32) bool

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

type FeeBumpTransaction Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*FeeBumpTransaction) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type FeeBumpTransactionEnvelope Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*FeeBumpTransactionEnvelope) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type FeeBumpTransactionExt Uses

type FeeBumpTransactionExt struct {
    V int32
}

FeeBumpTransactionExt is an XDR NestedUnion defines as:

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

func NewFeeBumpTransactionExt Uses

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

NewFeeBumpTransactionExt creates a new FeeBumpTransactionExt.

func (FeeBumpTransactionExt) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (FeeBumpTransactionExt) SwitchFieldName Uses

func (u FeeBumpTransactionExt) SwitchFieldName() string

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

func (*FeeBumpTransactionExt) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type FeeBumpTransactionInnerTx Uses

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 Uses

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

NewFeeBumpTransactionInnerTx creates a new FeeBumpTransactionInnerTx.

func (FeeBumpTransactionInnerTx) ArmForSwitch Uses

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) GetV1 Uses

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 Uses

func (e FeeBumpTransactionInnerTx) GoString() string

GoString implements fmt.GoStringer.

func (FeeBumpTransactionInnerTx) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (FeeBumpTransactionInnerTx) MustV1 Uses

func (u FeeBumpTransactionInnerTx) MustV1() TransactionV1Envelope

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

func (FeeBumpTransactionInnerTx) SwitchFieldName Uses

func (u FeeBumpTransactionInnerTx) SwitchFieldName() string

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

func (*FeeBumpTransactionInnerTx) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Hash Uses

type Hash [32]byte

Hash is an XDR Typedef defines as:

typedef opaque Hash[32];

func (Hash) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Hash) Scan Uses

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

Scan reads from a src into an xdr.Hash

func (*Hash) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (Hash) XDRMaxSize Uses

func (e Hash) XDRMaxSize() int

XDRMaxSize implements the Sized interface for Hash

type Hello Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Hello) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type HmacSha256Key Uses

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

HmacSha256Key is an XDR Struct defines as:

struct HmacSha256Key
 {
     opaque key[32];
 };

func (HmacSha256Key) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*HmacSha256Key) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type HmacSha256Mac Uses

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

HmacSha256Mac is an XDR Struct defines as:

struct HmacSha256Mac
 {
     opaque mac[32];
 };

func (HmacSha256Mac) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*HmacSha256Mac) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InflationPayout Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*InflationPayout) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InflationResult Uses

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 Uses

func NewInflationResult(code InflationResultCode, value interface{}) (result InflationResult, err error)

NewInflationResult creates a new InflationResult.

func (InflationResult) ArmForSwitch Uses

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) GetPayouts Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (InflationResult) MustPayouts Uses

func (u InflationResult) MustPayouts() []InflationPayout

MustPayouts retrieves the Payouts value from the union, panicing if the value is not set.

func (InflationResult) SwitchFieldName Uses

func (u InflationResult) SwitchFieldName() string

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

func (*InflationResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InflationResultCode Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (InflationResultCode) String Uses

func (e InflationResultCode) String() string

String returns the name of `e`

func (*InflationResultCode) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (InflationResultCode) ValidEnum Uses

func (e InflationResultCode) ValidEnum(v int32) bool

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

type InnerTransactionResult Uses

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:
         void;
     }
     result;

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

func (InnerTransactionResult) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*InnerTransactionResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InnerTransactionResultExt Uses

type InnerTransactionResultExt struct {
    V int32
}

InnerTransactionResultExt is an XDR NestedUnion defines as:

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

func NewInnerTransactionResultExt Uses

func NewInnerTransactionResultExt(v int32, value interface{}) (result InnerTransactionResultExt, err error)

NewInnerTransactionResultExt creates a new InnerTransactionResultExt.

func (InnerTransactionResultExt) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (InnerTransactionResultExt) SwitchFieldName Uses

func (u InnerTransactionResultExt) SwitchFieldName() string

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

func (*InnerTransactionResultExt) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InnerTransactionResultPair Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*InnerTransactionResultPair) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InnerTransactionResultResult Uses

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:
         void;
     }

func NewInnerTransactionResultResult Uses

func NewInnerTransactionResultResult(code TransactionResultCode, value interface{}) (result InnerTransactionResultResult, err error)

NewInnerTransactionResultResult creates a new InnerTransactionResultResult.

func (InnerTransactionResultResult) ArmForSwitch Uses

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) GetResults Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (InnerTransactionResultResult) MustResults Uses

func (u InnerTransactionResultResult) MustResults() []OperationResult

MustResults retrieves the Results value from the union, panicing if the value is not set.

func (InnerTransactionResultResult) SwitchFieldName Uses

func (u InnerTransactionResultResult) SwitchFieldName() string

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

func (*InnerTransactionResultResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Int32 Uses

type Int32 int32

Int32 is an XDR Typedef defines as:

typedef int int32;

func (Int32) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Int32) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Int64 Uses

type Int64 int64

Int64 is an XDR Typedef defines as:

typedef hyper int64;

func (Int64) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Int64) Scan Uses

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

Scan reads from src into an Int64

func (*Int64) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type IpAddrType Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (IpAddrType) String Uses

func (e IpAddrType) String() string

String returns the name of `e`

func (*IpAddrType) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (IpAddrType) ValidEnum Uses

func (e IpAddrType) ValidEnum(v int32) bool

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

type Keyer Uses

type Keyer interface {
    LedgerKey() LedgerKey
}

Keyer represents a type that can be converted into a LedgerKey

type LedgerCloseMeta Uses

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 Uses

func NewLedgerCloseMeta(v int32, value interface{}) (result LedgerCloseMeta, err error)

NewLedgerCloseMeta creates a new LedgerCloseMeta.

func (LedgerCloseMeta) ArmForSwitch Uses

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) GetV0 Uses

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) LedgerSequence Uses

func (l LedgerCloseMeta) LedgerSequence() uint32

func (LedgerCloseMeta) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerCloseMeta) MustV0 Uses

func (u LedgerCloseMeta) MustV0() LedgerCloseMetaV0

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

func (LedgerCloseMeta) SwitchFieldName Uses

func (u LedgerCloseMeta) SwitchFieldName() string

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

func (*LedgerCloseMeta) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerCloseMetaV0 Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerCloseMetaV0) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerCloseValueSignature Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerCloseValueSignature) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntry Uses

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;
     }
     data;

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

func (*LedgerEntry) LedgerKey Uses

func (entry *LedgerEntry) LedgerKey() LedgerKey

LedgerKey implements the `Keyer` interface

func (LedgerEntry) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerEntry) SponsoringID Uses

func (entry *LedgerEntry) SponsoringID() SponsorshipDescriptor

SponsoringID return SponsorshipDescriptor for a given ledger entry

func (*LedgerEntry) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryChange Uses

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 Uses

func NewLedgerEntryChange(aType LedgerEntryChangeType, value interface{}) (result LedgerEntryChange, err error)

NewLedgerEntryChange creates a new LedgerEntryChange.

func (LedgerEntryChange) ArmForSwitch Uses

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) EntryType Uses

func (change *LedgerEntryChange) EntryType() LedgerEntryType

EntryType is a helper to get at the entry type for a change.

func (LedgerEntryChange) GetCreated Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (change *LedgerEntryChange) LedgerKey() LedgerKey

LedgerKey returns the key for the ledger entry that was changed in `change`.

func (LedgerEntryChange) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryChange) MarshalBinaryBase64 Uses

func (change LedgerEntryChange) MarshalBinaryBase64() (string, error)

MarshalBinaryBase64 marshals XDR into a binary form and then encodes it using base64.

func (LedgerEntryChange) MustCreated Uses

func (u LedgerEntryChange) MustCreated() LedgerEntry

MustCreated retrieves the Created value from the union, panicing if the value is not set.

func (LedgerEntryChange) MustRemoved Uses

func (u LedgerEntryChange) MustRemoved() LedgerKey

MustRemoved retrieves the Removed value from the union, panicing if the value is not set.

func (LedgerEntryChange) MustState Uses

func (u LedgerEntryChange) MustState() LedgerEntry

MustState retrieves the State value from the union, panicing if the value is not set.

func (LedgerEntryChange) MustUpdated Uses

func (u LedgerEntryChange) MustUpdated() LedgerEntry

MustUpdated retrieves the Updated value from the union, panicing if the value is not set.

func (LedgerEntryChange) SwitchFieldName Uses

func (u LedgerEntryChange) SwitchFieldName() string

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

func (*LedgerEntryChange) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryChangeType Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryChangeType) String Uses

func (e LedgerEntryChangeType) String() string

String returns the name of `e`

func (*LedgerEntryChangeType) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LedgerEntryChangeType) ValidEnum Uses

func (e LedgerEntryChangeType) ValidEnum(v int32) bool

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

type LedgerEntryChanges Uses

type LedgerEntryChanges []LedgerEntryChange

LedgerEntryChanges is an XDR Typedef defines as:

typedef LedgerEntryChange LedgerEntryChanges<>;

func (LedgerEntryChanges) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerEntryChanges) Scan Uses

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

Scan reads from src into an LedgerEntryChanges struct

func (*LedgerEntryChanges) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryData Uses

type LedgerEntryData struct {
    Type             LedgerEntryType
    Account          *AccountEntry
    TrustLine        *TrustLineEntry
    Offer            *OfferEntry
    Data             *DataEntry
    ClaimableBalance *ClaimableBalanceEntry
}

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;
     }

func NewLedgerEntryData Uses

func NewLedgerEntryData(aType LedgerEntryType, value interface{}) (result LedgerEntryData, err error)

NewLedgerEntryData creates a new LedgerEntryData.

func (LedgerEntryData) ArmForSwitch Uses

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) GetAccount Uses

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 Uses

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 Uses

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) GetOffer Uses

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 Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryData) MustAccount Uses

func (u LedgerEntryData) MustAccount() AccountEntry

MustAccount retrieves the Account value from the union, panicing if the value is not set.

func (LedgerEntryData) MustClaimableBalance Uses

func (u LedgerEntryData) MustClaimableBalance() ClaimableBalanceEntry

MustClaimableBalance retrieves the ClaimableBalance value from the union, panicing if the value is not set.

func (LedgerEntryData) MustData Uses

func (u LedgerEntryData) MustData() DataEntry

MustData retrieves the Data value from the union, panicing if the value is not set.

func (LedgerEntryData) MustOffer Uses

func (u LedgerEntryData) MustOffer() OfferEntry

MustOffer retrieves the Offer value from the union, panicing if the value is not set.

func (LedgerEntryData) MustTrustLine Uses

func (u LedgerEntryData) MustTrustLine() TrustLineEntry

MustTrustLine retrieves the TrustLine value from the union, panicing if the value is not set.

func (LedgerEntryData) SwitchFieldName Uses

func (u LedgerEntryData) SwitchFieldName() string

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

func (*LedgerEntryData) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryExt Uses

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 Uses

func NewLedgerEntryExt(v int32, value interface{}) (result LedgerEntryExt, err error)

NewLedgerEntryExt creates a new LedgerEntryExt.

func (LedgerEntryExt) ArmForSwitch Uses

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) GetV1 Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryExt) MustV1 Uses

func (u LedgerEntryExt) MustV1() LedgerEntryExtensionV1

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

func (LedgerEntryExt) SwitchFieldName Uses

func (u LedgerEntryExt) SwitchFieldName() string

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

func (*LedgerEntryExt) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryExtensionV1 Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerEntryExtensionV1) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryExtensionV1Ext Uses

type LedgerEntryExtensionV1Ext struct {
    V int32
}

LedgerEntryExtensionV1Ext is an XDR NestedUnion defines as:

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

func NewLedgerEntryExtensionV1Ext Uses

func NewLedgerEntryExtensionV1Ext(v int32, value interface{}) (result LedgerEntryExtensionV1Ext, err error)

NewLedgerEntryExtensionV1Ext creates a new LedgerEntryExtensionV1Ext.

func (LedgerEntryExtensionV1Ext) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryExtensionV1Ext) SwitchFieldName Uses

func (u LedgerEntryExtensionV1Ext) SwitchFieldName() string

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

func (*LedgerEntryExtensionV1Ext) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryType Uses

type LedgerEntryType int32

LedgerEntryType is an XDR Enum defines as:

enum LedgerEntryType
 {
     ACCOUNT = 0,
     TRUSTLINE = 1,
     OFFER = 2,
     DATA = 3,
     CLAIMABLE_BALANCE = 4
 };
const (
    LedgerEntryTypeAccount          LedgerEntryType = 0
    LedgerEntryTypeTrustline        LedgerEntryType = 1
    LedgerEntryTypeOffer            LedgerEntryType = 2
    LedgerEntryTypeData             LedgerEntryType = 3
    LedgerEntryTypeClaimableBalance LedgerEntryType = 4
)

func (LedgerEntryType) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryType) String Uses

func (e LedgerEntryType) String() string

String returns the name of `e`

func (*LedgerEntryType) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LedgerEntryType) ValidEnum Uses

func (e LedgerEntryType) ValidEnum(v int32) bool

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

type LedgerHeader Uses

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;
     }
     ext;
 };

func (LedgerHeader) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerHeader) Scan Uses

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

Scan reads from src into an LedgerHeader struct

func (*LedgerHeader) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerHeaderExt Uses

type LedgerHeaderExt struct {
    V int32
}

LedgerHeaderExt is an XDR NestedUnion defines as:

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

func NewLedgerHeaderExt Uses

func NewLedgerHeaderExt(v int32, value interface{}) (result LedgerHeaderExt, err error)

NewLedgerHeaderExt creates a new LedgerHeaderExt.

func (LedgerHeaderExt) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerHeaderExt) SwitchFieldName Uses

func (u LedgerHeaderExt) SwitchFieldName() string

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

func (*LedgerHeaderExt) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerHeaderHistoryEntry Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerHeaderHistoryEntry) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerHeaderHistoryEntryExt Uses

type LedgerHeaderHistoryEntryExt struct {
    V int32
}

LedgerHeaderHistoryEntryExt is an XDR NestedUnion defines as:

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

func NewLedgerHeaderHistoryEntryExt Uses

func NewLedgerHeaderHistoryEntryExt(v int32, value interface{}) (result LedgerHeaderHistoryEntryExt, err error)

NewLedgerHeaderHistoryEntryExt creates a new LedgerHeaderHistoryEntryExt.

func (LedgerHeaderHistoryEntryExt) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerHeaderHistoryEntryExt) SwitchFieldName Uses

func (u LedgerHeaderHistoryEntryExt) SwitchFieldName() string

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

func (*LedgerHeaderHistoryEntryExt) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKey Uses

type LedgerKey struct {
    Type             LedgerEntryType
    Account          *LedgerKeyAccount
    TrustLine        *LedgerKeyTrustLine
    Offer            *LedgerKeyOffer
    Data             *LedgerKeyData
    ClaimableBalance *LedgerKeyClaimableBalance
}

LedgerKey is an XDR Union defines as:

union LedgerKey switch (LedgerEntryType type)
 {
 case ACCOUNT:
     struct
     {
         AccountID accountID;
     } account;

 case TRUSTLINE:
     struct
     {
         AccountID accountID;
         Asset 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;
 };

func NewLedgerKey Uses

func NewLedgerKey(aType LedgerEntryType, value interface{}) (result LedgerKey, err error)

NewLedgerKey creates a new LedgerKey.

func (LedgerKey) ArmForSwitch Uses

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) Equals Uses

func (key *LedgerKey) Equals(other LedgerKey) bool

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

func (LedgerKey) GetAccount Uses

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 Uses

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 Uses

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) GetOffer Uses

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 Uses

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 Uses

func (key *LedgerKey) LedgerKey() LedgerKey

LedgerKey implements the `Keyer` interface

func (LedgerKey) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerKey) MarshalBinaryBase64 Uses

func (key LedgerKey) MarshalBinaryBase64() (string, error)

MarshalBinaryBase64 marshals XDR into a binary form and then encodes it using base64.

func (LedgerKey) MarshalBinaryCompress Uses

func (key LedgerKey) MarshalBinaryCompress() ([]byte, error)

MarshalBinaryCompress 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.

func (LedgerKey) MustAccount Uses

func (u LedgerKey) MustAccount() LedgerKeyAccount

MustAccount retrieves the Account value from the union, panicing if the value is not set.

func (LedgerKey) MustClaimableBalance Uses

func (u LedgerKey) MustClaimableBalance() LedgerKeyClaimableBalance

MustClaimableBalance retrieves the ClaimableBalance value from the union, panicing if the value is not set.

func (LedgerKey) MustData Uses

func (u LedgerKey) MustData() LedgerKeyData

MustData retrieves the Data value from the union, panicing if the value is not set.

func (LedgerKey) MustOffer Uses

func (u LedgerKey) MustOffer() LedgerKeyOffer

MustOffer retrieves the Offer value from the union, panicing if the value is not set.

func (LedgerKey) MustTrustLine Uses

func (u LedgerKey) MustTrustLine() LedgerKeyTrustLine

MustTrustLine retrieves the TrustLine value from the union, panicing if the value is not set.

func (*LedgerKey) SetAccount Uses

func (key *LedgerKey) SetAccount(account AccountId) error

SetAccount mutates `key` such that it represents the identity of `account`

func (*LedgerKey) SetClaimableBalance Uses

func (key *LedgerKey) SetClaimableBalance(balanceID ClaimableBalanceId) error

SetClaimableBalance mutates `key` such that it represents the identity of a claimable balance.

func (*LedgerKey) SetData Uses

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) SetOffer Uses

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 Uses

func (key *LedgerKey) SetTrustline(account AccountId, line Asset) error

SetTrustline mutates `key` such that it represents the identity of the trustline owned by `account` and for `asset`.

func (LedgerKey) SwitchFieldName Uses

func (u LedgerKey) SwitchFieldName() string

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

func (*LedgerKey) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyAccount Uses

type LedgerKeyAccount struct {
    AccountId AccountId
}

LedgerKeyAccount is an XDR NestedStruct defines as:

struct
     {
         AccountID accountID;
     }

func (LedgerKeyAccount) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyAccount) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyClaimableBalance Uses

type LedgerKeyClaimableBalance struct {
    BalanceId ClaimableBalanceId
}

LedgerKeyClaimableBalance is an XDR NestedStruct defines as:

struct
     {
         ClaimableBalanceID balanceID;
     }

func (LedgerKeyClaimableBalance) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyClaimableBalance) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyData Uses

type LedgerKeyData struct {
    AccountId AccountId
    DataName  String64
}

LedgerKeyData is an XDR NestedStruct defines as:

struct
     {
         AccountID accountID;
         string64 dataName;
     }

func (LedgerKeyData) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyData) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyOffer Uses

type LedgerKeyOffer struct {
    SellerId AccountId
    OfferId  Int64
}

LedgerKeyOffer is an XDR NestedStruct defines as:

struct
     {
         AccountID sellerID;
         int64 offerID;
     }

func (LedgerKeyOffer) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyOffer) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyTrustLine Uses

type LedgerKeyTrustLine struct {
    AccountId AccountId
    Asset     Asset
}

LedgerKeyTrustLine is an XDR NestedStruct defines as:

struct
     {
         AccountID accountID;
         Asset asset;
     }

func (LedgerKeyTrustLine) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyTrustLine) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerScpMessages Uses

type LedgerScpMessages struct {
    LedgerSeq Uint32
    Messages  []ScpEnvelope
}

LedgerScpMessages is an XDR Struct defines as:

struct LedgerSCPMessages
 {
     uint32 ledgerSeq;
     SCPEnvelope messages<>;
 };

func (LedgerScpMessages) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerScpMessages) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerUpgrade Uses

type LedgerUpgrade struct {
    Type             LedgerUpgradeType
    NewLedgerVersion *Uint32
    NewBaseFee       *Uint32
    NewMaxTxSetSize  *Uint32
    NewBaseReserve   *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
 };

func NewLedgerUpgrade Uses

func NewLedgerUpgrade(aType LedgerUpgradeType, value interface{}) (result LedgerUpgrade, err error)

NewLedgerUpgrade creates a new LedgerUpgrade.

func (LedgerUpgrade) ArmForSwitch Uses

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) GetNewBaseFee Uses

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 Uses

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) GetNewLedgerVersion Uses

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 Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerUpgrade) MustNewBaseFee Uses

func (u LedgerUpgrade) MustNewBaseFee() Uint32

MustNewBaseFee retrieves the NewBaseFee value from the union, panicing if the value is not set.

func (LedgerUpgrade) MustNewBaseReserve Uses

func (u LedgerUpgrade) MustNewBaseReserve() Uint32

MustNewBaseReserve retrieves the NewBaseReserve value from the union, panicing if the value is not set.

func (LedgerUpgrade) MustNewLedgerVersion Uses

func (u LedgerUpgrade) MustNewLedgerVersion() Uint32

MustNewLedgerVersion retrieves the NewLedgerVersion value from the union, panicing if the value is not set.

func (LedgerUpgrade) MustNewMaxTxSetSize Uses

func (u LedgerUpgrade) MustNewMaxTxSetSize() Uint32

MustNewMaxTxSetSize retrieves the NewMaxTxSetSize value from the union, panicing if the value is not set.

func (*LedgerUpgrade) Scan Uses

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

Scan reads from src into an LedgerUpgrade struct

func (LedgerUpgrade) SwitchFieldName Uses

func (u LedgerUpgrade) SwitchFieldName() string

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

func (*LedgerUpgrade) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerUpgradeType Uses

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
 };
const (
    LedgerUpgradeTypeLedgerUpgradeVersion      LedgerUpgradeType = 1
    LedgerUpgradeTypeLedgerUpgradeBaseFee      LedgerUpgradeType = 2
    LedgerUpgradeTypeLedgerUpgradeMaxTxSetSize LedgerUpgradeType = 3
    LedgerUpgradeTypeLedgerUpgradeBaseReserve  LedgerUpgradeType = 4
)

func (LedgerUpgradeType) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerUpgradeType) String Uses

func (e LedgerUpgradeType) String() string

String returns the name of `e`

func (*LedgerUpgradeType) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LedgerUpgradeType) ValidEnum Uses

func (e LedgerUpgradeType) ValidEnum(v int32) bool

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

type Liabilities Uses

type Liabilities struct {
    Buying  Int64
    Selling Int64
}

Liabilities is an XDR Struct defines as:

struct Liabilities
 {
     int64 buying;
     int64 selling;
 };

func (Liabilities) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Liabilities) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageBuyOfferOp Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ManageBuyOfferOp) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageBuyOfferResult Uses

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 Uses

func NewManageBuyOfferResult(code ManageBuyOfferResultCode, value interface{}) (result ManageBuyOfferResult, err error)

NewManageBuyOfferResult creates a new ManageBuyOfferResult.

func (ManageBuyOfferResult) ArmForSwitch Uses

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) GetSuccess Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageBuyOfferResult) MustSuccess Uses

func (u ManageBuyOfferResult) MustSuccess() ManageOfferSuccessResult

MustSuccess retrieves the Success value from the union, panicing if the value is not set.

func (ManageBuyOfferResult) SwitchFieldName Uses

func (u ManageBuyOfferResult) SwitchFieldName() string

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

func (*ManageBuyOfferResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageBuyOfferResultCode Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageBuyOfferResultCode) String Uses

func (e ManageBuyOfferResultCode) String() string

String returns the name of `e`

func (*ManageBuyOfferResultCode) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ManageBuyOfferResultCode) ValidEnum Uses

func (e ManageBuyOfferResultCode) ValidEnum(v int32) bool

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

type ManageDataOp Uses

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) GoString Uses

func (s ManageDataOp) GoString() string

GoString implements fmt.GoStringer.

func (ManageDataOp) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ManageDataOp) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageDataResult Uses

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 Uses

func NewManageDataResult(code ManageDataResultCode, value interface{}) (result ManageDataResult, err error)

NewManageDataResult creates a new ManageDataResult.

func (ManageDataResult) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageDataResult) SwitchFieldName Uses

func (u ManageDataResult) SwitchFieldName() string

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

func (*ManageDataResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageDataResultCode Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageDataResultCode) String Uses

func (e ManageDataResultCode) String() string

String returns the name of `e`

func (*ManageDataResultCode) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ManageDataResultCode) ValidEnum Uses

func (e ManageDataResultCode) ValidEnum(v int32) bool

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

type ManageOfferEffect Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageOfferEffect) String Uses

func (e ManageOfferEffect) String() string

String returns the name of `e`

func (*ManageOfferEffect) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ManageOfferEffect) ValidEnum Uses

func (e ManageOfferEffect) ValidEnum(v int32) bool

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

type ManageOfferSuccessResult Uses

type ManageOfferSuccessResult struct {
    OffersClaimed []ClaimOfferAtom
    Offer         ManageOfferSuccessResultOffer
}

ManageOfferSuccessResult is an XDR Struct defines as:

struct ManageOfferSuccessResult
 {
     // offers that got claimed while creating this offer
     ClaimOfferAtom offersClaimed<>;

     union switch (ManageOfferEffect effect)
     {
     case MANAGE_OFFER_CREATED:
     case MANAGE_OFFER_UPDATED:
         OfferEntry offer;
     default:
         void;
     }
     offer;
 };

func (ManageOfferSuccessResult) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ManageOfferSuccessResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageOfferSuccessResultOffer Uses

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 Uses

func NewManageOfferSuccessResultOffer(effect ManageOfferEffect, value interface{}) (result ManageOfferSuccessResultOffer, err error)

NewManageOfferSuccessResultOffer creates a new ManageOfferSuccessResultOffer.

func (ManageOfferSuccessResultOffer) ArmForSwitch Uses

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) GetOffer Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageOfferSuccessResultOffer) MustOffer Uses

func (u ManageOfferSuccessResultOffer) MustOffer() OfferEntry

MustOffer retrieves the Offer value from the union, panicing if the value is not set.

func (ManageOfferSuccessResultOffer) SwitchFieldName Uses

func (u ManageOfferSuccessResultOffer) SwitchFieldName() string

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

func (*ManageOfferSuccessResultOffer) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageSellOfferOp Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ManageSellOfferOp) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageSellOfferResult Uses

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 Uses

func NewManageSellOfferResult(code ManageSellOfferResultCode, value interface{}) (result ManageSellOfferResult, err error)

NewManageSellOfferResult creates a new ManageSellOfferResult.

func (ManageSellOfferResult) ArmForSwitch Uses

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) GetSuccess Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageSellOfferResult) MustSuccess Uses

func (u ManageSellOfferResult) MustSuccess() ManageOfferSuccessResult

MustSuccess retrieves the Success value from the union, panicing if the value is not set.

func (ManageSellOfferResult) SwitchFieldName Uses

func (u ManageSellOfferResult) SwitchFieldName() string

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

func (*ManageSellOfferResult) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageSellOfferResultCode Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageSellOfferResultCode) String Uses

func (e ManageSellOfferResultCode) String() string

String returns the name of `e`

func (*ManageSellOfferResultCode) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ManageSellOfferResultCode) ValidEnum Uses

func (e ManageSellOfferResultCode) ValidEnum(v int32) bool

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

type Memo Uses

type Memo struct {
    Type    MemoType
    Text    *string `xdrmaxsize:"28"`
    Id      *Uint64
    Hash    *Hash
    RetHash *Hash
}

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
 };

func MemoHash Uses

func MemoHash(hash Hash) Memo

func MemoID Uses

func MemoID(id uint64) Memo

func MemoRetHash Uses

func MemoRetHash(hash Hash) Memo

func MemoText Uses

func MemoText(text string) Memo

func NewMemo Uses

func NewMemo(aType MemoType, value interface{}) (result Memo, err error)

NewMemo creates a new Memo.

func (Memo) ArmForSwitch Uses

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) GetHash Uses

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 Uses

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 Uses

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 Uses

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) GoString Uses

func (m Memo) GoString() string

GoString implements fmt.GoStringer.

func (Memo) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (Memo) MustHash Uses

func (u Memo) MustHash() Hash

MustHash retrieves the Hash value from the union, panicing if the value is not set.

func (Memo) MustId Uses

func (u Memo) MustId() Uint64

MustId retrieves the Id value from the union, panicing if the value is not set.

func (Memo) MustRetHash Uses

func (u Memo) MustRetHash() Hash

MustRetHash retrieves the RetHash value from the union, panicing if the value is not set.

func (Memo) MustText Uses

func (u Memo) MustText() string

MustText retrieves the Text value from the union, panicing if the value is not set.

func (Memo) SwitchFieldName Uses

func (u Memo) SwitchFieldName() string

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

func (*Memo) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type MemoType Uses

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
 };
const (
    MemoTypeMemoNone   MemoType = 0
    MemoTypeMemoText   MemoType = 1
    MemoTypeMemoId     MemoType = 2
    MemoTypeMemoHash   MemoType = 3
    MemoTypeMemoReturn MemoType = 4
)

func (MemoType) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (MemoType) String Uses

func (e MemoType) String() string

String returns the name of `e`

func (*MemoType) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (MemoType) ValidEnum Uses

func (e MemoType) ValidEnum(v int32) bool

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

type MessageType Uses

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
 };
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
)

func (MessageType) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (MessageType) String Uses

func (e MessageType) String() string

String returns the name of `e`

func (*MessageType) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (MessageType) ValidEnum Uses

func (e MessageType) ValidEnum(v int32) bool

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

type MuxedAccount Uses

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 MustMuxedAddress Uses

func MustMuxedAddress(address string) MuxedAccount

func MustMuxedAddressPtr Uses

func MustMuxedAddressPtr(address string) *MuxedAccount

func NewMuxedAccount Uses

func NewMuxedAccount(aType CryptoKeyType, value interface{}) (result MuxedAccount, err error)

NewMuxedAccount creates a new MuxedAccount.

func (MuxedAccount) ArmForSwitch Uses

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) GetEd25519 Uses

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) GetMed25519 Uses

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 Uses

func (m MuxedAccount) GoString() string

GoString implements fmt.GoStringer.

func (MuxedAccount) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (MuxedAccount) MustEd25519 Uses

func (u MuxedAccount) MustEd25519() Uint256

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

func (MuxedAccount) MustMed25519 Uses

func (u MuxedAccount) MustMed25519() MuxedAccountMed25519

MustMed25519 retrieves the Med25519 value from the union, panicing if the value is not set.

func (*MuxedAccount) SetAddress Uses

func (m *MuxedAccount) SetAddress(address string) error

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

func (MuxedAccount) SwitchFieldName Uses

func (u MuxedAccount) SwitchFieldName() string

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

func (MuxedAccount) ToAccountId Uses

func (m MuxedAccount) ToAccountId() AccountId

ToAccountId transforms a MuxedAccount to an AccountId, dropping the memo Id if necessary

func (*MuxedAccount) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type MuxedAccountMed25519 Uses

type MuxedAccountMed25519 struct {
    Id      Uint64
    Ed25519 Uint256
}

MuxedAccountMed25519 is an XDR NestedStruct defines as:

struct
     {
         uint64 id;
         uint256 ed25519;
     }

func (MuxedAccountMed25519) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*MuxedAccountMed25519) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type NodeId Uses

type NodeId PublicKey

NodeId is an XDR Typedef defines as:

typedef PublicKey NodeID;

func NewNodeId Uses

func NewNodeId(aType PublicKeyType, value interface{}) (result NodeId, err error)

NewNodeId creates a new NodeId.

func (NodeId) ArmForSwitch Uses

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) GetEd25519 Uses

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 Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (NodeId) MustEd25519 Uses

func (u NodeId) MustEd25519() Uint256

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

func (NodeId) SwitchFieldName Uses

func (u NodeId) SwitchFieldName() string

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

func (*NodeId) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OfferEntry Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*OfferEntry) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OfferEntryExt Uses

type OfferEntryExt struct {
    V int32
}

OfferEntryExt is an XDR NestedUnion defines as:

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

func NewOfferEntryExt Uses

func NewOfferEntryExt(v int32, value interface{}) (result OfferEntryExt, err error)

NewOfferEntryExt creates a new OfferEntryExt.

func (OfferEntryExt) ArmForSwitch Uses

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) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (OfferEntryExt) SwitchFieldName Uses

func (u OfferEntryExt) SwitchFieldName() string

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

func (*OfferEntryExt) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OfferEntryFlags Uses

type OfferEntryFlags int32

OfferEntryFlags is an XDR Enum defines as:

enum OfferEntryFlags
 {
     // issuer has authorized account to perform transactions with its credit
     PASSIVE_FLAG = 1
 };
const (
    OfferEntryFlagsPassiveFlag OfferEntryFlags = 1
)

func (OfferEntryFlags) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (OfferEntryFlags) String Uses

func (e OfferEntryFlags) String() string

String returns the name of `e`

func (*OfferEntryFlags) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (OfferEntryFlags) ValidEnum Uses

func (e OfferEntryFlags) ValidEnum(v int32) bool

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

type Operation Uses

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;
     }
     body;
 };

func (Operation) GoString Uses

func (o Operation) GoString() string

GoString implements fmt.GoStringer.

func (Operation) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Operation) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OperationBody Uses

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
}

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;
     }

func NewOperationBody Uses

func NewOperationBody(aType OperationType, value interface{}) (result OperationBody, err error)

NewOperationBody creates a new OperationBody.

func (OperationBody) ArmForSwitch Uses

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) GetAllowTrustOp Uses

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 Uses

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 Uses

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 Uses

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 Uses

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) GetCreateAccountOp Uses

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 Uses

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 Uses

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 Uses

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) GetManageBuyOfferOp Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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) GoString Uses

func (o OperationBody) GoString() string

GoString implements fmt.GoStringer.

func (OperationBody) MarshalBinary Uses

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

MarshalBinary implements encoding.BinaryMarshaler.

func (OperationBody) MustAllowTrustOp Uses

func (u OperationBody) MustAllowTrustOp() AllowTrustOp

MustAllowTrustOp retrieves the AllowTrustOp value from the union, panicing if the value is not set.

func (OperationBody) MustBeginSponsoringFutureReservesOp Uses

func (u OperationBody) MustBeginSponsoringFutureReservesOp() BeginSponsoringFutureReservesOp

MustBeginSponsoringFutureReservesOp retrieves the BeginSponsoringFutureReservesOp value from the union, panicing if the value is not set.

func (OperationBody) MustBumpSequenceOp Uses

func (u OperationBody) MustBumpSequenceOp() BumpSequenceOp

MustBumpSequenceOp retrieves the BumpSequenceOp value from the union, panicing if the value is not set.

func (OperationBody) MustChangeTrustOp Uses

func (u OperationBody) MustChangeTrustOp() ChangeTrustOp

MustChangeTrustOp retrieves the ChangeTrustOp value from the union, panicing if the value is not set.

func (OperationBody) MustClaimClaimableBalanceOp Uses

func (u OperationBody) MustClaimClaimableBalanceOp() ClaimClaimableBalanceOp

MustClaimClaimableBalanceOp retrieves the ClaimClaimableBalanceOp value from the union, panicing if the value is not set.

func (OperationBody) MustCreateAccountOp Uses

func (u OperationBody) MustCreateAccountOp() CreateAccountOp

MustCreateAccountOp retrieves the CreateAccountOp value from the union, panicing if the value is not set.

func (OperationBody) MustCreateClaimableBalanceOp Uses

func (u OperationBody) MustCreateClaimableBalanceOp() CreateClaimableBalanceOp

MustCreateClaimableBalanceOp retrieves the CreateClaimableBalanceOp value from the union, panicing if the value is not set.

func (OperationBody) MustCreatePassiveSellOfferOp Uses

func (u OperationBody) MustCreatePassiveSellOfferOp() CreatePassiveSellOfferOp

MustCreatePassiveSellOfferOp retrieves the CreatePassiveSellOfferOp value from the union, panicing if the value is not set.

func (OperationBody) MustDestination Uses

func (u OperationBody) MustDestination() MuxedAccount

MustDestination retrieves the Destination value from the union, panicing if the value is not set.

func (OperationBody) MustManageBuyOfferOp Uses

func (u OperationBody) MustManageBuyOfferOp() ManageBuyOfferOp

MustManageBuyOfferOp retrieves the ManageBuyOfferOp value from the union, panicing if the value is not set.

func (OperationBody) MustManageDataOp Uses

func (u OperationBody) MustManageDataOp() ManageDataOp

MustManageDataOp retrieves the ManageDataOp value from the union, panicing if the value is not set.

func (OperationBody) MustManageSellOfferOp Uses

func (u OperationBody) MustManageSellOfferOp() ManageSellOfferOp

MustManageSellOfferOp retrieves the ManageSellOfferOp value from the union, panicing if the value is not set.

func (OperationBody) MustPathPaymentStrictReceiveOp Uses

func (u OperationBody) MustPathPaymentStrictReceiveOp() PathPaymentStrictReceiveOp

MustPathPaymentStrictReceiveOp retrieves the PathPaymentStrictReceiveOp value from the union, panicing if the value is not set.

func (OperationBody) MustPathPaymentStrictSendOp Uses

func (u OperationBody) MustPathPaymentStrictSendOp() PathPaymentStrictSendOp

MustPathPaymentStrictSendOp retrieves the PathPaymentStrictSendOp value from the union, panicing if the value is not set.

func (OperationBody) MustPaymentOp Uses

func (u OperationBody) MustPaymentOp() PaymentOp

MustPaymentOp retrieves the PaymentOp value from the union, panicing if the value is not set.

func (OperationBody) MustRevokeSponsorshipOp Uses

func (u OperationBody) MustRevokeSponsorshipOp() RevokeSponsorshipOp

MustRevokeSponsorshipOp retrieves the RevokeSponsorshipOp value from the union, panicing if the value is not set.

func (OperationBody) MustSetOptionsOp Uses

func (u OperationBody) MustSetOptionsOp() SetOptionsOp

MustSetOptionsOp retrieves the SetOptionsOp value from the union, panicing if the value is not set.

func (OperationBody) SwitchFieldName Uses

func (u OperationBody) SwitchFieldName() string

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

func (*OperationBody) UnmarshalBinary Uses

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OperationId Uses

type OperationId struct {
    Type EnvelopeType
    Id   *OperationIdId
}

OperationId is an XDR Union defines as:

union OperationID switch (EnvelopeType type)
 {
 case ENVELOPE_TYPE_OP_ID:
     struct
     {
         MuxedAccount sourceAccount;
         SequenceNumber seqNum;
         uint32 opNum;
     } id;
 };

func NewOperationId Uses

func NewOperationId(aType EnvelopeType, value interface{}) (result OperationId, err error)

NewOperationId creates a new OperationId.