xdr

package
v0.0.0-...-9f7f9c2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0, Apache-2.0 Imports: 22 Imported by: 616

README

xdr

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

Code Generate

Most of the code this package is generated.

To download new XDR for code generation:

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

To regenerate the code from the local XDR:

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

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

Documentation

Overview

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

Package xdr is generated from:

xdr/Stellar-SCP.x
xdr/Stellar-contract-config-setting.x
xdr/Stellar-contract-env-meta.x
xdr/Stellar-contract-meta.x
xdr/Stellar-contract-spec.x
xdr/Stellar-contract.x
xdr/Stellar-exporter.x
xdr/Stellar-internal.x
xdr/Stellar-ledger-entries.x
xdr/Stellar-ledger.x
xdr/Stellar-lighthorizon.x
xdr/Stellar-overlay.x
xdr/Stellar-transaction.x
xdr/Stellar-types.x

DO NOT EDIT or your changes may be overwritten

Index

Examples

Constants

View Source
const AuthMsgFlagFlowControlBytesRequested = 200

AuthMsgFlagFlowControlBytesRequested is an XDR Const defines as:

const AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED = 200;
View Source
const ContractCostCountLimit = 1024

ContractCostCountLimit is an XDR Const defines as:

const CONTRACT_COST_COUNT_LIMIT = 1024;
View Source
const LiquidityPoolFeeV18 = 30

LiquidityPoolFeeV18 is an XDR Const defines as:

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

MaskAccountFlags is an XDR Const defines as:

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

MaskAccountFlagsV17 is an XDR Const defines as:

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

MaskClaimableBalanceFlags is an XDR Const defines as:

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

MaskLedgerHeaderFlags is an XDR Const defines as:

const MASK_LEDGER_HEADER_FLAGS = 0x7;
View Source
const MaskOfferentryFlags = 1

MaskOfferentryFlags is an XDR Const defines as:

const MASK_OFFERENTRY_FLAGS = 1;
View Source
const MaskTrustlineFlags = 1

MaskTrustlineFlags is an XDR Const defines as:

const MASK_TRUSTLINE_FLAGS = 1;
View Source
const MaskTrustlineFlagsV13 = 3

MaskTrustlineFlagsV13 is an XDR Const defines as:

const MASK_TRUSTLINE_FLAGS_V13 = 3;
View Source
const MaskTrustlineFlagsV17 = 7

MaskTrustlineFlagsV17 is an XDR Const defines as:

const MASK_TRUSTLINE_FLAGS_V17 = 7;
View Source
const MaxOpsPerTx = 100

MaxOpsPerTx is an XDR Const defines as:

const MAX_OPS_PER_TX = 100;
View Source
const MaxSigners = 20

MaxSigners is an XDR Const defines as:

const MAX_SIGNERS = 20;
View Source
const ScSpecDocLimit = 1024

ScSpecDocLimit is an XDR Const defines as:

const SC_SPEC_DOC_LIMIT = 1024;
View Source
const ScsymbolLimit = 32

ScsymbolLimit is an XDR Const defines as:

const SCSYMBOL_LIMIT = 32;
View Source
const TxAdvertVectorMaxSize = 1000

TxAdvertVectorMaxSize is an XDR Const defines as:

const TX_ADVERT_VECTOR_MAX_SIZE = 1000;
View Source
const TxDemandVectorMaxSize = 1000

TxDemandVectorMaxSize is an XDR Const defines as:

const TX_DEMAND_VECTOR_MAX_SIZE = 1000;

Variables

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

AssetTypeToString maps an xdr.AssetType to its string representation

View Source
var CommitHash string

CommitHash is the commit hash that was used to generate the xdr in this folder. During the process of updating the XDR, the text file below is being updated. Then, during compile time, the file content are being embedded into the given string.

View Source
var ErrMaxDecodingDepthReached = errors.New("maximum decoding depth reached")
View Source
var LedgerEntryTypeMap = ledgerEntryTypeMap
View Source
var LiquidityPoolTypeToString = map[LiquidityPoolType]string{
	LiquidityPoolTypeLiquidityPoolConstantProduct: "constant_product",
}

LiquidityPoolTypeToString maps an xdr.LiquidityPoolType to its string representation

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

StringToAssetType maps an strings to its xdr.AssetType representation

View Source
var ValidAssetCode = regexp.MustCompile("^[[:alnum:]]{1,12}$")
View Source
var XdrFilesSHA256 = map[string]string{
	"xdr/Stellar-SCP.x":                     "8f32b04d008f8bc33b8843d075e69837231a673691ee41d8b821ca229a6e802a",
	"xdr/Stellar-contract-config-setting.x": "393369678663cb0f9471a0b69e2a9cfa3ac93c4415fa40cec166e9a231ecbe0d",
	"xdr/Stellar-contract-env-meta.x":       "928a30de814ee589bc1d2aadd8dd81c39f71b7e6f430f56974505ccb1f49654b",
	"xdr/Stellar-contract-meta.x":           "f01532c11ca044e19d9f9f16fe373e9af64835da473be556b9a807ee3319ae0d",
	"xdr/Stellar-contract-spec.x":           "8d7f6bdd82c3e529cd8c6f035202ca0e7677cc05e4727492a165dfdc51a9cb3e",
	"xdr/Stellar-contract.x":                "7f665e4103e146a88fcdabce879aaaacd3bf9283feb194cc47ff986264c1e315",
	"xdr/Stellar-exporter.x":                "a00c83d02e8c8382e06f79a191f1fb5abd097a4bbcab8481c67467e3270e0529",
	"xdr/Stellar-internal.x":                "227835866c1b2122d1eaf28839ba85ea7289d1cb681dda4ca619c2da3d71fe00",
	"xdr/Stellar-ledger-entries.x":          "77dc7062ae6d0812136333e12e35b2294d7c2896a536be9c811eb0ed2abbbccb",
	"xdr/Stellar-ledger.x":                  "888152fb940b79a01ac00a5218ca91360cb0f01af7acc030d5805ebfec280203",
	"xdr/Stellar-lighthorizon.x":            "1aac09eaeda224154f653a0c95f02167be0c110fc295bb41b756a080eb8c06df",
	"xdr/Stellar-overlay.x":                 "de3957c58b96ae07968b3d3aebea84f83603e95322d1fa336360e13e3aba737a",
	"xdr/Stellar-transaction.x":             "0d2b35a331a540b48643925d0869857236eb2487c02d340ea32e365e784ea2b8",
	"xdr/Stellar-types.x":                   "6e3b13f0d3e360b09fa5e2b0e55d43f4d974a769df66afb34e8aecbb329d3f15",
}

XdrFilesSHA256 is the SHA256 hashes of source files.

Functions

func Marshal

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

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

func MarshalBase64

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

func MarshalFramed

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

func MarshalHex

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

func ReadFrameLength

func ReadFrameLength(d *xdr.Decoder) (uint32, error)

ReadFrameLength returns a length of a framed XDR object.

func SafeUnmarshal

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

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

func SafeUnmarshalBase64

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

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

func SafeUnmarshalHex

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

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

func Unmarshal

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

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

Example

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

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

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

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

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

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

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

read 196 bytes
This tx has 1 operations

func UnmarshalWithOptions

func UnmarshalWithOptions(r io.Reader, v interface{}, options xdr.DecodeOptions) (int, error)

UnmarshalWithOptions works like Unmarshal but uses decoding options.

Types

type AccountEntry

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

AccountEntry is an XDR Struct defines as:

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

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

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

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

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

func (*AccountEntry) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*AccountEntry) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (*AccountEntry) Liabilities

func (account *AccountEntry) Liabilities() Liabilities

Liabilities returns AccountEntry's liabilities

func (AccountEntry) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AccountEntry) MasterKeyWeight

func (account *AccountEntry) MasterKeyWeight() byte

func (*AccountEntry) NumSponsored

func (account *AccountEntry) NumSponsored() Uint32

NumSponsored returns NumSponsored value for account.

func (*AccountEntry) NumSponsoring

func (account *AccountEntry) NumSponsoring() Uint32

NumSponsoring returns NumSponsoring value for account.

func (*AccountEntry) SeqLedger

func (account *AccountEntry) SeqLedger() Uint32

func (*AccountEntry) SeqTime

func (account *AccountEntry) SeqTime() TimePoint

func (*AccountEntry) SignerSponsoringIDs

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

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

func (*AccountEntry) SignerSummary

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

func (*AccountEntry) SponsorPerSigner

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

SponsorPerSigner returns a mapping of signer to its sponsor

func (*AccountEntry) ThresholdHigh

func (account *AccountEntry) ThresholdHigh() byte

func (*AccountEntry) ThresholdLow

func (account *AccountEntry) ThresholdLow() byte

func (*AccountEntry) ThresholdMedium

func (account *AccountEntry) ThresholdMedium() byte

func (*AccountEntry) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountEntryExt

type AccountEntryExt struct {
	V  int32
	V1 *AccountEntryExtensionV1
}

AccountEntryExt is an XDR NestedUnion defines as:

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

func NewAccountEntryExt

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

NewAccountEntryExt creates a new AccountEntryExt.

func (AccountEntryExt) ArmForSwitch

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

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

func (*AccountEntryExt) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (AccountEntryExt) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AccountEntryExt) GetV1

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

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

func (AccountEntryExt) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AccountEntryExt) MustV1

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

func (AccountEntryExt) SwitchFieldName

func (u AccountEntryExt) SwitchFieldName() string

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

func (*AccountEntryExt) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountEntryExtensionV1

type AccountEntryExtensionV1 struct {
	Liabilities Liabilities
	Ext         AccountEntryExtensionV1Ext
}

AccountEntryExtensionV1 is an XDR Struct defines as:

struct AccountEntryExtensionV1
 {
     Liabilities liabilities;

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

func (*AccountEntryExtensionV1) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*AccountEntryExtensionV1) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AccountEntryExtensionV1) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AccountEntryExtensionV1) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountEntryExtensionV1Ext

type AccountEntryExtensionV1Ext struct {
	V  int32
	V2 *AccountEntryExtensionV2
}

AccountEntryExtensionV1Ext is an XDR NestedUnion defines as:

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

func NewAccountEntryExtensionV1Ext

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

NewAccountEntryExtensionV1Ext creates a new AccountEntryExtensionV1Ext.

func (AccountEntryExtensionV1Ext) ArmForSwitch

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

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

func (*AccountEntryExtensionV1Ext) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (AccountEntryExtensionV1Ext) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AccountEntryExtensionV1Ext) GetV2

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

func (AccountEntryExtensionV1Ext) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AccountEntryExtensionV1Ext) MustV2

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

func (AccountEntryExtensionV1Ext) SwitchFieldName

func (u AccountEntryExtensionV1Ext) SwitchFieldName() string

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

func (*AccountEntryExtensionV1Ext) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountEntryExtensionV2

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

AccountEntryExtensionV2 is an XDR Struct defines as:

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

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

func (*AccountEntryExtensionV2) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*AccountEntryExtensionV2) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AccountEntryExtensionV2) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AccountEntryExtensionV2) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountEntryExtensionV2Ext

type AccountEntryExtensionV2Ext struct {
	V  int32
	V3 *AccountEntryExtensionV3
}

AccountEntryExtensionV2Ext is an XDR NestedUnion defines as:

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

func NewAccountEntryExtensionV2Ext

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

NewAccountEntryExtensionV2Ext creates a new AccountEntryExtensionV2Ext.

func (AccountEntryExtensionV2Ext) ArmForSwitch

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

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

func (*AccountEntryExtensionV2Ext) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (AccountEntryExtensionV2Ext) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AccountEntryExtensionV2Ext) GetV3

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

func (AccountEntryExtensionV2Ext) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AccountEntryExtensionV2Ext) MustV3

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

func (AccountEntryExtensionV2Ext) SwitchFieldName

func (u AccountEntryExtensionV2Ext) SwitchFieldName() string

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

func (*AccountEntryExtensionV2Ext) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountEntryExtensionV3

type AccountEntryExtensionV3 struct {
	Ext       ExtensionPoint
	SeqLedger Uint32
	SeqTime   TimePoint
}

AccountEntryExtensionV3 is an XDR Struct defines as:

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

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

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

func (*AccountEntryExtensionV3) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*AccountEntryExtensionV3) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AccountEntryExtensionV3) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AccountEntryExtensionV3) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountFlags

type AccountFlags int32

AccountFlags is an XDR Enum defines as:

enum AccountFlags
 { // masks for each flag

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

func (*AccountFlags) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (AccountFlags) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AccountFlags) IsAuthClawbackEnabled

func (accountFlags AccountFlags) IsAuthClawbackEnabled() bool

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

func (AccountFlags) IsAuthImmutable

func (accountFlags AccountFlags) IsAuthImmutable() bool

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

func (AccountFlags) IsAuthRequired

func (accountFlags AccountFlags) IsAuthRequired() bool

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

func (AccountFlags) IsAuthRevocable

func (accountFlags AccountFlags) IsAuthRevocable() bool

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

func (AccountFlags) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AccountFlags) Scan

func (t *AccountFlags) Scan(src any) error

Scan reads from src into an AccountFlags

func (AccountFlags) String

func (e AccountFlags) String() string

String returns the name of `e`

func (*AccountFlags) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AccountFlags) ValidEnum

func (e AccountFlags) ValidEnum(v int32) bool

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

type AccountId

type AccountId PublicKey

AccountId is an XDR Typedef defines as:

typedef PublicKey AccountID;

func AddressToAccountId

func AddressToAccountId(address string) (AccountId, error)

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

func MustAddress

func MustAddress(address string) AccountId

func MustAddressPtr

func MustAddressPtr(address string) *AccountId

func NewAccountId

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

NewAccountId creates a new AccountId.

func (AccountId) Address

func (aid AccountId) Address() string

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

func (AccountId) ArmForSwitch

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

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

func (*AccountId) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (AccountId) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (*AccountId) Equals

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

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

func (*AccountId) GetAddress

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

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

func (AccountId) GetEd25519

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

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

func (AccountId) GoString

func (a AccountId) GoString() string

GoString implements fmt.GoStringer.

func (*AccountId) LedgerKey

func (aid *AccountId) LedgerKey() (key LedgerKey, err error)

LedgerKey implements the `Keyer` interface

func (AccountId) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AccountId) MustEd25519

func (u AccountId) MustEd25519() Uint256

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

func (*AccountId) SetAddress

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

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

func (AccountId) SwitchFieldName

func (u AccountId) SwitchFieldName() string

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

func (*AccountId) ToMuxedAccount

func (aid *AccountId) ToMuxedAccount() MuxedAccount

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

func (*AccountId) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountMergeResult

type AccountMergeResult struct {
	Code                 AccountMergeResultCode
	SourceAccountBalance *Int64
}

AccountMergeResult is an XDR Union defines as:

union AccountMergeResult switch (AccountMergeResultCode code)
 {
 case ACCOUNT_MERGE_SUCCESS:
     int64 sourceAccountBalance; // how much got transferred from source account
 case ACCOUNT_MERGE_MALFORMED:
 case ACCOUNT_MERGE_NO_ACCOUNT:
 case ACCOUNT_MERGE_IMMUTABLE_SET:
 case ACCOUNT_MERGE_HAS_SUB_ENTRIES:
 case ACCOUNT_MERGE_SEQNUM_TOO_FAR:
 case ACCOUNT_MERGE_DEST_FULL:
 case ACCOUNT_MERGE_IS_SPONSOR:
     void;
 };

func NewAccountMergeResult

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

NewAccountMergeResult creates a new AccountMergeResult.

func (AccountMergeResult) ArmForSwitch

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

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

func (*AccountMergeResult) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (AccountMergeResult) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AccountMergeResult) GetSourceAccountBalance

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

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

func (AccountMergeResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AccountMergeResult) MustSourceAccountBalance

func (u AccountMergeResult) MustSourceAccountBalance() Int64

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

func (AccountMergeResult) SwitchFieldName

func (u AccountMergeResult) SwitchFieldName() string

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

func (*AccountMergeResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AccountMergeResultCode

type AccountMergeResultCode int32

AccountMergeResultCode is an XDR Enum defines as:

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

func (*AccountMergeResultCode) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (AccountMergeResultCode) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AccountMergeResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AccountMergeResultCode) String

func (e AccountMergeResultCode) String() string

String returns the name of `e`

func (*AccountMergeResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AccountMergeResultCode) ValidEnum

func (e AccountMergeResultCode) ValidEnum(v int32) bool

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

type AllowTrustOp

type AllowTrustOp struct {
	Trustor   AccountId
	Asset     AssetCode
	Authorize Uint32
}

AllowTrustOp is an XDR Struct defines as:

struct AllowTrustOp
 {
     AccountID trustor;
     AssetCode asset;

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

func (*AllowTrustOp) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*AllowTrustOp) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AllowTrustOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AllowTrustOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AllowTrustResult

type AllowTrustResult struct {
	Code AllowTrustResultCode
}

AllowTrustResult is an XDR Union defines as:

union AllowTrustResult switch (AllowTrustResultCode code)
 {
 case ALLOW_TRUST_SUCCESS:
     void;
 case ALLOW_TRUST_MALFORMED:
 case ALLOW_TRUST_NO_TRUST_LINE:
 case ALLOW_TRUST_TRUST_NOT_REQUIRED:
 case ALLOW_TRUST_CANT_REVOKE:
 case ALLOW_TRUST_SELF_NOT_ALLOWED:
 case ALLOW_TRUST_LOW_RESERVE:
     void;
 };

func NewAllowTrustResult

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

NewAllowTrustResult creates a new AllowTrustResult.

func (AllowTrustResult) ArmForSwitch

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

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

func (*AllowTrustResult) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (AllowTrustResult) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AllowTrustResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AllowTrustResult) SwitchFieldName

func (u AllowTrustResult) SwitchFieldName() string

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

func (*AllowTrustResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AllowTrustResultCode

type AllowTrustResultCode int32

AllowTrustResultCode is an XDR Enum defines as:

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

func (*AllowTrustResultCode) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (AllowTrustResultCode) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AllowTrustResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AllowTrustResultCode) String

func (e AllowTrustResultCode) String() string

String returns the name of `e`

func (*AllowTrustResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AllowTrustResultCode) ValidEnum

func (e AllowTrustResultCode) ValidEnum(v int32) bool

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

type AlphaNum12

type AlphaNum12 struct {
	AssetCode AssetCode12
	Issuer    AccountId
}

AlphaNum12 is an XDR Struct defines as:

struct AlphaNum12
 {
     AssetCode12 assetCode;
     AccountID issuer;
 };

func (*AlphaNum12) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*AlphaNum12) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AlphaNum12) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AlphaNum12) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AlphaNum4

type AlphaNum4 struct {
	AssetCode AssetCode4
	Issuer    AccountId
}

AlphaNum4 is an XDR Struct defines as:

struct AlphaNum4
 {
     AssetCode4 assetCode;
     AccountID issuer;
 };

func (*AlphaNum4) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*AlphaNum4) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AlphaNum4) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AlphaNum4) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Asset

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

Asset is an XDR Union defines as:

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

 case ASSET_TYPE_CREDIT_ALPHANUM4:
     AlphaNum4 alphaNum4;

 case ASSET_TYPE_CREDIT_ALPHANUM12:
     AlphaNum12 alphaNum12;

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

func BuildAsset

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

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

Valid assetTypes are:

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

func BuildAssets

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

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

func MustNewCreditAsset

func MustNewCreditAsset(code string, issuer string) Asset

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

func MustNewNativeAsset

func MustNewNativeAsset() Asset

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

func NewAsset

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

NewAsset creates a new Asset.

func NewCreditAsset

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

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

func (Asset) ArmForSwitch

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

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

func (Asset) ContractID

func (a Asset) ContractID(passphrase string) ([32]byte, error)

ContractID returns the expected Stellar Asset Contract id for the given asset and network.

func (*Asset) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (Asset) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (Asset) Equals

func (a Asset) Equals(other Asset) bool

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

func (Asset) Extract

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

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

func (Asset) GetAlphaNum12

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

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

func (Asset) GetAlphaNum4

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

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

func (*Asset) GetCode

func (a *Asset) GetCode() string

func (*Asset) GetIssuer

func (a *Asset) GetIssuer() string

func (Asset) GoString

func (a Asset) GoString() string

GoString implements fmt.GoStringer.

func (*Asset) LessThan

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

func (Asset) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (Asset) MustAlphaNum12

func (u Asset) MustAlphaNum12() AlphaNum12

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

func (Asset) MustAlphaNum4

func (u Asset) MustAlphaNum4() AlphaNum4

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

func (Asset) MustExtract

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

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

func (*Asset) Scan

func (t *Asset) Scan(src any) error

Scan reads from src into an Asset

func (*Asset) SetCredit

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

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

func (*Asset) SetNative

func (a *Asset) SetNative() error

SetNative overwrites `a` with the native asset type

func (Asset) String

func (a Asset) String() string

String returns a display friendly form of the asset

func (Asset) StringCanonical

func (a Asset) StringCanonical() string

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

func (Asset) SwitchFieldName

func (u Asset) SwitchFieldName() string

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

func (*Asset) ToAssetCode

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

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

func (Asset) ToChangeTrustAsset

func (a Asset) ToChangeTrustAsset() ChangeTrustAsset

ToChangeTrustAsset converts Asset to ChangeTrustAsset.

func (Asset) ToTrustLineAsset

func (a Asset) ToTrustLineAsset() TrustLineAsset

ToTrustLineAsset converts Asset to TrustLineAsset.

func (*Asset) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (Asset) Value

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

Value implements the database/sql/driver Valuer interface.

type AssetCode

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

AssetCode is an XDR Union defines as:

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

 case ASSET_TYPE_CREDIT_ALPHANUM12:
     AssetCode12 assetCode12;

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

func MustNewAssetCodeFromString

func MustNewAssetCodeFromString(code string) AssetCode

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

func NewAssetCode

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

NewAssetCode creates a new AssetCode.

func NewAssetCodeFromString

func NewAssetCodeFromString(code string) (AssetCode, error)

NewAssetCodeFromString returns a new credit asset, erroring if it can't.

func (AssetCode) ArmForSwitch

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

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

func (*AssetCode) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (AssetCode) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AssetCode) GetAssetCode12

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

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

func (AssetCode) GetAssetCode4

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

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

func (AssetCode) GoString

func (s AssetCode) GoString() string

GoString implements fmt.GoStringer.

func (AssetCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AssetCode) MustAssetCode12

func (u AssetCode) MustAssetCode12() AssetCode12

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

func (AssetCode) MustAssetCode4

func (u AssetCode) MustAssetCode4() AssetCode4

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

func (AssetCode) SwitchFieldName

func (u AssetCode) SwitchFieldName() string

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

func (AssetCode) ToAsset

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

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

func (*AssetCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AssetCode12

type AssetCode12 [12]byte

AssetCode12 is an XDR Typedef defines as:

typedef opaque AssetCode12[12];

func (*AssetCode12) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*AssetCode12) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AssetCode12) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AssetCode12) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AssetCode12) XDRMaxSize

func (e AssetCode12) XDRMaxSize() int

XDRMaxSize implements the Sized interface for AssetCode12

type AssetCode4

type AssetCode4 [4]byte

AssetCode4 is an XDR Typedef defines as:

typedef opaque AssetCode4[4];

func (*AssetCode4) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*AssetCode4) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AssetCode4) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AssetCode4) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AssetCode4) XDRMaxSize

func (e AssetCode4) XDRMaxSize() int

XDRMaxSize implements the Sized interface for AssetCode4

type AssetType

type AssetType int32

AssetType is an XDR Enum defines as:

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

func (*AssetType) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (AssetType) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AssetType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AssetType) Scan

func (t *AssetType) Scan(src any) error

Scan reads from src into an AssetType

func (AssetType) String

func (e AssetType) String() string

String returns the name of `e`

func (*AssetType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (AssetType) ValidEnum

func (e AssetType) ValidEnum(v int32) bool

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

type Auth

type Auth struct {
	Flags int32
}

Auth is an XDR Struct defines as:

struct Auth
 {
     int flags;
 };

func (*Auth) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*Auth) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (Auth) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*Auth) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AuthCert

type AuthCert struct {
	Pubkey     Curve25519Public
	Expiration Uint64
	Sig        Signature
}

AuthCert is an XDR Struct defines as:

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

func (*AuthCert) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*AuthCert) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AuthCert) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AuthCert) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AuthenticatedMessage

type AuthenticatedMessage struct {
	V  Uint32
	V0 *AuthenticatedMessageV0
}

AuthenticatedMessage is an XDR Union defines as:

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

func NewAuthenticatedMessage

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

NewAuthenticatedMessage creates a new AuthenticatedMessage.

func (AuthenticatedMessage) ArmForSwitch

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

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

func (*AuthenticatedMessage) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (AuthenticatedMessage) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AuthenticatedMessage) GetV0

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

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

func (AuthenticatedMessage) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (AuthenticatedMessage) MustV0

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

func (AuthenticatedMessage) SwitchFieldName

func (u AuthenticatedMessage) SwitchFieldName() string

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

func (*AuthenticatedMessage) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type AuthenticatedMessageV0

type AuthenticatedMessageV0 struct {
	Sequence Uint64
	Message  StellarMessage
	Mac      HmacSha256Mac
}

AuthenticatedMessageV0 is an XDR NestedStruct defines as:

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

func (*AuthenticatedMessageV0) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*AuthenticatedMessageV0) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (AuthenticatedMessageV0) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*AuthenticatedMessageV0) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BeginSponsoringFutureReservesOp

type BeginSponsoringFutureReservesOp struct {
	SponsoredId AccountId
}

BeginSponsoringFutureReservesOp is an XDR Struct defines as:

struct BeginSponsoringFutureReservesOp
 {
     AccountID sponsoredID;
 };

func (*BeginSponsoringFutureReservesOp) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*BeginSponsoringFutureReservesOp) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (BeginSponsoringFutureReservesOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*BeginSponsoringFutureReservesOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BeginSponsoringFutureReservesResult

type BeginSponsoringFutureReservesResult struct {
	Code BeginSponsoringFutureReservesResultCode
}

BeginSponsoringFutureReservesResult is an XDR Union defines as:

union BeginSponsoringFutureReservesResult switch (
     BeginSponsoringFutureReservesResultCode code)
 {
 case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS:
     void;
 case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED:
 case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED:
 case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE:
     void;
 };

func NewBeginSponsoringFutureReservesResult

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

NewBeginSponsoringFutureReservesResult creates a new BeginSponsoringFutureReservesResult.

func (BeginSponsoringFutureReservesResult) ArmForSwitch

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

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

func (*BeginSponsoringFutureReservesResult) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (BeginSponsoringFutureReservesResult) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (BeginSponsoringFutureReservesResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BeginSponsoringFutureReservesResult) SwitchFieldName

func (u BeginSponsoringFutureReservesResult) SwitchFieldName() string

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

func (*BeginSponsoringFutureReservesResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BeginSponsoringFutureReservesResultCode

type BeginSponsoringFutureReservesResultCode int32

BeginSponsoringFutureReservesResultCode is an XDR Enum defines as:

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

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

func (*BeginSponsoringFutureReservesResultCode) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (BeginSponsoringFutureReservesResultCode) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (BeginSponsoringFutureReservesResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BeginSponsoringFutureReservesResultCode) String

String returns the name of `e`

func (*BeginSponsoringFutureReservesResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (BeginSponsoringFutureReservesResultCode) ValidEnum

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

type BitmapIndex

type BitmapIndex struct {
	FirstBit Uint32
	LastBit  Uint32
	Bitmap   Value
}

BitmapIndex is an XDR Struct defines as:

struct BitmapIndex {
     uint32 firstBit;
     uint32 lastBit;
     Value bitmap;
 };

func (*BitmapIndex) DecodeFrom

func (s *BitmapIndex) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*BitmapIndex) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (BitmapIndex) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*BitmapIndex) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BucketEntry

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

BucketEntry is an XDR Union defines as:

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

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

func NewBucketEntry

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

NewBucketEntry creates a new BucketEntry.

func (BucketEntry) ArmForSwitch

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

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

func (*BucketEntry) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (BucketEntry) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (BucketEntry) GetDeadEntry

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

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

func (BucketEntry) GetLiveEntry

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

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

func (BucketEntry) GetMetaEntry

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

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

func (BucketEntry) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BucketEntry) MustDeadEntry

func (u BucketEntry) MustDeadEntry() LedgerKey

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

func (BucketEntry) MustLiveEntry

func (u BucketEntry) MustLiveEntry() LedgerEntry

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

func (BucketEntry) MustMetaEntry

func (u BucketEntry) MustMetaEntry() BucketMetadata

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

func (BucketEntry) SwitchFieldName

func (u BucketEntry) SwitchFieldName() string

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

func (*BucketEntry) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BucketEntryType

type BucketEntryType int32

BucketEntryType is an XDR Enum defines as:

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

func (*BucketEntryType) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (BucketEntryType) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (BucketEntryType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BucketEntryType) String

func (e BucketEntryType) String() string

String returns the name of `e`

func (*BucketEntryType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (BucketEntryType) ValidEnum

func (e BucketEntryType) ValidEnum(v int32) bool

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

type BucketMetadata

type BucketMetadata struct {
	LedgerVersion Uint32
	Ext           BucketMetadataExt
}

BucketMetadata is an XDR Struct defines as:

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

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

func (*BucketMetadata) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*BucketMetadata) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (BucketMetadata) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*BucketMetadata) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BucketMetadataExt

type BucketMetadataExt struct {
	V int32
}

BucketMetadataExt is an XDR NestedUnion defines as:

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

func NewBucketMetadataExt

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

NewBucketMetadataExt creates a new BucketMetadataExt.

func (BucketMetadataExt) ArmForSwitch

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

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

func (*BucketMetadataExt) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (BucketMetadataExt) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (BucketMetadataExt) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BucketMetadataExt) SwitchFieldName

func (u BucketMetadataExt) SwitchFieldName() string

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

func (*BucketMetadataExt) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BumpSequenceOp

type BumpSequenceOp struct {
	BumpTo SequenceNumber
}

BumpSequenceOp is an XDR Struct defines as:

struct BumpSequenceOp
 {
     SequenceNumber bumpTo;
 };

func (*BumpSequenceOp) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*BumpSequenceOp) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (BumpSequenceOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*BumpSequenceOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BumpSequenceResult

type BumpSequenceResult struct {
	Code BumpSequenceResultCode
}

BumpSequenceResult is an XDR Union defines as:

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

func NewBumpSequenceResult

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

NewBumpSequenceResult creates a new BumpSequenceResult.

func (BumpSequenceResult) ArmForSwitch

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

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

func (*BumpSequenceResult) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (BumpSequenceResult) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (BumpSequenceResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BumpSequenceResult) SwitchFieldName

func (u BumpSequenceResult) SwitchFieldName() string

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

func (*BumpSequenceResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type BumpSequenceResultCode

type BumpSequenceResultCode int32

BumpSequenceResultCode is an XDR Enum defines as:

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

func (*BumpSequenceResultCode) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (BumpSequenceResultCode) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (BumpSequenceResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (BumpSequenceResultCode) String

func (e BumpSequenceResultCode) String() string

String returns the name of `e`

func (*BumpSequenceResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (BumpSequenceResultCode) ValidEnum

func (e BumpSequenceResultCode) ValidEnum(v int32) bool

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

type BytesDecoder

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

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

func NewBytesDecoder

func NewBytesDecoder() *BytesDecoder

func (*BytesDecoder) DecodeBytes

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

type ChangeTrustAsset

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

ChangeTrustAsset is an XDR Union defines as:

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

 case ASSET_TYPE_CREDIT_ALPHANUM4:
     AlphaNum4 alphaNum4;

 case ASSET_TYPE_CREDIT_ALPHANUM12:
     AlphaNum12 alphaNum12;

 case ASSET_TYPE_POOL_SHARE:
     LiquidityPoolParameters liquidityPool;

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

func NewChangeTrustAsset

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

NewChangeTrustAsset creates a new ChangeTrustAsset.

func (ChangeTrustAsset) ArmForSwitch

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

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

func (*ChangeTrustAsset) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ChangeTrustAsset) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ChangeTrustAsset) GetAlphaNum12

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

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

func (ChangeTrustAsset) GetAlphaNum4

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

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

func (ChangeTrustAsset) GetLiquidityPool

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

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

func (ChangeTrustAsset) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ChangeTrustAsset) MustAlphaNum12

func (u ChangeTrustAsset) MustAlphaNum12() AlphaNum12

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

func (ChangeTrustAsset) MustAlphaNum4

func (u ChangeTrustAsset) MustAlphaNum4() AlphaNum4

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

func (ChangeTrustAsset) MustLiquidityPool

func (u ChangeTrustAsset) MustLiquidityPool() LiquidityPoolParameters

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

func (ChangeTrustAsset) SwitchFieldName

func (u ChangeTrustAsset) SwitchFieldName() string

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

func (ChangeTrustAsset) ToAsset

func (tla ChangeTrustAsset) ToAsset() Asset

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

func (*ChangeTrustAsset) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ChangeTrustOp

type ChangeTrustOp struct {
	Line  ChangeTrustAsset
	Limit Int64
}

ChangeTrustOp is an XDR Struct defines as:

struct ChangeTrustOp
 {
     ChangeTrustAsset line;

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

func (*ChangeTrustOp) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*ChangeTrustOp) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ChangeTrustOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ChangeTrustOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ChangeTrustResult

type ChangeTrustResult struct {
	Code ChangeTrustResultCode
}

ChangeTrustResult is an XDR Union defines as:

union ChangeTrustResult switch (ChangeTrustResultCode code)
 {
 case CHANGE_TRUST_SUCCESS:
     void;
 case CHANGE_TRUST_MALFORMED:
 case CHANGE_TRUST_NO_ISSUER:
 case CHANGE_TRUST_INVALID_LIMIT:
 case CHANGE_TRUST_LOW_RESERVE:
 case CHANGE_TRUST_SELF_NOT_ALLOWED:
 case CHANGE_TRUST_TRUST_LINE_MISSING:
 case CHANGE_TRUST_CANNOT_DELETE:
 case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES:
     void;
 };

func NewChangeTrustResult

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

NewChangeTrustResult creates a new ChangeTrustResult.

func (ChangeTrustResult) ArmForSwitch

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

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

func (*ChangeTrustResult) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ChangeTrustResult) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ChangeTrustResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ChangeTrustResult) SwitchFieldName

func (u ChangeTrustResult) SwitchFieldName() string

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

func (*ChangeTrustResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ChangeTrustResultCode

type ChangeTrustResultCode int32

ChangeTrustResultCode is an XDR Enum defines as:

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

func (*ChangeTrustResultCode) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ChangeTrustResultCode) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ChangeTrustResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ChangeTrustResultCode) String

func (e ChangeTrustResultCode) String() string

String returns the name of `e`

func (*ChangeTrustResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ChangeTrustResultCode) ValidEnum

func (e ChangeTrustResultCode) ValidEnum(v int32) bool

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

type ClaimAtom

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

ClaimAtom is an XDR Union defines as:

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

func NewClaimAtom

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

NewClaimAtom creates a new ClaimAtom.

func (ClaimAtom) AmountBought

func (a ClaimAtom) AmountBought() Int64

func (ClaimAtom) AmountSold

func (a ClaimAtom) AmountSold() Int64

func (ClaimAtom) ArmForSwitch

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

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

func (ClaimAtom) AssetBought

func (a ClaimAtom) AssetBought() Asset

func (ClaimAtom) AssetSold

func (a ClaimAtom) AssetSold() Asset

func (*ClaimAtom) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClaimAtom) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimAtom) GetLiquidityPool

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

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

func (ClaimAtom) GetOrderBook

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

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

func (ClaimAtom) GetV0

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

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

func (ClaimAtom) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimAtom) MustLiquidityPool

func (u ClaimAtom) MustLiquidityPool() ClaimLiquidityAtom

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

func (ClaimAtom) MustOrderBook

func (u ClaimAtom) MustOrderBook() ClaimOfferAtom

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

func (ClaimAtom) MustV0

func (u ClaimAtom) MustV0() ClaimOfferAtomV0

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

func (ClaimAtom) OfferId

func (a ClaimAtom) OfferId() Int64

func (ClaimAtom) SellerId

func (a ClaimAtom) SellerId() AccountId

func (ClaimAtom) SwitchFieldName

func (u ClaimAtom) SwitchFieldName() string

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

func (*ClaimAtom) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimAtomType

type ClaimAtomType int32

ClaimAtomType is an XDR Enum defines as:

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

func (*ClaimAtomType) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClaimAtomType) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimAtomType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimAtomType) String

func (e ClaimAtomType) String() string

String returns the name of `e`

func (*ClaimAtomType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimAtomType) ValidEnum

func (e ClaimAtomType) ValidEnum(v int32) bool

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

type ClaimClaimableBalanceOp

type ClaimClaimableBalanceOp struct {
	BalanceId ClaimableBalanceId
}

ClaimClaimableBalanceOp is an XDR Struct defines as:

struct ClaimClaimableBalanceOp
 {
     ClaimableBalanceID balanceID;
 };

func (*ClaimClaimableBalanceOp) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*ClaimClaimableBalanceOp) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimClaimableBalanceOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimClaimableBalanceOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimClaimableBalanceResult

type ClaimClaimableBalanceResult struct {
	Code ClaimClaimableBalanceResultCode
}

ClaimClaimableBalanceResult is an XDR Union defines as:

union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code)
 {
 case CLAIM_CLAIMABLE_BALANCE_SUCCESS:
     void;
 case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST:
 case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM:
 case CLAIM_CLAIMABLE_BALANCE_LINE_FULL:
 case CLAIM_CLAIMABLE_BALANCE_NO_TRUST:
 case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED:
     void;
 };

func NewClaimClaimableBalanceResult

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

NewClaimClaimableBalanceResult creates a new ClaimClaimableBalanceResult.

func (ClaimClaimableBalanceResult) ArmForSwitch

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

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

func (*ClaimClaimableBalanceResult) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClaimClaimableBalanceResult) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimClaimableBalanceResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimClaimableBalanceResult) SwitchFieldName

func (u ClaimClaimableBalanceResult) SwitchFieldName() string

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

func (*ClaimClaimableBalanceResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimClaimableBalanceResultCode

type ClaimClaimableBalanceResultCode int32

ClaimClaimableBalanceResultCode is an XDR Enum defines as:

enum ClaimClaimableBalanceResultCode
 {
     CLAIM_CLAIMABLE_BALANCE_SUCCESS = 0,
     CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST = -1,
     CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM = -2,
     CLAIM_CLAIMABLE_BALANCE_LINE_FULL = -3,
     CLAIM_CLAIMABLE_BALANCE_NO_TRUST = -4,
     CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED = -5
 };
const (
	ClaimClaimableBalanceResultCodeClaimClaimableBalanceSuccess       ClaimClaimableBalanceResultCode = 0
	ClaimClaimableBalanceResultCodeClaimClaimableBalanceDoesNotExist  ClaimClaimableBalanceResultCode = -1
	ClaimClaimableBalanceResultCodeClaimClaimableBalanceCannotClaim   ClaimClaimableBalanceResultCode = -2
	ClaimClaimableBalanceResultCodeClaimClaimableBalanceLineFull      ClaimClaimableBalanceResultCode = -3
	ClaimClaimableBalanceResultCodeClaimClaimableBalanceNoTrust       ClaimClaimableBalanceResultCode = -4
	ClaimClaimableBalanceResultCodeClaimClaimableBalanceNotAuthorized ClaimClaimableBalanceResultCode = -5
)

func (*ClaimClaimableBalanceResultCode) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClaimClaimableBalanceResultCode) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimClaimableBalanceResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimClaimableBalanceResultCode) String

String returns the name of `e`

func (*ClaimClaimableBalanceResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimClaimableBalanceResultCode) ValidEnum

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

type ClaimLiquidityAtom

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

ClaimLiquidityAtom is an XDR Struct defines as:

struct ClaimLiquidityAtom
 {
     PoolID liquidityPoolID;

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

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

func (*ClaimLiquidityAtom) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*ClaimLiquidityAtom) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimLiquidityAtom) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimLiquidityAtom) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimOfferAtom

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

ClaimOfferAtom is an XDR Struct defines as:

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

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

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

func (*ClaimOfferAtom) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*ClaimOfferAtom) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimOfferAtom) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimOfferAtom) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimOfferAtomV0

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

ClaimOfferAtomV0 is an XDR Struct defines as:

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

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

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

func (*ClaimOfferAtomV0) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*ClaimOfferAtomV0) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimOfferAtomV0) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimOfferAtomV0) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimPredicate

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

ClaimPredicate is an XDR Union defines as:

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

func NewClaimPredicate

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

NewClaimPredicate creates a new ClaimPredicate.

func (ClaimPredicate) ArmForSwitch

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

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

func (*ClaimPredicate) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClaimPredicate) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimPredicate) GetAbsBefore

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

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

func (ClaimPredicate) GetAndPredicates

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

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

func (ClaimPredicate) GetNotPredicate

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

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

func (ClaimPredicate) GetOrPredicates

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

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

func (ClaimPredicate) GetRelBefore

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

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

func (ClaimPredicate) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimPredicate) MarshalJSON

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

func (ClaimPredicate) MustAbsBefore

func (u ClaimPredicate) MustAbsBefore() Int64

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

func (ClaimPredicate) MustAndPredicates

func (u ClaimPredicate) MustAndPredicates() []ClaimPredicate

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

func (ClaimPredicate) MustNotPredicate

func (u ClaimPredicate) MustNotPredicate() *ClaimPredicate

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

func (ClaimPredicate) MustOrPredicates

func (u ClaimPredicate) MustOrPredicates() []ClaimPredicate

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

func (ClaimPredicate) MustRelBefore

func (u ClaimPredicate) MustRelBefore() Int64

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

func (*ClaimPredicate) Scan

func (c *ClaimPredicate) Scan(src any) error

Scan reads from src into a ClaimPredicate

func (ClaimPredicate) SwitchFieldName

func (u ClaimPredicate) SwitchFieldName() string

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

func (*ClaimPredicate) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (*ClaimPredicate) UnmarshalJSON

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

func (ClaimPredicate) Value

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

Value implements the database/sql/driver Valuer interface.

type ClaimPredicateType

type ClaimPredicateType int32

ClaimPredicateType is an XDR Enum defines as:

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

func (*ClaimPredicateType) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClaimPredicateType) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimPredicateType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimPredicateType) String

func (e ClaimPredicateType) String() string

String returns the name of `e`

func (*ClaimPredicateType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimPredicateType) ValidEnum

func (e ClaimPredicateType) ValidEnum(v int32) bool

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

type ClaimableBalanceEntry

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

ClaimableBalanceEntry is an XDR Struct defines as:

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

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

     // Any asset including native
     Asset asset;

     // Amount of asset
     int64 amount;

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

func (*ClaimableBalanceEntry) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*ClaimableBalanceEntry) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (*ClaimableBalanceEntry) Flags

func (ClaimableBalanceEntry) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimableBalanceEntry) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimableBalanceEntryExt

type ClaimableBalanceEntryExt struct {
	V  int32
	V1 *ClaimableBalanceEntryExtensionV1
}

ClaimableBalanceEntryExt is an XDR NestedUnion defines as:

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

func NewClaimableBalanceEntryExt

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

NewClaimableBalanceEntryExt creates a new ClaimableBalanceEntryExt.

func (ClaimableBalanceEntryExt) ArmForSwitch

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

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

func (*ClaimableBalanceEntryExt) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClaimableBalanceEntryExt) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimableBalanceEntryExt) GetV1

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

func (ClaimableBalanceEntryExt) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimableBalanceEntryExt) MustV1

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

func (ClaimableBalanceEntryExt) SwitchFieldName

func (u ClaimableBalanceEntryExt) SwitchFieldName() string

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

func (*ClaimableBalanceEntryExt) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimableBalanceEntryExtensionV1

type ClaimableBalanceEntryExtensionV1 struct {
	Ext   ClaimableBalanceEntryExtensionV1Ext
	Flags Uint32
}

ClaimableBalanceEntryExtensionV1 is an XDR Struct defines as:

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

     uint32 flags; // see ClaimableBalanceFlags
 };

func (*ClaimableBalanceEntryExtensionV1) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*ClaimableBalanceEntryExtensionV1) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimableBalanceEntryExtensionV1) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimableBalanceEntryExtensionV1) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimableBalanceEntryExtensionV1Ext

type ClaimableBalanceEntryExtensionV1Ext struct {
	V int32
}

ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defines as:

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

func NewClaimableBalanceEntryExtensionV1Ext

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

NewClaimableBalanceEntryExtensionV1Ext creates a new ClaimableBalanceEntryExtensionV1Ext.

func (ClaimableBalanceEntryExtensionV1Ext) ArmForSwitch

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

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

func (*ClaimableBalanceEntryExtensionV1Ext) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClaimableBalanceEntryExtensionV1Ext) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimableBalanceEntryExtensionV1Ext) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimableBalanceEntryExtensionV1Ext) SwitchFieldName

func (u ClaimableBalanceEntryExtensionV1Ext) SwitchFieldName() string

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

func (*ClaimableBalanceEntryExtensionV1Ext) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimableBalanceFlags

type ClaimableBalanceFlags int32

ClaimableBalanceFlags is an XDR Enum defines as:

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

func (*ClaimableBalanceFlags) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClaimableBalanceFlags) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimableBalanceFlags) IsClawbackEnabled

func (cbFlags ClaimableBalanceFlags) IsClawbackEnabled() bool

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

func (ClaimableBalanceFlags) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimableBalanceFlags) String

func (e ClaimableBalanceFlags) String() string

String returns the name of `e`

func (*ClaimableBalanceFlags) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimableBalanceFlags) ValidEnum

func (e ClaimableBalanceFlags) ValidEnum(v int32) bool

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

type ClaimableBalanceId

type ClaimableBalanceId struct {
	Type ClaimableBalanceIdType
	V0   *Hash
}

ClaimableBalanceId is an XDR Union defines as:

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

func NewClaimableBalanceId

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

NewClaimableBalanceId creates a new ClaimableBalanceId.

func (ClaimableBalanceId) ArmForSwitch

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

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

func (*ClaimableBalanceId) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClaimableBalanceId) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimableBalanceId) GetV0

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

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

func (ClaimableBalanceId) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimableBalanceId) MustV0

func (u ClaimableBalanceId) MustV0() Hash

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

func (ClaimableBalanceId) SwitchFieldName

func (u ClaimableBalanceId) SwitchFieldName() string

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

func (*ClaimableBalanceId) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimableBalanceIdType

type ClaimableBalanceIdType int32

ClaimableBalanceIdType is an XDR Enum defines as:

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

func (*ClaimableBalanceIdType) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClaimableBalanceIdType) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimableBalanceIdType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimableBalanceIdType) String

func (e ClaimableBalanceIdType) String() string

String returns the name of `e`

func (*ClaimableBalanceIdType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimableBalanceIdType) ValidEnum

func (e ClaimableBalanceIdType) ValidEnum(v int32) bool

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

type Claimant

type Claimant struct {
	Type ClaimantType
	V0   *ClaimantV0
}

Claimant is an XDR Union defines as:

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

func NewClaimant

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

NewClaimant creates a new Claimant.

func SortClaimantsByDestination

func SortClaimantsByDestination(claimants []Claimant) []Claimant

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

func (Claimant) ArmForSwitch

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

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

func (*Claimant) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (Claimant) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (Claimant) GetV0

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

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

func (Claimant) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (Claimant) MustV0

func (u Claimant) MustV0() ClaimantV0

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

func (Claimant) SwitchFieldName

func (u Claimant) SwitchFieldName() string

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

func (*Claimant) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClaimantType

type ClaimantType int32

ClaimantType is an XDR Enum defines as:

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

func (*ClaimantType) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClaimantType) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimantType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClaimantType) String

func (e ClaimantType) String() string

String returns the name of `e`

func (*ClaimantType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClaimantType) ValidEnum

func (e ClaimantType) ValidEnum(v int32) bool

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

type ClaimantV0

type ClaimantV0 struct {
	Destination AccountId
	Predicate   ClaimPredicate
}

ClaimantV0 is an XDR NestedStruct defines as:

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

func (*ClaimantV0) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*ClaimantV0) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClaimantV0) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClaimantV0) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClawbackClaimableBalanceOp

type ClawbackClaimableBalanceOp struct {
	BalanceId ClaimableBalanceId
}

ClawbackClaimableBalanceOp is an XDR Struct defines as:

struct ClawbackClaimableBalanceOp
 {
     ClaimableBalanceID balanceID;
 };

func (*ClawbackClaimableBalanceOp) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*ClawbackClaimableBalanceOp) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClawbackClaimableBalanceOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClawbackClaimableBalanceOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClawbackClaimableBalanceResult

type ClawbackClaimableBalanceResult struct {
	Code ClawbackClaimableBalanceResultCode
}

ClawbackClaimableBalanceResult is an XDR Union defines as:

union ClawbackClaimableBalanceResult switch (
     ClawbackClaimableBalanceResultCode code)
 {
 case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS:
     void;
 case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST:
 case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER:
 case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED:
     void;
 };

func NewClawbackClaimableBalanceResult

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

NewClawbackClaimableBalanceResult creates a new ClawbackClaimableBalanceResult.

func (ClawbackClaimableBalanceResult) ArmForSwitch

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

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

func (*ClawbackClaimableBalanceResult) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClawbackClaimableBalanceResult) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClawbackClaimableBalanceResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClawbackClaimableBalanceResult) SwitchFieldName

func (u ClawbackClaimableBalanceResult) SwitchFieldName() string

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

func (*ClawbackClaimableBalanceResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClawbackClaimableBalanceResultCode

type ClawbackClaimableBalanceResultCode int32

ClawbackClaimableBalanceResultCode is an XDR Enum defines as:

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

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

func (*ClawbackClaimableBalanceResultCode) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClawbackClaimableBalanceResultCode) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClawbackClaimableBalanceResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClawbackClaimableBalanceResultCode) String

String returns the name of `e`

func (*ClawbackClaimableBalanceResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClawbackClaimableBalanceResultCode) ValidEnum

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

type ClawbackOp

type ClawbackOp struct {
	Asset  Asset
	From   MuxedAccount
	Amount Int64
}

ClawbackOp is an XDR Struct defines as:

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

func (*ClawbackOp) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*ClawbackOp) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClawbackOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ClawbackOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClawbackResult

type ClawbackResult struct {
	Code ClawbackResultCode
}

ClawbackResult is an XDR Union defines as:

union ClawbackResult switch (ClawbackResultCode code)
 {
 case CLAWBACK_SUCCESS:
     void;
 case CLAWBACK_MALFORMED:
 case CLAWBACK_NOT_CLAWBACK_ENABLED:
 case CLAWBACK_NO_TRUST:
 case CLAWBACK_UNDERFUNDED:
     void;
 };

func NewClawbackResult

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

NewClawbackResult creates a new ClawbackResult.

func (ClawbackResult) ArmForSwitch

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

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

func (*ClawbackResult) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClawbackResult) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClawbackResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClawbackResult) SwitchFieldName

func (u ClawbackResult) SwitchFieldName() string

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

func (*ClawbackResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ClawbackResultCode

type ClawbackResultCode int32

ClawbackResultCode is an XDR Enum defines as:

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

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

func (*ClawbackResultCode) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (ClawbackResultCode) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ClawbackResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ClawbackResultCode) String

func (e ClawbackResultCode) String() string

String returns the name of `e`

func (*ClawbackResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ClawbackResultCode) ValidEnum

func (e ClawbackResultCode) ValidEnum(v int32) bool

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

type ConfigSettingContractBandwidthV0

type ConfigSettingContractBandwidthV0 struct {
	LedgerMaxTxsSizeBytes Uint32
	TxMaxSizeBytes        Uint32
	FeeTxSize1Kb          Int64
}

ConfigSettingContractBandwidthV0 is an XDR Struct defines as:

struct ConfigSettingContractBandwidthV0
 {
     // Maximum sum of all transaction sizes in the ledger in bytes
     uint32 ledgerMaxTxsSizeBytes;
     // Maximum size in bytes for a transaction
     uint32 txMaxSizeBytes;

     // Fee for 1 KB of transaction size
     int64 feeTxSize1KB;
 };

func (*ConfigSettingContractBandwidthV0) DecodeFrom

func (s *ConfigSettingContractBandwidthV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ConfigSettingContractBandwidthV0) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ConfigSettingContractBandwidthV0) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ConfigSettingContractBandwidthV0) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ConfigSettingContractComputeV0

type ConfigSettingContractComputeV0 struct {
	LedgerMaxInstructions           Int64
	TxMaxInstructions               Int64
	FeeRatePerInstructionsIncrement Int64
	TxMemoryLimit                   Uint32
}

ConfigSettingContractComputeV0 is an XDR Struct defines as:

struct ConfigSettingContractComputeV0
 {
     // Maximum instructions per ledger
     int64 ledgerMaxInstructions;
     // Maximum instructions per transaction
     int64 txMaxInstructions;
     // Cost of 10000 instructions
     int64 feeRatePerInstructionsIncrement;

     // Memory limit per transaction. Unlike instructions, there is no fee
     // for memory, just the limit.
     uint32 txMemoryLimit;
 };

func (*ConfigSettingContractComputeV0) DecodeFrom

func (s *ConfigSettingContractComputeV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ConfigSettingContractComputeV0) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ConfigSettingContractComputeV0) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ConfigSettingContractComputeV0) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ConfigSettingContractEventsV0

type ConfigSettingContractEventsV0 struct {
	TxMaxContractEventsSizeBytes Uint32
	FeeContractEvents1Kb         Int64
}

ConfigSettingContractEventsV0 is an XDR Struct defines as:

struct ConfigSettingContractEventsV0
 {
     // Maximum size of events that a contract call can emit.
     uint32 txMaxContractEventsSizeBytes;
     // Fee for generating 1KB of contract events.
     int64 feeContractEvents1KB;
 };

func (*ConfigSettingContractEventsV0) DecodeFrom

func (s *ConfigSettingContractEventsV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ConfigSettingContractEventsV0) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ConfigSettingContractEventsV0) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ConfigSettingContractEventsV0) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ConfigSettingContractExecutionLanesV0

type ConfigSettingContractExecutionLanesV0 struct {
	LedgerMaxTxCount Uint32
}

ConfigSettingContractExecutionLanesV0 is an XDR Struct defines as:

struct ConfigSettingContractExecutionLanesV0
 {
     // maximum number of Soroban transactions per ledger
     uint32 ledgerMaxTxCount;
 };

func (*ConfigSettingContractExecutionLanesV0) DecodeFrom

func (s *ConfigSettingContractExecutionLanesV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ConfigSettingContractExecutionLanesV0) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ConfigSettingContractExecutionLanesV0) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ConfigSettingContractExecutionLanesV0) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ConfigSettingContractHistoricalDataV0

type ConfigSettingContractHistoricalDataV0 struct {
	FeeHistorical1Kb Int64
}

ConfigSettingContractHistoricalDataV0 is an XDR Struct defines as:

struct ConfigSettingContractHistoricalDataV0
 {
     int64 feeHistorical1KB; // Fee for storing 1KB in archives
 };

func (*ConfigSettingContractHistoricalDataV0) DecodeFrom

func (s *ConfigSettingContractHistoricalDataV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ConfigSettingContractHistoricalDataV0) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ConfigSettingContractHistoricalDataV0) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ConfigSettingContractHistoricalDataV0) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ConfigSettingContractLedgerCostV0

type ConfigSettingContractLedgerCostV0 struct {
	LedgerMaxReadLedgerEntries     Uint32
	LedgerMaxReadBytes             Uint32
	LedgerMaxWriteLedgerEntries    Uint32
	LedgerMaxWriteBytes            Uint32
	TxMaxReadLedgerEntries         Uint32
	TxMaxReadBytes                 Uint32
	TxMaxWriteLedgerEntries        Uint32
	TxMaxWriteBytes                Uint32
	FeeReadLedgerEntry             Int64
	FeeWriteLedgerEntry            Int64
	FeeRead1Kb                     Int64
	BucketListTargetSizeBytes      Int64
	WriteFee1KbBucketListLow       Int64
	WriteFee1KbBucketListHigh      Int64
	BucketListWriteFeeGrowthFactor Uint32
}

ConfigSettingContractLedgerCostV0 is an XDR Struct defines as:

struct ConfigSettingContractLedgerCostV0
 {
     // Maximum number of ledger entry read operations per ledger
     uint32 ledgerMaxReadLedgerEntries;
     // Maximum number of bytes that can be read per ledger
     uint32 ledgerMaxReadBytes;
     // Maximum number of ledger entry write operations per ledger
     uint32 ledgerMaxWriteLedgerEntries;
     // Maximum number of bytes that can be written per ledger
     uint32 ledgerMaxWriteBytes;

     // Maximum number of ledger entry read operations per transaction
     uint32 txMaxReadLedgerEntries;
     // Maximum number of bytes that can be read per transaction
     uint32 txMaxReadBytes;
     // Maximum number of ledger entry write operations per transaction
     uint32 txMaxWriteLedgerEntries;
     // Maximum number of bytes that can be written per transaction
     uint32 txMaxWriteBytes;

     int64 feeReadLedgerEntry;  // Fee per ledger entry read
     int64 feeWriteLedgerEntry; // Fee per ledger entry write

     int64 feeRead1KB;  // Fee for reading 1KB

     // The following parameters determine the write fee per 1KB.
     // Write fee grows linearly until bucket list reaches this size
     int64 bucketListTargetSizeBytes;
     // Fee per 1KB write when the bucket list is empty
     int64 writeFee1KBBucketListLow;
     // Fee per 1KB write when the bucket list has reached `bucketListTargetSizeBytes`
     int64 writeFee1KBBucketListHigh;
     // Write fee multiplier for any additional data past the first `bucketListTargetSizeBytes`
     uint32 bucketListWriteFeeGrowthFactor;
 };

func (*ConfigSettingContractLedgerCostV0) DecodeFrom

func (s *ConfigSettingContractLedgerCostV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ConfigSettingContractLedgerCostV0) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ConfigSettingContractLedgerCostV0) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ConfigSettingContractLedgerCostV0) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ConfigSettingEntry

type ConfigSettingEntry struct {
	ConfigSettingId            ConfigSettingId
	ContractMaxSizeBytes       *Uint32
	ContractCompute            *ConfigSettingContractComputeV0
	ContractLedgerCost         *ConfigSettingContractLedgerCostV0
	ContractHistoricalData     *ConfigSettingContractHistoricalDataV0
	ContractEvents             *ConfigSettingContractEventsV0
	ContractBandwidth          *ConfigSettingContractBandwidthV0
	ContractCostParamsCpuInsns *ContractCostParams
	ContractCostParamsMemBytes *ContractCostParams
	ContractDataKeySizeBytes   *Uint32
	ContractDataEntrySizeBytes *Uint32
	StateArchivalSettings      *StateArchivalSettings
	ContractExecutionLanes     *ConfigSettingContractExecutionLanesV0
	BucketListSizeWindow       *[]Uint64
	EvictionIterator           *EvictionIterator
}

ConfigSettingEntry is an XDR Union defines as:

union ConfigSettingEntry switch (ConfigSettingID configSettingID)
 {
 case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES:
     uint32 contractMaxSizeBytes;
 case CONFIG_SETTING_CONTRACT_COMPUTE_V0:
     ConfigSettingContractComputeV0 contractCompute;
 case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0:
     ConfigSettingContractLedgerCostV0 contractLedgerCost;
 case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0:
     ConfigSettingContractHistoricalDataV0 contractHistoricalData;
 case CONFIG_SETTING_CONTRACT_EVENTS_V0:
     ConfigSettingContractEventsV0 contractEvents;
 case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0:
     ConfigSettingContractBandwidthV0 contractBandwidth;
 case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS:
     ContractCostParams contractCostParamsCpuInsns;
 case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES:
     ContractCostParams contractCostParamsMemBytes;
 case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES:
     uint32 contractDataKeySizeBytes;
 case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES:
     uint32 contractDataEntrySizeBytes;
 case CONFIG_SETTING_STATE_ARCHIVAL:
     StateArchivalSettings stateArchivalSettings;
 case CONFIG_SETTING_CONTRACT_EXECUTION_LANES:
     ConfigSettingContractExecutionLanesV0 contractExecutionLanes;
 case CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW:
     uint64 bucketListSizeWindow<>;
 case CONFIG_SETTING_EVICTION_ITERATOR:
     EvictionIterator evictionIterator;
 };

func NewConfigSettingEntry

func NewConfigSettingEntry(configSettingId ConfigSettingId, value interface{}) (result ConfigSettingEntry, err error)

NewConfigSettingEntry creates a new ConfigSettingEntry.

func (ConfigSettingEntry) ArmForSwitch

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

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

func (*ConfigSettingEntry) DecodeFrom

func (u *ConfigSettingEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ConfigSettingEntry) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ConfigSettingEntry) GetBucketListSizeWindow

func (u ConfigSettingEntry) GetBucketListSizeWindow() (result []Uint64, ok bool)

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

func (ConfigSettingEntry) GetContractBandwidth

func (u ConfigSettingEntry) GetContractBandwidth() (result ConfigSettingContractBandwidthV0, ok bool)

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

func (ConfigSettingEntry) GetContractCompute

func (u ConfigSettingEntry) GetContractCompute() (result ConfigSettingContractComputeV0, ok bool)

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

func (ConfigSettingEntry) GetContractCostParamsCpuInsns

func (u ConfigSettingEntry) GetContractCostParamsCpuInsns() (result ContractCostParams, ok bool)

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

func (ConfigSettingEntry) GetContractCostParamsMemBytes

func (u ConfigSettingEntry) GetContractCostParamsMemBytes() (result ContractCostParams, ok bool)

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

func (ConfigSettingEntry) GetContractDataEntrySizeBytes

func (u ConfigSettingEntry) GetContractDataEntrySizeBytes() (result Uint32, ok bool)

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

func (ConfigSettingEntry) GetContractDataKeySizeBytes

func (u ConfigSettingEntry) GetContractDataKeySizeBytes() (result Uint32, ok bool)

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

func (ConfigSettingEntry) GetContractEvents

func (u ConfigSettingEntry) GetContractEvents() (result ConfigSettingContractEventsV0, ok bool)

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

func (ConfigSettingEntry) GetContractExecutionLanes

func (u ConfigSettingEntry) GetContractExecutionLanes() (result ConfigSettingContractExecutionLanesV0, ok bool)

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

func (ConfigSettingEntry) GetContractHistoricalData

func (u ConfigSettingEntry) GetContractHistoricalData() (result ConfigSettingContractHistoricalDataV0, ok bool)

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

func (ConfigSettingEntry) GetContractLedgerCost

func (u ConfigSettingEntry) GetContractLedgerCost() (result ConfigSettingContractLedgerCostV0, ok bool)

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

func (ConfigSettingEntry) GetContractMaxSizeBytes

func (u ConfigSettingEntry) GetContractMaxSizeBytes() (result Uint32, ok bool)

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

func (ConfigSettingEntry) GetEvictionIterator

func (u ConfigSettingEntry) GetEvictionIterator() (result EvictionIterator, ok bool)

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

func (ConfigSettingEntry) GetStateArchivalSettings

func (u ConfigSettingEntry) GetStateArchivalSettings() (result StateArchivalSettings, ok bool)

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

func (ConfigSettingEntry) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ConfigSettingEntry) MustBucketListSizeWindow

func (u ConfigSettingEntry) MustBucketListSizeWindow() []Uint64

MustBucketListSizeWindow retrieves the BucketListSizeWindow value from the union, panicing if the value is not set.

func (ConfigSettingEntry) MustContractBandwidth

func (u ConfigSettingEntry) MustContractBandwidth() ConfigSettingContractBandwidthV0

MustContractBandwidth retrieves the ContractBandwidth value from the union, panicing if the value is not set.

func (ConfigSettingEntry) MustContractCompute

func (u ConfigSettingEntry) MustContractCompute() ConfigSettingContractComputeV0

MustContractCompute retrieves the ContractCompute value from the union, panicing if the value is not set.

func (ConfigSettingEntry) MustContractCostParamsCpuInsns

func (u ConfigSettingEntry) MustContractCostParamsCpuInsns() ContractCostParams

MustContractCostParamsCpuInsns retrieves the ContractCostParamsCpuInsns value from the union, panicing if the value is not set.

func (ConfigSettingEntry) MustContractCostParamsMemBytes

func (u ConfigSettingEntry) MustContractCostParamsMemBytes() ContractCostParams

MustContractCostParamsMemBytes retrieves the ContractCostParamsMemBytes value from the union, panicing if the value is not set.

func (ConfigSettingEntry) MustContractDataEntrySizeBytes

func (u ConfigSettingEntry) MustContractDataEntrySizeBytes() Uint32

MustContractDataEntrySizeBytes retrieves the ContractDataEntrySizeBytes value from the union, panicing if the value is not set.

func (ConfigSettingEntry) MustContractDataKeySizeBytes

func (u ConfigSettingEntry) MustContractDataKeySizeBytes() Uint32

MustContractDataKeySizeBytes retrieves the ContractDataKeySizeBytes value from the union, panicing if the value is not set.

func (ConfigSettingEntry) MustContractEvents

func (u ConfigSettingEntry) MustContractEvents() ConfigSettingContractEventsV0

MustContractEvents retrieves the ContractEvents value from the union, panicing if the value is not set.

func (ConfigSettingEntry) MustContractExecutionLanes

func (u ConfigSettingEntry) MustContractExecutionLanes() ConfigSettingContractExecutionLanesV0

MustContractExecutionLanes retrieves the ContractExecutionLanes value from the union, panicing if the value is not set.

func (ConfigSettingEntry) MustContractHistoricalData

func (u ConfigSettingEntry) MustContractHistoricalData() ConfigSettingContractHistoricalDataV0

MustContractHistoricalData retrieves the ContractHistoricalData value from the union, panicing if the value is not set.

func (ConfigSettingEntry) MustContractLedgerCost

func (u ConfigSettingEntry) MustContractLedgerCost() ConfigSettingContractLedgerCostV0

MustContractLedgerCost retrieves the ContractLedgerCost value from the union, panicing if the value is not set.

func (ConfigSettingEntry) MustContractMaxSizeBytes

func (u ConfigSettingEntry) MustContractMaxSizeBytes() Uint32

MustContractMaxSizeBytes retrieves the ContractMaxSizeBytes value from the union, panicing if the value is not set.

func (ConfigSettingEntry) MustEvictionIterator

func (u ConfigSettingEntry) MustEvictionIterator() EvictionIterator

MustEvictionIterator retrieves the EvictionIterator value from the union, panicing if the value is not set.

func (ConfigSettingEntry) MustStateArchivalSettings

func (u ConfigSettingEntry) MustStateArchivalSettings() StateArchivalSettings

MustStateArchivalSettings retrieves the StateArchivalSettings value from the union, panicing if the value is not set.

func (ConfigSettingEntry) SwitchFieldName

func (u ConfigSettingEntry) SwitchFieldName() string

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

func (*ConfigSettingEntry) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ConfigSettingId

type ConfigSettingId int32

ConfigSettingId is an XDR Enum defines as:

enum ConfigSettingID
 {
     CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0,
     CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1,
     CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2,
     CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3,
     CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4,
     CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5,
     CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6,
     CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7,
     CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8,
     CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9,
     CONFIG_SETTING_STATE_ARCHIVAL = 10,
     CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11,
     CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW = 12,
     CONFIG_SETTING_EVICTION_ITERATOR = 13
 };
const (
	ConfigSettingIdConfigSettingContractMaxSizeBytes              ConfigSettingId = 0
	ConfigSettingIdConfigSettingContractComputeV0                 ConfigSettingId = 1
	ConfigSettingIdConfigSettingContractLedgerCostV0              ConfigSettingId = 2
	ConfigSettingIdConfigSettingContractHistoricalDataV0          ConfigSettingId = 3
	ConfigSettingIdConfigSettingContractEventsV0                  ConfigSettingId = 4
	ConfigSettingIdConfigSettingContractBandwidthV0               ConfigSettingId = 5
	ConfigSettingIdConfigSettingContractCostParamsCpuInstructions ConfigSettingId = 6
	ConfigSettingIdConfigSettingContractCostParamsMemoryBytes     ConfigSettingId = 7
	ConfigSettingIdConfigSettingContractDataKeySizeBytes          ConfigSettingId = 8
	ConfigSettingIdConfigSettingContractDataEntrySizeBytes        ConfigSettingId = 9
	ConfigSettingIdConfigSettingStateArchival                     ConfigSettingId = 10
	ConfigSettingIdConfigSettingContractExecutionLanes            ConfigSettingId = 11
	ConfigSettingIdConfigSettingBucketlistSizeWindow              ConfigSettingId = 12
	ConfigSettingIdConfigSettingEvictionIterator                  ConfigSettingId = 13
)

func (*ConfigSettingId) DecodeFrom

func (e *ConfigSettingId) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ConfigSettingId) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ConfigSettingId) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ConfigSettingId) String

func (e ConfigSettingId) String() string

String returns the name of `e`

func (*ConfigSettingId) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ConfigSettingId) ValidEnum

func (e ConfigSettingId) ValidEnum(v int32) bool

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

type ConfigUpgradeSet

type ConfigUpgradeSet struct {
	UpdatedEntry []ConfigSettingEntry
}

ConfigUpgradeSet is an XDR Struct defines as:

struct ConfigUpgradeSet {
     ConfigSettingEntry updatedEntry<>;
 };

func (*ConfigUpgradeSet) DecodeFrom

func (s *ConfigUpgradeSet) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ConfigUpgradeSet) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ConfigUpgradeSet) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ConfigUpgradeSet) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ConfigUpgradeSetKey

type ConfigUpgradeSetKey struct {
	ContractId  Hash
	ContentHash Hash
}

ConfigUpgradeSetKey is an XDR Struct defines as:

struct ConfigUpgradeSetKey {
     Hash contractID;
     Hash contentHash;
 };

func (*ConfigUpgradeSetKey) DecodeFrom

func (s *ConfigUpgradeSetKey) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ConfigUpgradeSetKey) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ConfigUpgradeSetKey) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ConfigUpgradeSetKey) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ContractCodeCostInputs

type ContractCodeCostInputs struct {
	Ext               ExtensionPoint
	NInstructions     Uint32
	NFunctions        Uint32
	NGlobals          Uint32
	NTableEntries     Uint32
	NTypes            Uint32
	NDataSegments     Uint32
	NElemSegments     Uint32
	NImports          Uint32
	NExports          Uint32
	NDataSegmentBytes Uint32
}

ContractCodeCostInputs is an XDR Struct defines as:

struct ContractCodeCostInputs {
     ExtensionPoint ext;
     uint32 nInstructions;
     uint32 nFunctions;
     uint32 nGlobals;
     uint32 nTableEntries;
     uint32 nTypes;
     uint32 nDataSegments;
     uint32 nElemSegments;
     uint32 nImports;
     uint32 nExports;
     uint32 nDataSegmentBytes;
 };

func (*ContractCodeCostInputs) DecodeFrom

func (s *ContractCodeCostInputs) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ContractCodeCostInputs) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractCodeCostInputs) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ContractCodeCostInputs) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ContractCodeEntry

type ContractCodeEntry struct {
	Ext  ContractCodeEntryExt
	Hash Hash
	Code []byte
}

ContractCodeEntry is an XDR Struct defines as:

struct ContractCodeEntry {
     union switch (int v)
     {
         case 0:
             void;
         case 1:
             struct
             {
                 ExtensionPoint ext;
                 ContractCodeCostInputs costInputs;
             } v1;
     } ext;

     Hash hash;
     opaque code<>;
 };

func (*ContractCodeEntry) DecodeFrom

func (s *ContractCodeEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ContractCodeEntry) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractCodeEntry) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ContractCodeEntry) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ContractCodeEntryExt

type ContractCodeEntryExt struct {
	V  int32
	V1 *ContractCodeEntryV1
}

ContractCodeEntryExt is an XDR NestedUnion defines as:

union switch (int v)
     {
         case 0:
             void;
         case 1:
             struct
             {
                 ExtensionPoint ext;
                 ContractCodeCostInputs costInputs;
             } v1;
     }

func NewContractCodeEntryExt

func NewContractCodeEntryExt(v int32, value interface{}) (result ContractCodeEntryExt, err error)

NewContractCodeEntryExt creates a new ContractCodeEntryExt.

func (ContractCodeEntryExt) ArmForSwitch

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

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

func (*ContractCodeEntryExt) DecodeFrom

func (u *ContractCodeEntryExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ContractCodeEntryExt) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractCodeEntryExt) GetV1

func (u ContractCodeEntryExt) GetV1() (result ContractCodeEntryV1, ok bool)

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

func (ContractCodeEntryExt) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ContractCodeEntryExt) MustV1

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

func (ContractCodeEntryExt) SwitchFieldName

func (u ContractCodeEntryExt) SwitchFieldName() string

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

func (*ContractCodeEntryExt) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ContractCodeEntryV1

type ContractCodeEntryV1 struct {
	Ext        ExtensionPoint
	CostInputs ContractCodeCostInputs
}

ContractCodeEntryV1 is an XDR NestedStruct defines as:

struct
             {
                 ExtensionPoint ext;
                 ContractCodeCostInputs costInputs;
             }

func (*ContractCodeEntryV1) DecodeFrom

func (s *ContractCodeEntryV1) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ContractCodeEntryV1) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractCodeEntryV1) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ContractCodeEntryV1) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ContractCostParamEntry

type ContractCostParamEntry struct {
	Ext        ExtensionPoint
	ConstTerm  Int64
	LinearTerm Int64
}

ContractCostParamEntry is an XDR Struct defines as:

struct ContractCostParamEntry {
     // use `ext` to add more terms (e.g. higher order polynomials) in the future
     ExtensionPoint ext;

     int64 constTerm;
     int64 linearTerm;
 };

func (*ContractCostParamEntry) DecodeFrom

func (s *ContractCostParamEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ContractCostParamEntry) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractCostParamEntry) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ContractCostParamEntry) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ContractCostParams

type ContractCostParams []ContractCostParamEntry

ContractCostParams is an XDR Typedef defines as:

typedef ContractCostParamEntry ContractCostParams<CONTRACT_COST_COUNT_LIMIT>;

func (*ContractCostParams) DecodeFrom

func (s *ContractCostParams) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ContractCostParams) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractCostParams) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ContractCostParams) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ContractCostParams) XDRMaxSize

func (e ContractCostParams) XDRMaxSize() int

XDRMaxSize implements the Sized interface for ContractCostParams

type ContractCostType

type ContractCostType int32

ContractCostType is an XDR Enum defines as:

enum ContractCostType {
     // Cost of running 1 wasm instruction
     WasmInsnExec = 0,
     // Cost of allocating a slice of memory (in bytes)
     MemAlloc = 1,
     // Cost of copying a slice of bytes into a pre-allocated memory
     MemCpy = 2,
     // Cost of comparing two slices of memory
     MemCmp = 3,
     // Cost of a host function dispatch, not including the actual work done by
     // the function nor the cost of VM invocation machinary
     DispatchHostFunction = 4,
     // Cost of visiting a host object from the host object storage. Exists to
     // make sure some baseline cost coverage, i.e. repeatly visiting objects
     // by the guest will always incur some charges.
     VisitObject = 5,
     // Cost of serializing an xdr object to bytes
     ValSer = 6,
     // Cost of deserializing an xdr object from bytes
     ValDeser = 7,
     // Cost of computing the sha256 hash from bytes
     ComputeSha256Hash = 8,
     // Cost of computing the ed25519 pubkey from bytes
     ComputeEd25519PubKey = 9,
     // Cost of verifying ed25519 signature of a payload.
     VerifyEd25519Sig = 10,
     // Cost of instantiation a VM from wasm bytes code.
     VmInstantiation = 11,
     // Cost of instantiation a VM from a cached state.
     VmCachedInstantiation = 12,
     // Cost of invoking a function on the VM. If the function is a host function,
     // additional cost will be covered by `DispatchHostFunction`.
     InvokeVmFunction = 13,
     // Cost of computing a keccak256 hash from bytes.
     ComputeKeccak256Hash = 14,
     // Cost of decoding an ECDSA signature computed from a 256-bit prime modulus
     // curve (e.g. secp256k1 and secp256r1)
     DecodeEcdsaCurve256Sig = 15,
     // Cost of recovering an ECDSA secp256k1 key from a signature.
     RecoverEcdsaSecp256k1Key = 16,
     // Cost of int256 addition (`+`) and subtraction (`-`) operations
     Int256AddSub = 17,
     // Cost of int256 multiplication (`*`) operation
     Int256Mul = 18,
     // Cost of int256 division (`/`) operation
     Int256Div = 19,
     // Cost of int256 power (`exp`) operation
     Int256Pow = 20,
     // Cost of int256 shift (`shl`, `shr`) operation
     Int256Shift = 21,
     // Cost of drawing random bytes using a ChaCha20 PRNG
     ChaCha20DrawBytes = 22,

     // Cost of parsing wasm bytes that only encode instructions.
     ParseWasmInstructions = 23,
     // Cost of parsing a known number of wasm functions.
     ParseWasmFunctions = 24,
     // Cost of parsing a known number of wasm globals.
     ParseWasmGlobals = 25,
     // Cost of parsing a known number of wasm table entries.
     ParseWasmTableEntries = 26,
     // Cost of parsing a known number of wasm types.
     ParseWasmTypes = 27,
     // Cost of parsing a known number of wasm data segments.
     ParseWasmDataSegments = 28,
     // Cost of parsing a known number of wasm element segments.
     ParseWasmElemSegments = 29,
     // Cost of parsing a known number of wasm imports.
     ParseWasmImports = 30,
     // Cost of parsing a known number of wasm exports.
     ParseWasmExports = 31,
     // Cost of parsing a known number of data segment bytes.
     ParseWasmDataSegmentBytes = 32,

     // Cost of instantiating wasm bytes that only encode instructions.
     InstantiateWasmInstructions = 33,
     // Cost of instantiating a known number of wasm functions.
     InstantiateWasmFunctions = 34,
     // Cost of instantiating a known number of wasm globals.
     InstantiateWasmGlobals = 35,
     // Cost of instantiating a known number of wasm table entries.
     InstantiateWasmTableEntries = 36,
     // Cost of instantiating a known number of wasm types.
     InstantiateWasmTypes = 37,
     // Cost of instantiating a known number of wasm data segments.
     InstantiateWasmDataSegments = 38,
     // Cost of instantiating a known number of wasm element segments.
     InstantiateWasmElemSegments = 39,
     // Cost of instantiating a known number of wasm imports.
     InstantiateWasmImports = 40,
     // Cost of instantiating a known number of wasm exports.
     InstantiateWasmExports = 41,
     // Cost of instantiating a known number of data segment bytes.
     InstantiateWasmDataSegmentBytes = 42,

     // Cost of decoding a bytes array representing an uncompressed SEC-1 encoded
     // point on a 256-bit elliptic curve
     Sec1DecodePointUncompressed = 43,
     // Cost of verifying an ECDSA Secp256r1 signature
     VerifyEcdsaSecp256r1Sig = 44
 };
const (
	ContractCostTypeWasmInsnExec                    ContractCostType = 0
	ContractCostTypeMemAlloc                        ContractCostType = 1
	ContractCostTypeMemCpy                          ContractCostType = 2
	ContractCostTypeMemCmp                          ContractCostType = 3
	ContractCostTypeDispatchHostFunction            ContractCostType = 4
	ContractCostTypeVisitObject                     ContractCostType = 5
	ContractCostTypeValSer                          ContractCostType = 6
	ContractCostTypeValDeser                        ContractCostType = 7
	ContractCostTypeComputeSha256Hash               ContractCostType = 8
	ContractCostTypeComputeEd25519PubKey            ContractCostType = 9
	ContractCostTypeVerifyEd25519Sig                ContractCostType = 10
	ContractCostTypeVmInstantiation                 ContractCostType = 11
	ContractCostTypeVmCachedInstantiation           ContractCostType = 12
	ContractCostTypeInvokeVmFunction                ContractCostType = 13
	ContractCostTypeComputeKeccak256Hash            ContractCostType = 14
	ContractCostTypeDecodeEcdsaCurve256Sig          ContractCostType = 15
	ContractCostTypeRecoverEcdsaSecp256k1Key        ContractCostType = 16
	ContractCostTypeInt256AddSub                    ContractCostType = 17
	ContractCostTypeInt256Mul                       ContractCostType = 18
	ContractCostTypeInt256Div                       ContractCostType = 19
	ContractCostTypeInt256Pow                       ContractCostType = 20
	ContractCostTypeInt256Shift                     ContractCostType = 21
	ContractCostTypeChaCha20DrawBytes               ContractCostType = 22
	ContractCostTypeParseWasmInstructions           ContractCostType = 23
	ContractCostTypeParseWasmFunctions              ContractCostType = 24
	ContractCostTypeParseWasmGlobals                ContractCostType = 25
	ContractCostTypeParseWasmTableEntries           ContractCostType = 26
	ContractCostTypeParseWasmTypes                  ContractCostType = 27
	ContractCostTypeParseWasmDataSegments           ContractCostType = 28
	ContractCostTypeParseWasmElemSegments           ContractCostType = 29
	ContractCostTypeParseWasmImports                ContractCostType = 30
	ContractCostTypeParseWasmExports                ContractCostType = 31
	ContractCostTypeParseWasmDataSegmentBytes       ContractCostType = 32
	ContractCostTypeInstantiateWasmInstructions     ContractCostType = 33
	ContractCostTypeInstantiateWasmFunctions        ContractCostType = 34
	ContractCostTypeInstantiateWasmGlobals          ContractCostType = 35
	ContractCostTypeInstantiateWasmTableEntries     ContractCostType = 36
	ContractCostTypeInstantiateWasmTypes            ContractCostType = 37
	ContractCostTypeInstantiateWasmDataSegments     ContractCostType = 38
	ContractCostTypeInstantiateWasmElemSegments     ContractCostType = 39
	ContractCostTypeInstantiateWasmImports          ContractCostType = 40
	ContractCostTypeInstantiateWasmExports          ContractCostType = 41
	ContractCostTypeInstantiateWasmDataSegmentBytes ContractCostType = 42
	ContractCostTypeSec1DecodePointUncompressed     ContractCostType = 43
	ContractCostTypeVerifyEcdsaSecp256r1Sig         ContractCostType = 44
)

func (*ContractCostType) DecodeFrom

func (e *ContractCostType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ContractCostType) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractCostType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ContractCostType) String

func (e ContractCostType) String() string

String returns the name of `e`

func (*ContractCostType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ContractCostType) ValidEnum

func (e ContractCostType) ValidEnum(v int32) bool

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

type ContractDataDurability

type ContractDataDurability int32

ContractDataDurability is an XDR Enum defines as:

enum ContractDataDurability {
     TEMPORARY = 0,
     PERSISTENT = 1
 };
const (
	ContractDataDurabilityTemporary  ContractDataDurability = 0
	ContractDataDurabilityPersistent ContractDataDurability = 1
)

func (*ContractDataDurability) DecodeFrom

func (e *ContractDataDurability) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ContractDataDurability) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractDataDurability) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ContractDataDurability) String

func (e ContractDataDurability) String() string

String returns the name of `e`

func (*ContractDataDurability) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ContractDataDurability) ValidEnum

func (e ContractDataDurability) ValidEnum(v int32) bool

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

type ContractDataEntry

type ContractDataEntry struct {
	Ext        ExtensionPoint
	Contract   ScAddress
	Key        ScVal
	Durability ContractDataDurability
	Val        ScVal
}

ContractDataEntry is an XDR Struct defines as:

struct ContractDataEntry {
     ExtensionPoint ext;

     SCAddress contract;
     SCVal key;
     ContractDataDurability durability;
     SCVal val;
 };

func (*ContractDataEntry) DecodeFrom

func (s *ContractDataEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ContractDataEntry) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractDataEntry) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ContractDataEntry) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ContractEvent

type ContractEvent struct {
	Ext        ExtensionPoint
	ContractId *Hash
	Type       ContractEventType
	Body       ContractEventBody
}

ContractEvent is an XDR Struct defines as:

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

     Hash* contractID;
     ContractEventType type;

     union switch (int v)
     {
     case 0:
         struct
         {
             SCVal topics<>;
             SCVal data;
         } v0;
     }
     body;
 };

func (*ContractEvent) DecodeFrom

func (s *ContractEvent) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ContractEvent) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractEvent) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ContractEvent) String

func (ce ContractEvent) String() string

func (*ContractEvent) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ContractEventBody

type ContractEventBody struct {
	V  int32
	V0 *ContractEventV0
}

ContractEventBody is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         struct
         {
             SCVal topics<>;
             SCVal data;
         } v0;
     }

func NewContractEventBody

func NewContractEventBody(v int32, value interface{}) (result ContractEventBody, err error)

NewContractEventBody creates a new ContractEventBody.

func (ContractEventBody) ArmForSwitch

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

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

func (*ContractEventBody) DecodeFrom

func (u *ContractEventBody) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ContractEventBody) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractEventBody) GetV0

func (u ContractEventBody) GetV0() (result ContractEventV0, ok bool)

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

func (ContractEventBody) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ContractEventBody) MustV0

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

func (ContractEventBody) String

func (eb ContractEventBody) String() string

func (ContractEventBody) SwitchFieldName

func (u ContractEventBody) SwitchFieldName() string

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

func (*ContractEventBody) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ContractEventType

type ContractEventType int32

ContractEventType is an XDR Enum defines as:

enum ContractEventType
 {
     SYSTEM = 0,
     CONTRACT = 1,
     DIAGNOSTIC = 2
 };
const (
	ContractEventTypeSystem     ContractEventType = 0
	ContractEventTypeContract   ContractEventType = 1
	ContractEventTypeDiagnostic ContractEventType = 2
)

func (*ContractEventType) DecodeFrom

func (e *ContractEventType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ContractEventType) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractEventType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ContractEventType) String

func (e ContractEventType) String() string

String returns the name of `e`

func (*ContractEventType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ContractEventType) ValidEnum

func (e ContractEventType) ValidEnum(v int32) bool

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

type ContractEventV0

type ContractEventV0 struct {
	Topics []ScVal
	Data   ScVal
}

ContractEventV0 is an XDR NestedStruct defines as:

struct
         {
             SCVal topics<>;
             SCVal data;
         }

func (*ContractEventV0) DecodeFrom

func (s *ContractEventV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ContractEventV0) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractEventV0) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ContractEventV0) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ContractExecutable

type ContractExecutable struct {
	Type     ContractExecutableType
	WasmHash *Hash
}

ContractExecutable is an XDR Union defines as:

union ContractExecutable switch (ContractExecutableType type)
 {
 case CONTRACT_EXECUTABLE_WASM:
     Hash wasm_hash;
 case CONTRACT_EXECUTABLE_STELLAR_ASSET:
     void;
 };

func NewContractExecutable

func NewContractExecutable(aType ContractExecutableType, value interface{}) (result ContractExecutable, err error)

NewContractExecutable creates a new ContractExecutable.

func (ContractExecutable) ArmForSwitch

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

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

func (*ContractExecutable) DecodeFrom

func (u *ContractExecutable) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ContractExecutable) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractExecutable) Equals

func (ContractExecutable) GetWasmHash

func (u ContractExecutable) GetWasmHash() (result Hash, ok bool)

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

func (ContractExecutable) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ContractExecutable) MustWasmHash

func (u ContractExecutable) MustWasmHash() Hash

MustWasmHash retrieves the WasmHash value from the union, panicing if the value is not set.

func (ContractExecutable) SwitchFieldName

func (u ContractExecutable) SwitchFieldName() string

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

func (*ContractExecutable) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ContractExecutableType

type ContractExecutableType int32

ContractExecutableType is an XDR Enum defines as:

enum ContractExecutableType
 {
     CONTRACT_EXECUTABLE_WASM = 0,
     CONTRACT_EXECUTABLE_STELLAR_ASSET = 1
 };
const (
	ContractExecutableTypeContractExecutableWasm         ContractExecutableType = 0
	ContractExecutableTypeContractExecutableStellarAsset ContractExecutableType = 1
)

func (*ContractExecutableType) DecodeFrom

func (e *ContractExecutableType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ContractExecutableType) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractExecutableType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ContractExecutableType) String

func (e ContractExecutableType) String() string

String returns the name of `e`

func (*ContractExecutableType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ContractExecutableType) ValidEnum

func (e ContractExecutableType) ValidEnum(v int32) bool

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

type ContractIdPreimage

type ContractIdPreimage struct {
	Type        ContractIdPreimageType
	FromAddress *ContractIdPreimageFromAddress
	FromAsset   *Asset
}

ContractIdPreimage is an XDR Union defines as:

union ContractIDPreimage switch (ContractIDPreimageType type)
 {
 case CONTRACT_ID_PREIMAGE_FROM_ADDRESS:
     struct
     {
         SCAddress address;
         uint256 salt;
     } fromAddress;
 case CONTRACT_ID_PREIMAGE_FROM_ASSET:
     Asset fromAsset;
 };

func NewContractIdPreimage

func NewContractIdPreimage(aType ContractIdPreimageType, value interface{}) (result ContractIdPreimage, err error)

NewContractIdPreimage creates a new ContractIdPreimage.

func (ContractIdPreimage) ArmForSwitch

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

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

func (*ContractIdPreimage) DecodeFrom

func (u *ContractIdPreimage) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ContractIdPreimage) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractIdPreimage) GetFromAddress

func (u ContractIdPreimage) GetFromAddress() (result ContractIdPreimageFromAddress, ok bool)

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

func (ContractIdPreimage) GetFromAsset

func (u ContractIdPreimage) GetFromAsset() (result Asset, ok bool)

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

func (ContractIdPreimage) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ContractIdPreimage) MustFromAddress

MustFromAddress retrieves the FromAddress value from the union, panicing if the value is not set.

func (ContractIdPreimage) MustFromAsset

func (u ContractIdPreimage) MustFromAsset() Asset

MustFromAsset retrieves the FromAsset value from the union, panicing if the value is not set.

func (ContractIdPreimage) SwitchFieldName

func (u ContractIdPreimage) SwitchFieldName() string

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

func (*ContractIdPreimage) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ContractIdPreimageFromAddress

type ContractIdPreimageFromAddress struct {
	Address ScAddress
	Salt    Uint256
}

ContractIdPreimageFromAddress is an XDR NestedStruct defines as:

struct
     {
         SCAddress address;
         uint256 salt;
     }

func (*ContractIdPreimageFromAddress) DecodeFrom

func (s *ContractIdPreimageFromAddress) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ContractIdPreimageFromAddress) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractIdPreimageFromAddress) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*ContractIdPreimageFromAddress) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ContractIdPreimageType

type ContractIdPreimageType int32

ContractIdPreimageType is an XDR Enum defines as:

enum ContractIDPreimageType
 {
     CONTRACT_ID_PREIMAGE_FROM_ADDRESS = 0,
     CONTRACT_ID_PREIMAGE_FROM_ASSET = 1
 };
const (
	ContractIdPreimageTypeContractIdPreimageFromAddress ContractIdPreimageType = 0
	ContractIdPreimageTypeContractIdPreimageFromAsset   ContractIdPreimageType = 1
)

func (*ContractIdPreimageType) DecodeFrom

func (e *ContractIdPreimageType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ContractIdPreimageType) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (ContractIdPreimageType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (ContractIdPreimageType) String

func (e ContractIdPreimageType) String() string

String returns the name of `e`

func (*ContractIdPreimageType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ContractIdPreimageType) ValidEnum

func (e ContractIdPreimageType) ValidEnum(v int32) bool

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

type CreateAccountOp

type CreateAccountOp struct {
	Destination     AccountId
	StartingBalance Int64
}

CreateAccountOp is an XDR Struct defines as:

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

func (*CreateAccountOp) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*CreateAccountOp) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (CreateAccountOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*CreateAccountOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CreateAccountResult

type CreateAccountResult struct {
	Code CreateAccountResultCode
}

CreateAccountResult is an XDR Union defines as:

union CreateAccountResult switch (CreateAccountResultCode code)
 {
 case CREATE_ACCOUNT_SUCCESS:
     void;
 case CREATE_ACCOUNT_MALFORMED:
 case CREATE_ACCOUNT_UNDERFUNDED:
 case CREATE_ACCOUNT_LOW_RESERVE:
 case CREATE_ACCOUNT_ALREADY_EXIST:
     void;
 };

func NewCreateAccountResult

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

NewCreateAccountResult creates a new CreateAccountResult.

func (CreateAccountResult) ArmForSwitch

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

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

func (*CreateAccountResult) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (CreateAccountResult) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (CreateAccountResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (CreateAccountResult) SwitchFieldName

func (u CreateAccountResult) SwitchFieldName() string

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

func (*CreateAccountResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CreateAccountResultCode

type CreateAccountResultCode int32

CreateAccountResultCode is an XDR Enum defines as:

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

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

func (*CreateAccountResultCode) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (CreateAccountResultCode) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (CreateAccountResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (CreateAccountResultCode) String

func (e CreateAccountResultCode) String() string

String returns the name of `e`

func (*CreateAccountResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (CreateAccountResultCode) ValidEnum

func (e CreateAccountResultCode) ValidEnum(v int32) bool

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

type CreateClaimableBalanceOp

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

CreateClaimableBalanceOp is an XDR Struct defines as:

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

func (*CreateClaimableBalanceOp) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*CreateClaimableBalanceOp) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (CreateClaimableBalanceOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*CreateClaimableBalanceOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CreateClaimableBalanceResult

type CreateClaimableBalanceResult struct {
	Code      CreateClaimableBalanceResultCode
	BalanceId *ClaimableBalanceId
}

CreateClaimableBalanceResult is an XDR Union defines as:

union CreateClaimableBalanceResult switch (
     CreateClaimableBalanceResultCode code)
 {
 case CREATE_CLAIMABLE_BALANCE_SUCCESS:
     ClaimableBalanceID balanceID;
 case CREATE_CLAIMABLE_BALANCE_MALFORMED:
 case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE:
 case CREATE_CLAIMABLE_BALANCE_NO_TRUST:
 case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED:
 case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED:
     void;
 };

func NewCreateClaimableBalanceResult

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

NewCreateClaimableBalanceResult creates a new CreateClaimableBalanceResult.

func (CreateClaimableBalanceResult) ArmForSwitch

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

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

func (*CreateClaimableBalanceResult) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (CreateClaimableBalanceResult) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (CreateClaimableBalanceResult) GetBalanceId

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

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

func (CreateClaimableBalanceResult) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (CreateClaimableBalanceResult) MustBalanceId

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

func (CreateClaimableBalanceResult) SwitchFieldName

func (u CreateClaimableBalanceResult) SwitchFieldName() string

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

func (*CreateClaimableBalanceResult) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CreateClaimableBalanceResultCode

type CreateClaimableBalanceResultCode int32

CreateClaimableBalanceResultCode is an XDR Enum defines as:

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

func (*CreateClaimableBalanceResultCode) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (CreateClaimableBalanceResultCode) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (CreateClaimableBalanceResultCode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (CreateClaimableBalanceResultCode) String

String returns the name of `e`

func (*CreateClaimableBalanceResultCode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (CreateClaimableBalanceResultCode) ValidEnum

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

type CreateContractArgs

type CreateContractArgs struct {
	ContractIdPreimage ContractIdPreimage
	Executable         ContractExecutable
}

CreateContractArgs is an XDR Struct defines as:

struct CreateContractArgs
 {
     ContractIDPreimage contractIDPreimage;
     ContractExecutable executable;
 };

func (*CreateContractArgs) DecodeFrom

func (s *CreateContractArgs) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*CreateContractArgs) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (CreateContractArgs) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*CreateContractArgs) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CreatePassiveSellOfferOp

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

CreatePassiveSellOfferOp is an XDR Struct defines as:

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

func (*CreatePassiveSellOfferOp) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (*CreatePassiveSellOfferOp) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (CreatePassiveSellOfferOp) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (*CreatePassiveSellOfferOp) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type CryptoKeyType

type CryptoKeyType int32

CryptoKeyType is an XDR Enum defines as:

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

func (*CryptoKeyType) DecodeFrom

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

DecodeFrom decodes this value using the Decoder.

func (CryptoKeyType) EncodeTo

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

EncodeTo encodes this value using the Encoder.

func (CryptoKeyType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler.

func (CryptoKeyType) String

func (e CryptoKeyType) String() string

String returns the name of `e`

func (*CryptoKeyType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (CryptoKeyType) ValidEnum

func (e CryptoKeyType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for CryptoKeyType

type Curve25519Public

type Curve25519Public struct {
	Key [32]byte `xdrmaxsize:"32"`
}

Curve25519Public is an XDR Struct defines as:

struct Curve25519Public
 {
     opaque key[32];
 };

func (*Curve25519Public) DecodeFrom

func (s *Curve25519Public) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Curve25519Public) EncodeTo

func (s *Curve25519Public) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Curve25519Public) MarshalBinary

func (s Curve25519Public) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Curve25519Public) UnmarshalBinary

func (s *Curve25519Public) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Curve25519Secret

type Curve25519Secret struct {
	Key [32]byte `xdrmaxsize:"32"`
}

Curve25519Secret is an XDR Struct defines as:

struct Curve25519Secret
 {
     opaque key[32];
 };

func (*Curve25519Secret) DecodeFrom

func (s *Curve25519Secret) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Curve25519Secret) EncodeTo

func (s *Curve25519Secret) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Curve25519Secret) MarshalBinary

func (s Curve25519Secret) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Curve25519Secret) UnmarshalBinary

func (s *Curve25519Secret) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type DataEntry

type DataEntry struct {
	AccountId AccountId
	DataName  String64
	DataValue DataValue
	Ext       DataEntryExt
}

DataEntry is an XDR Struct defines as:

struct DataEntry
 {
     AccountID accountID; // account this data belongs to
     string64 dataName;
     DataValue dataValue;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*DataEntry) DecodeFrom

func (s *DataEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*DataEntry) EncodeTo

func (s *DataEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (DataEntry) MarshalBinary

func (s DataEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*DataEntry) UnmarshalBinary

func (s *DataEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type DataEntryExt

type DataEntryExt struct {
	V int32
}

DataEntryExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewDataEntryExt

func NewDataEntryExt(v int32, value interface{}) (result DataEntryExt, err error)

NewDataEntryExt creates a new DataEntryExt.

func (DataEntryExt) ArmForSwitch

func (u DataEntryExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of DataEntryExt

func (*DataEntryExt) DecodeFrom

func (u *DataEntryExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (DataEntryExt) EncodeTo

func (u DataEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (DataEntryExt) MarshalBinary

func (s DataEntryExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (DataEntryExt) SwitchFieldName

func (u DataEntryExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*DataEntryExt) UnmarshalBinary

func (s *DataEntryExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type DataValue

type DataValue []byte

DataValue is an XDR Typedef defines as:

typedef opaque DataValue<64>;

func (*DataValue) DecodeFrom

func (s *DataValue) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (DataValue) EncodeTo

func (s DataValue) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (DataValue) MarshalBinary

func (s DataValue) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*DataValue) UnmarshalBinary

func (s *DataValue) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (DataValue) XDRMaxSize

func (e DataValue) XDRMaxSize() int

XDRMaxSize implements the Sized interface for DataValue

type DecoderFrom

type DecoderFrom interface {
	// contains filtered or unexported methods
}

type DecoratedSignature

type DecoratedSignature struct {
	Hint      SignatureHint
	Signature Signature
}

DecoratedSignature is an XDR Struct defines as:

struct DecoratedSignature
 {
     SignatureHint hint;  // last 4 bytes of the public key, used as a hint
     Signature signature; // actual signature
 };

func NewDecoratedSignature

func NewDecoratedSignature(sig []byte, hint [4]byte) DecoratedSignature

NewDecoratedSignature constructs a decorated signature structure directly from the given signature and hint. Note that the hint should correspond to the signer that created the signature, but this helper cannot ensure that.

func NewDecoratedSignatureForPayload

func NewDecoratedSignatureForPayload(
	sig []byte, keyHint [4]byte, payload []byte,
) DecoratedSignature

NewDecoratedSignatureForPayload creates a decorated signature with a hint that uses the key hint, the last four bytes of signature, and the last four bytes of the input that got signed. Note that the signature should be the signature of the payload via the key being hinted, but this construction method cannot ensure that.

func (*DecoratedSignature) DecodeFrom

func (s *DecoratedSignature) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*DecoratedSignature) EncodeTo

func (s *DecoratedSignature) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (DecoratedSignature) MarshalBinary

func (s DecoratedSignature) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*DecoratedSignature) UnmarshalBinary

func (s *DecoratedSignature) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type DiagnosticEvent

type DiagnosticEvent struct {
	InSuccessfulContractCall bool
	Event                    ContractEvent
}

DiagnosticEvent is an XDR Struct defines as:

struct DiagnosticEvent
 {
     bool inSuccessfulContractCall;
     ContractEvent event;
 };

func (*DiagnosticEvent) DecodeFrom

func (s *DiagnosticEvent) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*DiagnosticEvent) EncodeTo

func (s *DiagnosticEvent) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (DiagnosticEvent) MarshalBinary

func (s DiagnosticEvent) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (DiagnosticEvent) String

func (de DiagnosticEvent) String() string

func (*DiagnosticEvent) UnmarshalBinary

func (s *DiagnosticEvent) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type DontHave

type DontHave struct {
	Type    MessageType
	ReqHash Uint256
}

DontHave is an XDR Struct defines as:

struct DontHave
 {
     MessageType type;
     uint256 reqHash;
 };

func (*DontHave) DecodeFrom

func (s *DontHave) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*DontHave) EncodeTo

func (s *DontHave) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (DontHave) MarshalBinary

func (s DontHave) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*DontHave) UnmarshalBinary

func (s *DontHave) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Duration

type Duration Uint64

Duration is an XDR Typedef defines as:

typedef uint64 Duration;

func (*Duration) DecodeFrom

func (s *Duration) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Duration) EncodeTo

func (s Duration) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Duration) MarshalBinary

func (s Duration) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Duration) UnmarshalBinary

func (s *Duration) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type EncoderTo

type EncoderTo interface {
	EncodeTo(e *xdr.Encoder) error
}

type EncodingBuffer

type EncodingBuffer struct {
	// contains filtered or unexported fields
}

EncodingBuffer reuses internal buffers between invocations to minimize allocations. For that reason, it is not thread-safe. It intentionally only allows EncodeTo method arguments, to guarantee high performance encoding.

func NewEncodingBuffer

func NewEncodingBuffer() *EncodingBuffer

func (*EncodingBuffer) LedgerKeyUnsafeMarshalBinaryCompress

func (e *EncodingBuffer) LedgerKeyUnsafeMarshalBinaryCompress(key LedgerKey) ([]byte, error)

LedgerKeyUnsafeMarshalBinaryCompress marshals LedgerKey to []byte but unlike MarshalBinary() it removes all unnecessary bytes, exploting the fact that XDR is padding data to 4 bytes in union discriminants etc. It's primary use is in ingest/io.StateReader that keep LedgerKeys in memory so this function decrease memory requirements.

Warning, do not use UnmarshalBinary() on data encoded using this method!

Optimizations: - Writes a single byte for union discriminants vs 4 bytes. - Removes type and code padding for Asset. - Removes padding for AccountIds

func (*EncodingBuffer) MarshalBase64

func (e *EncodingBuffer) MarshalBase64(encodable EncoderTo) (string, error)

func (*EncodingBuffer) MarshalBinary

func (e *EncodingBuffer) MarshalBinary(encodable EncoderTo) ([]byte, error)

func (*EncodingBuffer) MarshalHex

func (e *EncodingBuffer) MarshalHex(encodable EncoderTo) (string, error)

func (*EncodingBuffer) UnsafeMarshalBase64

func (e *EncodingBuffer) UnsafeMarshalBase64(encodable EncoderTo) ([]byte, error)

UnsafeMarshalBase64 is the base64 version of UnsafeMarshalBinary

func (*EncodingBuffer) UnsafeMarshalBinary

func (e *EncodingBuffer) UnsafeMarshalBinary(encodable EncoderTo) ([]byte, error)

UnsafeMarshalBinary marshals the input XDR binary, returning a slice pointing to the internal buffer. Handled with care this improveds performance since copying is not required. Subsequent calls to marshaling methods will overwrite the returned buffer.

func (*EncodingBuffer) UnsafeMarshalHex

func (e *EncodingBuffer) UnsafeMarshalHex(encodable EncoderTo) ([]byte, error)

UnsafeMarshalHex is the hex version of UnsafeMarshalBinary

type EncryptedBody

type EncryptedBody []byte

EncryptedBody is an XDR Typedef defines as:

typedef opaque EncryptedBody<64000>;

func (*EncryptedBody) DecodeFrom

func (s *EncryptedBody) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (EncryptedBody) EncodeTo

func (s EncryptedBody) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (EncryptedBody) MarshalBinary

func (s EncryptedBody) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*EncryptedBody) UnmarshalBinary

func (s *EncryptedBody) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (EncryptedBody) XDRMaxSize

func (e EncryptedBody) XDRMaxSize() int

XDRMaxSize implements the Sized interface for EncryptedBody

type EndSponsoringFutureReservesResult

type EndSponsoringFutureReservesResult struct {
	Code EndSponsoringFutureReservesResultCode
}

EndSponsoringFutureReservesResult is an XDR Union defines as:

union EndSponsoringFutureReservesResult switch (
     EndSponsoringFutureReservesResultCode code)
 {
 case END_SPONSORING_FUTURE_RESERVES_SUCCESS:
     void;
 case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED:
     void;
 };

func NewEndSponsoringFutureReservesResult

func NewEndSponsoringFutureReservesResult(code EndSponsoringFutureReservesResultCode, value interface{}) (result EndSponsoringFutureReservesResult, err error)

NewEndSponsoringFutureReservesResult creates a new EndSponsoringFutureReservesResult.

func (EndSponsoringFutureReservesResult) ArmForSwitch

func (u EndSponsoringFutureReservesResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of EndSponsoringFutureReservesResult

func (*EndSponsoringFutureReservesResult) DecodeFrom

func (u *EndSponsoringFutureReservesResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (EndSponsoringFutureReservesResult) EncodeTo

func (u EndSponsoringFutureReservesResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (EndSponsoringFutureReservesResult) MarshalBinary

func (s EndSponsoringFutureReservesResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (EndSponsoringFutureReservesResult) SwitchFieldName

func (u EndSponsoringFutureReservesResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*EndSponsoringFutureReservesResult) UnmarshalBinary

func (s *EndSponsoringFutureReservesResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type EndSponsoringFutureReservesResultCode

type EndSponsoringFutureReservesResultCode int32

EndSponsoringFutureReservesResultCode is an XDR Enum defines as:

enum EndSponsoringFutureReservesResultCode
 {
     // codes considered as "success" for the operation
     END_SPONSORING_FUTURE_RESERVES_SUCCESS = 0,

     // codes considered as "failure" for the operation
     END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED = -1
 };
const (
	EndSponsoringFutureReservesResultCodeEndSponsoringFutureReservesSuccess      EndSponsoringFutureReservesResultCode = 0
	EndSponsoringFutureReservesResultCodeEndSponsoringFutureReservesNotSponsored EndSponsoringFutureReservesResultCode = -1
)

func (*EndSponsoringFutureReservesResultCode) DecodeFrom

func (e *EndSponsoringFutureReservesResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (EndSponsoringFutureReservesResultCode) EncodeTo

func (e EndSponsoringFutureReservesResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (EndSponsoringFutureReservesResultCode) MarshalBinary

func (s EndSponsoringFutureReservesResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (EndSponsoringFutureReservesResultCode) String

String returns the name of `e`

func (*EndSponsoringFutureReservesResultCode) UnmarshalBinary

func (s *EndSponsoringFutureReservesResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (EndSponsoringFutureReservesResultCode) ValidEnum

ValidEnum validates a proposed value for this enum. Implements the Enum interface for EndSponsoringFutureReservesResultCode

type EnvelopeType

type EnvelopeType int32

EnvelopeType is an XDR Enum defines as:

enum EnvelopeType
 {
     ENVELOPE_TYPE_TX_V0 = 0,
     ENVELOPE_TYPE_SCP = 1,
     ENVELOPE_TYPE_TX = 2,
     ENVELOPE_TYPE_AUTH = 3,
     ENVELOPE_TYPE_SCPVALUE = 4,
     ENVELOPE_TYPE_TX_FEE_BUMP = 5,
     ENVELOPE_TYPE_OP_ID = 6,
     ENVELOPE_TYPE_POOL_REVOKE_OP_ID = 7,
     ENVELOPE_TYPE_CONTRACT_ID = 8,
     ENVELOPE_TYPE_SOROBAN_AUTHORIZATION = 9
 };
const (
	EnvelopeTypeEnvelopeTypeTxV0                 EnvelopeType = 0
	EnvelopeTypeEnvelopeTypeScp                  EnvelopeType = 1
	EnvelopeTypeEnvelopeTypeTx                   EnvelopeType = 2
	EnvelopeTypeEnvelopeTypeAuth                 EnvelopeType = 3
	EnvelopeTypeEnvelopeTypeScpvalue             EnvelopeType = 4
	EnvelopeTypeEnvelopeTypeTxFeeBump            EnvelopeType = 5
	EnvelopeTypeEnvelopeTypeOpId                 EnvelopeType = 6
	EnvelopeTypeEnvelopeTypePoolRevokeOpId       EnvelopeType = 7
	EnvelopeTypeEnvelopeTypeContractId           EnvelopeType = 8
	EnvelopeTypeEnvelopeTypeSorobanAuthorization EnvelopeType = 9
)

func (*EnvelopeType) DecodeFrom

func (e *EnvelopeType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (EnvelopeType) EncodeTo

func (e EnvelopeType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (EnvelopeType) MarshalBinary

func (s EnvelopeType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (EnvelopeType) String

func (e EnvelopeType) String() string

String returns the name of `e`

func (*EnvelopeType) UnmarshalBinary

func (s *EnvelopeType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (EnvelopeType) ValidEnum

func (e EnvelopeType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for EnvelopeType

type Error

type Error struct {
	Code ErrorCode
	Msg  string `xdrmaxsize:"100"`
}

Error is an XDR Struct defines as:

struct Error
 {
     ErrorCode code;
     string msg<100>;
 };

func (*Error) DecodeFrom

func (s *Error) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Error) EncodeTo

func (s *Error) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Error) MarshalBinary

func (s Error) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Error) UnmarshalBinary

func (s *Error) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ErrorCode

type ErrorCode int32

ErrorCode is an XDR Enum defines as:

enum ErrorCode
 {
     ERR_MISC = 0, // Unspecific error
     ERR_DATA = 1, // Malformed data
     ERR_CONF = 2, // Misconfiguration error
     ERR_AUTH = 3, // Authentication failure
     ERR_LOAD = 4  // System overloaded
 };
const (
	ErrorCodeErrMisc ErrorCode = 0
	ErrorCodeErrData ErrorCode = 1
	ErrorCodeErrConf ErrorCode = 2
	ErrorCodeErrAuth ErrorCode = 3
	ErrorCodeErrLoad ErrorCode = 4
)

func (*ErrorCode) DecodeFrom

func (e *ErrorCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ErrorCode) EncodeTo

func (e ErrorCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ErrorCode) MarshalBinary

func (s ErrorCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ErrorCode) String

func (e ErrorCode) String() string

String returns the name of `e`

func (*ErrorCode) UnmarshalBinary

func (s *ErrorCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ErrorCode) ValidEnum

func (e ErrorCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ErrorCode

type EvictionIterator

type EvictionIterator struct {
	BucketListLevel  Uint32
	IsCurrBucket     bool
	BucketFileOffset Uint64
}

EvictionIterator is an XDR Struct defines as:

struct EvictionIterator {
     uint32 bucketListLevel;
     bool isCurrBucket;
     uint64 bucketFileOffset;
 };

func (*EvictionIterator) DecodeFrom

func (s *EvictionIterator) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*EvictionIterator) EncodeTo

func (s *EvictionIterator) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (EvictionIterator) MarshalBinary

func (s EvictionIterator) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*EvictionIterator) UnmarshalBinary

func (s *EvictionIterator) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ExtendFootprintTtlOp

type ExtendFootprintTtlOp struct {
	Ext      ExtensionPoint
	ExtendTo Uint32
}

ExtendFootprintTtlOp is an XDR Struct defines as:

struct ExtendFootprintTTLOp
 {
     ExtensionPoint ext;
     uint32 extendTo;
 };

func (*ExtendFootprintTtlOp) DecodeFrom

func (s *ExtendFootprintTtlOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ExtendFootprintTtlOp) EncodeTo

func (s *ExtendFootprintTtlOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ExtendFootprintTtlOp) MarshalBinary

func (s ExtendFootprintTtlOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ExtendFootprintTtlOp) UnmarshalBinary

func (s *ExtendFootprintTtlOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ExtendFootprintTtlResult

type ExtendFootprintTtlResult struct {
	Code ExtendFootprintTtlResultCode
}

ExtendFootprintTtlResult is an XDR Union defines as:

union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code)
 {
 case EXTEND_FOOTPRINT_TTL_SUCCESS:
     void;
 case EXTEND_FOOTPRINT_TTL_MALFORMED:
 case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED:
 case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE:
     void;
 };

func NewExtendFootprintTtlResult

func NewExtendFootprintTtlResult(code ExtendFootprintTtlResultCode, value interface{}) (result ExtendFootprintTtlResult, err error)

NewExtendFootprintTtlResult creates a new ExtendFootprintTtlResult.

func (ExtendFootprintTtlResult) ArmForSwitch

func (u ExtendFootprintTtlResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ExtendFootprintTtlResult

func (*ExtendFootprintTtlResult) DecodeFrom

func (u *ExtendFootprintTtlResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ExtendFootprintTtlResult) EncodeTo

func (u ExtendFootprintTtlResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ExtendFootprintTtlResult) MarshalBinary

func (s ExtendFootprintTtlResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ExtendFootprintTtlResult) SwitchFieldName

func (u ExtendFootprintTtlResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ExtendFootprintTtlResult) UnmarshalBinary

func (s *ExtendFootprintTtlResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ExtendFootprintTtlResultCode

type ExtendFootprintTtlResultCode int32

ExtendFootprintTtlResultCode is an XDR Enum defines as:

enum ExtendFootprintTTLResultCode
 {
     // codes considered as "success" for the operation
     EXTEND_FOOTPRINT_TTL_SUCCESS = 0,

     // codes considered as "failure" for the operation
     EXTEND_FOOTPRINT_TTL_MALFORMED = -1,
     EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED = -2,
     EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE = -3
 };
const (
	ExtendFootprintTtlResultCodeExtendFootprintTtlSuccess                   ExtendFootprintTtlResultCode = 0
	ExtendFootprintTtlResultCodeExtendFootprintTtlMalformed                 ExtendFootprintTtlResultCode = -1
	ExtendFootprintTtlResultCodeExtendFootprintTtlResourceLimitExceeded     ExtendFootprintTtlResultCode = -2
	ExtendFootprintTtlResultCodeExtendFootprintTtlInsufficientRefundableFee ExtendFootprintTtlResultCode = -3
)

func (*ExtendFootprintTtlResultCode) DecodeFrom

func (e *ExtendFootprintTtlResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ExtendFootprintTtlResultCode) EncodeTo

func (e ExtendFootprintTtlResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ExtendFootprintTtlResultCode) MarshalBinary

func (s ExtendFootprintTtlResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ExtendFootprintTtlResultCode) String

String returns the name of `e`

func (*ExtendFootprintTtlResultCode) UnmarshalBinary

func (s *ExtendFootprintTtlResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ExtendFootprintTtlResultCode) ValidEnum

func (e ExtendFootprintTtlResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ExtendFootprintTtlResultCode

type ExtensionPoint

type ExtensionPoint struct {
	V int32
}

ExtensionPoint is an XDR Union defines as:

union ExtensionPoint switch (int v)
 {
 case 0:
     void;
 };

func NewExtensionPoint

func NewExtensionPoint(v int32, value interface{}) (result ExtensionPoint, err error)

NewExtensionPoint creates a new ExtensionPoint.

func (ExtensionPoint) ArmForSwitch

func (u ExtensionPoint) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ExtensionPoint

func (*ExtensionPoint) DecodeFrom

func (u *ExtensionPoint) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ExtensionPoint) EncodeTo

func (u ExtensionPoint) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ExtensionPoint) MarshalBinary

func (s ExtensionPoint) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ExtensionPoint) SwitchFieldName

func (u ExtensionPoint) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ExtensionPoint) UnmarshalBinary

func (s *ExtensionPoint) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type FeeBumpTransaction

type FeeBumpTransaction struct {
	FeeSource MuxedAccount
	Fee       Int64
	InnerTx   FeeBumpTransactionInnerTx
	Ext       FeeBumpTransactionExt
}

FeeBumpTransaction is an XDR Struct defines as:

struct FeeBumpTransaction
 {
     MuxedAccount feeSource;
     int64 fee;
     union switch (EnvelopeType type)
     {
     case ENVELOPE_TYPE_TX:
         TransactionV1Envelope v1;
     }
     innerTx;
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*FeeBumpTransaction) DecodeFrom

func (s *FeeBumpTransaction) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*FeeBumpTransaction) EncodeTo

func (s *FeeBumpTransaction) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (FeeBumpTransaction) MarshalBinary

func (s FeeBumpTransaction) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*FeeBumpTransaction) UnmarshalBinary

func (s *FeeBumpTransaction) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type FeeBumpTransactionEnvelope

type FeeBumpTransactionEnvelope struct {
	Tx         FeeBumpTransaction
	Signatures []DecoratedSignature `xdrmaxsize:"20"`
}

FeeBumpTransactionEnvelope is an XDR Struct defines as:

struct FeeBumpTransactionEnvelope
 {
     FeeBumpTransaction tx;
     /* Each decorated signature is a signature over the SHA256 hash of
      * a TransactionSignaturePayload */
     DecoratedSignature signatures<20>;
 };

func (*FeeBumpTransactionEnvelope) DecodeFrom

func (s *FeeBumpTransactionEnvelope) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*FeeBumpTransactionEnvelope) EncodeTo

func (s *FeeBumpTransactionEnvelope) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (FeeBumpTransactionEnvelope) MarshalBinary

func (s FeeBumpTransactionEnvelope) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*FeeBumpTransactionEnvelope) UnmarshalBinary

func (s *FeeBumpTransactionEnvelope) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type FeeBumpTransactionExt

type FeeBumpTransactionExt struct {
	V int32
}

FeeBumpTransactionExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewFeeBumpTransactionExt

func NewFeeBumpTransactionExt(v int32, value interface{}) (result FeeBumpTransactionExt, err error)

NewFeeBumpTransactionExt creates a new FeeBumpTransactionExt.

func (FeeBumpTransactionExt) ArmForSwitch

func (u FeeBumpTransactionExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of FeeBumpTransactionExt

func (*FeeBumpTransactionExt) DecodeFrom

func (u *FeeBumpTransactionExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (FeeBumpTransactionExt) EncodeTo

func (u FeeBumpTransactionExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (FeeBumpTransactionExt) MarshalBinary

func (s FeeBumpTransactionExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (FeeBumpTransactionExt) SwitchFieldName

func (u FeeBumpTransactionExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*FeeBumpTransactionExt) UnmarshalBinary

func (s *FeeBumpTransactionExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type FeeBumpTransactionInnerTx

type FeeBumpTransactionInnerTx struct {
	Type EnvelopeType
	V1   *TransactionV1Envelope
}

FeeBumpTransactionInnerTx is an XDR NestedUnion defines as:

union switch (EnvelopeType type)
     {
     case ENVELOPE_TYPE_TX:
         TransactionV1Envelope v1;
     }

func NewFeeBumpTransactionInnerTx

func NewFeeBumpTransactionInnerTx(aType EnvelopeType, value interface{}) (result FeeBumpTransactionInnerTx, err error)

NewFeeBumpTransactionInnerTx creates a new FeeBumpTransactionInnerTx.

func (FeeBumpTransactionInnerTx) ArmForSwitch

func (u FeeBumpTransactionInnerTx) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of FeeBumpTransactionInnerTx

func (*FeeBumpTransactionInnerTx) DecodeFrom

func (u *FeeBumpTransactionInnerTx) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (FeeBumpTransactionInnerTx) EncodeTo

func (u FeeBumpTransactionInnerTx) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (FeeBumpTransactionInnerTx) GetV1

func (u FeeBumpTransactionInnerTx) GetV1() (result TransactionV1Envelope, ok bool)

GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.

func (FeeBumpTransactionInnerTx) GoString

func (e FeeBumpTransactionInnerTx) GoString() string

GoString implements fmt.GoStringer.

func (FeeBumpTransactionInnerTx) MarshalBinary

func (s FeeBumpTransactionInnerTx) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (FeeBumpTransactionInnerTx) MustV1

MustV1 retrieves the V1 value from the union, panicing if the value is not set.

func (FeeBumpTransactionInnerTx) SwitchFieldName

func (u FeeBumpTransactionInnerTx) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*FeeBumpTransactionInnerTx) UnmarshalBinary

func (s *FeeBumpTransactionInnerTx) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type FloodAdvert

type FloodAdvert struct {
	TxHashes TxAdvertVector
}

FloodAdvert is an XDR Struct defines as:

struct FloodAdvert
 {
     TxAdvertVector txHashes;
 };

func (*FloodAdvert) DecodeFrom

func (s *FloodAdvert) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*FloodAdvert) EncodeTo

func (s *FloodAdvert) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (FloodAdvert) MarshalBinary

func (s FloodAdvert) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*FloodAdvert) UnmarshalBinary

func (s *FloodAdvert) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type FloodDemand

type FloodDemand struct {
	TxHashes TxDemandVector
}

FloodDemand is an XDR Struct defines as:

struct FloodDemand
 {
     TxDemandVector txHashes;
 };

func (*FloodDemand) DecodeFrom

func (s *FloodDemand) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*FloodDemand) EncodeTo

func (s *FloodDemand) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (FloodDemand) MarshalBinary

func (s FloodDemand) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*FloodDemand) UnmarshalBinary

func (s *FloodDemand) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type GeneralizedTransactionSet

type GeneralizedTransactionSet struct {
	V       int32
	V1TxSet *TransactionSetV1
}

GeneralizedTransactionSet is an XDR Union defines as:

union GeneralizedTransactionSet switch (int v)
 {
 // We consider the legacy TransactionSet to be v0.
 case 1:
     TransactionSetV1 v1TxSet;
 };

func NewGeneralizedTransactionSet

func NewGeneralizedTransactionSet(v int32, value interface{}) (result GeneralizedTransactionSet, err error)

NewGeneralizedTransactionSet creates a new GeneralizedTransactionSet.

func (GeneralizedTransactionSet) ArmForSwitch

func (u GeneralizedTransactionSet) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of GeneralizedTransactionSet

func (*GeneralizedTransactionSet) DecodeFrom

func (u *GeneralizedTransactionSet) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (GeneralizedTransactionSet) EncodeTo

func (u GeneralizedTransactionSet) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (GeneralizedTransactionSet) GetV1TxSet

func (u GeneralizedTransactionSet) GetV1TxSet() (result TransactionSetV1, ok bool)

GetV1TxSet retrieves the V1TxSet value from the union, returning ok if the union's switch indicated the value is valid.

func (GeneralizedTransactionSet) MarshalBinary

func (s GeneralizedTransactionSet) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (GeneralizedTransactionSet) MustV1TxSet

MustV1TxSet retrieves the V1TxSet value from the union, panicing if the value is not set.

func (GeneralizedTransactionSet) SwitchFieldName

func (u GeneralizedTransactionSet) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*GeneralizedTransactionSet) UnmarshalBinary

func (s *GeneralizedTransactionSet) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Hash

type Hash [32]byte

Hash is an XDR Typedef defines as:

typedef opaque Hash[32];

func (*Hash) DecodeFrom

func (s *Hash) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Hash) EncodeTo

func (s *Hash) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Hash) Equals

func (s Hash) Equals(o Hash) bool

func (Hash) HexString

func (h Hash) HexString() string

func (Hash) MarshalBinary

func (s Hash) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Hash) Scan

func (t *Hash) Scan(src any) error

Scan reads from a src into an xdr.Hash

func (*Hash) UnmarshalBinary

func (s *Hash) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (Hash) XDRMaxSize

func (e Hash) XDRMaxSize() int

XDRMaxSize implements the Sized interface for Hash

type HashIdPreimage

type HashIdPreimage struct {
	Type                 EnvelopeType
	OperationId          *HashIdPreimageOperationId
	RevokeId             *HashIdPreimageRevokeId
	ContractId           *HashIdPreimageContractId
	SorobanAuthorization *HashIdPreimageSorobanAuthorization
}

HashIdPreimage is an XDR Union defines as:

union HashIDPreimage switch (EnvelopeType type)
 {
 case ENVELOPE_TYPE_OP_ID:
     struct
     {
         AccountID sourceAccount;
         SequenceNumber seqNum;
         uint32 opNum;
     } operationID;
 case ENVELOPE_TYPE_POOL_REVOKE_OP_ID:
     struct
     {
         AccountID sourceAccount;
         SequenceNumber seqNum;
         uint32 opNum;
         PoolID liquidityPoolID;
         Asset asset;
     } revokeID;
 case ENVELOPE_TYPE_CONTRACT_ID:
     struct
     {
         Hash networkID;
         ContractIDPreimage contractIDPreimage;
     } contractID;
 case ENVELOPE_TYPE_SOROBAN_AUTHORIZATION:
     struct
     {
         Hash networkID;
         int64 nonce;
         uint32 signatureExpirationLedger;
         SorobanAuthorizedInvocation invocation;
     } sorobanAuthorization;
 };

func NewHashIdPreimage

func NewHashIdPreimage(aType EnvelopeType, value interface{}) (result HashIdPreimage, err error)

NewHashIdPreimage creates a new HashIdPreimage.

func (HashIdPreimage) ArmForSwitch

func (u HashIdPreimage) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of HashIdPreimage

func (*HashIdPreimage) DecodeFrom

func (u *HashIdPreimage) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (HashIdPreimage) EncodeTo

func (u HashIdPreimage) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (HashIdPreimage) GetContractId

func (u HashIdPreimage) GetContractId() (result HashIdPreimageContractId, ok bool)

GetContractId retrieves the ContractId value from the union, returning ok if the union's switch indicated the value is valid.

func (HashIdPreimage) GetOperationId

func (u HashIdPreimage) GetOperationId() (result HashIdPreimageOperationId, ok bool)

GetOperationId retrieves the OperationId value from the union, returning ok if the union's switch indicated the value is valid.

func (HashIdPreimage) GetRevokeId

func (u HashIdPreimage) GetRevokeId() (result HashIdPreimageRevokeId, ok bool)

GetRevokeId retrieves the RevokeId value from the union, returning ok if the union's switch indicated the value is valid.

func (HashIdPreimage) GetSorobanAuthorization

func (u HashIdPreimage) GetSorobanAuthorization() (result HashIdPreimageSorobanAuthorization, ok bool)

GetSorobanAuthorization retrieves the SorobanAuthorization value from the union, returning ok if the union's switch indicated the value is valid.

func (HashIdPreimage) MarshalBinary

func (s HashIdPreimage) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (HashIdPreimage) MustContractId

func (u HashIdPreimage) MustContractId() HashIdPreimageContractId

MustContractId retrieves the ContractId value from the union, panicing if the value is not set.

func (HashIdPreimage) MustOperationId

func (u HashIdPreimage) MustOperationId() HashIdPreimageOperationId

MustOperationId retrieves the OperationId value from the union, panicing if the value is not set.

func (HashIdPreimage) MustRevokeId

func (u HashIdPreimage) MustRevokeId() HashIdPreimageRevokeId

MustRevokeId retrieves the RevokeId value from the union, panicing if the value is not set.

func (HashIdPreimage) MustSorobanAuthorization

func (u HashIdPreimage) MustSorobanAuthorization() HashIdPreimageSorobanAuthorization

MustSorobanAuthorization retrieves the SorobanAuthorization value from the union, panicing if the value is not set.

func (HashIdPreimage) SwitchFieldName

func (u HashIdPreimage) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*HashIdPreimage) UnmarshalBinary

func (s *HashIdPreimage) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type HashIdPreimageContractId

type HashIdPreimageContractId struct {
	NetworkId          Hash
	ContractIdPreimage ContractIdPreimage
}

HashIdPreimageContractId is an XDR NestedStruct defines as:

struct
     {
         Hash networkID;
         ContractIDPreimage contractIDPreimage;
     }

func (*HashIdPreimageContractId) DecodeFrom

func (s *HashIdPreimageContractId) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*HashIdPreimageContractId) EncodeTo

func (s *HashIdPreimageContractId) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (HashIdPreimageContractId) MarshalBinary

func (s HashIdPreimageContractId) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*HashIdPreimageContractId) UnmarshalBinary

func (s *HashIdPreimageContractId) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type HashIdPreimageOperationId

type HashIdPreimageOperationId struct {
	SourceAccount AccountId
	SeqNum        SequenceNumber
	OpNum         Uint32
}

HashIdPreimageOperationId is an XDR NestedStruct defines as:

struct
     {
         AccountID sourceAccount;
         SequenceNumber seqNum;
         uint32 opNum;
     }

func (*HashIdPreimageOperationId) DecodeFrom

func (s *HashIdPreimageOperationId) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*HashIdPreimageOperationId) EncodeTo

func (s *HashIdPreimageOperationId) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (HashIdPreimageOperationId) MarshalBinary

func (s HashIdPreimageOperationId) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*HashIdPreimageOperationId) UnmarshalBinary

func (s *HashIdPreimageOperationId) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type HashIdPreimageRevokeId

type HashIdPreimageRevokeId struct {
	SourceAccount   AccountId
	SeqNum          SequenceNumber
	OpNum           Uint32
	LiquidityPoolId PoolId
	Asset           Asset
}

HashIdPreimageRevokeId is an XDR NestedStruct defines as:

struct
     {
         AccountID sourceAccount;
         SequenceNumber seqNum;
         uint32 opNum;
         PoolID liquidityPoolID;
         Asset asset;
     }

func (*HashIdPreimageRevokeId) DecodeFrom

func (s *HashIdPreimageRevokeId) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*HashIdPreimageRevokeId) EncodeTo

func (s *HashIdPreimageRevokeId) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (HashIdPreimageRevokeId) MarshalBinary

func (s HashIdPreimageRevokeId) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*HashIdPreimageRevokeId) UnmarshalBinary

func (s *HashIdPreimageRevokeId) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type HashIdPreimageSorobanAuthorization

type HashIdPreimageSorobanAuthorization struct {
	NetworkId                 Hash
	Nonce                     Int64
	SignatureExpirationLedger Uint32
	Invocation                SorobanAuthorizedInvocation
}

HashIdPreimageSorobanAuthorization is an XDR NestedStruct defines as:

struct
     {
         Hash networkID;
         int64 nonce;
         uint32 signatureExpirationLedger;
         SorobanAuthorizedInvocation invocation;
     }

func (*HashIdPreimageSorobanAuthorization) DecodeFrom

func (s *HashIdPreimageSorobanAuthorization) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*HashIdPreimageSorobanAuthorization) EncodeTo

func (s *HashIdPreimageSorobanAuthorization) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (HashIdPreimageSorobanAuthorization) MarshalBinary

func (s HashIdPreimageSorobanAuthorization) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*HashIdPreimageSorobanAuthorization) UnmarshalBinary

func (s *HashIdPreimageSorobanAuthorization) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Hello

type Hello struct {
	LedgerVersion     Uint32
	OverlayVersion    Uint32
	OverlayMinVersion Uint32
	NetworkId         Hash
	VersionStr        string `xdrmaxsize:"100"`
	ListeningPort     int32
	PeerId            NodeId
	Cert              AuthCert
	Nonce             Uint256
}

Hello is an XDR Struct defines as:

struct Hello
 {
     uint32 ledgerVersion;
     uint32 overlayVersion;
     uint32 overlayMinVersion;
     Hash networkID;
     string versionStr<100>;
     int listeningPort;
     NodeID peerID;
     AuthCert cert;
     uint256 nonce;
 };

func (*Hello) DecodeFrom

func (s *Hello) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Hello) EncodeTo

func (s *Hello) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Hello) MarshalBinary

func (s Hello) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Hello) UnmarshalBinary

func (s *Hello) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type HmacSha256Key

type HmacSha256Key struct {
	Key [32]byte `xdrmaxsize:"32"`
}

HmacSha256Key is an XDR Struct defines as:

struct HmacSha256Key
 {
     opaque key[32];
 };

func (*HmacSha256Key) DecodeFrom

func (s *HmacSha256Key) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*HmacSha256Key) EncodeTo

func (s *HmacSha256Key) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (HmacSha256Key) MarshalBinary

func (s HmacSha256Key) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*HmacSha256Key) UnmarshalBinary

func (s *HmacSha256Key) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type HmacSha256Mac

type HmacSha256Mac struct {
	Mac [32]byte `xdrmaxsize:"32"`
}

HmacSha256Mac is an XDR Struct defines as:

struct HmacSha256Mac
 {
     opaque mac[32];
 };

func (*HmacSha256Mac) DecodeFrom

func (s *HmacSha256Mac) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*HmacSha256Mac) EncodeTo

func (s *HmacSha256Mac) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (HmacSha256Mac) MarshalBinary

func (s HmacSha256Mac) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*HmacSha256Mac) UnmarshalBinary

func (s *HmacSha256Mac) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type HostFunction

type HostFunction struct {
	Type           HostFunctionType
	InvokeContract *InvokeContractArgs
	CreateContract *CreateContractArgs
	Wasm           *[]byte
}

HostFunction is an XDR Union defines as:

union HostFunction switch (HostFunctionType type)
 {
 case HOST_FUNCTION_TYPE_INVOKE_CONTRACT:
     InvokeContractArgs invokeContract;
 case HOST_FUNCTION_TYPE_CREATE_CONTRACT:
     CreateContractArgs createContract;
 case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM:
     opaque wasm<>;
 };

func NewHostFunction

func NewHostFunction(aType HostFunctionType, value interface{}) (result HostFunction, err error)

NewHostFunction creates a new HostFunction.

func (HostFunction) ArmForSwitch

func (u HostFunction) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of HostFunction

func (*HostFunction) DecodeFrom

func (u *HostFunction) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (HostFunction) EncodeTo

func (u HostFunction) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (HostFunction) GetCreateContract

func (u HostFunction) GetCreateContract() (result CreateContractArgs, ok bool)

GetCreateContract retrieves the CreateContract value from the union, returning ok if the union's switch indicated the value is valid.

func (HostFunction) GetInvokeContract

func (u HostFunction) GetInvokeContract() (result InvokeContractArgs, ok bool)

GetInvokeContract retrieves the InvokeContract value from the union, returning ok if the union's switch indicated the value is valid.

func (HostFunction) GetWasm

func (u HostFunction) GetWasm() (result []byte, ok bool)

GetWasm retrieves the Wasm value from the union, returning ok if the union's switch indicated the value is valid.

func (HostFunction) MarshalBinary

func (s HostFunction) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (HostFunction) MustCreateContract

func (u HostFunction) MustCreateContract() CreateContractArgs

MustCreateContract retrieves the CreateContract value from the union, panicing if the value is not set.

func (HostFunction) MustInvokeContract

func (u HostFunction) MustInvokeContract() InvokeContractArgs

MustInvokeContract retrieves the InvokeContract value from the union, panicing if the value is not set.

func (HostFunction) MustWasm

func (u HostFunction) MustWasm() []byte

MustWasm retrieves the Wasm value from the union, panicing if the value is not set.

func (HostFunction) SwitchFieldName

func (u HostFunction) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*HostFunction) UnmarshalBinary

func (s *HostFunction) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type HostFunctionType

type HostFunctionType int32

HostFunctionType is an XDR Enum defines as:

enum HostFunctionType
 {
     HOST_FUNCTION_TYPE_INVOKE_CONTRACT = 0,
     HOST_FUNCTION_TYPE_CREATE_CONTRACT = 1,
     HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2
 };
const (
	HostFunctionTypeHostFunctionTypeInvokeContract     HostFunctionType = 0
	HostFunctionTypeHostFunctionTypeCreateContract     HostFunctionType = 1
	HostFunctionTypeHostFunctionTypeUploadContractWasm HostFunctionType = 2
)

func (*HostFunctionType) DecodeFrom

func (e *HostFunctionType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (HostFunctionType) EncodeTo

func (e HostFunctionType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (HostFunctionType) MarshalBinary

func (s HostFunctionType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (HostFunctionType) String

func (e HostFunctionType) String() string

String returns the name of `e`

func (*HostFunctionType) UnmarshalBinary

func (s *HostFunctionType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (HostFunctionType) ValidEnum

func (e HostFunctionType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for HostFunctionType

type InflationPayout

type InflationPayout struct {
	Destination AccountId
	Amount      Int64
}

InflationPayout is an XDR Struct defines as:

struct InflationPayout // or use PaymentResultAtom to limit types?
 {
     AccountID destination;
     int64 amount;
 };

func (*InflationPayout) DecodeFrom

func (s *InflationPayout) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*InflationPayout) EncodeTo

func (s *InflationPayout) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InflationPayout) MarshalBinary

func (s InflationPayout) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*InflationPayout) UnmarshalBinary

func (s *InflationPayout) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InflationResult

type InflationResult struct {
	Code    InflationResultCode
	Payouts *[]InflationPayout
}

InflationResult is an XDR Union defines as:

union InflationResult switch (InflationResultCode code)
 {
 case INFLATION_SUCCESS:
     InflationPayout payouts<>;
 case INFLATION_NOT_TIME:
     void;
 };

func NewInflationResult

func NewInflationResult(code InflationResultCode, value interface{}) (result InflationResult, err error)

NewInflationResult creates a new InflationResult.

func (InflationResult) ArmForSwitch

func (u InflationResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of InflationResult

func (*InflationResult) DecodeFrom

func (u *InflationResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (InflationResult) EncodeTo

func (u InflationResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InflationResult) GetPayouts

func (u InflationResult) GetPayouts() (result []InflationPayout, ok bool)

GetPayouts retrieves the Payouts value from the union, returning ok if the union's switch indicated the value is valid.

func (InflationResult) MarshalBinary

func (s InflationResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (InflationResult) MustPayouts

func (u InflationResult) MustPayouts() []InflationPayout

MustPayouts retrieves the Payouts value from the union, panicing if the value is not set.

func (InflationResult) SwitchFieldName

func (u InflationResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*InflationResult) UnmarshalBinary

func (s *InflationResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InflationResultCode

type InflationResultCode int32

InflationResultCode is an XDR Enum defines as:

enum InflationResultCode
 {
     // codes considered as "success" for the operation
     INFLATION_SUCCESS = 0,
     // codes considered as "failure" for the operation
     INFLATION_NOT_TIME = -1
 };
const (
	InflationResultCodeInflationSuccess InflationResultCode = 0
	InflationResultCodeInflationNotTime InflationResultCode = -1
)

func (*InflationResultCode) DecodeFrom

func (e *InflationResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (InflationResultCode) EncodeTo

func (e InflationResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InflationResultCode) MarshalBinary

func (s InflationResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (InflationResultCode) String

func (e InflationResultCode) String() string

String returns the name of `e`

func (*InflationResultCode) UnmarshalBinary

func (s *InflationResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (InflationResultCode) ValidEnum

func (e InflationResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for InflationResultCode

type InnerTransactionResult

type InnerTransactionResult struct {
	FeeCharged Int64
	Result     InnerTransactionResultResult
	Ext        InnerTransactionResultExt
}

InnerTransactionResult is an XDR Struct defines as:

struct InnerTransactionResult
 {
     // Always 0. Here for binary compatibility.
     int64 feeCharged;

     union switch (TransactionResultCode code)
     {
     // txFEE_BUMP_INNER_SUCCESS is not included
     case txSUCCESS:
     case txFAILED:
         OperationResult results<>;
     case txTOO_EARLY:
     case txTOO_LATE:
     case txMISSING_OPERATION:
     case txBAD_SEQ:
     case txBAD_AUTH:
     case txINSUFFICIENT_BALANCE:
     case txNO_ACCOUNT:
     case txINSUFFICIENT_FEE:
     case txBAD_AUTH_EXTRA:
     case txINTERNAL_ERROR:
     case txNOT_SUPPORTED:
     // txFEE_BUMP_INNER_FAILED is not included
     case txBAD_SPONSORSHIP:
     case txBAD_MIN_SEQ_AGE_OR_GAP:
     case txMALFORMED:
     case txSOROBAN_INVALID:
         void;
     }
     result;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*InnerTransactionResult) DecodeFrom

func (s *InnerTransactionResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*InnerTransactionResult) EncodeTo

func (s *InnerTransactionResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InnerTransactionResult) MarshalBinary

func (s InnerTransactionResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*InnerTransactionResult) UnmarshalBinary

func (s *InnerTransactionResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InnerTransactionResultExt

type InnerTransactionResultExt struct {
	V int32
}

InnerTransactionResultExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewInnerTransactionResultExt

func NewInnerTransactionResultExt(v int32, value interface{}) (result InnerTransactionResultExt, err error)

NewInnerTransactionResultExt creates a new InnerTransactionResultExt.

func (InnerTransactionResultExt) ArmForSwitch

func (u InnerTransactionResultExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of InnerTransactionResultExt

func (*InnerTransactionResultExt) DecodeFrom

func (u *InnerTransactionResultExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (InnerTransactionResultExt) EncodeTo

func (u InnerTransactionResultExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InnerTransactionResultExt) MarshalBinary

func (s InnerTransactionResultExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (InnerTransactionResultExt) SwitchFieldName

func (u InnerTransactionResultExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*InnerTransactionResultExt) UnmarshalBinary

func (s *InnerTransactionResultExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InnerTransactionResultPair

type InnerTransactionResultPair struct {
	TransactionHash Hash
	Result          InnerTransactionResult
}

InnerTransactionResultPair is an XDR Struct defines as:

struct InnerTransactionResultPair
 {
     Hash transactionHash;          // hash of the inner transaction
     InnerTransactionResult result; // result for the inner transaction
 };

func (*InnerTransactionResultPair) DecodeFrom

func (s *InnerTransactionResultPair) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*InnerTransactionResultPair) EncodeTo

func (s *InnerTransactionResultPair) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InnerTransactionResultPair) MarshalBinary

func (s InnerTransactionResultPair) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*InnerTransactionResultPair) UnmarshalBinary

func (s *InnerTransactionResultPair) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InnerTransactionResultResult

type InnerTransactionResultResult struct {
	Code    TransactionResultCode
	Results *[]OperationResult
}

InnerTransactionResultResult is an XDR NestedUnion defines as:

union switch (TransactionResultCode code)
     {
     // txFEE_BUMP_INNER_SUCCESS is not included
     case txSUCCESS:
     case txFAILED:
         OperationResult results<>;
     case txTOO_EARLY:
     case txTOO_LATE:
     case txMISSING_OPERATION:
     case txBAD_SEQ:
     case txBAD_AUTH:
     case txINSUFFICIENT_BALANCE:
     case txNO_ACCOUNT:
     case txINSUFFICIENT_FEE:
     case txBAD_AUTH_EXTRA:
     case txINTERNAL_ERROR:
     case txNOT_SUPPORTED:
     // txFEE_BUMP_INNER_FAILED is not included
     case txBAD_SPONSORSHIP:
     case txBAD_MIN_SEQ_AGE_OR_GAP:
     case txMALFORMED:
     case txSOROBAN_INVALID:
         void;
     }

func NewInnerTransactionResultResult

func NewInnerTransactionResultResult(code TransactionResultCode, value interface{}) (result InnerTransactionResultResult, err error)

NewInnerTransactionResultResult creates a new InnerTransactionResultResult.

func (InnerTransactionResultResult) ArmForSwitch

func (u InnerTransactionResultResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of InnerTransactionResultResult

func (*InnerTransactionResultResult) DecodeFrom

func (u *InnerTransactionResultResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (InnerTransactionResultResult) EncodeTo

func (u InnerTransactionResultResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InnerTransactionResultResult) GetResults

func (u InnerTransactionResultResult) GetResults() (result []OperationResult, ok bool)

GetResults retrieves the Results value from the union, returning ok if the union's switch indicated the value is valid.

func (InnerTransactionResultResult) MarshalBinary

func (s InnerTransactionResultResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (InnerTransactionResultResult) MustResults

MustResults retrieves the Results value from the union, panicing if the value is not set.

func (InnerTransactionResultResult) SwitchFieldName

func (u InnerTransactionResultResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*InnerTransactionResultResult) UnmarshalBinary

func (s *InnerTransactionResultResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Int128Parts

type Int128Parts struct {
	Hi Int64
	Lo Uint64
}

Int128Parts is an XDR Struct defines as:

struct Int128Parts {
     int64 hi;
     uint64 lo;
 };

func (*Int128Parts) DecodeFrom

func (s *Int128Parts) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Int128Parts) EncodeTo

func (s *Int128Parts) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Int128Parts) MarshalBinary

func (s Int128Parts) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Int128Parts) UnmarshalBinary

func (s *Int128Parts) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Int256Parts

type Int256Parts struct {
	HiHi Int64
	HiLo Uint64
	LoHi Uint64
	LoLo Uint64
}

Int256Parts is an XDR Struct defines as:

struct Int256Parts {
     int64 hi_hi;
     uint64 hi_lo;
     uint64 lo_hi;
     uint64 lo_lo;
 };

func (*Int256Parts) DecodeFrom

func (s *Int256Parts) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Int256Parts) EncodeTo

func (s *Int256Parts) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Int256Parts) MarshalBinary

func (s Int256Parts) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Int256Parts) UnmarshalBinary

func (s *Int256Parts) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Int32

type Int32 int32

Int32 is an XDR Typedef defines as:

typedef int int32;

func (*Int32) DecodeFrom

func (s *Int32) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Int32) EncodeTo

func (s Int32) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Int32) MarshalBinary

func (s Int32) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Int32) UnmarshalBinary

func (s *Int32) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Int64

type Int64 int64

Int64 is an XDR Typedef defines as:

typedef hyper int64;

func (*Int64) DecodeFrom

func (s *Int64) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Int64) EncodeTo

func (s Int64) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Int64) MarshalBinary

func (s Int64) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Int64) Scan

func (t *Int64) Scan(src any) error

Scan reads from src into an Int64

func (*Int64) UnmarshalBinary

func (s *Int64) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InvokeContractArgs

type InvokeContractArgs struct {
	ContractAddress ScAddress
	FunctionName    ScSymbol
	Args            []ScVal
}

InvokeContractArgs is an XDR Struct defines as:

struct InvokeContractArgs {
     SCAddress contractAddress;
     SCSymbol functionName;
     SCVal args<>;
 };

func (*InvokeContractArgs) DecodeFrom

func (s *InvokeContractArgs) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*InvokeContractArgs) EncodeTo

func (s *InvokeContractArgs) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InvokeContractArgs) MarshalBinary

func (s InvokeContractArgs) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*InvokeContractArgs) UnmarshalBinary

func (s *InvokeContractArgs) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InvokeHostFunctionOp

type InvokeHostFunctionOp struct {
	HostFunction HostFunction
	Auth         []SorobanAuthorizationEntry
}

InvokeHostFunctionOp is an XDR Struct defines as:

struct InvokeHostFunctionOp
 {
     // Host function to invoke.
     HostFunction hostFunction;
     // Per-address authorizations for this host function.
     SorobanAuthorizationEntry auth<>;
 };

func (*InvokeHostFunctionOp) DecodeFrom

func (s *InvokeHostFunctionOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*InvokeHostFunctionOp) EncodeTo

func (s *InvokeHostFunctionOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InvokeHostFunctionOp) MarshalBinary

func (s InvokeHostFunctionOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*InvokeHostFunctionOp) UnmarshalBinary

func (s *InvokeHostFunctionOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InvokeHostFunctionResult

type InvokeHostFunctionResult struct {
	Code    InvokeHostFunctionResultCode
	Success *Hash
}

InvokeHostFunctionResult is an XDR Union defines as:

union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code)
 {
 case INVOKE_HOST_FUNCTION_SUCCESS:
     Hash success; // sha256(InvokeHostFunctionSuccessPreImage)
 case INVOKE_HOST_FUNCTION_MALFORMED:
 case INVOKE_HOST_FUNCTION_TRAPPED:
 case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED:
 case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED:
 case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE:
     void;
 };

func NewInvokeHostFunctionResult

func NewInvokeHostFunctionResult(code InvokeHostFunctionResultCode, value interface{}) (result InvokeHostFunctionResult, err error)

NewInvokeHostFunctionResult creates a new InvokeHostFunctionResult.

func (InvokeHostFunctionResult) ArmForSwitch

func (u InvokeHostFunctionResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of InvokeHostFunctionResult

func (*InvokeHostFunctionResult) DecodeFrom

func (u *InvokeHostFunctionResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (InvokeHostFunctionResult) EncodeTo

func (u InvokeHostFunctionResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InvokeHostFunctionResult) GetSuccess

func (u InvokeHostFunctionResult) GetSuccess() (result Hash, ok bool)

GetSuccess retrieves the Success value from the union, returning ok if the union's switch indicated the value is valid.

func (InvokeHostFunctionResult) MarshalBinary

func (s InvokeHostFunctionResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (InvokeHostFunctionResult) MustSuccess

func (u InvokeHostFunctionResult) MustSuccess() Hash

MustSuccess retrieves the Success value from the union, panicing if the value is not set.

func (InvokeHostFunctionResult) SwitchFieldName

func (u InvokeHostFunctionResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*InvokeHostFunctionResult) UnmarshalBinary

func (s *InvokeHostFunctionResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type InvokeHostFunctionResultCode

type InvokeHostFunctionResultCode int32

InvokeHostFunctionResultCode is an XDR Enum defines as:

enum InvokeHostFunctionResultCode
 {
     // codes considered as "success" for the operation
     INVOKE_HOST_FUNCTION_SUCCESS = 0,

     // codes considered as "failure" for the operation
     INVOKE_HOST_FUNCTION_MALFORMED = -1,
     INVOKE_HOST_FUNCTION_TRAPPED = -2,
     INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED = -3,
     INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED = -4,
     INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE = -5
 };
const (
	InvokeHostFunctionResultCodeInvokeHostFunctionSuccess                   InvokeHostFunctionResultCode = 0
	InvokeHostFunctionResultCodeInvokeHostFunctionMalformed                 InvokeHostFunctionResultCode = -1
	InvokeHostFunctionResultCodeInvokeHostFunctionTrapped                   InvokeHostFunctionResultCode = -2
	InvokeHostFunctionResultCodeInvokeHostFunctionResourceLimitExceeded     InvokeHostFunctionResultCode = -3
	InvokeHostFunctionResultCodeInvokeHostFunctionEntryArchived             InvokeHostFunctionResultCode = -4
	InvokeHostFunctionResultCodeInvokeHostFunctionInsufficientRefundableFee InvokeHostFunctionResultCode = -5
)

func (*InvokeHostFunctionResultCode) DecodeFrom

func (e *InvokeHostFunctionResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (InvokeHostFunctionResultCode) EncodeTo

func (e InvokeHostFunctionResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InvokeHostFunctionResultCode) MarshalBinary

func (s InvokeHostFunctionResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (InvokeHostFunctionResultCode) String

String returns the name of `e`

func (*InvokeHostFunctionResultCode) UnmarshalBinary

func (s *InvokeHostFunctionResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (InvokeHostFunctionResultCode) ValidEnum

func (e InvokeHostFunctionResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for InvokeHostFunctionResultCode

type InvokeHostFunctionSuccessPreImage

type InvokeHostFunctionSuccessPreImage struct {
	ReturnValue ScVal
	Events      []ContractEvent
}

InvokeHostFunctionSuccessPreImage is an XDR Struct defines as:

struct InvokeHostFunctionSuccessPreImage
 {
     SCVal returnValue;
     ContractEvent events<>;
 };

func (*InvokeHostFunctionSuccessPreImage) DecodeFrom

func (s *InvokeHostFunctionSuccessPreImage) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*InvokeHostFunctionSuccessPreImage) EncodeTo

func (s *InvokeHostFunctionSuccessPreImage) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (InvokeHostFunctionSuccessPreImage) MarshalBinary

func (s InvokeHostFunctionSuccessPreImage) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*InvokeHostFunctionSuccessPreImage) UnmarshalBinary

func (s *InvokeHostFunctionSuccessPreImage) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type IpAddrType

type IpAddrType int32

IpAddrType is an XDR Enum defines as:

enum IPAddrType
 {
     IPv4 = 0,
     IPv6 = 1
 };
const (
	IpAddrTypeIPv4 IpAddrType = 0
	IpAddrTypeIPv6 IpAddrType = 1
)

func (*IpAddrType) DecodeFrom

func (e *IpAddrType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (IpAddrType) EncodeTo

func (e IpAddrType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (IpAddrType) MarshalBinary

func (s IpAddrType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (IpAddrType) String

func (e IpAddrType) String() string

String returns the name of `e`

func (*IpAddrType) UnmarshalBinary

func (s *IpAddrType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (IpAddrType) ValidEnum

func (e IpAddrType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for IpAddrType

type Keyer

type Keyer interface {
	LedgerKey() (LedgerKey, error)
}

Keyer represents a type that can be converted into a LedgerKey

type LedgerBounds

type LedgerBounds struct {
	MinLedger Uint32
	MaxLedger Uint32
}

LedgerBounds is an XDR Struct defines as:

struct LedgerBounds
 {
     uint32 minLedger;
     uint32 maxLedger; // 0 here means no maxLedger
 };

func (*LedgerBounds) DecodeFrom

func (s *LedgerBounds) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerBounds) EncodeTo

func (s *LedgerBounds) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerBounds) MarshalBinary

func (s LedgerBounds) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerBounds) UnmarshalBinary

func (s *LedgerBounds) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerCloseMeta

type LedgerCloseMeta struct {
	V  int32
	V0 *LedgerCloseMetaV0
	V1 *LedgerCloseMetaV1
}

LedgerCloseMeta is an XDR Union defines as:

union LedgerCloseMeta switch (int v)
 {
 case 0:
     LedgerCloseMetaV0 v0;
 case 1:
     LedgerCloseMetaV1 v1;
 };

func NewLedgerCloseMeta

func NewLedgerCloseMeta(v int32, value interface{}) (result LedgerCloseMeta, err error)

NewLedgerCloseMeta creates a new LedgerCloseMeta.

func (LedgerCloseMeta) ArmForSwitch

func (u LedgerCloseMeta) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of LedgerCloseMeta

func (LedgerCloseMeta) BucketListHash

func (l LedgerCloseMeta) BucketListHash() Hash

func (LedgerCloseMeta) CountTransactions

func (l LedgerCloseMeta) CountTransactions() int

func (*LedgerCloseMeta) DecodeFrom

func (u *LedgerCloseMeta) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerCloseMeta) EncodeTo

func (u LedgerCloseMeta) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerCloseMeta) EvictedPersistentLedgerEntries

func (l LedgerCloseMeta) EvictedPersistentLedgerEntries() ([]LedgerEntry, error)

EvictedPersistentLedgerEntries returns the persistent ledger entries which have been evicted in this ledger.

func (LedgerCloseMeta) EvictedTemporaryLedgerKeys

func (l LedgerCloseMeta) EvictedTemporaryLedgerKeys() ([]LedgerKey, error)

EvictedTemporaryLedgerKeys returns a slice of ledger keys for temporary ledger entries that have been evicted in this ledger.

func (LedgerCloseMeta) FeeProcessing

func (l LedgerCloseMeta) FeeProcessing(i int) LedgerEntryChanges

FeeProcessing returns FeeProcessing for tx at index i in processing order.

func (LedgerCloseMeta) GetV0

func (u LedgerCloseMeta) GetV0() (result LedgerCloseMetaV0, ok bool)

GetV0 retrieves the V0 value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerCloseMeta) GetV1

func (u LedgerCloseMeta) GetV1() (result LedgerCloseMetaV1, ok bool)

GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerCloseMeta) LedgerCloseTime

func (l LedgerCloseMeta) LedgerCloseTime() int64

func (LedgerCloseMeta) LedgerHash

func (l LedgerCloseMeta) LedgerHash() Hash

func (LedgerCloseMeta) LedgerHeaderHistoryEntry

func (l LedgerCloseMeta) LedgerHeaderHistoryEntry() LedgerHeaderHistoryEntry

func (LedgerCloseMeta) LedgerSequence

func (l LedgerCloseMeta) LedgerSequence() uint32

func (LedgerCloseMeta) MarshalBinary

func (s LedgerCloseMeta) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerCloseMeta) MustV0

MustV0 retrieves the V0 value from the union, panicing if the value is not set.

func (LedgerCloseMeta) MustV1

MustV1 retrieves the V1 value from the union, panicing if the value is not set.

func (LedgerCloseMeta) PreviousLedgerHash

func (l LedgerCloseMeta) PreviousLedgerHash() Hash

func (LedgerCloseMeta) ProtocolVersion

func (l LedgerCloseMeta) ProtocolVersion() uint32

func (*LedgerCloseMeta) Scan

func (l *LedgerCloseMeta) Scan(src any) error

Scan reads from src into a ledgerCloseMeta struct

func (LedgerCloseMeta) SwitchFieldName

func (u LedgerCloseMeta) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (LedgerCloseMeta) TransactionEnvelopes

func (l LedgerCloseMeta) TransactionEnvelopes() []TransactionEnvelope

func (LedgerCloseMeta) TransactionHash

func (l LedgerCloseMeta) TransactionHash(i int) Hash

TransactionHash returns Hash for tx at index i in processing order..

func (LedgerCloseMeta) TransactionResultPair

func (l LedgerCloseMeta) TransactionResultPair(i int) TransactionResultPair

TransactionResultPair returns TransactionResultPair for tx at index i in processing order.

func (LedgerCloseMeta) TxApplyProcessing

func (l LedgerCloseMeta) TxApplyProcessing(i int) TransactionMeta

TxApplyProcessing returns TxApplyProcessing for tx at index i in processing order.

func (*LedgerCloseMeta) UnmarshalBinary

func (s *LedgerCloseMeta) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LedgerCloseMeta) UpgradesProcessing

func (l LedgerCloseMeta) UpgradesProcessing() []UpgradeEntryMeta

UpgradesProcessing returns UpgradesProcessing for ledger.

func (LedgerCloseMeta) Value

func (l LedgerCloseMeta) Value() (driver.Value, error)

Value implements the database/sql/driver Valuer interface.

type LedgerCloseMetaBatch

type LedgerCloseMetaBatch struct {
	StartSequence    Uint32
	EndSequence      Uint32
	LedgerCloseMetas []LedgerCloseMeta
}

LedgerCloseMetaBatch is an XDR Struct defines as:

struct LedgerCloseMetaBatch
 {
     // starting ledger sequence number in the batch
     uint32 startSequence;

     // ending ledger sequence number in the batch
     uint32 endSequence;

     // Ledger close meta for each ledger within the batch
     LedgerCloseMeta ledgerCloseMetas<>;
 };

func (*LedgerCloseMetaBatch) DecodeFrom

func (s *LedgerCloseMetaBatch) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerCloseMetaBatch) EncodeTo

func (s *LedgerCloseMetaBatch) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerCloseMetaBatch) MarshalBinary

func (s LedgerCloseMetaBatch) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerCloseMetaBatch) UnmarshalBinary

func (s *LedgerCloseMetaBatch) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerCloseMetaExt

type LedgerCloseMetaExt struct {
	V  int32
	V1 *LedgerCloseMetaExtV1
}

LedgerCloseMetaExt is an XDR Union defines as:

union LedgerCloseMetaExt switch (int v)
 {
 case 0:
     void;
 case 1:
     LedgerCloseMetaExtV1 v1;
 };

func NewLedgerCloseMetaExt

func NewLedgerCloseMetaExt(v int32, value interface{}) (result LedgerCloseMetaExt, err error)

NewLedgerCloseMetaExt creates a new LedgerCloseMetaExt.

func (LedgerCloseMetaExt) ArmForSwitch

func (u LedgerCloseMetaExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of LedgerCloseMetaExt

func (*LedgerCloseMetaExt) DecodeFrom

func (u *LedgerCloseMetaExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerCloseMetaExt) EncodeTo

func (u LedgerCloseMetaExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerCloseMetaExt) GetV1

func (u LedgerCloseMetaExt) GetV1() (result LedgerCloseMetaExtV1, ok bool)

GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerCloseMetaExt) MarshalBinary

func (s LedgerCloseMetaExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerCloseMetaExt) MustV1

MustV1 retrieves the V1 value from the union, panicing if the value is not set.

func (LedgerCloseMetaExt) SwitchFieldName

func (u LedgerCloseMetaExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*LedgerCloseMetaExt) UnmarshalBinary

func (s *LedgerCloseMetaExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerCloseMetaExtV1

type LedgerCloseMetaExtV1 struct {
	Ext                ExtensionPoint
	SorobanFeeWrite1Kb Int64
}

LedgerCloseMetaExtV1 is an XDR Struct defines as:

struct LedgerCloseMetaExtV1
 {
     ExtensionPoint ext;
     int64 sorobanFeeWrite1KB;
 };

func (*LedgerCloseMetaExtV1) DecodeFrom

func (s *LedgerCloseMetaExtV1) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerCloseMetaExtV1) EncodeTo

func (s *LedgerCloseMetaExtV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerCloseMetaExtV1) MarshalBinary

func (s LedgerCloseMetaExtV1) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerCloseMetaExtV1) UnmarshalBinary

func (s *LedgerCloseMetaExtV1) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerCloseMetaV0

type LedgerCloseMetaV0 struct {
	LedgerHeader       LedgerHeaderHistoryEntry
	TxSet              TransactionSet
	TxProcessing       []TransactionResultMeta
	UpgradesProcessing []UpgradeEntryMeta
	ScpInfo            []ScpHistoryEntry
}

LedgerCloseMetaV0 is an XDR Struct defines as:

struct LedgerCloseMetaV0
 {
     LedgerHeaderHistoryEntry ledgerHeader;
     // NB: txSet is sorted in "Hash order"
     TransactionSet txSet;

     // NB: transactions are sorted in apply order here
     // fees for all transactions are processed first
     // followed by applying transactions
     TransactionResultMeta txProcessing<>;

     // upgrades are applied last
     UpgradeEntryMeta upgradesProcessing<>;

     // other misc information attached to the ledger close
     SCPHistoryEntry scpInfo<>;
 };

func (*LedgerCloseMetaV0) DecodeFrom

func (s *LedgerCloseMetaV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerCloseMetaV0) EncodeTo

func (s *LedgerCloseMetaV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerCloseMetaV0) MarshalBinary

func (s LedgerCloseMetaV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerCloseMetaV0) UnmarshalBinary

func (s *LedgerCloseMetaV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerCloseMetaV1

type LedgerCloseMetaV1 struct {
	Ext                            LedgerCloseMetaExt
	LedgerHeader                   LedgerHeaderHistoryEntry
	TxSet                          GeneralizedTransactionSet
	TxProcessing                   []TransactionResultMeta
	UpgradesProcessing             []UpgradeEntryMeta
	ScpInfo                        []ScpHistoryEntry
	TotalByteSizeOfBucketList      Uint64
	EvictedTemporaryLedgerKeys     []LedgerKey
	EvictedPersistentLedgerEntries []LedgerEntry
}

LedgerCloseMetaV1 is an XDR Struct defines as:

struct LedgerCloseMetaV1
 {
     LedgerCloseMetaExt ext;

     LedgerHeaderHistoryEntry ledgerHeader;

     GeneralizedTransactionSet 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<>;

     // Size in bytes of BucketList, to support downstream
     // systems calculating storage fees correctly.
     uint64 totalByteSizeOfBucketList;

     // Temp keys that are being evicted at this ledger.
     LedgerKey evictedTemporaryLedgerKeys<>;

     // Archived restorable ledger entries that are being
     // evicted at this ledger.
     LedgerEntry evictedPersistentLedgerEntries<>;
 };

func (*LedgerCloseMetaV1) DecodeFrom

func (s *LedgerCloseMetaV1) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerCloseMetaV1) EncodeTo

func (s *LedgerCloseMetaV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerCloseMetaV1) MarshalBinary

func (s LedgerCloseMetaV1) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerCloseMetaV1) UnmarshalBinary

func (s *LedgerCloseMetaV1) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerCloseValueSignature

type LedgerCloseValueSignature struct {
	NodeId    NodeId
	Signature Signature
}

LedgerCloseValueSignature is an XDR Struct defines as:

struct LedgerCloseValueSignature
 {
     NodeID nodeID;       // which node introduced the value
     Signature signature; // nodeID's signature
 };

func (*LedgerCloseValueSignature) DecodeFrom

func (s *LedgerCloseValueSignature) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerCloseValueSignature) EncodeTo

func (s *LedgerCloseValueSignature) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerCloseValueSignature) MarshalBinary

func (s LedgerCloseValueSignature) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerCloseValueSignature) UnmarshalBinary

func (s *LedgerCloseValueSignature) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntry

type LedgerEntry struct {
	LastModifiedLedgerSeq Uint32
	Data                  LedgerEntryData
	Ext                   LedgerEntryExt
}

LedgerEntry is an XDR Struct defines as:

struct LedgerEntry
 {
     uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed

     union switch (LedgerEntryType type)
     {
     case ACCOUNT:
         AccountEntry account;
     case TRUSTLINE:
         TrustLineEntry trustLine;
     case OFFER:
         OfferEntry offer;
     case DATA:
         DataEntry data;
     case CLAIMABLE_BALANCE:
         ClaimableBalanceEntry claimableBalance;
     case LIQUIDITY_POOL:
         LiquidityPoolEntry liquidityPool;
     case CONTRACT_DATA:
         ContractDataEntry contractData;
     case CONTRACT_CODE:
         ContractCodeEntry contractCode;
     case CONFIG_SETTING:
         ConfigSettingEntry configSetting;
     case TTL:
         TTLEntry ttl;
     }
     data;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     case 1:
         LedgerEntryExtensionV1 v1;
     }
     ext;
 };

func (*LedgerEntry) DecodeFrom

func (s *LedgerEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerEntry) EncodeTo

func (s *LedgerEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*LedgerEntry) LedgerKey

func (entry *LedgerEntry) LedgerKey() (LedgerKey, error)

LedgerKey implements the `Keyer` interface

func (LedgerEntry) MarshalBinary

func (s LedgerEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerEntry) Normalize

func (entry *LedgerEntry) Normalize() *LedgerEntry

Normalize overwrites LedgerEntry with all the extensions set to default values (if extension is not present). This is helpful to compare two ledger entries that are the same but for one of them extensions are not set. Returns the same entry.

func (*LedgerEntry) SponsoringID

func (entry *LedgerEntry) SponsoringID() SponsorshipDescriptor

SponsoringID return SponsorshipDescriptor for a given ledger entry

func (*LedgerEntry) UnmarshalBinary

func (s *LedgerEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryChange

type LedgerEntryChange struct {
	Type    LedgerEntryChangeType
	Created *LedgerEntry
	Updated *LedgerEntry
	Removed *LedgerKey
	State   *LedgerEntry
}

LedgerEntryChange is an XDR Union defines as:

union LedgerEntryChange switch (LedgerEntryChangeType type)
 {
 case LEDGER_ENTRY_CREATED:
     LedgerEntry created;
 case LEDGER_ENTRY_UPDATED:
     LedgerEntry updated;
 case LEDGER_ENTRY_REMOVED:
     LedgerKey removed;
 case LEDGER_ENTRY_STATE:
     LedgerEntry state;
 };

func NewLedgerEntryChange

func NewLedgerEntryChange(aType LedgerEntryChangeType, value interface{}) (result LedgerEntryChange, err error)

NewLedgerEntryChange creates a new LedgerEntryChange.

func (LedgerEntryChange) ArmForSwitch

func (u LedgerEntryChange) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of LedgerEntryChange

func (*LedgerEntryChange) DecodeFrom

func (u *LedgerEntryChange) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerEntryChange) EncodeTo

func (u LedgerEntryChange) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*LedgerEntryChange) EntryType

func (change *LedgerEntryChange) EntryType() (LedgerEntryType, error)

EntryType is a helper to get at the entry type for a change.

func (LedgerEntryChange) GetCreated

func (u LedgerEntryChange) GetCreated() (result LedgerEntry, ok bool)

GetCreated retrieves the Created value from the union, returning ok if the union's switch indicated the value is valid.

func (*LedgerEntryChange) GetLedgerEntry

func (change *LedgerEntryChange) GetLedgerEntry() (LedgerEntry, bool)

GetLedgerEntry returns the ledger entry that was changed in `change`, along with a boolean indicating whether the entry value was valid.

func (LedgerEntryChange) GetRemoved

func (u LedgerEntryChange) GetRemoved() (result LedgerKey, ok bool)

GetRemoved retrieves the Removed value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerEntryChange) GetState

func (u LedgerEntryChange) GetState() (result LedgerEntry, ok bool)

GetState retrieves the State value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerEntryChange) GetUpdated

func (u LedgerEntryChange) GetUpdated() (result LedgerEntry, ok bool)

GetUpdated retrieves the Updated value from the union, returning ok if the union's switch indicated the value is valid.

func (*LedgerEntryChange) LedgerKey

func (change *LedgerEntryChange) LedgerKey() (LedgerKey, error)

LedgerKey returns the key for the ledger entry that was changed in `change`. LedgerKey implements `Keyer`

func (LedgerEntryChange) MarshalBinary

func (s LedgerEntryChange) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryChange) MarshalBinaryBase64

func (change LedgerEntryChange) MarshalBinaryBase64() (string, error)

MarshalBinaryBase64 marshals XDR into a binary form and then encodes it using base64.

func (LedgerEntryChange) MustCreated

func (u LedgerEntryChange) MustCreated() LedgerEntry

MustCreated retrieves the Created value from the union, panicing if the value is not set.

func (LedgerEntryChange) MustRemoved

func (u LedgerEntryChange) MustRemoved() LedgerKey

MustRemoved retrieves the Removed value from the union, panicing if the value is not set.

func (LedgerEntryChange) MustState

func (u LedgerEntryChange) MustState() LedgerEntry

MustState retrieves the State value from the union, panicing if the value is not set.

func (LedgerEntryChange) MustUpdated

func (u LedgerEntryChange) MustUpdated() LedgerEntry

MustUpdated retrieves the Updated value from the union, panicing if the value is not set.

func (LedgerEntryChange) SwitchFieldName

func (u LedgerEntryChange) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*LedgerEntryChange) UnmarshalBinary

func (s *LedgerEntryChange) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryChangeType

type LedgerEntryChangeType int32

LedgerEntryChangeType is an XDR Enum defines as:

enum LedgerEntryChangeType
 {
     LEDGER_ENTRY_CREATED = 0, // entry was added to the ledger
     LEDGER_ENTRY_UPDATED = 1, // entry was modified in the ledger
     LEDGER_ENTRY_REMOVED = 2, // entry was removed from the ledger
     LEDGER_ENTRY_STATE = 3    // value of the entry
 };
const (
	LedgerEntryChangeTypeLedgerEntryCreated LedgerEntryChangeType = 0
	LedgerEntryChangeTypeLedgerEntryUpdated LedgerEntryChangeType = 1
	LedgerEntryChangeTypeLedgerEntryRemoved LedgerEntryChangeType = 2
	LedgerEntryChangeTypeLedgerEntryState   LedgerEntryChangeType = 3
)

func (*LedgerEntryChangeType) DecodeFrom

func (e *LedgerEntryChangeType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerEntryChangeType) EncodeTo

func (e LedgerEntryChangeType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerEntryChangeType) MarshalBinary

func (s LedgerEntryChangeType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryChangeType) String

func (e LedgerEntryChangeType) String() string

String returns the name of `e`

func (*LedgerEntryChangeType) UnmarshalBinary

func (s *LedgerEntryChangeType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LedgerEntryChangeType) ValidEnum

func (e LedgerEntryChangeType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for LedgerEntryChangeType

type LedgerEntryChanges

type LedgerEntryChanges []LedgerEntryChange

LedgerEntryChanges is an XDR Typedef defines as:

typedef LedgerEntryChange LedgerEntryChanges<>;

func (*LedgerEntryChanges) DecodeFrom

func (s *LedgerEntryChanges) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerEntryChanges) EncodeTo

func (s LedgerEntryChanges) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerEntryChanges) MarshalBinary

func (s LedgerEntryChanges) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerEntryChanges) Scan

func (t *LedgerEntryChanges) Scan(src any) error

Scan reads from src into an LedgerEntryChanges struct

func (*LedgerEntryChanges) UnmarshalBinary

func (s *LedgerEntryChanges) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryData

type LedgerEntryData struct {
	Type             LedgerEntryType
	Account          *AccountEntry
	TrustLine        *TrustLineEntry
	Offer            *OfferEntry
	Data             *DataEntry
	ClaimableBalance *ClaimableBalanceEntry
	LiquidityPool    *LiquidityPoolEntry
	ContractData     *ContractDataEntry
	ContractCode     *ContractCodeEntry
	ConfigSetting    *ConfigSettingEntry
	Ttl              *TtlEntry
}

LedgerEntryData is an XDR NestedUnion defines as:

union switch (LedgerEntryType type)
     {
     case ACCOUNT:
         AccountEntry account;
     case TRUSTLINE:
         TrustLineEntry trustLine;
     case OFFER:
         OfferEntry offer;
     case DATA:
         DataEntry data;
     case CLAIMABLE_BALANCE:
         ClaimableBalanceEntry claimableBalance;
     case LIQUIDITY_POOL:
         LiquidityPoolEntry liquidityPool;
     case CONTRACT_DATA:
         ContractDataEntry contractData;
     case CONTRACT_CODE:
         ContractCodeEntry contractCode;
     case CONFIG_SETTING:
         ConfigSettingEntry configSetting;
     case TTL:
         TTLEntry ttl;
     }

func NewLedgerEntryData

func NewLedgerEntryData(aType LedgerEntryType, value interface{}) (result LedgerEntryData, err error)

NewLedgerEntryData creates a new LedgerEntryData.

func (LedgerEntryData) ArmForSwitch

func (u LedgerEntryData) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of LedgerEntryData

func (*LedgerEntryData) DecodeFrom

func (u *LedgerEntryData) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerEntryData) EncodeTo

func (u LedgerEntryData) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerEntryData) GetAccount

func (u LedgerEntryData) GetAccount() (result AccountEntry, ok bool)

GetAccount retrieves the Account value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerEntryData) GetClaimableBalance

func (u LedgerEntryData) GetClaimableBalance() (result ClaimableBalanceEntry, ok bool)

GetClaimableBalance retrieves the ClaimableBalance value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerEntryData) GetConfigSetting

func (u LedgerEntryData) GetConfigSetting() (result ConfigSettingEntry, ok bool)

GetConfigSetting retrieves the ConfigSetting value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerEntryData) GetContractCode

func (u LedgerEntryData) GetContractCode() (result ContractCodeEntry, ok bool)

GetContractCode retrieves the ContractCode value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerEntryData) GetContractData

func (u LedgerEntryData) GetContractData() (result ContractDataEntry, ok bool)

GetContractData retrieves the ContractData value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerEntryData) GetData

func (u LedgerEntryData) GetData() (result DataEntry, ok bool)

GetData retrieves the Data value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerEntryData) GetLiquidityPool

func (u LedgerEntryData) GetLiquidityPool() (result LiquidityPoolEntry, ok bool)

GetLiquidityPool retrieves the LiquidityPool value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerEntryData) GetOffer

func (u LedgerEntryData) GetOffer() (result OfferEntry, ok bool)

GetOffer retrieves the Offer value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerEntryData) GetTrustLine

func (u LedgerEntryData) GetTrustLine() (result TrustLineEntry, ok bool)

GetTrustLine retrieves the TrustLine value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerEntryData) GetTtl

func (u LedgerEntryData) GetTtl() (result TtlEntry, ok bool)

GetTtl retrieves the Ttl value from the union, returning ok if the union's switch indicated the value is valid.

func (*LedgerEntryData) LedgerKey

func (data *LedgerEntryData) LedgerKey() (LedgerKey, error)

LedgerKey implements the `Keyer` interface

func (LedgerEntryData) MarshalBinary

func (s LedgerEntryData) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryData) MustAccount

func (u LedgerEntryData) MustAccount() AccountEntry

MustAccount retrieves the Account value from the union, panicing if the value is not set.

func (LedgerEntryData) MustClaimableBalance

func (u LedgerEntryData) MustClaimableBalance() ClaimableBalanceEntry

MustClaimableBalance retrieves the ClaimableBalance value from the union, panicing if the value is not set.

func (LedgerEntryData) MustConfigSetting

func (u LedgerEntryData) MustConfigSetting() ConfigSettingEntry

MustConfigSetting retrieves the ConfigSetting value from the union, panicing if the value is not set.

func (LedgerEntryData) MustContractCode

func (u LedgerEntryData) MustContractCode() ContractCodeEntry

MustContractCode retrieves the ContractCode value from the union, panicing if the value is not set.

func (LedgerEntryData) MustContractData

func (u LedgerEntryData) MustContractData() ContractDataEntry

MustContractData retrieves the ContractData value from the union, panicing if the value is not set.

func (LedgerEntryData) MustData

func (u LedgerEntryData) MustData() DataEntry

MustData retrieves the Data value from the union, panicing if the value is not set.

func (LedgerEntryData) MustLiquidityPool

func (u LedgerEntryData) MustLiquidityPool() LiquidityPoolEntry

MustLiquidityPool retrieves the LiquidityPool value from the union, panicing if the value is not set.

func (LedgerEntryData) MustOffer

func (u LedgerEntryData) MustOffer() OfferEntry

MustOffer retrieves the Offer value from the union, panicing if the value is not set.

func (LedgerEntryData) MustTrustLine

func (u LedgerEntryData) MustTrustLine() TrustLineEntry

MustTrustLine retrieves the TrustLine value from the union, panicing if the value is not set.

func (LedgerEntryData) MustTtl

func (u LedgerEntryData) MustTtl() TtlEntry

MustTtl retrieves the Ttl value from the union, panicing if the value is not set.

func (*LedgerEntryData) SetContractCode

func (data *LedgerEntryData) SetContractCode(entry *ContractCodeEntry) error

func (*LedgerEntryData) SetContractData

func (data *LedgerEntryData) SetContractData(entry *ContractDataEntry) error

func (LedgerEntryData) SwitchFieldName

func (u LedgerEntryData) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*LedgerEntryData) UnmarshalBinary

func (s *LedgerEntryData) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryExt

type LedgerEntryExt struct {
	V  int32
	V1 *LedgerEntryExtensionV1
}

LedgerEntryExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     case 1:
         LedgerEntryExtensionV1 v1;
     }

func NewLedgerEntryExt

func NewLedgerEntryExt(v int32, value interface{}) (result LedgerEntryExt, err error)

NewLedgerEntryExt creates a new LedgerEntryExt.

func (LedgerEntryExt) ArmForSwitch

func (u LedgerEntryExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of LedgerEntryExt

func (*LedgerEntryExt) DecodeFrom

func (u *LedgerEntryExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerEntryExt) EncodeTo

func (u LedgerEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerEntryExt) GetV1

func (u LedgerEntryExt) GetV1() (result LedgerEntryExtensionV1, ok bool)

GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerEntryExt) MarshalBinary

func (s LedgerEntryExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryExt) MustV1

MustV1 retrieves the V1 value from the union, panicing if the value is not set.

func (LedgerEntryExt) SwitchFieldName

func (u LedgerEntryExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*LedgerEntryExt) UnmarshalBinary

func (s *LedgerEntryExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryExtensionV1

type LedgerEntryExtensionV1 struct {
	SponsoringId SponsorshipDescriptor
	Ext          LedgerEntryExtensionV1Ext
}

LedgerEntryExtensionV1 is an XDR Struct defines as:

struct LedgerEntryExtensionV1
 {
     SponsorshipDescriptor sponsoringID;

     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*LedgerEntryExtensionV1) DecodeFrom

func (s *LedgerEntryExtensionV1) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerEntryExtensionV1) EncodeTo

func (s *LedgerEntryExtensionV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerEntryExtensionV1) MarshalBinary

func (s LedgerEntryExtensionV1) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerEntryExtensionV1) UnmarshalBinary

func (s *LedgerEntryExtensionV1) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryExtensionV1Ext

type LedgerEntryExtensionV1Ext struct {
	V int32
}

LedgerEntryExtensionV1Ext is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewLedgerEntryExtensionV1Ext

func NewLedgerEntryExtensionV1Ext(v int32, value interface{}) (result LedgerEntryExtensionV1Ext, err error)

NewLedgerEntryExtensionV1Ext creates a new LedgerEntryExtensionV1Ext.

func (LedgerEntryExtensionV1Ext) ArmForSwitch

func (u LedgerEntryExtensionV1Ext) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of LedgerEntryExtensionV1Ext

func (*LedgerEntryExtensionV1Ext) DecodeFrom

func (u *LedgerEntryExtensionV1Ext) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerEntryExtensionV1Ext) EncodeTo

func (u LedgerEntryExtensionV1Ext) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerEntryExtensionV1Ext) MarshalBinary

func (s LedgerEntryExtensionV1Ext) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryExtensionV1Ext) SwitchFieldName

func (u LedgerEntryExtensionV1Ext) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*LedgerEntryExtensionV1Ext) UnmarshalBinary

func (s *LedgerEntryExtensionV1Ext) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerEntryType

type LedgerEntryType int32

LedgerEntryType is an XDR Enum defines as:

enum LedgerEntryType
 {
     ACCOUNT = 0,
     TRUSTLINE = 1,
     OFFER = 2,
     DATA = 3,
     CLAIMABLE_BALANCE = 4,
     LIQUIDITY_POOL = 5,
     CONTRACT_DATA = 6,
     CONTRACT_CODE = 7,
     CONFIG_SETTING = 8,
     TTL = 9
 };
const (
	LedgerEntryTypeAccount          LedgerEntryType = 0
	LedgerEntryTypeTrustline        LedgerEntryType = 1
	LedgerEntryTypeOffer            LedgerEntryType = 2
	LedgerEntryTypeData             LedgerEntryType = 3
	LedgerEntryTypeClaimableBalance LedgerEntryType = 4
	LedgerEntryTypeLiquidityPool    LedgerEntryType = 5
	LedgerEntryTypeContractData     LedgerEntryType = 6
	LedgerEntryTypeContractCode     LedgerEntryType = 7
	LedgerEntryTypeConfigSetting    LedgerEntryType = 8
	LedgerEntryTypeTtl              LedgerEntryType = 9
)

func GetBinaryCompressedLedgerKeyType

func GetBinaryCompressedLedgerKeyType(compressedKey []byte) (LedgerEntryType, error)

GetBinaryCompressedLedgerKeyType gets the key type from the result of LedgerKeyUnsafeMarshalBinaryCompress

func (*LedgerEntryType) DecodeFrom

func (e *LedgerEntryType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerEntryType) EncodeTo

func (e LedgerEntryType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerEntryType) MarshalBinary

func (s LedgerEntryType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerEntryType) String

func (e LedgerEntryType) String() string

String returns the name of `e`

func (*LedgerEntryType) UnmarshalBinary

func (s *LedgerEntryType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LedgerEntryType) ValidEnum

func (e LedgerEntryType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for LedgerEntryType

type LedgerFootprint

type LedgerFootprint struct {
	ReadOnly  []LedgerKey
	ReadWrite []LedgerKey
}

LedgerFootprint is an XDR Struct defines as:

struct LedgerFootprint
 {
     LedgerKey readOnly<>;
     LedgerKey readWrite<>;
 };

func (*LedgerFootprint) DecodeFrom

func (s *LedgerFootprint) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerFootprint) EncodeTo

func (s *LedgerFootprint) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerFootprint) MarshalBinary

func (s LedgerFootprint) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerFootprint) UnmarshalBinary

func (s *LedgerFootprint) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerHeader

type LedgerHeader struct {
	LedgerVersion      Uint32
	PreviousLedgerHash Hash
	ScpValue           StellarValue
	TxSetResultHash    Hash
	BucketListHash     Hash
	LedgerSeq          Uint32
	TotalCoins         Int64
	FeePool            Int64
	InflationSeq       Uint32
	IdPool             Uint64
	BaseFee            Uint32
	BaseReserve        Uint32
	MaxTxSetSize       Uint32
	SkipList           [4]Hash
	Ext                LedgerHeaderExt
}

LedgerHeader is an XDR Struct defines as:

struct LedgerHeader
 {
     uint32 ledgerVersion;    // the protocol version of the ledger
     Hash previousLedgerHash; // hash of the previous ledger header
     StellarValue scpValue;   // what consensus agreed to
     Hash txSetResultHash;    // the TransactionResultSet that led to this ledger
     Hash bucketListHash;     // hash of the ledger state

     uint32 ledgerSeq; // sequence number of this ledger

     int64 totalCoins; // total number of stroops in existence.
                       // 10,000,000 stroops in 1 XLM

     int64 feePool;       // fees burned since last inflation run
     uint32 inflationSeq; // inflation sequence number

     uint64 idPool; // last used global ID, used for generating objects

     uint32 baseFee;     // base fee per operation in stroops
     uint32 baseReserve; // account base reserve in stroops

     uint32 maxTxSetSize; // maximum size a transaction set can be

     Hash skipList[4]; // hashes of ledgers in the past. allows you to jump back
                       // in time without walking the chain back ledger by ledger
                       // each slot contains the oldest ledger that is mod of
                       // either 50  5000  50000 or 500000 depending on index
                       // skipList[0] mod(50), skipList[1] mod(5000), etc

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     case 1:
         LedgerHeaderExtensionV1 v1;
     }
     ext;
 };

func (*LedgerHeader) DecodeFrom

func (s *LedgerHeader) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerHeader) EncodeTo

func (s *LedgerHeader) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerHeader) MarshalBinary

func (s LedgerHeader) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerHeader) Scan

func (t *LedgerHeader) Scan(src any) error

Scan reads from src into an LedgerHeader struct

func (*LedgerHeader) UnmarshalBinary

func (s *LedgerHeader) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerHeaderExt

type LedgerHeaderExt struct {
	V  int32
	V1 *LedgerHeaderExtensionV1
}

LedgerHeaderExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     case 1:
         LedgerHeaderExtensionV1 v1;
     }

func NewLedgerHeaderExt

func NewLedgerHeaderExt(v int32, value interface{}) (result LedgerHeaderExt, err error)

NewLedgerHeaderExt creates a new LedgerHeaderExt.

func (LedgerHeaderExt) ArmForSwitch

func (u LedgerHeaderExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of LedgerHeaderExt

func (*LedgerHeaderExt) DecodeFrom

func (u *LedgerHeaderExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerHeaderExt) EncodeTo

func (u LedgerHeaderExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerHeaderExt) GetV1

func (u LedgerHeaderExt) GetV1() (result LedgerHeaderExtensionV1, ok bool)

GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerHeaderExt) MarshalBinary

func (s LedgerHeaderExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerHeaderExt) MustV1

MustV1 retrieves the V1 value from the union, panicing if the value is not set.

func (LedgerHeaderExt) SwitchFieldName

func (u LedgerHeaderExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*LedgerHeaderExt) UnmarshalBinary

func (s *LedgerHeaderExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerHeaderExtensionV1

type LedgerHeaderExtensionV1 struct {
	Flags Uint32
	Ext   LedgerHeaderExtensionV1Ext
}

LedgerHeaderExtensionV1 is an XDR Struct defines as:

struct LedgerHeaderExtensionV1
 {
     uint32 flags; // LedgerHeaderFlags

     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*LedgerHeaderExtensionV1) DecodeFrom

func (s *LedgerHeaderExtensionV1) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerHeaderExtensionV1) EncodeTo

func (s *LedgerHeaderExtensionV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerHeaderExtensionV1) MarshalBinary

func (s LedgerHeaderExtensionV1) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerHeaderExtensionV1) UnmarshalBinary

func (s *LedgerHeaderExtensionV1) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerHeaderExtensionV1Ext

type LedgerHeaderExtensionV1Ext struct {
	V int32
}

LedgerHeaderExtensionV1Ext is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewLedgerHeaderExtensionV1Ext

func NewLedgerHeaderExtensionV1Ext(v int32, value interface{}) (result LedgerHeaderExtensionV1Ext, err error)

NewLedgerHeaderExtensionV1Ext creates a new LedgerHeaderExtensionV1Ext.

func (LedgerHeaderExtensionV1Ext) ArmForSwitch

func (u LedgerHeaderExtensionV1Ext) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of LedgerHeaderExtensionV1Ext

func (*LedgerHeaderExtensionV1Ext) DecodeFrom

func (u *LedgerHeaderExtensionV1Ext) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerHeaderExtensionV1Ext) EncodeTo

func (u LedgerHeaderExtensionV1Ext) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerHeaderExtensionV1Ext) MarshalBinary

func (s LedgerHeaderExtensionV1Ext) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerHeaderExtensionV1Ext) SwitchFieldName

func (u LedgerHeaderExtensionV1Ext) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*LedgerHeaderExtensionV1Ext) UnmarshalBinary

func (s *LedgerHeaderExtensionV1Ext) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerHeaderFlags

type LedgerHeaderFlags int32

LedgerHeaderFlags is an XDR Enum defines as:

enum LedgerHeaderFlags
 {
     DISABLE_LIQUIDITY_POOL_TRADING_FLAG = 0x1,
     DISABLE_LIQUIDITY_POOL_DEPOSIT_FLAG = 0x2,
     DISABLE_LIQUIDITY_POOL_WITHDRAWAL_FLAG = 0x4
 };
const (
	LedgerHeaderFlagsDisableLiquidityPoolTradingFlag    LedgerHeaderFlags = 1
	LedgerHeaderFlagsDisableLiquidityPoolDepositFlag    LedgerHeaderFlags = 2
	LedgerHeaderFlagsDisableLiquidityPoolWithdrawalFlag LedgerHeaderFlags = 4
)

func (*LedgerHeaderFlags) DecodeFrom

func (e *LedgerHeaderFlags) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerHeaderFlags) EncodeTo

func (e LedgerHeaderFlags) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerHeaderFlags) MarshalBinary

func (s LedgerHeaderFlags) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerHeaderFlags) String

func (e LedgerHeaderFlags) String() string

String returns the name of `e`

func (*LedgerHeaderFlags) UnmarshalBinary

func (s *LedgerHeaderFlags) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LedgerHeaderFlags) ValidEnum

func (e LedgerHeaderFlags) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for LedgerHeaderFlags

type LedgerHeaderHistoryEntry

type LedgerHeaderHistoryEntry struct {
	Hash   Hash
	Header LedgerHeader
	Ext    LedgerHeaderHistoryEntryExt
}

LedgerHeaderHistoryEntry is an XDR Struct defines as:

struct LedgerHeaderHistoryEntry
 {
     Hash hash;
     LedgerHeader header;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*LedgerHeaderHistoryEntry) DecodeFrom

func (s *LedgerHeaderHistoryEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerHeaderHistoryEntry) EncodeTo

func (s *LedgerHeaderHistoryEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerHeaderHistoryEntry) MarshalBinary

func (s LedgerHeaderHistoryEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerHeaderHistoryEntry) UnmarshalBinary

func (s *LedgerHeaderHistoryEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerHeaderHistoryEntryExt

type LedgerHeaderHistoryEntryExt struct {
	V int32
}

LedgerHeaderHistoryEntryExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewLedgerHeaderHistoryEntryExt

func NewLedgerHeaderHistoryEntryExt(v int32, value interface{}) (result LedgerHeaderHistoryEntryExt, err error)

NewLedgerHeaderHistoryEntryExt creates a new LedgerHeaderHistoryEntryExt.

func (LedgerHeaderHistoryEntryExt) ArmForSwitch

func (u LedgerHeaderHistoryEntryExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of LedgerHeaderHistoryEntryExt

func (*LedgerHeaderHistoryEntryExt) DecodeFrom

func (u *LedgerHeaderHistoryEntryExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerHeaderHistoryEntryExt) EncodeTo

func (u LedgerHeaderHistoryEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerHeaderHistoryEntryExt) MarshalBinary

func (s LedgerHeaderHistoryEntryExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerHeaderHistoryEntryExt) SwitchFieldName

func (u LedgerHeaderHistoryEntryExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*LedgerHeaderHistoryEntryExt) UnmarshalBinary

func (s *LedgerHeaderHistoryEntryExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKey

type LedgerKey struct {
	Type             LedgerEntryType
	Account          *LedgerKeyAccount
	TrustLine        *LedgerKeyTrustLine
	Offer            *LedgerKeyOffer
	Data             *LedgerKeyData
	ClaimableBalance *LedgerKeyClaimableBalance
	LiquidityPool    *LedgerKeyLiquidityPool
	ContractData     *LedgerKeyContractData
	ContractCode     *LedgerKeyContractCode
	ConfigSetting    *LedgerKeyConfigSetting
	Ttl              *LedgerKeyTtl
}

LedgerKey is an XDR Union defines as:

union LedgerKey switch (LedgerEntryType type)
 {
 case ACCOUNT:
     struct
     {
         AccountID accountID;
     } account;

 case TRUSTLINE:
     struct
     {
         AccountID accountID;
         TrustLineAsset asset;
     } trustLine;

 case OFFER:
     struct
     {
         AccountID sellerID;
         int64 offerID;
     } offer;

 case DATA:
     struct
     {
         AccountID accountID;
         string64 dataName;
     } data;

 case CLAIMABLE_BALANCE:
     struct
     {
         ClaimableBalanceID balanceID;
     } claimableBalance;

 case LIQUIDITY_POOL:
     struct
     {
         PoolID liquidityPoolID;
     } liquidityPool;
 case CONTRACT_DATA:
     struct
     {
         SCAddress contract;
         SCVal key;
         ContractDataDurability durability;
     } contractData;
 case CONTRACT_CODE:
     struct
     {
         Hash hash;
     } contractCode;
 case CONFIG_SETTING:
     struct
     {
         ConfigSettingID configSettingID;
     } configSetting;
 case TTL:
     struct
     {
         // Hash of the LedgerKey that is associated with this TTLEntry
         Hash keyHash;
     } ttl;
 };

func GetLedgerKeyFromData

func GetLedgerKeyFromData(data LedgerEntryData) (LedgerKey, error)

GetLedgerKeyFromData obtains a ledger key from LedgerEntryData

deprecated: Use `LedgerEntryData.LedgerKey()`

func NewLedgerKey

func NewLedgerKey(aType LedgerEntryType, value interface{}) (result LedgerKey, err error)

NewLedgerKey creates a new LedgerKey.

func (LedgerKey) ArmForSwitch

func (u LedgerKey) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of LedgerKey

func (*LedgerKey) DecodeFrom

func (u *LedgerKey) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerKey) EncodeTo

func (u LedgerKey) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*LedgerKey) Equals

func (key *LedgerKey) Equals(other LedgerKey) bool

Equals returns true if `other` is equivalent to `key`

func (LedgerKey) GetAccount

func (u LedgerKey) GetAccount() (result LedgerKeyAccount, ok bool)

GetAccount retrieves the Account value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerKey) GetClaimableBalance

func (u LedgerKey) GetClaimableBalance() (result LedgerKeyClaimableBalance, ok bool)

GetClaimableBalance retrieves the ClaimableBalance value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerKey) GetConfigSetting

func (u LedgerKey) GetConfigSetting() (result LedgerKeyConfigSetting, ok bool)

GetConfigSetting retrieves the ConfigSetting value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerKey) GetContractCode

func (u LedgerKey) GetContractCode() (result LedgerKeyContractCode, ok bool)

GetContractCode retrieves the ContractCode value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerKey) GetContractData

func (u LedgerKey) GetContractData() (result LedgerKeyContractData, ok bool)

GetContractData retrieves the ContractData value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerKey) GetData

func (u LedgerKey) GetData() (result LedgerKeyData, ok bool)

GetData retrieves the Data value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerKey) GetLiquidityPool

func (u LedgerKey) GetLiquidityPool() (result LedgerKeyLiquidityPool, ok bool)

GetLiquidityPool retrieves the LiquidityPool value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerKey) GetOffer

func (u LedgerKey) GetOffer() (result LedgerKeyOffer, ok bool)

GetOffer retrieves the Offer value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerKey) GetTrustLine

func (u LedgerKey) GetTrustLine() (result LedgerKeyTrustLine, ok bool)

GetTrustLine retrieves the TrustLine value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerKey) GetTtl

func (u LedgerKey) GetTtl() (result LedgerKeyTtl, ok bool)

GetTtl retrieves the Ttl value from the union, returning ok if the union's switch indicated the value is valid.

func (*LedgerKey) LedgerKey

func (key *LedgerKey) LedgerKey() LedgerKey

LedgerKey implements the `Keyer` interface

func (LedgerKey) MarshalBinary

func (s LedgerKey) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerKey) MarshalBinaryBase64

func (key LedgerKey) MarshalBinaryBase64() (string, error)

MarshalBinaryBase64 marshals XDR into a binary form and then encodes it using base64.

func (LedgerKey) MustAccount

func (u LedgerKey) MustAccount() LedgerKeyAccount

MustAccount retrieves the Account value from the union, panicing if the value is not set.

func (LedgerKey) MustClaimableBalance

func (u LedgerKey) MustClaimableBalance() LedgerKeyClaimableBalance

MustClaimableBalance retrieves the ClaimableBalance value from the union, panicing if the value is not set.

func (LedgerKey) MustConfigSetting

func (u LedgerKey) MustConfigSetting() LedgerKeyConfigSetting

MustConfigSetting retrieves the ConfigSetting value from the union, panicing if the value is not set.

func (LedgerKey) MustContractCode

func (u LedgerKey) MustContractCode() LedgerKeyContractCode

MustContractCode retrieves the ContractCode value from the union, panicing if the value is not set.

func (LedgerKey) MustContractData

func (u LedgerKey) MustContractData() LedgerKeyContractData

MustContractData retrieves the ContractData value from the union, panicing if the value is not set.

func (LedgerKey) MustData

func (u LedgerKey) MustData() LedgerKeyData

MustData retrieves the Data value from the union, panicing if the value is not set.

func (LedgerKey) MustLiquidityPool

func (u LedgerKey) MustLiquidityPool() LedgerKeyLiquidityPool

MustLiquidityPool retrieves the LiquidityPool value from the union, panicing if the value is not set.

func (LedgerKey) MustOffer

func (u LedgerKey) MustOffer() LedgerKeyOffer

MustOffer retrieves the Offer value from the union, panicing if the value is not set.

func (LedgerKey) MustTrustLine

func (u LedgerKey) MustTrustLine() LedgerKeyTrustLine

MustTrustLine retrieves the TrustLine value from the union, panicing if the value is not set.

func (LedgerKey) MustTtl

func (u LedgerKey) MustTtl() LedgerKeyTtl

MustTtl retrieves the Ttl value from the union, panicing if the value is not set.

func (*LedgerKey) SetAccount

func (key *LedgerKey) SetAccount(account AccountId) error

SetAccount mutates `key` such that it represents the identity of `account`

func (*LedgerKey) SetClaimableBalance

func (key *LedgerKey) SetClaimableBalance(balanceID ClaimableBalanceId) error

SetClaimableBalance mutates `key` such that it represents the identity of a claimable balance.

func (*LedgerKey) SetConfigSetting

func (key *LedgerKey) SetConfigSetting(configSettingID ConfigSettingId) error

SetConfigSetting mutates `key` such that it represents the identity of a config setting entry.

func (*LedgerKey) SetContractCode

func (key *LedgerKey) SetContractCode(contractID Hash) error

SetContractCode mutates `key` such that it represents the identity of a contract code entry.

func (*LedgerKey) SetContractData

func (key *LedgerKey) SetContractData(contract ScAddress,
	keyVal ScVal,
	keyDurability ContractDataDurability) error

SetContractData mutates `key` such that it represents the identity of a contract data entry.

func (*LedgerKey) SetData

func (key *LedgerKey) SetData(account AccountId, name string) error

SetData mutates `key` such that it represents the identity of the data entry owned by `account` and for `name`.

func (*LedgerKey) SetLiquidityPool

func (key *LedgerKey) SetLiquidityPool(poolID PoolId) error

SetLiquidityPool mutates `key` such that it represents the identity of a liquidity pool.

func (*LedgerKey) SetOffer

func (key *LedgerKey) SetOffer(account AccountId, id uint64) error

SetOffer mutates `key` such that it represents the identity of the data entry owned by `account` and for offer `id`.

func (*LedgerKey) SetTrustline

func (key *LedgerKey) SetTrustline(account AccountId, line TrustLineAsset) error

SetTrustline mutates `key` such that it represents the identity of the trustline owned by `account` and for `asset`.

func (*LedgerKey) SetTtl

func (key *LedgerKey) SetTtl(keyHash Hash) error

SetTtl mutates `key` such that it represents the identity of an expiration entry.

func (LedgerKey) SwitchFieldName

func (u LedgerKey) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*LedgerKey) UnmarshalBinary

func (s *LedgerKey) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyAccount

type LedgerKeyAccount struct {
	AccountId AccountId
}

LedgerKeyAccount is an XDR NestedStruct defines as:

struct
     {
         AccountID accountID;
     }

func (*LedgerKeyAccount) DecodeFrom

func (s *LedgerKeyAccount) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyAccount) EncodeTo

func (s *LedgerKeyAccount) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyAccount) MarshalBinary

func (s LedgerKeyAccount) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyAccount) UnmarshalBinary

func (s *LedgerKeyAccount) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyClaimableBalance

type LedgerKeyClaimableBalance struct {
	BalanceId ClaimableBalanceId
}

LedgerKeyClaimableBalance is an XDR NestedStruct defines as:

struct
     {
         ClaimableBalanceID balanceID;
     }

func (*LedgerKeyClaimableBalance) DecodeFrom

func (s *LedgerKeyClaimableBalance) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyClaimableBalance) EncodeTo

func (s *LedgerKeyClaimableBalance) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyClaimableBalance) MarshalBinary

func (s LedgerKeyClaimableBalance) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyClaimableBalance) UnmarshalBinary

func (s *LedgerKeyClaimableBalance) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyConfigSetting

type LedgerKeyConfigSetting struct {
	ConfigSettingId ConfigSettingId
}

LedgerKeyConfigSetting is an XDR NestedStruct defines as:

struct
     {
         ConfigSettingID configSettingID;
     }

func (*LedgerKeyConfigSetting) DecodeFrom

func (s *LedgerKeyConfigSetting) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyConfigSetting) EncodeTo

func (s *LedgerKeyConfigSetting) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyConfigSetting) MarshalBinary

func (s LedgerKeyConfigSetting) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyConfigSetting) UnmarshalBinary

func (s *LedgerKeyConfigSetting) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyContractCode

type LedgerKeyContractCode struct {
	Hash Hash
}

LedgerKeyContractCode is an XDR NestedStruct defines as:

struct
     {
         Hash hash;
     }

func (*LedgerKeyContractCode) DecodeFrom

func (s *LedgerKeyContractCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyContractCode) EncodeTo

func (s *LedgerKeyContractCode) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyContractCode) MarshalBinary

func (s LedgerKeyContractCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyContractCode) UnmarshalBinary

func (s *LedgerKeyContractCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyContractData

type LedgerKeyContractData struct {
	Contract   ScAddress
	Key        ScVal
	Durability ContractDataDurability
}

LedgerKeyContractData is an XDR NestedStruct defines as:

struct
     {
         SCAddress contract;
         SCVal key;
         ContractDataDurability durability;
     }

func (*LedgerKeyContractData) DecodeFrom

func (s *LedgerKeyContractData) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyContractData) EncodeTo

func (s *LedgerKeyContractData) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyContractData) MarshalBinary

func (s LedgerKeyContractData) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyContractData) UnmarshalBinary

func (s *LedgerKeyContractData) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyData

type LedgerKeyData struct {
	AccountId AccountId
	DataName  String64
}

LedgerKeyData is an XDR NestedStruct defines as:

struct
     {
         AccountID accountID;
         string64 dataName;
     }

func (*LedgerKeyData) DecodeFrom

func (s *LedgerKeyData) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyData) EncodeTo

func (s *LedgerKeyData) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyData) MarshalBinary

func (s LedgerKeyData) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyData) UnmarshalBinary

func (s *LedgerKeyData) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyLiquidityPool

type LedgerKeyLiquidityPool struct {
	LiquidityPoolId PoolId
}

LedgerKeyLiquidityPool is an XDR NestedStruct defines as:

struct
     {
         PoolID liquidityPoolID;
     }

func (*LedgerKeyLiquidityPool) DecodeFrom

func (s *LedgerKeyLiquidityPool) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyLiquidityPool) EncodeTo

func (s *LedgerKeyLiquidityPool) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyLiquidityPool) MarshalBinary

func (s LedgerKeyLiquidityPool) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyLiquidityPool) UnmarshalBinary

func (s *LedgerKeyLiquidityPool) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyOffer

type LedgerKeyOffer struct {
	SellerId AccountId
	OfferId  Int64
}

LedgerKeyOffer is an XDR NestedStruct defines as:

struct
     {
         AccountID sellerID;
         int64 offerID;
     }

func (*LedgerKeyOffer) DecodeFrom

func (s *LedgerKeyOffer) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyOffer) EncodeTo

func (s *LedgerKeyOffer) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyOffer) MarshalBinary

func (s LedgerKeyOffer) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyOffer) UnmarshalBinary

func (s *LedgerKeyOffer) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyTrustLine

type LedgerKeyTrustLine struct {
	AccountId AccountId
	Asset     TrustLineAsset
}

LedgerKeyTrustLine is an XDR NestedStruct defines as:

struct
     {
         AccountID accountID;
         TrustLineAsset asset;
     }

func (*LedgerKeyTrustLine) DecodeFrom

func (s *LedgerKeyTrustLine) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyTrustLine) EncodeTo

func (s *LedgerKeyTrustLine) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyTrustLine) MarshalBinary

func (s LedgerKeyTrustLine) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyTrustLine) UnmarshalBinary

func (s *LedgerKeyTrustLine) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerKeyTtl

type LedgerKeyTtl struct {
	KeyHash Hash
}

LedgerKeyTtl is an XDR NestedStruct defines as:

struct
     {
         // Hash of the LedgerKey that is associated with this TTLEntry
         Hash keyHash;
     }

func (*LedgerKeyTtl) DecodeFrom

func (s *LedgerKeyTtl) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerKeyTtl) EncodeTo

func (s *LedgerKeyTtl) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerKeyTtl) MarshalBinary

func (s LedgerKeyTtl) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerKeyTtl) UnmarshalBinary

func (s *LedgerKeyTtl) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerScpMessages

type LedgerScpMessages struct {
	LedgerSeq Uint32
	Messages  []ScpEnvelope
}

LedgerScpMessages is an XDR Struct defines as:

struct LedgerSCPMessages
 {
     uint32 ledgerSeq;
     SCPEnvelope messages<>;
 };

func (*LedgerScpMessages) DecodeFrom

func (s *LedgerScpMessages) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LedgerScpMessages) EncodeTo

func (s *LedgerScpMessages) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerScpMessages) MarshalBinary

func (s LedgerScpMessages) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LedgerScpMessages) UnmarshalBinary

func (s *LedgerScpMessages) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerUpgrade

type LedgerUpgrade struct {
	Type                   LedgerUpgradeType
	NewLedgerVersion       *Uint32
	NewBaseFee             *Uint32
	NewMaxTxSetSize        *Uint32
	NewBaseReserve         *Uint32
	NewFlags               *Uint32
	NewConfig              *ConfigUpgradeSetKey
	NewMaxSorobanTxSetSize *Uint32
}

LedgerUpgrade is an XDR Union defines as:

union LedgerUpgrade switch (LedgerUpgradeType type)
 {
 case LEDGER_UPGRADE_VERSION:
     uint32 newLedgerVersion; // update ledgerVersion
 case LEDGER_UPGRADE_BASE_FEE:
     uint32 newBaseFee; // update baseFee
 case LEDGER_UPGRADE_MAX_TX_SET_SIZE:
     uint32 newMaxTxSetSize; // update maxTxSetSize
 case LEDGER_UPGRADE_BASE_RESERVE:
     uint32 newBaseReserve; // update baseReserve
 case LEDGER_UPGRADE_FLAGS:
     uint32 newFlags; // update flags
 case LEDGER_UPGRADE_CONFIG:
     // Update arbitrary `ConfigSetting` entries identified by the key.
     ConfigUpgradeSetKey newConfig;
 case LEDGER_UPGRADE_MAX_SOROBAN_TX_SET_SIZE:
     // Update ConfigSettingContractExecutionLanesV0.ledgerMaxTxCount without
     // using `LEDGER_UPGRADE_CONFIG`.
     uint32 newMaxSorobanTxSetSize;
 };

func NewLedgerUpgrade

func NewLedgerUpgrade(aType LedgerUpgradeType, value interface{}) (result LedgerUpgrade, err error)

NewLedgerUpgrade creates a new LedgerUpgrade.

func (LedgerUpgrade) ArmForSwitch

func (u LedgerUpgrade) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of LedgerUpgrade

func (*LedgerUpgrade) DecodeFrom

func (u *LedgerUpgrade) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerUpgrade) EncodeTo

func (u LedgerUpgrade) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerUpgrade) GetNewBaseFee

func (u LedgerUpgrade) GetNewBaseFee() (result Uint32, ok bool)

GetNewBaseFee retrieves the NewBaseFee value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerUpgrade) GetNewBaseReserve

func (u LedgerUpgrade) GetNewBaseReserve() (result Uint32, ok bool)

GetNewBaseReserve retrieves the NewBaseReserve value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerUpgrade) GetNewConfig

func (u LedgerUpgrade) GetNewConfig() (result ConfigUpgradeSetKey, ok bool)

GetNewConfig retrieves the NewConfig value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerUpgrade) GetNewFlags

func (u LedgerUpgrade) GetNewFlags() (result Uint32, ok bool)

GetNewFlags retrieves the NewFlags value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerUpgrade) GetNewLedgerVersion

func (u LedgerUpgrade) GetNewLedgerVersion() (result Uint32, ok bool)

GetNewLedgerVersion retrieves the NewLedgerVersion value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerUpgrade) GetNewMaxSorobanTxSetSize

func (u LedgerUpgrade) GetNewMaxSorobanTxSetSize() (result Uint32, ok bool)

GetNewMaxSorobanTxSetSize retrieves the NewMaxSorobanTxSetSize value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerUpgrade) GetNewMaxTxSetSize

func (u LedgerUpgrade) GetNewMaxTxSetSize() (result Uint32, ok bool)

GetNewMaxTxSetSize retrieves the NewMaxTxSetSize value from the union, returning ok if the union's switch indicated the value is valid.

func (LedgerUpgrade) MarshalBinary

func (s LedgerUpgrade) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerUpgrade) MustNewBaseFee

func (u LedgerUpgrade) MustNewBaseFee() Uint32

MustNewBaseFee retrieves the NewBaseFee value from the union, panicing if the value is not set.

func (LedgerUpgrade) MustNewBaseReserve

func (u LedgerUpgrade) MustNewBaseReserve() Uint32

MustNewBaseReserve retrieves the NewBaseReserve value from the union, panicing if the value is not set.

func (LedgerUpgrade) MustNewConfig

func (u LedgerUpgrade) MustNewConfig() ConfigUpgradeSetKey

MustNewConfig retrieves the NewConfig value from the union, panicing if the value is not set.

func (LedgerUpgrade) MustNewFlags

func (u LedgerUpgrade) MustNewFlags() Uint32

MustNewFlags retrieves the NewFlags value from the union, panicing if the value is not set.

func (LedgerUpgrade) MustNewLedgerVersion

func (u LedgerUpgrade) MustNewLedgerVersion() Uint32

MustNewLedgerVersion retrieves the NewLedgerVersion value from the union, panicing if the value is not set.

func (LedgerUpgrade) MustNewMaxSorobanTxSetSize

func (u LedgerUpgrade) MustNewMaxSorobanTxSetSize() Uint32

MustNewMaxSorobanTxSetSize retrieves the NewMaxSorobanTxSetSize value from the union, panicing if the value is not set.

func (LedgerUpgrade) MustNewMaxTxSetSize

func (u LedgerUpgrade) MustNewMaxTxSetSize() Uint32

MustNewMaxTxSetSize retrieves the NewMaxTxSetSize value from the union, panicing if the value is not set.

func (*LedgerUpgrade) Scan

func (t *LedgerUpgrade) Scan(src any) error

Scan reads from src into an LedgerUpgrade struct

func (LedgerUpgrade) SwitchFieldName

func (u LedgerUpgrade) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*LedgerUpgrade) UnmarshalBinary

func (s *LedgerUpgrade) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LedgerUpgradeType

type LedgerUpgradeType int32

LedgerUpgradeType is an XDR Enum defines as:

enum LedgerUpgradeType
 {
     LEDGER_UPGRADE_VERSION = 1,
     LEDGER_UPGRADE_BASE_FEE = 2,
     LEDGER_UPGRADE_MAX_TX_SET_SIZE = 3,
     LEDGER_UPGRADE_BASE_RESERVE = 4,
     LEDGER_UPGRADE_FLAGS = 5,
     LEDGER_UPGRADE_CONFIG = 6,
     LEDGER_UPGRADE_MAX_SOROBAN_TX_SET_SIZE = 7
 };
const (
	LedgerUpgradeTypeLedgerUpgradeVersion             LedgerUpgradeType = 1
	LedgerUpgradeTypeLedgerUpgradeBaseFee             LedgerUpgradeType = 2
	LedgerUpgradeTypeLedgerUpgradeMaxTxSetSize        LedgerUpgradeType = 3
	LedgerUpgradeTypeLedgerUpgradeBaseReserve         LedgerUpgradeType = 4
	LedgerUpgradeTypeLedgerUpgradeFlags               LedgerUpgradeType = 5
	LedgerUpgradeTypeLedgerUpgradeConfig              LedgerUpgradeType = 6
	LedgerUpgradeTypeLedgerUpgradeMaxSorobanTxSetSize LedgerUpgradeType = 7
)

func (*LedgerUpgradeType) DecodeFrom

func (e *LedgerUpgradeType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LedgerUpgradeType) EncodeTo

func (e LedgerUpgradeType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LedgerUpgradeType) MarshalBinary

func (s LedgerUpgradeType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LedgerUpgradeType) String

func (e LedgerUpgradeType) String() string

String returns the name of `e`

func (*LedgerUpgradeType) UnmarshalBinary

func (s *LedgerUpgradeType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LedgerUpgradeType) ValidEnum

func (e LedgerUpgradeType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for LedgerUpgradeType

type Liabilities

type Liabilities struct {
	Buying  Int64
	Selling Int64
}

Liabilities is an XDR Struct defines as:

struct Liabilities
 {
     int64 buying;
     int64 selling;
 };

func (*Liabilities) DecodeFrom

func (s *Liabilities) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Liabilities) EncodeTo

func (s *Liabilities) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Liabilities) MarshalBinary

func (s Liabilities) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Liabilities) UnmarshalBinary

func (s *Liabilities) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolConstantProductParameters

type LiquidityPoolConstantProductParameters struct {
	AssetA Asset
	AssetB Asset
	Fee    Int32
}

LiquidityPoolConstantProductParameters is an XDR Struct defines as:

struct LiquidityPoolConstantProductParameters
 {
     Asset assetA; // assetA < assetB
     Asset assetB;
     int32 fee; // Fee is in basis points, so the actual rate is (fee/100)%
 };

func (*LiquidityPoolConstantProductParameters) DecodeFrom

func (s *LiquidityPoolConstantProductParameters) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LiquidityPoolConstantProductParameters) EncodeTo

func (s *LiquidityPoolConstantProductParameters) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolConstantProductParameters) MarshalBinary

func (s LiquidityPoolConstantProductParameters) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LiquidityPoolConstantProductParameters) UnmarshalBinary

func (s *LiquidityPoolConstantProductParameters) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolDepositOp

type LiquidityPoolDepositOp struct {
	LiquidityPoolId PoolId
	MaxAmountA      Int64
	MaxAmountB      Int64
	MinPrice        Price
	MaxPrice        Price
}

LiquidityPoolDepositOp is an XDR Struct defines as:

struct LiquidityPoolDepositOp
 {
     PoolID liquidityPoolID;
     int64 maxAmountA; // maximum amount of first asset to deposit
     int64 maxAmountB; // maximum amount of second asset to deposit
     Price minPrice;   // minimum depositA/depositB
     Price maxPrice;   // maximum depositA/depositB
 };

func (*LiquidityPoolDepositOp) DecodeFrom

func (s *LiquidityPoolDepositOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LiquidityPoolDepositOp) EncodeTo

func (s *LiquidityPoolDepositOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolDepositOp) MarshalBinary

func (s LiquidityPoolDepositOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LiquidityPoolDepositOp) UnmarshalBinary

func (s *LiquidityPoolDepositOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolDepositResult

type LiquidityPoolDepositResult struct {
	Code LiquidityPoolDepositResultCode
}

LiquidityPoolDepositResult is an XDR Union defines as:

union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code)
 {
 case LIQUIDITY_POOL_DEPOSIT_SUCCESS:
     void;
 case LIQUIDITY_POOL_DEPOSIT_MALFORMED:
 case LIQUIDITY_POOL_DEPOSIT_NO_TRUST:
 case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED:
 case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED:
 case LIQUIDITY_POOL_DEPOSIT_LINE_FULL:
 case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE:
 case LIQUIDITY_POOL_DEPOSIT_POOL_FULL:
     void;
 };

func NewLiquidityPoolDepositResult

func NewLiquidityPoolDepositResult(code LiquidityPoolDepositResultCode, value interface{}) (result LiquidityPoolDepositResult, err error)

NewLiquidityPoolDepositResult creates a new LiquidityPoolDepositResult.

func (LiquidityPoolDepositResult) ArmForSwitch

func (u LiquidityPoolDepositResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of LiquidityPoolDepositResult

func (*LiquidityPoolDepositResult) DecodeFrom

func (u *LiquidityPoolDepositResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LiquidityPoolDepositResult) EncodeTo

func (u LiquidityPoolDepositResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolDepositResult) MarshalBinary

func (s LiquidityPoolDepositResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LiquidityPoolDepositResult) SwitchFieldName

func (u LiquidityPoolDepositResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*LiquidityPoolDepositResult) UnmarshalBinary

func (s *LiquidityPoolDepositResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolDepositResultCode

type LiquidityPoolDepositResultCode int32

LiquidityPoolDepositResultCode is an XDR Enum defines as:

enum LiquidityPoolDepositResultCode
 {
     // codes considered as "success" for the operation
     LIQUIDITY_POOL_DEPOSIT_SUCCESS = 0,

     // codes considered as "failure" for the operation
     LIQUIDITY_POOL_DEPOSIT_MALFORMED = -1,      // bad input
     LIQUIDITY_POOL_DEPOSIT_NO_TRUST = -2,       // no trust line for one of the
                                                 // assets
     LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED = -3, // not authorized for one of the
                                                 // assets
     LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED = -4,    // not enough balance for one of
                                                 // the assets
     LIQUIDITY_POOL_DEPOSIT_LINE_FULL = -5,      // pool share trust line doesn't
                                                 // have sufficient limit
     LIQUIDITY_POOL_DEPOSIT_BAD_PRICE = -6,      // deposit price outside bounds
     LIQUIDITY_POOL_DEPOSIT_POOL_FULL = -7       // pool reserves are full
 };
const (
	LiquidityPoolDepositResultCodeLiquidityPoolDepositSuccess       LiquidityPoolDepositResultCode = 0
	LiquidityPoolDepositResultCodeLiquidityPoolDepositMalformed     LiquidityPoolDepositResultCode = -1
	LiquidityPoolDepositResultCodeLiquidityPoolDepositNoTrust       LiquidityPoolDepositResultCode = -2
	LiquidityPoolDepositResultCodeLiquidityPoolDepositNotAuthorized LiquidityPoolDepositResultCode = -3
	LiquidityPoolDepositResultCodeLiquidityPoolDepositUnderfunded   LiquidityPoolDepositResultCode = -4
	LiquidityPoolDepositResultCodeLiquidityPoolDepositLineFull      LiquidityPoolDepositResultCode = -5
	LiquidityPoolDepositResultCodeLiquidityPoolDepositBadPrice      LiquidityPoolDepositResultCode = -6
	LiquidityPoolDepositResultCodeLiquidityPoolDepositPoolFull      LiquidityPoolDepositResultCode = -7
)

func (*LiquidityPoolDepositResultCode) DecodeFrom

func (e *LiquidityPoolDepositResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LiquidityPoolDepositResultCode) EncodeTo

func (e LiquidityPoolDepositResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolDepositResultCode) MarshalBinary

func (s LiquidityPoolDepositResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LiquidityPoolDepositResultCode) String

String returns the name of `e`

func (*LiquidityPoolDepositResultCode) UnmarshalBinary

func (s *LiquidityPoolDepositResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LiquidityPoolDepositResultCode) ValidEnum

func (e LiquidityPoolDepositResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for LiquidityPoolDepositResultCode

type LiquidityPoolEntry

type LiquidityPoolEntry struct {
	LiquidityPoolId PoolId
	Body            LiquidityPoolEntryBody
}

LiquidityPoolEntry is an XDR Struct defines as:

struct LiquidityPoolEntry
 {
     PoolID liquidityPoolID;

     union switch (LiquidityPoolType type)
     {
     case LIQUIDITY_POOL_CONSTANT_PRODUCT:
         struct
         {
             LiquidityPoolConstantProductParameters params;

             int64 reserveA;        // amount of A in the pool
             int64 reserveB;        // amount of B in the pool
             int64 totalPoolShares; // total number of pool shares issued
             int64 poolSharesTrustLineCount; // number of trust lines for the
                                             // associated pool shares
         } constantProduct;
     }
     body;
 };

func (*LiquidityPoolEntry) DecodeFrom

func (s *LiquidityPoolEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LiquidityPoolEntry) EncodeTo

func (s *LiquidityPoolEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolEntry) MarshalBinary

func (s LiquidityPoolEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LiquidityPoolEntry) UnmarshalBinary

func (s *LiquidityPoolEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolEntryBody

type LiquidityPoolEntryBody struct {
	Type            LiquidityPoolType
	ConstantProduct *LiquidityPoolEntryConstantProduct
}

LiquidityPoolEntryBody is an XDR NestedUnion defines as:

union switch (LiquidityPoolType type)
     {
     case LIQUIDITY_POOL_CONSTANT_PRODUCT:
         struct
         {
             LiquidityPoolConstantProductParameters params;

             int64 reserveA;        // amount of A in the pool
             int64 reserveB;        // amount of B in the pool
             int64 totalPoolShares; // total number of pool shares issued
             int64 poolSharesTrustLineCount; // number of trust lines for the
                                             // associated pool shares
         } constantProduct;
     }

func NewLiquidityPoolEntryBody

func NewLiquidityPoolEntryBody(aType LiquidityPoolType, value interface{}) (result LiquidityPoolEntryBody, err error)

NewLiquidityPoolEntryBody creates a new LiquidityPoolEntryBody.

func (LiquidityPoolEntryBody) ArmForSwitch

func (u LiquidityPoolEntryBody) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of LiquidityPoolEntryBody

func (*LiquidityPoolEntryBody) DecodeFrom

func (u *LiquidityPoolEntryBody) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LiquidityPoolEntryBody) EncodeTo

func (u LiquidityPoolEntryBody) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolEntryBody) GetConstantProduct

func (u LiquidityPoolEntryBody) GetConstantProduct() (result LiquidityPoolEntryConstantProduct, ok bool)

GetConstantProduct retrieves the ConstantProduct value from the union, returning ok if the union's switch indicated the value is valid.

func (LiquidityPoolEntryBody) MarshalBinary

func (s LiquidityPoolEntryBody) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LiquidityPoolEntryBody) MustConstantProduct

MustConstantProduct retrieves the ConstantProduct value from the union, panicing if the value is not set.

func (LiquidityPoolEntryBody) SwitchFieldName

func (u LiquidityPoolEntryBody) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*LiquidityPoolEntryBody) UnmarshalBinary

func (s *LiquidityPoolEntryBody) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolEntryConstantProduct

type LiquidityPoolEntryConstantProduct struct {
	Params                   LiquidityPoolConstantProductParameters
	ReserveA                 Int64
	ReserveB                 Int64
	TotalPoolShares          Int64
	PoolSharesTrustLineCount Int64
}

LiquidityPoolEntryConstantProduct is an XDR NestedStruct defines as:

struct
         {
             LiquidityPoolConstantProductParameters params;

             int64 reserveA;        // amount of A in the pool
             int64 reserveB;        // amount of B in the pool
             int64 totalPoolShares; // total number of pool shares issued
             int64 poolSharesTrustLineCount; // number of trust lines for the
                                             // associated pool shares
         }

func (*LiquidityPoolEntryConstantProduct) DecodeFrom

func (s *LiquidityPoolEntryConstantProduct) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LiquidityPoolEntryConstantProduct) EncodeTo

func (s *LiquidityPoolEntryConstantProduct) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolEntryConstantProduct) MarshalBinary

func (s LiquidityPoolEntryConstantProduct) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LiquidityPoolEntryConstantProduct) UnmarshalBinary

func (s *LiquidityPoolEntryConstantProduct) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolParameters

type LiquidityPoolParameters struct {
	Type            LiquidityPoolType
	ConstantProduct *LiquidityPoolConstantProductParameters
}

LiquidityPoolParameters is an XDR Union defines as:

union LiquidityPoolParameters switch (LiquidityPoolType type)
 {
 case LIQUIDITY_POOL_CONSTANT_PRODUCT:
     LiquidityPoolConstantProductParameters constantProduct;
 };

func NewLiquidityPoolParameters

func NewLiquidityPoolParameters(aType LiquidityPoolType, value interface{}) (result LiquidityPoolParameters, err error)

NewLiquidityPoolParameters creates a new LiquidityPoolParameters.

func (LiquidityPoolParameters) ArmForSwitch

func (u LiquidityPoolParameters) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of LiquidityPoolParameters

func (*LiquidityPoolParameters) DecodeFrom

func (u *LiquidityPoolParameters) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LiquidityPoolParameters) EncodeTo

func (u LiquidityPoolParameters) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolParameters) GetConstantProduct

func (u LiquidityPoolParameters) GetConstantProduct() (result LiquidityPoolConstantProductParameters, ok bool)

GetConstantProduct retrieves the ConstantProduct value from the union, returning ok if the union's switch indicated the value is valid.

func (LiquidityPoolParameters) MarshalBinary

func (s LiquidityPoolParameters) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LiquidityPoolParameters) MustConstantProduct

MustConstantProduct retrieves the ConstantProduct value from the union, panicing if the value is not set.

func (LiquidityPoolParameters) SwitchFieldName

func (u LiquidityPoolParameters) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*LiquidityPoolParameters) UnmarshalBinary

func (s *LiquidityPoolParameters) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolType

type LiquidityPoolType int32

LiquidityPoolType is an XDR Enum defines as:

enum LiquidityPoolType
 {
     LIQUIDITY_POOL_CONSTANT_PRODUCT = 0
 };
const (
	LiquidityPoolTypeLiquidityPoolConstantProduct LiquidityPoolType = 0
)

func (*LiquidityPoolType) DecodeFrom

func (e *LiquidityPoolType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LiquidityPoolType) EncodeTo

func (e LiquidityPoolType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolType) MarshalBinary

func (s LiquidityPoolType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LiquidityPoolType) String

func (e LiquidityPoolType) String() string

String returns the name of `e`

func (*LiquidityPoolType) UnmarshalBinary

func (s *LiquidityPoolType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LiquidityPoolType) ValidEnum

func (e LiquidityPoolType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for LiquidityPoolType

type LiquidityPoolWithdrawOp

type LiquidityPoolWithdrawOp struct {
	LiquidityPoolId PoolId
	Amount          Int64
	MinAmountA      Int64
	MinAmountB      Int64
}

LiquidityPoolWithdrawOp is an XDR Struct defines as:

struct LiquidityPoolWithdrawOp
 {
     PoolID liquidityPoolID;
     int64 amount;     // amount of pool shares to withdraw
     int64 minAmountA; // minimum amount of first asset to withdraw
     int64 minAmountB; // minimum amount of second asset to withdraw
 };

func (*LiquidityPoolWithdrawOp) DecodeFrom

func (s *LiquidityPoolWithdrawOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*LiquidityPoolWithdrawOp) EncodeTo

func (s *LiquidityPoolWithdrawOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolWithdrawOp) MarshalBinary

func (s LiquidityPoolWithdrawOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*LiquidityPoolWithdrawOp) UnmarshalBinary

func (s *LiquidityPoolWithdrawOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolWithdrawResult

type LiquidityPoolWithdrawResult struct {
	Code LiquidityPoolWithdrawResultCode
}

LiquidityPoolWithdrawResult is an XDR Union defines as:

union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code)
 {
 case LIQUIDITY_POOL_WITHDRAW_SUCCESS:
     void;
 case LIQUIDITY_POOL_WITHDRAW_MALFORMED:
 case LIQUIDITY_POOL_WITHDRAW_NO_TRUST:
 case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED:
 case LIQUIDITY_POOL_WITHDRAW_LINE_FULL:
 case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM:
     void;
 };

func NewLiquidityPoolWithdrawResult

func NewLiquidityPoolWithdrawResult(code LiquidityPoolWithdrawResultCode, value interface{}) (result LiquidityPoolWithdrawResult, err error)

NewLiquidityPoolWithdrawResult creates a new LiquidityPoolWithdrawResult.

func (LiquidityPoolWithdrawResult) ArmForSwitch

func (u LiquidityPoolWithdrawResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of LiquidityPoolWithdrawResult

func (*LiquidityPoolWithdrawResult) DecodeFrom

func (u *LiquidityPoolWithdrawResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LiquidityPoolWithdrawResult) EncodeTo

func (u LiquidityPoolWithdrawResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolWithdrawResult) MarshalBinary

func (s LiquidityPoolWithdrawResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LiquidityPoolWithdrawResult) SwitchFieldName

func (u LiquidityPoolWithdrawResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*LiquidityPoolWithdrawResult) UnmarshalBinary

func (s *LiquidityPoolWithdrawResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type LiquidityPoolWithdrawResultCode

type LiquidityPoolWithdrawResultCode int32

LiquidityPoolWithdrawResultCode is an XDR Enum defines as:

enum LiquidityPoolWithdrawResultCode
 {
     // codes considered as "success" for the operation
     LIQUIDITY_POOL_WITHDRAW_SUCCESS = 0,

     // codes considered as "failure" for the operation
     LIQUIDITY_POOL_WITHDRAW_MALFORMED = -1,    // bad input
     LIQUIDITY_POOL_WITHDRAW_NO_TRUST = -2,     // no trust line for one of the
                                                // assets
     LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED = -3,  // not enough balance of the
                                                // pool share
     LIQUIDITY_POOL_WITHDRAW_LINE_FULL = -4,    // would go above limit for one
                                                // of the assets
     LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM = -5 // didn't withdraw enough
 };
const (
	LiquidityPoolWithdrawResultCodeLiquidityPoolWithdrawSuccess      LiquidityPoolWithdrawResultCode = 0
	LiquidityPoolWithdrawResultCodeLiquidityPoolWithdrawMalformed    LiquidityPoolWithdrawResultCode = -1
	LiquidityPoolWithdrawResultCodeLiquidityPoolWithdrawNoTrust      LiquidityPoolWithdrawResultCode = -2
	LiquidityPoolWithdrawResultCodeLiquidityPoolWithdrawUnderfunded  LiquidityPoolWithdrawResultCode = -3
	LiquidityPoolWithdrawResultCodeLiquidityPoolWithdrawLineFull     LiquidityPoolWithdrawResultCode = -4
	LiquidityPoolWithdrawResultCodeLiquidityPoolWithdrawUnderMinimum LiquidityPoolWithdrawResultCode = -5
)

func (*LiquidityPoolWithdrawResultCode) DecodeFrom

func (e *LiquidityPoolWithdrawResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (LiquidityPoolWithdrawResultCode) EncodeTo

func (e LiquidityPoolWithdrawResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (LiquidityPoolWithdrawResultCode) MarshalBinary

func (s LiquidityPoolWithdrawResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (LiquidityPoolWithdrawResultCode) String

String returns the name of `e`

func (*LiquidityPoolWithdrawResultCode) UnmarshalBinary

func (s *LiquidityPoolWithdrawResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (LiquidityPoolWithdrawResultCode) ValidEnum

ValidEnum validates a proposed value for this enum. Implements the Enum interface for LiquidityPoolWithdrawResultCode

type ManageBuyOfferOp

type ManageBuyOfferOp struct {
	Selling   Asset
	Buying    Asset
	BuyAmount Int64
	Price     Price
	OfferId   Int64
}

ManageBuyOfferOp is an XDR Struct defines as:

struct ManageBuyOfferOp
 {
     Asset selling;
     Asset buying;
     int64 buyAmount; // amount being bought. if set to 0, delete the offer
     Price price;     // price of thing being bought in terms of what you are
                      // selling

     // 0=create a new offer, otherwise edit an existing offer
     int64 offerID;
 };

func (*ManageBuyOfferOp) DecodeFrom

func (s *ManageBuyOfferOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ManageBuyOfferOp) EncodeTo

func (s *ManageBuyOfferOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageBuyOfferOp) MarshalBinary

func (s ManageBuyOfferOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ManageBuyOfferOp) UnmarshalBinary

func (s *ManageBuyOfferOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageBuyOfferResult

type ManageBuyOfferResult struct {
	Code    ManageBuyOfferResultCode
	Success *ManageOfferSuccessResult
}

ManageBuyOfferResult is an XDR Union defines as:

union ManageBuyOfferResult switch (ManageBuyOfferResultCode code)
 {
 case MANAGE_BUY_OFFER_SUCCESS:
     ManageOfferSuccessResult success;
 case MANAGE_BUY_OFFER_MALFORMED:
 case MANAGE_BUY_OFFER_SELL_NO_TRUST:
 case MANAGE_BUY_OFFER_BUY_NO_TRUST:
 case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED:
 case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED:
 case MANAGE_BUY_OFFER_LINE_FULL:
 case MANAGE_BUY_OFFER_UNDERFUNDED:
 case MANAGE_BUY_OFFER_CROSS_SELF:
 case MANAGE_BUY_OFFER_SELL_NO_ISSUER:
 case MANAGE_BUY_OFFER_BUY_NO_ISSUER:
 case MANAGE_BUY_OFFER_NOT_FOUND:
 case MANAGE_BUY_OFFER_LOW_RESERVE:
     void;
 };

func NewManageBuyOfferResult

func NewManageBuyOfferResult(code ManageBuyOfferResultCode, value interface{}) (result ManageBuyOfferResult, err error)

NewManageBuyOfferResult creates a new ManageBuyOfferResult.

func (ManageBuyOfferResult) ArmForSwitch

func (u ManageBuyOfferResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ManageBuyOfferResult

func (*ManageBuyOfferResult) DecodeFrom

func (u *ManageBuyOfferResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageBuyOfferResult) EncodeTo

func (u ManageBuyOfferResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageBuyOfferResult) GetSuccess

func (u ManageBuyOfferResult) GetSuccess() (result ManageOfferSuccessResult, ok bool)

GetSuccess retrieves the Success value from the union, returning ok if the union's switch indicated the value is valid.

func (ManageBuyOfferResult) MarshalBinary

func (s ManageBuyOfferResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageBuyOfferResult) MustSuccess

MustSuccess retrieves the Success value from the union, panicing if the value is not set.

func (ManageBuyOfferResult) SwitchFieldName

func (u ManageBuyOfferResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ManageBuyOfferResult) UnmarshalBinary

func (s *ManageBuyOfferResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageBuyOfferResultCode

type ManageBuyOfferResultCode int32

ManageBuyOfferResultCode is an XDR Enum defines as:

enum ManageBuyOfferResultCode
 {
     // codes considered as "success" for the operation
     MANAGE_BUY_OFFER_SUCCESS = 0,

     // codes considered as "failure" for the operation
     MANAGE_BUY_OFFER_MALFORMED = -1,     // generated offer would be invalid
     MANAGE_BUY_OFFER_SELL_NO_TRUST = -2, // no trust line for what we're selling
     MANAGE_BUY_OFFER_BUY_NO_TRUST = -3,  // no trust line for what we're buying
     MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED = -4, // not authorized to sell
     MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED = -5,  // not authorized to buy
     MANAGE_BUY_OFFER_LINE_FULL = -6,   // can't receive more of what it's buying
     MANAGE_BUY_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell
     MANAGE_BUY_OFFER_CROSS_SELF = -8, // would cross an offer from the same user
     MANAGE_BUY_OFFER_SELL_NO_ISSUER = -9, // no issuer for what we're selling
     MANAGE_BUY_OFFER_BUY_NO_ISSUER = -10, // no issuer for what we're buying

     // update errors
     MANAGE_BUY_OFFER_NOT_FOUND =
         -11, // offerID does not match an existing offer

     MANAGE_BUY_OFFER_LOW_RESERVE = -12 // not enough funds to create a new Offer
 };
const (
	ManageBuyOfferResultCodeManageBuyOfferSuccess           ManageBuyOfferResultCode = 0
	ManageBuyOfferResultCodeManageBuyOfferMalformed         ManageBuyOfferResultCode = -1
	ManageBuyOfferResultCodeManageBuyOfferSellNoTrust       ManageBuyOfferResultCode = -2
	ManageBuyOfferResultCodeManageBuyOfferBuyNoTrust        ManageBuyOfferResultCode = -3
	ManageBuyOfferResultCodeManageBuyOfferSellNotAuthorized ManageBuyOfferResultCode = -4
	ManageBuyOfferResultCodeManageBuyOfferBuyNotAuthorized  ManageBuyOfferResultCode = -5
	ManageBuyOfferResultCodeManageBuyOfferLineFull          ManageBuyOfferResultCode = -6
	ManageBuyOfferResultCodeManageBuyOfferUnderfunded       ManageBuyOfferResultCode = -7
	ManageBuyOfferResultCodeManageBuyOfferCrossSelf         ManageBuyOfferResultCode = -8
	ManageBuyOfferResultCodeManageBuyOfferSellNoIssuer      ManageBuyOfferResultCode = -9
	ManageBuyOfferResultCodeManageBuyOfferBuyNoIssuer       ManageBuyOfferResultCode = -10
	ManageBuyOfferResultCodeManageBuyOfferNotFound          ManageBuyOfferResultCode = -11
	ManageBuyOfferResultCodeManageBuyOfferLowReserve        ManageBuyOfferResultCode = -12
)

func (*ManageBuyOfferResultCode) DecodeFrom

func (e *ManageBuyOfferResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageBuyOfferResultCode) EncodeTo

func (e ManageBuyOfferResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageBuyOfferResultCode) MarshalBinary

func (s ManageBuyOfferResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageBuyOfferResultCode) String

func (e ManageBuyOfferResultCode) String() string

String returns the name of `e`

func (*ManageBuyOfferResultCode) UnmarshalBinary

func (s *ManageBuyOfferResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ManageBuyOfferResultCode) ValidEnum

func (e ManageBuyOfferResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ManageBuyOfferResultCode

type ManageDataOp

type ManageDataOp struct {
	DataName  String64
	DataValue *DataValue
}

ManageDataOp is an XDR Struct defines as:

struct ManageDataOp
 {
     string64 dataName;
     DataValue* dataValue; // set to null to clear
 };

func (*ManageDataOp) DecodeFrom

func (s *ManageDataOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ManageDataOp) EncodeTo

func (s *ManageDataOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageDataOp) GoString

func (s ManageDataOp) GoString() string

GoString implements fmt.GoStringer.

func (ManageDataOp) MarshalBinary

func (s ManageDataOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ManageDataOp) UnmarshalBinary

func (s *ManageDataOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageDataResult

type ManageDataResult struct {
	Code ManageDataResultCode
}

ManageDataResult is an XDR Union defines as:

union ManageDataResult switch (ManageDataResultCode code)
 {
 case MANAGE_DATA_SUCCESS:
     void;
 case MANAGE_DATA_NOT_SUPPORTED_YET:
 case MANAGE_DATA_NAME_NOT_FOUND:
 case MANAGE_DATA_LOW_RESERVE:
 case MANAGE_DATA_INVALID_NAME:
     void;
 };

func NewManageDataResult

func NewManageDataResult(code ManageDataResultCode, value interface{}) (result ManageDataResult, err error)

NewManageDataResult creates a new ManageDataResult.

func (ManageDataResult) ArmForSwitch

func (u ManageDataResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ManageDataResult

func (*ManageDataResult) DecodeFrom

func (u *ManageDataResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageDataResult) EncodeTo

func (u ManageDataResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageDataResult) MarshalBinary

func (s ManageDataResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageDataResult) SwitchFieldName

func (u ManageDataResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ManageDataResult) UnmarshalBinary

func (s *ManageDataResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageDataResultCode

type ManageDataResultCode int32

ManageDataResultCode is an XDR Enum defines as:

enum ManageDataResultCode
 {
     // codes considered as "success" for the operation
     MANAGE_DATA_SUCCESS = 0,
     // codes considered as "failure" for the operation
     MANAGE_DATA_NOT_SUPPORTED_YET =
         -1, // The network hasn't moved to this protocol change yet
     MANAGE_DATA_NAME_NOT_FOUND =
         -2, // Trying to remove a Data Entry that isn't there
     MANAGE_DATA_LOW_RESERVE = -3, // not enough funds to create a new Data Entry
     MANAGE_DATA_INVALID_NAME = -4 // Name not a valid string
 };
const (
	ManageDataResultCodeManageDataSuccess         ManageDataResultCode = 0
	ManageDataResultCodeManageDataNotSupportedYet ManageDataResultCode = -1
	ManageDataResultCodeManageDataNameNotFound    ManageDataResultCode = -2
	ManageDataResultCodeManageDataLowReserve      ManageDataResultCode = -3
	ManageDataResultCodeManageDataInvalidName     ManageDataResultCode = -4
)

func (*ManageDataResultCode) DecodeFrom

func (e *ManageDataResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageDataResultCode) EncodeTo

func (e ManageDataResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageDataResultCode) MarshalBinary

func (s ManageDataResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageDataResultCode) String

func (e ManageDataResultCode) String() string

String returns the name of `e`

func (*ManageDataResultCode) UnmarshalBinary

func (s *ManageDataResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ManageDataResultCode) ValidEnum

func (e ManageDataResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ManageDataResultCode

type ManageOfferEffect

type ManageOfferEffect int32

ManageOfferEffect is an XDR Enum defines as:

enum ManageOfferEffect
 {
     MANAGE_OFFER_CREATED = 0,
     MANAGE_OFFER_UPDATED = 1,
     MANAGE_OFFER_DELETED = 2
 };
const (
	ManageOfferEffectManageOfferCreated ManageOfferEffect = 0
	ManageOfferEffectManageOfferUpdated ManageOfferEffect = 1
	ManageOfferEffectManageOfferDeleted ManageOfferEffect = 2
)

func (*ManageOfferEffect) DecodeFrom

func (e *ManageOfferEffect) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageOfferEffect) EncodeTo

func (e ManageOfferEffect) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageOfferEffect) MarshalBinary

func (s ManageOfferEffect) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageOfferEffect) String

func (e ManageOfferEffect) String() string

String returns the name of `e`

func (*ManageOfferEffect) UnmarshalBinary

func (s *ManageOfferEffect) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ManageOfferEffect) ValidEnum

func (e ManageOfferEffect) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ManageOfferEffect

type ManageOfferSuccessResult

type ManageOfferSuccessResult struct {
	OffersClaimed []ClaimAtom
	Offer         ManageOfferSuccessResultOffer
}

ManageOfferSuccessResult is an XDR Struct defines as:

struct ManageOfferSuccessResult
 {
     // offers that got claimed while creating this offer
     ClaimAtom offersClaimed<>;

     union switch (ManageOfferEffect effect)
     {
     case MANAGE_OFFER_CREATED:
     case MANAGE_OFFER_UPDATED:
         OfferEntry offer;
     case MANAGE_OFFER_DELETED:
         void;
     }
     offer;
 };

func (*ManageOfferSuccessResult) DecodeFrom

func (s *ManageOfferSuccessResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ManageOfferSuccessResult) EncodeTo

func (s *ManageOfferSuccessResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageOfferSuccessResult) MarshalBinary

func (s ManageOfferSuccessResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ManageOfferSuccessResult) UnmarshalBinary

func (s *ManageOfferSuccessResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageOfferSuccessResultOffer

type ManageOfferSuccessResultOffer struct {
	Effect ManageOfferEffect
	Offer  *OfferEntry
}

ManageOfferSuccessResultOffer is an XDR NestedUnion defines as:

union switch (ManageOfferEffect effect)
     {
     case MANAGE_OFFER_CREATED:
     case MANAGE_OFFER_UPDATED:
         OfferEntry offer;
     case MANAGE_OFFER_DELETED:
         void;
     }

func NewManageOfferSuccessResultOffer

func NewManageOfferSuccessResultOffer(effect ManageOfferEffect, value interface{}) (result ManageOfferSuccessResultOffer, err error)

NewManageOfferSuccessResultOffer creates a new ManageOfferSuccessResultOffer.

func (ManageOfferSuccessResultOffer) ArmForSwitch

func (u ManageOfferSuccessResultOffer) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ManageOfferSuccessResultOffer

func (*ManageOfferSuccessResultOffer) DecodeFrom

func (u *ManageOfferSuccessResultOffer) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageOfferSuccessResultOffer) EncodeTo

func (u ManageOfferSuccessResultOffer) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageOfferSuccessResultOffer) GetOffer

func (u ManageOfferSuccessResultOffer) GetOffer() (result OfferEntry, ok bool)

GetOffer retrieves the Offer value from the union, returning ok if the union's switch indicated the value is valid.

func (ManageOfferSuccessResultOffer) MarshalBinary

func (s ManageOfferSuccessResultOffer) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageOfferSuccessResultOffer) MustOffer

MustOffer retrieves the Offer value from the union, panicing if the value is not set.

func (ManageOfferSuccessResultOffer) SwitchFieldName

func (u ManageOfferSuccessResultOffer) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ManageOfferSuccessResultOffer) UnmarshalBinary

func (s *ManageOfferSuccessResultOffer) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageSellOfferOp

type ManageSellOfferOp struct {
	Selling Asset
	Buying  Asset
	Amount  Int64
	Price   Price
	OfferId Int64
}

ManageSellOfferOp is an XDR Struct defines as:

struct ManageSellOfferOp
 {
     Asset selling;
     Asset buying;
     int64 amount; // amount being sold. if set to 0, delete the offer
     Price price;  // price of thing being sold in terms of what you are buying

     // 0=create a new offer, otherwise edit an existing offer
     int64 offerID;
 };

func (*ManageSellOfferOp) DecodeFrom

func (s *ManageSellOfferOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ManageSellOfferOp) EncodeTo

func (s *ManageSellOfferOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageSellOfferOp) MarshalBinary

func (s ManageSellOfferOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ManageSellOfferOp) UnmarshalBinary

func (s *ManageSellOfferOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageSellOfferResult

type ManageSellOfferResult struct {
	Code    ManageSellOfferResultCode
	Success *ManageOfferSuccessResult
}

ManageSellOfferResult is an XDR Union defines as:

union ManageSellOfferResult switch (ManageSellOfferResultCode code)
 {
 case MANAGE_SELL_OFFER_SUCCESS:
     ManageOfferSuccessResult success;
 case MANAGE_SELL_OFFER_MALFORMED:
 case MANAGE_SELL_OFFER_SELL_NO_TRUST:
 case MANAGE_SELL_OFFER_BUY_NO_TRUST:
 case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED:
 case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED:
 case MANAGE_SELL_OFFER_LINE_FULL:
 case MANAGE_SELL_OFFER_UNDERFUNDED:
 case MANAGE_SELL_OFFER_CROSS_SELF:
 case MANAGE_SELL_OFFER_SELL_NO_ISSUER:
 case MANAGE_SELL_OFFER_BUY_NO_ISSUER:
 case MANAGE_SELL_OFFER_NOT_FOUND:
 case MANAGE_SELL_OFFER_LOW_RESERVE:
     void;
 };

func NewManageSellOfferResult

func NewManageSellOfferResult(code ManageSellOfferResultCode, value interface{}) (result ManageSellOfferResult, err error)

NewManageSellOfferResult creates a new ManageSellOfferResult.

func (ManageSellOfferResult) ArmForSwitch

func (u ManageSellOfferResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ManageSellOfferResult

func (*ManageSellOfferResult) DecodeFrom

func (u *ManageSellOfferResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageSellOfferResult) EncodeTo

func (u ManageSellOfferResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageSellOfferResult) GetSuccess

func (u ManageSellOfferResult) GetSuccess() (result ManageOfferSuccessResult, ok bool)

GetSuccess retrieves the Success value from the union, returning ok if the union's switch indicated the value is valid.

func (ManageSellOfferResult) MarshalBinary

func (s ManageSellOfferResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageSellOfferResult) MustSuccess

MustSuccess retrieves the Success value from the union, panicing if the value is not set.

func (ManageSellOfferResult) SwitchFieldName

func (u ManageSellOfferResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ManageSellOfferResult) UnmarshalBinary

func (s *ManageSellOfferResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ManageSellOfferResultCode

type ManageSellOfferResultCode int32

ManageSellOfferResultCode is an XDR Enum defines as:

enum ManageSellOfferResultCode
 {
     // codes considered as "success" for the operation
     MANAGE_SELL_OFFER_SUCCESS = 0,

     // codes considered as "failure" for the operation
     MANAGE_SELL_OFFER_MALFORMED = -1, // generated offer would be invalid
     MANAGE_SELL_OFFER_SELL_NO_TRUST =
         -2,                              // no trust line for what we're selling
     MANAGE_SELL_OFFER_BUY_NO_TRUST = -3, // no trust line for what we're buying
     MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED = -4, // not authorized to sell
     MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED = -5,  // not authorized to buy
     MANAGE_SELL_OFFER_LINE_FULL = -6, // can't receive more of what it's buying
     MANAGE_SELL_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell
     MANAGE_SELL_OFFER_CROSS_SELF =
         -8, // would cross an offer from the same user
     MANAGE_SELL_OFFER_SELL_NO_ISSUER = -9, // no issuer for what we're selling
     MANAGE_SELL_OFFER_BUY_NO_ISSUER = -10, // no issuer for what we're buying

     // update errors
     MANAGE_SELL_OFFER_NOT_FOUND =
         -11, // offerID does not match an existing offer

     MANAGE_SELL_OFFER_LOW_RESERVE =
         -12 // not enough funds to create a new Offer
 };
const (
	ManageSellOfferResultCodeManageSellOfferSuccess           ManageSellOfferResultCode = 0
	ManageSellOfferResultCodeManageSellOfferMalformed         ManageSellOfferResultCode = -1
	ManageSellOfferResultCodeManageSellOfferSellNoTrust       ManageSellOfferResultCode = -2
	ManageSellOfferResultCodeManageSellOfferBuyNoTrust        ManageSellOfferResultCode = -3
	ManageSellOfferResultCodeManageSellOfferSellNotAuthorized ManageSellOfferResultCode = -4
	ManageSellOfferResultCodeManageSellOfferBuyNotAuthorized  ManageSellOfferResultCode = -5
	ManageSellOfferResultCodeManageSellOfferLineFull          ManageSellOfferResultCode = -6
	ManageSellOfferResultCodeManageSellOfferUnderfunded       ManageSellOfferResultCode = -7
	ManageSellOfferResultCodeManageSellOfferCrossSelf         ManageSellOfferResultCode = -8
	ManageSellOfferResultCodeManageSellOfferSellNoIssuer      ManageSellOfferResultCode = -9
	ManageSellOfferResultCodeManageSellOfferBuyNoIssuer       ManageSellOfferResultCode = -10
	ManageSellOfferResultCodeManageSellOfferNotFound          ManageSellOfferResultCode = -11
	ManageSellOfferResultCodeManageSellOfferLowReserve        ManageSellOfferResultCode = -12
)

func (*ManageSellOfferResultCode) DecodeFrom

func (e *ManageSellOfferResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ManageSellOfferResultCode) EncodeTo

func (e ManageSellOfferResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ManageSellOfferResultCode) MarshalBinary

func (s ManageSellOfferResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ManageSellOfferResultCode) String

func (e ManageSellOfferResultCode) String() string

String returns the name of `e`

func (*ManageSellOfferResultCode) UnmarshalBinary

func (s *ManageSellOfferResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ManageSellOfferResultCode) ValidEnum

func (e ManageSellOfferResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ManageSellOfferResultCode

type Memo

type Memo struct {
	Type    MemoType
	Text    *string `xdrmaxsize:"28"`
	Id      *Uint64
	Hash    *Hash
	RetHash *Hash
}

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

func MemoHash(hash Hash) Memo

func MemoID

func MemoID(id uint64) Memo

func MemoRetHash

func MemoRetHash(hash Hash) Memo

func MemoText

func MemoText(text string) Memo

func NewMemo

func NewMemo(aType MemoType, value interface{}) (result Memo, err error)

NewMemo creates a new Memo.

func (Memo) ArmForSwitch

func (u Memo) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of Memo

func (*Memo) DecodeFrom

func (u *Memo) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Memo) EncodeTo

func (u Memo) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Memo) GetHash

func (u Memo) GetHash() (result Hash, ok bool)

GetHash retrieves the Hash value from the union, returning ok if the union's switch indicated the value is valid.

func (Memo) GetId

func (u Memo) GetId() (result Uint64, ok bool)

GetId retrieves the Id value from the union, returning ok if the union's switch indicated the value is valid.

func (Memo) GetRetHash

func (u Memo) GetRetHash() (result Hash, ok bool)

GetRetHash retrieves the RetHash value from the union, returning ok if the union's switch indicated the value is valid.

func (Memo) GetText

func (u Memo) GetText() (result string, ok bool)

GetText retrieves the Text value from the union, returning ok if the union's switch indicated the value is valid.

func (Memo) GoString

func (m Memo) GoString() string

GoString implements fmt.GoStringer.

func (Memo) MarshalBinary

func (s Memo) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (Memo) MustHash

func (u Memo) MustHash() Hash

MustHash retrieves the Hash value from the union, panicing if the value is not set.

func (Memo) MustId

func (u Memo) MustId() Uint64

MustId retrieves the Id value from the union, panicing if the value is not set.

func (Memo) MustRetHash

func (u Memo) MustRetHash() Hash

MustRetHash retrieves the RetHash value from the union, panicing if the value is not set.

func (Memo) MustText

func (u Memo) MustText() string

MustText retrieves the Text value from the union, panicing if the value is not set.

func (Memo) SwitchFieldName

func (u Memo) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*Memo) UnmarshalBinary

func (s *Memo) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type MemoType

type MemoType int32

MemoType is an XDR Enum defines as:

enum MemoType
 {
     MEMO_NONE = 0,
     MEMO_TEXT = 1,
     MEMO_ID = 2,
     MEMO_HASH = 3,
     MEMO_RETURN = 4
 };
const (
	MemoTypeMemoNone   MemoType = 0
	MemoTypeMemoText   MemoType = 1
	MemoTypeMemoId     MemoType = 2
	MemoTypeMemoHash   MemoType = 3
	MemoTypeMemoReturn MemoType = 4
)

func (*MemoType) DecodeFrom

func (e *MemoType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (MemoType) EncodeTo

func (e MemoType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (MemoType) MarshalBinary

func (s MemoType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (MemoType) String

func (e MemoType) String() string

String returns the name of `e`

func (*MemoType) UnmarshalBinary

func (s *MemoType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (MemoType) ValidEnum

func (e MemoType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for MemoType

type MessageType

type MessageType int32

MessageType is an XDR Enum defines as:

enum MessageType
 {
     ERROR_MSG = 0,
     AUTH = 2,
     DONT_HAVE = 3,

     GET_PEERS = 4, // gets a list of peers this guy knows about
     PEERS = 5,

     GET_TX_SET = 6, // gets a particular txset by hash
     TX_SET = 7,
     GENERALIZED_TX_SET = 17,

     TRANSACTION = 8, // pass on a tx you have heard about

     // SCP
     GET_SCP_QUORUMSET = 9,
     SCP_QUORUMSET = 10,
     SCP_MESSAGE = 11,
     GET_SCP_STATE = 12,

     // new messages
     HELLO = 13,

     SURVEY_REQUEST = 14,
     SURVEY_RESPONSE = 15,

     SEND_MORE = 16,
     SEND_MORE_EXTENDED = 20,

     FLOOD_ADVERT = 18,
     FLOOD_DEMAND = 19
 };
const (
	MessageTypeErrorMsg         MessageType = 0
	MessageTypeAuth             MessageType = 2
	MessageTypeDontHave         MessageType = 3
	MessageTypeGetPeers         MessageType = 4
	MessageTypePeers            MessageType = 5
	MessageTypeGetTxSet         MessageType = 6
	MessageTypeTxSet            MessageType = 7
	MessageTypeGeneralizedTxSet MessageType = 17
	MessageTypeTransaction      MessageType = 8
	MessageTypeGetScpQuorumset  MessageType = 9
	MessageTypeScpQuorumset     MessageType = 10
	MessageTypeScpMessage       MessageType = 11
	MessageTypeGetScpState      MessageType = 12
	MessageTypeHello            MessageType = 13
	MessageTypeSurveyRequest    MessageType = 14
	MessageTypeSurveyResponse   MessageType = 15
	MessageTypeSendMore         MessageType = 16
	MessageTypeSendMoreExtended MessageType = 20
	MessageTypeFloodAdvert      MessageType = 18
	MessageTypeFloodDemand      MessageType = 19
)

func (*MessageType) DecodeFrom

func (e *MessageType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (MessageType) EncodeTo

func (e MessageType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (MessageType) MarshalBinary

func (s MessageType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (MessageType) String

func (e MessageType) String() string

String returns the name of `e`

func (*MessageType) UnmarshalBinary

func (s *MessageType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (MessageType) ValidEnum

func (e MessageType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for MessageType

type MuxedAccount

type MuxedAccount struct {
	Type     CryptoKeyType
	Ed25519  *Uint256
	Med25519 *MuxedAccountMed25519
}

MuxedAccount is an XDR Union defines as:

union MuxedAccount switch (CryptoKeyType type)
 {
 case KEY_TYPE_ED25519:
     uint256 ed25519;
 case KEY_TYPE_MUXED_ED25519:
     struct
     {
         uint64 id;
         uint256 ed25519;
     } med25519;
 };

func AddressToMuxedAccount

func AddressToMuxedAccount(address string) (MuxedAccount, error)

AddressToMuxedAccount returns an MuxedAccount for a given address string or SEP23 M-address. If the address is not valid the error returned will not be nil

func MustMuxedAddress

func MustMuxedAddress(address string) MuxedAccount

func MustMuxedAddressPtr

func MustMuxedAddressPtr(address string) *MuxedAccount

func MuxedAccountFromAccountId

func MuxedAccountFromAccountId(gAddress string, id uint64) (MuxedAccount, error)

func NewMuxedAccount

func NewMuxedAccount(aType CryptoKeyType, value interface{}) (result MuxedAccount, err error)

NewMuxedAccount creates a new MuxedAccount.

func (*MuxedAccount) Address

func (m *MuxedAccount) Address() string

Address returns the strkey-encoded form of this MuxedAccount. In particular, it will return an M- strkey representation for CryptoKeyTypeKeyTypeMuxedEd25519 variants of the account (according to SEP23). This method will panic if the MuxedAccount is backed by a public key of an unknown type.

func (MuxedAccount) ArmForSwitch

func (u MuxedAccount) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of MuxedAccount

func (*MuxedAccount) DecodeFrom

func (u *MuxedAccount) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (MuxedAccount) EncodeTo

func (u MuxedAccount) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*MuxedAccount) GetAddress

func (m *MuxedAccount) GetAddress() (string, error)

GetAddress returns the strkey-encoded form of this MuxedAccount. In particular, it will return an M-strkey representation for CryptoKeyTypeKeyTypeMuxedEd25519 variants of the account (according to SEP23). In addition it will return an error if the MuxedAccount is backed by a public key of an unknown type.

func (MuxedAccount) GetEd25519

func (u MuxedAccount) GetEd25519() (result Uint256, ok bool)

GetEd25519 retrieves the Ed25519 value from the union, returning ok if the union's switch indicated the value is valid.

func (*MuxedAccount) GetId

func (m *MuxedAccount) GetId() (uint64, error)

GetId retrieves the underlying memo ID if this is a fully muxed account. It will return an error if the muxed account does not have a memo ID (i.e it's of the key type Ed25519).

func (MuxedAccount) GetMed25519

func (u MuxedAccount) GetMed25519() (result MuxedAccountMed25519, ok bool)

GetMed25519 retrieves the Med25519 value from the union, returning ok if the union's switch indicated the value is valid.

func (MuxedAccount) GoString

func (m MuxedAccount) GoString() string

GoString implements fmt.GoStringer.

func (MuxedAccount) MarshalBinary

func (s MuxedAccount) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (MuxedAccount) MustEd25519

func (u MuxedAccount) MustEd25519() Uint256

MustEd25519 retrieves the Ed25519 value from the union, panicing if the value is not set.

func (MuxedAccount) MustMed25519

func (u MuxedAccount) MustMed25519() MuxedAccountMed25519

MustMed25519 retrieves the Med25519 value from the union, panicing if the value is not set.

func (*MuxedAccount) SetAddress

func (m *MuxedAccount) SetAddress(address string) error

SetAddress modifies the receiver, setting it's value to the MuxedAccount form of the provided strkey G-address or M-address, as described in SEP23.

func (*MuxedAccount) SetEd25519Address

func (m *MuxedAccount) SetEd25519Address(address string) error

SetEd25519Address modifies the receiver, setting it's value to the MuxedAccount form of the provided G-address. Unlike SetAddress(), it only supports G-addresses.

func (MuxedAccount) SwitchFieldName

func (u MuxedAccount) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (MuxedAccount) ToAccountId

func (m MuxedAccount) ToAccountId() AccountId

ToAccountId transforms a MuxedAccount to an AccountId, dropping the memo Id if necessary

func (*MuxedAccount) UnmarshalBinary

func (s *MuxedAccount) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type MuxedAccountMed25519

type MuxedAccountMed25519 struct {
	Id      Uint64
	Ed25519 Uint256
}

MuxedAccountMed25519 is an XDR NestedStruct defines as:

struct
     {
         uint64 id;
         uint256 ed25519;
     }

func (*MuxedAccountMed25519) DecodeFrom

func (s *MuxedAccountMed25519) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*MuxedAccountMed25519) EncodeTo

func (s *MuxedAccountMed25519) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (MuxedAccountMed25519) MarshalBinary

func (s MuxedAccountMed25519) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*MuxedAccountMed25519) UnmarshalBinary

func (s *MuxedAccountMed25519) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type NodeId

type NodeId PublicKey

NodeId is an XDR Typedef defines as:

typedef PublicKey NodeID;

func NewNodeId

func NewNodeId(aType PublicKeyType, value interface{}) (result NodeId, err error)

NewNodeId creates a new NodeId.

func (NodeId) ArmForSwitch

func (u NodeId) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of PublicKey

func (*NodeId) DecodeFrom

func (s *NodeId) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (NodeId) EncodeTo

func (s NodeId) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (NodeId) GetEd25519

func (u NodeId) GetEd25519() (result Uint256, ok bool)

GetEd25519 retrieves the Ed25519 value from the union, returning ok if the union's switch indicated the value is valid.

func (NodeId) MarshalBinary

func (s NodeId) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (NodeId) MustEd25519

func (u NodeId) MustEd25519() Uint256

MustEd25519 retrieves the Ed25519 value from the union, panicing if the value is not set.

func (NodeId) SwitchFieldName

func (u NodeId) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*NodeId) UnmarshalBinary

func (s *NodeId) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OfferEntry

type OfferEntry struct {
	SellerId AccountId
	OfferId  Int64
	Selling  Asset
	Buying   Asset
	Amount   Int64
	Price    Price
	Flags    Uint32
	Ext      OfferEntryExt
}

OfferEntry is an XDR Struct defines as:

struct OfferEntry
 {
     AccountID sellerID;
     int64 offerID;
     Asset selling; // A
     Asset buying;  // B
     int64 amount;  // amount of A

     /* price for this offer:
         price of A in terms of B
         price=AmountB/AmountA=priceNumerator/priceDenominator
         price is after fees
     */
     Price price;
     uint32 flags; // see OfferEntryFlags

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*OfferEntry) DecodeFrom

func (s *OfferEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*OfferEntry) EncodeTo

func (s *OfferEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OfferEntry) MarshalBinary

func (s OfferEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*OfferEntry) UnmarshalBinary

func (s *OfferEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OfferEntryExt

type OfferEntryExt struct {
	V int32
}

OfferEntryExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewOfferEntryExt

func NewOfferEntryExt(v int32, value interface{}) (result OfferEntryExt, err error)

NewOfferEntryExt creates a new OfferEntryExt.

func (OfferEntryExt) ArmForSwitch

func (u OfferEntryExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of OfferEntryExt

func (*OfferEntryExt) DecodeFrom

func (u *OfferEntryExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (OfferEntryExt) EncodeTo

func (u OfferEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OfferEntryExt) MarshalBinary

func (s OfferEntryExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (OfferEntryExt) SwitchFieldName

func (u OfferEntryExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*OfferEntryExt) UnmarshalBinary

func (s *OfferEntryExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OfferEntryFlags

type OfferEntryFlags int32

OfferEntryFlags is an XDR Enum defines as:

enum OfferEntryFlags
 {
     // an offer with this flag will not act on and take a reverse offer of equal
     // price
     PASSIVE_FLAG = 1
 };
const (
	OfferEntryFlagsPassiveFlag OfferEntryFlags = 1
)

func (*OfferEntryFlags) DecodeFrom

func (e *OfferEntryFlags) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (OfferEntryFlags) EncodeTo

func (e OfferEntryFlags) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OfferEntryFlags) MarshalBinary

func (s OfferEntryFlags) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (OfferEntryFlags) String

func (e OfferEntryFlags) String() string

String returns the name of `e`

func (*OfferEntryFlags) UnmarshalBinary

func (s *OfferEntryFlags) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (OfferEntryFlags) ValidEnum

func (e OfferEntryFlags) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for OfferEntryFlags

type Operation

type Operation struct {
	SourceAccount *MuxedAccount
	Body          OperationBody
}

Operation is an XDR Struct defines as:

struct Operation
 {
     // sourceAccount is the account used to run the operation
     // if not set, the runtime defaults to "sourceAccount" specified at
     // the transaction level
     MuxedAccount* sourceAccount;

     union switch (OperationType type)
     {
     case CREATE_ACCOUNT:
         CreateAccountOp createAccountOp;
     case PAYMENT:
         PaymentOp paymentOp;
     case PATH_PAYMENT_STRICT_RECEIVE:
         PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp;
     case MANAGE_SELL_OFFER:
         ManageSellOfferOp manageSellOfferOp;
     case CREATE_PASSIVE_SELL_OFFER:
         CreatePassiveSellOfferOp createPassiveSellOfferOp;
     case SET_OPTIONS:
         SetOptionsOp setOptionsOp;
     case CHANGE_TRUST:
         ChangeTrustOp changeTrustOp;
     case ALLOW_TRUST:
         AllowTrustOp allowTrustOp;
     case ACCOUNT_MERGE:
         MuxedAccount destination;
     case INFLATION:
         void;
     case MANAGE_DATA:
         ManageDataOp manageDataOp;
     case BUMP_SEQUENCE:
         BumpSequenceOp bumpSequenceOp;
     case MANAGE_BUY_OFFER:
         ManageBuyOfferOp manageBuyOfferOp;
     case PATH_PAYMENT_STRICT_SEND:
         PathPaymentStrictSendOp pathPaymentStrictSendOp;
     case CREATE_CLAIMABLE_BALANCE:
         CreateClaimableBalanceOp createClaimableBalanceOp;
     case CLAIM_CLAIMABLE_BALANCE:
         ClaimClaimableBalanceOp claimClaimableBalanceOp;
     case BEGIN_SPONSORING_FUTURE_RESERVES:
         BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp;
     case END_SPONSORING_FUTURE_RESERVES:
         void;
     case REVOKE_SPONSORSHIP:
         RevokeSponsorshipOp revokeSponsorshipOp;
     case CLAWBACK:
         ClawbackOp clawbackOp;
     case CLAWBACK_CLAIMABLE_BALANCE:
         ClawbackClaimableBalanceOp clawbackClaimableBalanceOp;
     case SET_TRUST_LINE_FLAGS:
         SetTrustLineFlagsOp setTrustLineFlagsOp;
     case LIQUIDITY_POOL_DEPOSIT:
         LiquidityPoolDepositOp liquidityPoolDepositOp;
     case LIQUIDITY_POOL_WITHDRAW:
         LiquidityPoolWithdrawOp liquidityPoolWithdrawOp;
     case INVOKE_HOST_FUNCTION:
         InvokeHostFunctionOp invokeHostFunctionOp;
     case EXTEND_FOOTPRINT_TTL:
         ExtendFootprintTTLOp extendFootprintTTLOp;
     case RESTORE_FOOTPRINT:
         RestoreFootprintOp restoreFootprintOp;
     }
     body;
 };

func (*Operation) DecodeFrom

func (s *Operation) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Operation) EncodeTo

func (s *Operation) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Operation) GoString

func (o Operation) GoString() string

GoString implements fmt.GoStringer.

func (Operation) MarshalBinary

func (s Operation) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Operation) UnmarshalBinary

func (s *Operation) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OperationBody

type OperationBody struct {
	Type                            OperationType
	CreateAccountOp                 *CreateAccountOp
	PaymentOp                       *PaymentOp
	PathPaymentStrictReceiveOp      *PathPaymentStrictReceiveOp
	ManageSellOfferOp               *ManageSellOfferOp
	CreatePassiveSellOfferOp        *CreatePassiveSellOfferOp
	SetOptionsOp                    *SetOptionsOp
	ChangeTrustOp                   *ChangeTrustOp
	AllowTrustOp                    *AllowTrustOp
	Destination                     *MuxedAccount
	ManageDataOp                    *ManageDataOp
	BumpSequenceOp                  *BumpSequenceOp
	ManageBuyOfferOp                *ManageBuyOfferOp
	PathPaymentStrictSendOp         *PathPaymentStrictSendOp
	CreateClaimableBalanceOp        *CreateClaimableBalanceOp
	ClaimClaimableBalanceOp         *ClaimClaimableBalanceOp
	BeginSponsoringFutureReservesOp *BeginSponsoringFutureReservesOp
	RevokeSponsorshipOp             *RevokeSponsorshipOp
	ClawbackOp                      *ClawbackOp
	ClawbackClaimableBalanceOp      *ClawbackClaimableBalanceOp
	SetTrustLineFlagsOp             *SetTrustLineFlagsOp
	LiquidityPoolDepositOp          *LiquidityPoolDepositOp
	LiquidityPoolWithdrawOp         *LiquidityPoolWithdrawOp
	InvokeHostFunctionOp            *InvokeHostFunctionOp
	ExtendFootprintTtlOp            *ExtendFootprintTtlOp
	RestoreFootprintOp              *RestoreFootprintOp
}

OperationBody is an XDR NestedUnion defines as:

union switch (OperationType type)
     {
     case CREATE_ACCOUNT:
         CreateAccountOp createAccountOp;
     case PAYMENT:
         PaymentOp paymentOp;
     case PATH_PAYMENT_STRICT_RECEIVE:
         PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp;
     case MANAGE_SELL_OFFER:
         ManageSellOfferOp manageSellOfferOp;
     case CREATE_PASSIVE_SELL_OFFER:
         CreatePassiveSellOfferOp createPassiveSellOfferOp;
     case SET_OPTIONS:
         SetOptionsOp setOptionsOp;
     case CHANGE_TRUST:
         ChangeTrustOp changeTrustOp;
     case ALLOW_TRUST:
         AllowTrustOp allowTrustOp;
     case ACCOUNT_MERGE:
         MuxedAccount destination;
     case INFLATION:
         void;
     case MANAGE_DATA:
         ManageDataOp manageDataOp;
     case BUMP_SEQUENCE:
         BumpSequenceOp bumpSequenceOp;
     case MANAGE_BUY_OFFER:
         ManageBuyOfferOp manageBuyOfferOp;
     case PATH_PAYMENT_STRICT_SEND:
         PathPaymentStrictSendOp pathPaymentStrictSendOp;
     case CREATE_CLAIMABLE_BALANCE:
         CreateClaimableBalanceOp createClaimableBalanceOp;
     case CLAIM_CLAIMABLE_BALANCE:
         ClaimClaimableBalanceOp claimClaimableBalanceOp;
     case BEGIN_SPONSORING_FUTURE_RESERVES:
         BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp;
     case END_SPONSORING_FUTURE_RESERVES:
         void;
     case REVOKE_SPONSORSHIP:
         RevokeSponsorshipOp revokeSponsorshipOp;
     case CLAWBACK:
         ClawbackOp clawbackOp;
     case CLAWBACK_CLAIMABLE_BALANCE:
         ClawbackClaimableBalanceOp clawbackClaimableBalanceOp;
     case SET_TRUST_LINE_FLAGS:
         SetTrustLineFlagsOp setTrustLineFlagsOp;
     case LIQUIDITY_POOL_DEPOSIT:
         LiquidityPoolDepositOp liquidityPoolDepositOp;
     case LIQUIDITY_POOL_WITHDRAW:
         LiquidityPoolWithdrawOp liquidityPoolWithdrawOp;
     case INVOKE_HOST_FUNCTION:
         InvokeHostFunctionOp invokeHostFunctionOp;
     case EXTEND_FOOTPRINT_TTL:
         ExtendFootprintTTLOp extendFootprintTTLOp;
     case RESTORE_FOOTPRINT:
         RestoreFootprintOp restoreFootprintOp;
     }

func NewOperationBody

func NewOperationBody(aType OperationType, value interface{}) (result OperationBody, err error)

NewOperationBody creates a new OperationBody.

func (OperationBody) ArmForSwitch

func (u OperationBody) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of OperationBody

func (*OperationBody) DecodeFrom

func (u *OperationBody) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (OperationBody) EncodeTo

func (u OperationBody) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OperationBody) GetAllowTrustOp

func (u OperationBody) GetAllowTrustOp() (result AllowTrustOp, ok bool)

GetAllowTrustOp retrieves the AllowTrustOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetBeginSponsoringFutureReservesOp

func (u OperationBody) GetBeginSponsoringFutureReservesOp() (result BeginSponsoringFutureReservesOp, ok bool)

GetBeginSponsoringFutureReservesOp retrieves the BeginSponsoringFutureReservesOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetBumpSequenceOp

func (u OperationBody) GetBumpSequenceOp() (result BumpSequenceOp, ok bool)

GetBumpSequenceOp retrieves the BumpSequenceOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetChangeTrustOp

func (u OperationBody) GetChangeTrustOp() (result ChangeTrustOp, ok bool)

GetChangeTrustOp retrieves the ChangeTrustOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetClaimClaimableBalanceOp

func (u OperationBody) GetClaimClaimableBalanceOp() (result ClaimClaimableBalanceOp, ok bool)

GetClaimClaimableBalanceOp retrieves the ClaimClaimableBalanceOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetClawbackClaimableBalanceOp

func (u OperationBody) GetClawbackClaimableBalanceOp() (result ClawbackClaimableBalanceOp, ok bool)

GetClawbackClaimableBalanceOp retrieves the ClawbackClaimableBalanceOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetClawbackOp

func (u OperationBody) GetClawbackOp() (result ClawbackOp, ok bool)

GetClawbackOp retrieves the ClawbackOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetCreateAccountOp

func (u OperationBody) GetCreateAccountOp() (result CreateAccountOp, ok bool)

GetCreateAccountOp retrieves the CreateAccountOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetCreateClaimableBalanceOp

func (u OperationBody) GetCreateClaimableBalanceOp() (result CreateClaimableBalanceOp, ok bool)

GetCreateClaimableBalanceOp retrieves the CreateClaimableBalanceOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetCreatePassiveSellOfferOp

func (u OperationBody) GetCreatePassiveSellOfferOp() (result CreatePassiveSellOfferOp, ok bool)

GetCreatePassiveSellOfferOp retrieves the CreatePassiveSellOfferOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetDestination

func (u OperationBody) GetDestination() (result MuxedAccount, ok bool)

GetDestination retrieves the Destination value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetExtendFootprintTtlOp

func (u OperationBody) GetExtendFootprintTtlOp() (result ExtendFootprintTtlOp, ok bool)

GetExtendFootprintTtlOp retrieves the ExtendFootprintTtlOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetInvokeHostFunctionOp

func (u OperationBody) GetInvokeHostFunctionOp() (result InvokeHostFunctionOp, ok bool)

GetInvokeHostFunctionOp retrieves the InvokeHostFunctionOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetLiquidityPoolDepositOp

func (u OperationBody) GetLiquidityPoolDepositOp() (result LiquidityPoolDepositOp, ok bool)

GetLiquidityPoolDepositOp retrieves the LiquidityPoolDepositOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetLiquidityPoolWithdrawOp

func (u OperationBody) GetLiquidityPoolWithdrawOp() (result LiquidityPoolWithdrawOp, ok bool)

GetLiquidityPoolWithdrawOp retrieves the LiquidityPoolWithdrawOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetManageBuyOfferOp

func (u OperationBody) GetManageBuyOfferOp() (result ManageBuyOfferOp, ok bool)

GetManageBuyOfferOp retrieves the ManageBuyOfferOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetManageDataOp

func (u OperationBody) GetManageDataOp() (result ManageDataOp, ok bool)

GetManageDataOp retrieves the ManageDataOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetManageSellOfferOp

func (u OperationBody) GetManageSellOfferOp() (result ManageSellOfferOp, ok bool)

GetManageSellOfferOp retrieves the ManageSellOfferOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetPathPaymentStrictReceiveOp

func (u OperationBody) GetPathPaymentStrictReceiveOp() (result PathPaymentStrictReceiveOp, ok bool)

GetPathPaymentStrictReceiveOp retrieves the PathPaymentStrictReceiveOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetPathPaymentStrictSendOp

func (u OperationBody) GetPathPaymentStrictSendOp() (result PathPaymentStrictSendOp, ok bool)

GetPathPaymentStrictSendOp retrieves the PathPaymentStrictSendOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetPaymentOp

func (u OperationBody) GetPaymentOp() (result PaymentOp, ok bool)

GetPaymentOp retrieves the PaymentOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetRestoreFootprintOp

func (u OperationBody) GetRestoreFootprintOp() (result RestoreFootprintOp, ok bool)

GetRestoreFootprintOp retrieves the RestoreFootprintOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetRevokeSponsorshipOp

func (u OperationBody) GetRevokeSponsorshipOp() (result RevokeSponsorshipOp, ok bool)

GetRevokeSponsorshipOp retrieves the RevokeSponsorshipOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetSetOptionsOp

func (u OperationBody) GetSetOptionsOp() (result SetOptionsOp, ok bool)

GetSetOptionsOp retrieves the SetOptionsOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GetSetTrustLineFlagsOp

func (u OperationBody) GetSetTrustLineFlagsOp() (result SetTrustLineFlagsOp, ok bool)

GetSetTrustLineFlagsOp retrieves the SetTrustLineFlagsOp value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationBody) GoString

func (o OperationBody) GoString() string

GoString implements fmt.GoStringer.

func (OperationBody) MarshalBinary

func (s OperationBody) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (OperationBody) MustAllowTrustOp

func (u OperationBody) MustAllowTrustOp() AllowTrustOp

MustAllowTrustOp retrieves the AllowTrustOp value from the union, panicing if the value is not set.

func (OperationBody) MustBeginSponsoringFutureReservesOp

func (u OperationBody) MustBeginSponsoringFutureReservesOp() BeginSponsoringFutureReservesOp

MustBeginSponsoringFutureReservesOp retrieves the BeginSponsoringFutureReservesOp value from the union, panicing if the value is not set.

func (OperationBody) MustBumpSequenceOp

func (u OperationBody) MustBumpSequenceOp() BumpSequenceOp

MustBumpSequenceOp retrieves the BumpSequenceOp value from the union, panicing if the value is not set.

func (OperationBody) MustChangeTrustOp

func (u OperationBody) MustChangeTrustOp() ChangeTrustOp

MustChangeTrustOp retrieves the ChangeTrustOp value from the union, panicing if the value is not set.

func (OperationBody) MustClaimClaimableBalanceOp

func (u OperationBody) MustClaimClaimableBalanceOp() ClaimClaimableBalanceOp

MustClaimClaimableBalanceOp retrieves the ClaimClaimableBalanceOp value from the union, panicing if the value is not set.

func (OperationBody) MustClawbackClaimableBalanceOp

func (u OperationBody) MustClawbackClaimableBalanceOp() ClawbackClaimableBalanceOp

MustClawbackClaimableBalanceOp retrieves the ClawbackClaimableBalanceOp value from the union, panicing if the value is not set.

func (OperationBody) MustClawbackOp

func (u OperationBody) MustClawbackOp() ClawbackOp

MustClawbackOp retrieves the ClawbackOp value from the union, panicing if the value is not set.

func (OperationBody) MustCreateAccountOp

func (u OperationBody) MustCreateAccountOp() CreateAccountOp

MustCreateAccountOp retrieves the CreateAccountOp value from the union, panicing if the value is not set.

func (OperationBody) MustCreateClaimableBalanceOp

func (u OperationBody) MustCreateClaimableBalanceOp() CreateClaimableBalanceOp

MustCreateClaimableBalanceOp retrieves the CreateClaimableBalanceOp value from the union, panicing if the value is not set.

func (OperationBody) MustCreatePassiveSellOfferOp

func (u OperationBody) MustCreatePassiveSellOfferOp() CreatePassiveSellOfferOp

MustCreatePassiveSellOfferOp retrieves the CreatePassiveSellOfferOp value from the union, panicing if the value is not set.

func (OperationBody) MustDestination

func (u OperationBody) MustDestination() MuxedAccount

MustDestination retrieves the Destination value from the union, panicing if the value is not set.

func (OperationBody) MustExtendFootprintTtlOp

func (u OperationBody) MustExtendFootprintTtlOp() ExtendFootprintTtlOp

MustExtendFootprintTtlOp retrieves the ExtendFootprintTtlOp value from the union, panicing if the value is not set.

func (OperationBody) MustInvokeHostFunctionOp

func (u OperationBody) MustInvokeHostFunctionOp() InvokeHostFunctionOp

MustInvokeHostFunctionOp retrieves the InvokeHostFunctionOp value from the union, panicing if the value is not set.

func (OperationBody) MustLiquidityPoolDepositOp

func (u OperationBody) MustLiquidityPoolDepositOp() LiquidityPoolDepositOp

MustLiquidityPoolDepositOp retrieves the LiquidityPoolDepositOp value from the union, panicing if the value is not set.

func (OperationBody) MustLiquidityPoolWithdrawOp

func (u OperationBody) MustLiquidityPoolWithdrawOp() LiquidityPoolWithdrawOp

MustLiquidityPoolWithdrawOp retrieves the LiquidityPoolWithdrawOp value from the union, panicing if the value is not set.

func (OperationBody) MustManageBuyOfferOp

func (u OperationBody) MustManageBuyOfferOp() ManageBuyOfferOp

MustManageBuyOfferOp retrieves the ManageBuyOfferOp value from the union, panicing if the value is not set.

func (OperationBody) MustManageDataOp

func (u OperationBody) MustManageDataOp() ManageDataOp

MustManageDataOp retrieves the ManageDataOp value from the union, panicing if the value is not set.

func (OperationBody) MustManageSellOfferOp

func (u OperationBody) MustManageSellOfferOp() ManageSellOfferOp

MustManageSellOfferOp retrieves the ManageSellOfferOp value from the union, panicing if the value is not set.

func (OperationBody) MustPathPaymentStrictReceiveOp

func (u OperationBody) MustPathPaymentStrictReceiveOp() PathPaymentStrictReceiveOp

MustPathPaymentStrictReceiveOp retrieves the PathPaymentStrictReceiveOp value from the union, panicing if the value is not set.

func (OperationBody) MustPathPaymentStrictSendOp

func (u OperationBody) MustPathPaymentStrictSendOp() PathPaymentStrictSendOp

MustPathPaymentStrictSendOp retrieves the PathPaymentStrictSendOp value from the union, panicing if the value is not set.

func (OperationBody) MustPaymentOp

func (u OperationBody) MustPaymentOp() PaymentOp

MustPaymentOp retrieves the PaymentOp value from the union, panicing if the value is not set.

func (OperationBody) MustRestoreFootprintOp

func (u OperationBody) MustRestoreFootprintOp() RestoreFootprintOp

MustRestoreFootprintOp retrieves the RestoreFootprintOp value from the union, panicing if the value is not set.

func (OperationBody) MustRevokeSponsorshipOp

func (u OperationBody) MustRevokeSponsorshipOp() RevokeSponsorshipOp

MustRevokeSponsorshipOp retrieves the RevokeSponsorshipOp value from the union, panicing if the value is not set.

func (OperationBody) MustSetOptionsOp

func (u OperationBody) MustSetOptionsOp() SetOptionsOp

MustSetOptionsOp retrieves the SetOptionsOp value from the union, panicing if the value is not set.

func (OperationBody) MustSetTrustLineFlagsOp

func (u OperationBody) MustSetTrustLineFlagsOp() SetTrustLineFlagsOp

MustSetTrustLineFlagsOp retrieves the SetTrustLineFlagsOp value from the union, panicing if the value is not set.

func (OperationBody) SwitchFieldName

func (u OperationBody) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*OperationBody) UnmarshalBinary

func (s *OperationBody) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OperationMeta

type OperationMeta struct {
	Changes LedgerEntryChanges
}

OperationMeta is an XDR Struct defines as:

struct OperationMeta
 {
     LedgerEntryChanges changes;
 };

func (*OperationMeta) DecodeFrom

func (s *OperationMeta) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*OperationMeta) EncodeTo

func (s *OperationMeta) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OperationMeta) MarshalBinary

func (s OperationMeta) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*OperationMeta) UnmarshalBinary

func (s *OperationMeta) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OperationResult

type OperationResult struct {
	Code OperationResultCode
	Tr   *OperationResultTr
}

OperationResult is an XDR Union defines as:

union OperationResult switch (OperationResultCode code)
 {
 case opINNER:
     union switch (OperationType type)
     {
     case CREATE_ACCOUNT:
         CreateAccountResult createAccountResult;
     case PAYMENT:
         PaymentResult paymentResult;
     case PATH_PAYMENT_STRICT_RECEIVE:
         PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult;
     case MANAGE_SELL_OFFER:
         ManageSellOfferResult manageSellOfferResult;
     case CREATE_PASSIVE_SELL_OFFER:
         ManageSellOfferResult createPassiveSellOfferResult;
     case SET_OPTIONS:
         SetOptionsResult setOptionsResult;
     case CHANGE_TRUST:
         ChangeTrustResult changeTrustResult;
     case ALLOW_TRUST:
         AllowTrustResult allowTrustResult;
     case ACCOUNT_MERGE:
         AccountMergeResult accountMergeResult;
     case INFLATION:
         InflationResult inflationResult;
     case MANAGE_DATA:
         ManageDataResult manageDataResult;
     case BUMP_SEQUENCE:
         BumpSequenceResult bumpSeqResult;
     case MANAGE_BUY_OFFER:
         ManageBuyOfferResult manageBuyOfferResult;
     case PATH_PAYMENT_STRICT_SEND:
         PathPaymentStrictSendResult pathPaymentStrictSendResult;
     case CREATE_CLAIMABLE_BALANCE:
         CreateClaimableBalanceResult createClaimableBalanceResult;
     case CLAIM_CLAIMABLE_BALANCE:
         ClaimClaimableBalanceResult claimClaimableBalanceResult;
     case BEGIN_SPONSORING_FUTURE_RESERVES:
         BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult;
     case END_SPONSORING_FUTURE_RESERVES:
         EndSponsoringFutureReservesResult endSponsoringFutureReservesResult;
     case REVOKE_SPONSORSHIP:
         RevokeSponsorshipResult revokeSponsorshipResult;
     case CLAWBACK:
         ClawbackResult clawbackResult;
     case CLAWBACK_CLAIMABLE_BALANCE:
         ClawbackClaimableBalanceResult clawbackClaimableBalanceResult;
     case SET_TRUST_LINE_FLAGS:
         SetTrustLineFlagsResult setTrustLineFlagsResult;
     case LIQUIDITY_POOL_DEPOSIT:
         LiquidityPoolDepositResult liquidityPoolDepositResult;
     case LIQUIDITY_POOL_WITHDRAW:
         LiquidityPoolWithdrawResult liquidityPoolWithdrawResult;
     case INVOKE_HOST_FUNCTION:
         InvokeHostFunctionResult invokeHostFunctionResult;
     case EXTEND_FOOTPRINT_TTL:
         ExtendFootprintTTLResult extendFootprintTTLResult;
     case RESTORE_FOOTPRINT:
         RestoreFootprintResult restoreFootprintResult;
     }
     tr;
 case opBAD_AUTH:
 case opNO_ACCOUNT:
 case opNOT_SUPPORTED:
 case opTOO_MANY_SUBENTRIES:
 case opEXCEEDED_WORK_LIMIT:
 case opTOO_MANY_SPONSORING:
     void;
 };

func NewOperationResult

func NewOperationResult(code OperationResultCode, value interface{}) (result OperationResult, err error)

NewOperationResult creates a new OperationResult.

func (OperationResult) ArmForSwitch

func (u OperationResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of OperationResult

func (*OperationResult) DecodeFrom

func (u *OperationResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (OperationResult) EncodeTo

func (u OperationResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OperationResult) GetTr

func (u OperationResult) GetTr() (result OperationResultTr, ok bool)

GetTr retrieves the Tr value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResult) MarshalBinary

func (s OperationResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (OperationResult) MustTr

MustTr retrieves the Tr value from the union, panicing if the value is not set.

func (OperationResult) SwitchFieldName

func (u OperationResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*OperationResult) UnmarshalBinary

func (s *OperationResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OperationResultCode

type OperationResultCode int32

OperationResultCode is an XDR Enum defines as:

enum OperationResultCode
 {
     opINNER = 0, // inner object result is valid

     opBAD_AUTH = -1,            // too few valid signatures / wrong network
     opNO_ACCOUNT = -2,          // source account was not found
     opNOT_SUPPORTED = -3,       // operation not supported at this time
     opTOO_MANY_SUBENTRIES = -4, // max number of subentries already reached
     opEXCEEDED_WORK_LIMIT = -5, // operation did too much work
     opTOO_MANY_SPONSORING = -6  // account is sponsoring too many entries
 };
const (
	OperationResultCodeOpInner             OperationResultCode = 0
	OperationResultCodeOpBadAuth           OperationResultCode = -1
	OperationResultCodeOpNoAccount         OperationResultCode = -2
	OperationResultCodeOpNotSupported      OperationResultCode = -3
	OperationResultCodeOpTooManySubentries OperationResultCode = -4
	OperationResultCodeOpExceededWorkLimit OperationResultCode = -5
	OperationResultCodeOpTooManySponsoring OperationResultCode = -6
)

func (*OperationResultCode) DecodeFrom

func (e *OperationResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (OperationResultCode) EncodeTo

func (e OperationResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OperationResultCode) MarshalBinary

func (s OperationResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (OperationResultCode) String

func (e OperationResultCode) String() string

String returns the name of `e`

func (*OperationResultCode) UnmarshalBinary

func (s *OperationResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (OperationResultCode) ValidEnum

func (e OperationResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for OperationResultCode

type OperationResultTr

type OperationResultTr struct {
	Type                                OperationType
	CreateAccountResult                 *CreateAccountResult
	PaymentResult                       *PaymentResult
	PathPaymentStrictReceiveResult      *PathPaymentStrictReceiveResult
	ManageSellOfferResult               *ManageSellOfferResult
	CreatePassiveSellOfferResult        *ManageSellOfferResult
	SetOptionsResult                    *SetOptionsResult
	ChangeTrustResult                   *ChangeTrustResult
	AllowTrustResult                    *AllowTrustResult
	AccountMergeResult                  *AccountMergeResult
	InflationResult                     *InflationResult
	ManageDataResult                    *ManageDataResult
	BumpSeqResult                       *BumpSequenceResult
	ManageBuyOfferResult                *ManageBuyOfferResult
	PathPaymentStrictSendResult         *PathPaymentStrictSendResult
	CreateClaimableBalanceResult        *CreateClaimableBalanceResult
	ClaimClaimableBalanceResult         *ClaimClaimableBalanceResult
	BeginSponsoringFutureReservesResult *BeginSponsoringFutureReservesResult
	EndSponsoringFutureReservesResult   *EndSponsoringFutureReservesResult
	RevokeSponsorshipResult             *RevokeSponsorshipResult
	ClawbackResult                      *ClawbackResult
	ClawbackClaimableBalanceResult      *ClawbackClaimableBalanceResult
	SetTrustLineFlagsResult             *SetTrustLineFlagsResult
	LiquidityPoolDepositResult          *LiquidityPoolDepositResult
	LiquidityPoolWithdrawResult         *LiquidityPoolWithdrawResult
	InvokeHostFunctionResult            *InvokeHostFunctionResult
	ExtendFootprintTtlResult            *ExtendFootprintTtlResult
	RestoreFootprintResult              *RestoreFootprintResult
}

OperationResultTr is an XDR NestedUnion defines as:

union switch (OperationType type)
     {
     case CREATE_ACCOUNT:
         CreateAccountResult createAccountResult;
     case PAYMENT:
         PaymentResult paymentResult;
     case PATH_PAYMENT_STRICT_RECEIVE:
         PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult;
     case MANAGE_SELL_OFFER:
         ManageSellOfferResult manageSellOfferResult;
     case CREATE_PASSIVE_SELL_OFFER:
         ManageSellOfferResult createPassiveSellOfferResult;
     case SET_OPTIONS:
         SetOptionsResult setOptionsResult;
     case CHANGE_TRUST:
         ChangeTrustResult changeTrustResult;
     case ALLOW_TRUST:
         AllowTrustResult allowTrustResult;
     case ACCOUNT_MERGE:
         AccountMergeResult accountMergeResult;
     case INFLATION:
         InflationResult inflationResult;
     case MANAGE_DATA:
         ManageDataResult manageDataResult;
     case BUMP_SEQUENCE:
         BumpSequenceResult bumpSeqResult;
     case MANAGE_BUY_OFFER:
         ManageBuyOfferResult manageBuyOfferResult;
     case PATH_PAYMENT_STRICT_SEND:
         PathPaymentStrictSendResult pathPaymentStrictSendResult;
     case CREATE_CLAIMABLE_BALANCE:
         CreateClaimableBalanceResult createClaimableBalanceResult;
     case CLAIM_CLAIMABLE_BALANCE:
         ClaimClaimableBalanceResult claimClaimableBalanceResult;
     case BEGIN_SPONSORING_FUTURE_RESERVES:
         BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult;
     case END_SPONSORING_FUTURE_RESERVES:
         EndSponsoringFutureReservesResult endSponsoringFutureReservesResult;
     case REVOKE_SPONSORSHIP:
         RevokeSponsorshipResult revokeSponsorshipResult;
     case CLAWBACK:
         ClawbackResult clawbackResult;
     case CLAWBACK_CLAIMABLE_BALANCE:
         ClawbackClaimableBalanceResult clawbackClaimableBalanceResult;
     case SET_TRUST_LINE_FLAGS:
         SetTrustLineFlagsResult setTrustLineFlagsResult;
     case LIQUIDITY_POOL_DEPOSIT:
         LiquidityPoolDepositResult liquidityPoolDepositResult;
     case LIQUIDITY_POOL_WITHDRAW:
         LiquidityPoolWithdrawResult liquidityPoolWithdrawResult;
     case INVOKE_HOST_FUNCTION:
         InvokeHostFunctionResult invokeHostFunctionResult;
     case EXTEND_FOOTPRINT_TTL:
         ExtendFootprintTTLResult extendFootprintTTLResult;
     case RESTORE_FOOTPRINT:
         RestoreFootprintResult restoreFootprintResult;
     }

func NewOperationResultTr

func NewOperationResultTr(aType OperationType, value interface{}) (result OperationResultTr, err error)

NewOperationResultTr creates a new OperationResultTr.

func (OperationResultTr) ArmForSwitch

func (u OperationResultTr) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of OperationResultTr

func (*OperationResultTr) DecodeFrom

func (u *OperationResultTr) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (OperationResultTr) EncodeTo

func (u OperationResultTr) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OperationResultTr) GetAccountMergeResult

func (u OperationResultTr) GetAccountMergeResult() (result AccountMergeResult, ok bool)

GetAccountMergeResult retrieves the AccountMergeResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetAllowTrustResult

func (u OperationResultTr) GetAllowTrustResult() (result AllowTrustResult, ok bool)

GetAllowTrustResult retrieves the AllowTrustResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetBeginSponsoringFutureReservesResult

func (u OperationResultTr) GetBeginSponsoringFutureReservesResult() (result BeginSponsoringFutureReservesResult, ok bool)

GetBeginSponsoringFutureReservesResult retrieves the BeginSponsoringFutureReservesResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetBumpSeqResult

func (u OperationResultTr) GetBumpSeqResult() (result BumpSequenceResult, ok bool)

GetBumpSeqResult retrieves the BumpSeqResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetChangeTrustResult

func (u OperationResultTr) GetChangeTrustResult() (result ChangeTrustResult, ok bool)

GetChangeTrustResult retrieves the ChangeTrustResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetClaimClaimableBalanceResult

func (u OperationResultTr) GetClaimClaimableBalanceResult() (result ClaimClaimableBalanceResult, ok bool)

GetClaimClaimableBalanceResult retrieves the ClaimClaimableBalanceResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetClawbackClaimableBalanceResult

func (u OperationResultTr) GetClawbackClaimableBalanceResult() (result ClawbackClaimableBalanceResult, ok bool)

GetClawbackClaimableBalanceResult retrieves the ClawbackClaimableBalanceResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetClawbackResult

func (u OperationResultTr) GetClawbackResult() (result ClawbackResult, ok bool)

GetClawbackResult retrieves the ClawbackResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetCreateAccountResult

func (u OperationResultTr) GetCreateAccountResult() (result CreateAccountResult, ok bool)

GetCreateAccountResult retrieves the CreateAccountResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetCreateClaimableBalanceResult

func (u OperationResultTr) GetCreateClaimableBalanceResult() (result CreateClaimableBalanceResult, ok bool)

GetCreateClaimableBalanceResult retrieves the CreateClaimableBalanceResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetCreatePassiveSellOfferResult

func (u OperationResultTr) GetCreatePassiveSellOfferResult() (result ManageSellOfferResult, ok bool)

GetCreatePassiveSellOfferResult retrieves the CreatePassiveSellOfferResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetEndSponsoringFutureReservesResult

func (u OperationResultTr) GetEndSponsoringFutureReservesResult() (result EndSponsoringFutureReservesResult, ok bool)

GetEndSponsoringFutureReservesResult retrieves the EndSponsoringFutureReservesResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetExtendFootprintTtlResult

func (u OperationResultTr) GetExtendFootprintTtlResult() (result ExtendFootprintTtlResult, ok bool)

GetExtendFootprintTtlResult retrieves the ExtendFootprintTtlResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetInflationResult

func (u OperationResultTr) GetInflationResult() (result InflationResult, ok bool)

GetInflationResult retrieves the InflationResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetInvokeHostFunctionResult

func (u OperationResultTr) GetInvokeHostFunctionResult() (result InvokeHostFunctionResult, ok bool)

GetInvokeHostFunctionResult retrieves the InvokeHostFunctionResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetLiquidityPoolDepositResult

func (u OperationResultTr) GetLiquidityPoolDepositResult() (result LiquidityPoolDepositResult, ok bool)

GetLiquidityPoolDepositResult retrieves the LiquidityPoolDepositResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetLiquidityPoolWithdrawResult

func (u OperationResultTr) GetLiquidityPoolWithdrawResult() (result LiquidityPoolWithdrawResult, ok bool)

GetLiquidityPoolWithdrawResult retrieves the LiquidityPoolWithdrawResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetManageBuyOfferResult

func (u OperationResultTr) GetManageBuyOfferResult() (result ManageBuyOfferResult, ok bool)

GetManageBuyOfferResult retrieves the ManageBuyOfferResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetManageDataResult

func (u OperationResultTr) GetManageDataResult() (result ManageDataResult, ok bool)

GetManageDataResult retrieves the ManageDataResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetManageSellOfferResult

func (u OperationResultTr) GetManageSellOfferResult() (result ManageSellOfferResult, ok bool)

GetManageSellOfferResult retrieves the ManageSellOfferResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetPathPaymentStrictReceiveResult

func (u OperationResultTr) GetPathPaymentStrictReceiveResult() (result PathPaymentStrictReceiveResult, ok bool)

GetPathPaymentStrictReceiveResult retrieves the PathPaymentStrictReceiveResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetPathPaymentStrictSendResult

func (u OperationResultTr) GetPathPaymentStrictSendResult() (result PathPaymentStrictSendResult, ok bool)

GetPathPaymentStrictSendResult retrieves the PathPaymentStrictSendResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetPaymentResult

func (u OperationResultTr) GetPaymentResult() (result PaymentResult, ok bool)

GetPaymentResult retrieves the PaymentResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetRestoreFootprintResult

func (u OperationResultTr) GetRestoreFootprintResult() (result RestoreFootprintResult, ok bool)

GetRestoreFootprintResult retrieves the RestoreFootprintResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetRevokeSponsorshipResult

func (u OperationResultTr) GetRevokeSponsorshipResult() (result RevokeSponsorshipResult, ok bool)

GetRevokeSponsorshipResult retrieves the RevokeSponsorshipResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetSetOptionsResult

func (u OperationResultTr) GetSetOptionsResult() (result SetOptionsResult, ok bool)

GetSetOptionsResult retrieves the SetOptionsResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) GetSetTrustLineFlagsResult

func (u OperationResultTr) GetSetTrustLineFlagsResult() (result SetTrustLineFlagsResult, ok bool)

GetSetTrustLineFlagsResult retrieves the SetTrustLineFlagsResult value from the union, returning ok if the union's switch indicated the value is valid.

func (OperationResultTr) MarshalBinary

func (s OperationResultTr) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (OperationResultTr) MustAccountMergeResult

func (u OperationResultTr) MustAccountMergeResult() AccountMergeResult

MustAccountMergeResult retrieves the AccountMergeResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustAllowTrustResult

func (u OperationResultTr) MustAllowTrustResult() AllowTrustResult

MustAllowTrustResult retrieves the AllowTrustResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustBeginSponsoringFutureReservesResult

func (u OperationResultTr) MustBeginSponsoringFutureReservesResult() BeginSponsoringFutureReservesResult

MustBeginSponsoringFutureReservesResult retrieves the BeginSponsoringFutureReservesResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustBumpSeqResult

func (u OperationResultTr) MustBumpSeqResult() BumpSequenceResult

MustBumpSeqResult retrieves the BumpSeqResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustChangeTrustResult

func (u OperationResultTr) MustChangeTrustResult() ChangeTrustResult

MustChangeTrustResult retrieves the ChangeTrustResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustClaimClaimableBalanceResult

func (u OperationResultTr) MustClaimClaimableBalanceResult() ClaimClaimableBalanceResult

MustClaimClaimableBalanceResult retrieves the ClaimClaimableBalanceResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustClawbackClaimableBalanceResult

func (u OperationResultTr) MustClawbackClaimableBalanceResult() ClawbackClaimableBalanceResult

MustClawbackClaimableBalanceResult retrieves the ClawbackClaimableBalanceResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustClawbackResult

func (u OperationResultTr) MustClawbackResult() ClawbackResult

MustClawbackResult retrieves the ClawbackResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustCreateAccountResult

func (u OperationResultTr) MustCreateAccountResult() CreateAccountResult

MustCreateAccountResult retrieves the CreateAccountResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustCreateClaimableBalanceResult

func (u OperationResultTr) MustCreateClaimableBalanceResult() CreateClaimableBalanceResult

MustCreateClaimableBalanceResult retrieves the CreateClaimableBalanceResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustCreatePassiveSellOfferResult

func (u OperationResultTr) MustCreatePassiveSellOfferResult() ManageSellOfferResult

MustCreatePassiveSellOfferResult retrieves the CreatePassiveSellOfferResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustEndSponsoringFutureReservesResult

func (u OperationResultTr) MustEndSponsoringFutureReservesResult() EndSponsoringFutureReservesResult

MustEndSponsoringFutureReservesResult retrieves the EndSponsoringFutureReservesResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustExtendFootprintTtlResult

func (u OperationResultTr) MustExtendFootprintTtlResult() ExtendFootprintTtlResult

MustExtendFootprintTtlResult retrieves the ExtendFootprintTtlResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustInflationResult

func (u OperationResultTr) MustInflationResult() InflationResult

MustInflationResult retrieves the InflationResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustInvokeHostFunctionResult

func (u OperationResultTr) MustInvokeHostFunctionResult() InvokeHostFunctionResult

MustInvokeHostFunctionResult retrieves the InvokeHostFunctionResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustLiquidityPoolDepositResult

func (u OperationResultTr) MustLiquidityPoolDepositResult() LiquidityPoolDepositResult

MustLiquidityPoolDepositResult retrieves the LiquidityPoolDepositResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustLiquidityPoolWithdrawResult

func (u OperationResultTr) MustLiquidityPoolWithdrawResult() LiquidityPoolWithdrawResult

MustLiquidityPoolWithdrawResult retrieves the LiquidityPoolWithdrawResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustManageBuyOfferResult

func (u OperationResultTr) MustManageBuyOfferResult() ManageBuyOfferResult

MustManageBuyOfferResult retrieves the ManageBuyOfferResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustManageDataResult

func (u OperationResultTr) MustManageDataResult() ManageDataResult

MustManageDataResult retrieves the ManageDataResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustManageSellOfferResult

func (u OperationResultTr) MustManageSellOfferResult() ManageSellOfferResult

MustManageSellOfferResult retrieves the ManageSellOfferResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustPathPaymentStrictReceiveResult

func (u OperationResultTr) MustPathPaymentStrictReceiveResult() PathPaymentStrictReceiveResult

MustPathPaymentStrictReceiveResult retrieves the PathPaymentStrictReceiveResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustPathPaymentStrictSendResult

func (u OperationResultTr) MustPathPaymentStrictSendResult() PathPaymentStrictSendResult

MustPathPaymentStrictSendResult retrieves the PathPaymentStrictSendResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustPaymentResult

func (u OperationResultTr) MustPaymentResult() PaymentResult

MustPaymentResult retrieves the PaymentResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustRestoreFootprintResult

func (u OperationResultTr) MustRestoreFootprintResult() RestoreFootprintResult

MustRestoreFootprintResult retrieves the RestoreFootprintResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustRevokeSponsorshipResult

func (u OperationResultTr) MustRevokeSponsorshipResult() RevokeSponsorshipResult

MustRevokeSponsorshipResult retrieves the RevokeSponsorshipResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustSetOptionsResult

func (u OperationResultTr) MustSetOptionsResult() SetOptionsResult

MustSetOptionsResult retrieves the SetOptionsResult value from the union, panicing if the value is not set.

func (OperationResultTr) MustSetTrustLineFlagsResult

func (u OperationResultTr) MustSetTrustLineFlagsResult() SetTrustLineFlagsResult

MustSetTrustLineFlagsResult retrieves the SetTrustLineFlagsResult value from the union, panicing if the value is not set.

func (OperationResultTr) SwitchFieldName

func (u OperationResultTr) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*OperationResultTr) UnmarshalBinary

func (s *OperationResultTr) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type OperationType

type OperationType int32

OperationType is an XDR Enum defines as:

enum OperationType
 {
     CREATE_ACCOUNT = 0,
     PAYMENT = 1,
     PATH_PAYMENT_STRICT_RECEIVE = 2,
     MANAGE_SELL_OFFER = 3,
     CREATE_PASSIVE_SELL_OFFER = 4,
     SET_OPTIONS = 5,
     CHANGE_TRUST = 6,
     ALLOW_TRUST = 7,
     ACCOUNT_MERGE = 8,
     INFLATION = 9,
     MANAGE_DATA = 10,
     BUMP_SEQUENCE = 11,
     MANAGE_BUY_OFFER = 12,
     PATH_PAYMENT_STRICT_SEND = 13,
     CREATE_CLAIMABLE_BALANCE = 14,
     CLAIM_CLAIMABLE_BALANCE = 15,
     BEGIN_SPONSORING_FUTURE_RESERVES = 16,
     END_SPONSORING_FUTURE_RESERVES = 17,
     REVOKE_SPONSORSHIP = 18,
     CLAWBACK = 19,
     CLAWBACK_CLAIMABLE_BALANCE = 20,
     SET_TRUST_LINE_FLAGS = 21,
     LIQUIDITY_POOL_DEPOSIT = 22,
     LIQUIDITY_POOL_WITHDRAW = 23,
     INVOKE_HOST_FUNCTION = 24,
     EXTEND_FOOTPRINT_TTL = 25,
     RESTORE_FOOTPRINT = 26
 };
const (
	OperationTypeCreateAccount                 OperationType = 0
	OperationTypePayment                       OperationType = 1
	OperationTypePathPaymentStrictReceive      OperationType = 2
	OperationTypeManageSellOffer               OperationType = 3
	OperationTypeCreatePassiveSellOffer        OperationType = 4
	OperationTypeSetOptions                    OperationType = 5
	OperationTypeChangeTrust                   OperationType = 6
	OperationTypeAllowTrust                    OperationType = 7
	OperationTypeAccountMerge                  OperationType = 8
	OperationTypeInflation                     OperationType = 9
	OperationTypeManageData                    OperationType = 10
	OperationTypeBumpSequence                  OperationType = 11
	OperationTypeManageBuyOffer                OperationType = 12
	OperationTypePathPaymentStrictSend         OperationType = 13
	OperationTypeCreateClaimableBalance        OperationType = 14
	OperationTypeClaimClaimableBalance         OperationType = 15
	OperationTypeBeginSponsoringFutureReserves OperationType = 16
	OperationTypeEndSponsoringFutureReserves   OperationType = 17
	OperationTypeRevokeSponsorship             OperationType = 18
	OperationTypeClawback                      OperationType = 19
	OperationTypeClawbackClaimableBalance      OperationType = 20
	OperationTypeSetTrustLineFlags             OperationType = 21
	OperationTypeLiquidityPoolDeposit          OperationType = 22
	OperationTypeLiquidityPoolWithdraw         OperationType = 23
	OperationTypeInvokeHostFunction            OperationType = 24
	OperationTypeExtendFootprintTtl            OperationType = 25
	OperationTypeRestoreFootprint              OperationType = 26
)

func (*OperationType) DecodeFrom

func (e *OperationType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (OperationType) EncodeTo

func (e OperationType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (OperationType) MarshalBinary

func (s OperationType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (OperationType) String

func (e OperationType) String() string

String returns the name of `e`

func (*OperationType) UnmarshalBinary

func (s *OperationType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (OperationType) ValidEnum

func (e OperationType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for OperationType

type PathPaymentStrictReceiveOp

type PathPaymentStrictReceiveOp struct {
	SendAsset   Asset
	SendMax     Int64
	Destination MuxedAccount
	DestAsset   Asset
	DestAmount  Int64
	Path        []Asset `xdrmaxsize:"5"`
}

PathPaymentStrictReceiveOp is an XDR Struct defines as:

struct PathPaymentStrictReceiveOp
 {
     Asset sendAsset; // asset we pay with
     int64 sendMax;   // the maximum amount of sendAsset to
                      // send (excluding fees).
                      // The operation will fail if can't be met

     MuxedAccount destination; // recipient of the payment
     Asset destAsset;          // what they end up with
     int64 destAmount;         // amount they end up with

     Asset path<5>; // additional hops it must go through to get there
 };

func (*PathPaymentStrictReceiveOp) DecodeFrom

func (s *PathPaymentStrictReceiveOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PathPaymentStrictReceiveOp) EncodeTo

func (s *PathPaymentStrictReceiveOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictReceiveOp) MarshalBinary

func (s PathPaymentStrictReceiveOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*PathPaymentStrictReceiveOp) UnmarshalBinary

func (s *PathPaymentStrictReceiveOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PathPaymentStrictReceiveResult

type PathPaymentStrictReceiveResult struct {
	Code     PathPaymentStrictReceiveResultCode
	Success  *PathPaymentStrictReceiveResultSuccess
	NoIssuer *Asset
}

PathPaymentStrictReceiveResult is an XDR Union defines as:

union PathPaymentStrictReceiveResult switch (
     PathPaymentStrictReceiveResultCode code)
 {
 case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS:
     struct
     {
         ClaimAtom offers<>;
         SimplePaymentResult last;
     } success;
 case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED:
 case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED:
 case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST:
 case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED:
 case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION:
 case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST:
 case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED:
 case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL:
     void;
 case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER:
     Asset noIssuer; // the asset that caused the error
 case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS:
 case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF:
 case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX:
     void;
 };

func NewPathPaymentStrictReceiveResult

func NewPathPaymentStrictReceiveResult(code PathPaymentStrictReceiveResultCode, value interface{}) (result PathPaymentStrictReceiveResult, err error)

NewPathPaymentStrictReceiveResult creates a new PathPaymentStrictReceiveResult.

func (PathPaymentStrictReceiveResult) ArmForSwitch

func (u PathPaymentStrictReceiveResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of PathPaymentStrictReceiveResult

func (*PathPaymentStrictReceiveResult) DecodeFrom

func (u *PathPaymentStrictReceiveResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PathPaymentStrictReceiveResult) EncodeTo

func (u PathPaymentStrictReceiveResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictReceiveResult) GetNoIssuer

func (u PathPaymentStrictReceiveResult) GetNoIssuer() (result Asset, ok bool)

GetNoIssuer retrieves the NoIssuer value from the union, returning ok if the union's switch indicated the value is valid.

func (PathPaymentStrictReceiveResult) GetSuccess

GetSuccess retrieves the Success value from the union, returning ok if the union's switch indicated the value is valid.

func (PathPaymentStrictReceiveResult) MarshalBinary

func (s PathPaymentStrictReceiveResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (PathPaymentStrictReceiveResult) MustNoIssuer

func (u PathPaymentStrictReceiveResult) MustNoIssuer() Asset

MustNoIssuer retrieves the NoIssuer value from the union, panicing if the value is not set.

func (PathPaymentStrictReceiveResult) MustSuccess

MustSuccess retrieves the Success value from the union, panicing if the value is not set.

func (*PathPaymentStrictReceiveResult) SendAmount

func (pr *PathPaymentStrictReceiveResult) SendAmount() Int64

SendAmount returns the amount spent, denominated in the source asset, in the course of this path payment

func (PathPaymentStrictReceiveResult) SwitchFieldName

func (u PathPaymentStrictReceiveResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*PathPaymentStrictReceiveResult) UnmarshalBinary

func (s *PathPaymentStrictReceiveResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PathPaymentStrictReceiveResultCode

type PathPaymentStrictReceiveResultCode int32

PathPaymentStrictReceiveResultCode is an XDR Enum defines as:

enum PathPaymentStrictReceiveResultCode
 {
     // codes considered as "success" for the operation
     PATH_PAYMENT_STRICT_RECEIVE_SUCCESS = 0, // success

     // codes considered as "failure" for the operation
     PATH_PAYMENT_STRICT_RECEIVE_MALFORMED = -1, // bad input
     PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED =
         -2, // not enough funds in source account
     PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST =
         -3, // no trust line on source account
     PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED =
         -4, // source not authorized to transfer
     PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION =
         -5, // destination account does not exist
     PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST =
         -6, // dest missing a trust line for asset
     PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED =
         -7, // dest not authorized to hold asset
     PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL =
         -8, // dest would go above their limit
     PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER = -9, // missing issuer on one asset
     PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS =
         -10, // not enough offers to satisfy path
     PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF =
         -11, // would cross one of its own offers
     PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX = -12 // could not satisfy sendmax
 };
const (
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveSuccess          PathPaymentStrictReceiveResultCode = 0
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveMalformed        PathPaymentStrictReceiveResultCode = -1
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveUnderfunded      PathPaymentStrictReceiveResultCode = -2
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveSrcNoTrust       PathPaymentStrictReceiveResultCode = -3
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveSrcNotAuthorized PathPaymentStrictReceiveResultCode = -4
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveNoDestination    PathPaymentStrictReceiveResultCode = -5
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveNoTrust          PathPaymentStrictReceiveResultCode = -6
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveNotAuthorized    PathPaymentStrictReceiveResultCode = -7
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveLineFull         PathPaymentStrictReceiveResultCode = -8
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveNoIssuer         PathPaymentStrictReceiveResultCode = -9
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveTooFewOffers     PathPaymentStrictReceiveResultCode = -10
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveOfferCrossSelf   PathPaymentStrictReceiveResultCode = -11
	PathPaymentStrictReceiveResultCodePathPaymentStrictReceiveOverSendmax      PathPaymentStrictReceiveResultCode = -12
)

func (*PathPaymentStrictReceiveResultCode) DecodeFrom

func (e *PathPaymentStrictReceiveResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PathPaymentStrictReceiveResultCode) EncodeTo

func (e PathPaymentStrictReceiveResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictReceiveResultCode) MarshalBinary

func (s PathPaymentStrictReceiveResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (PathPaymentStrictReceiveResultCode) String

String returns the name of `e`

func (*PathPaymentStrictReceiveResultCode) UnmarshalBinary

func (s *PathPaymentStrictReceiveResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (PathPaymentStrictReceiveResultCode) ValidEnum

ValidEnum validates a proposed value for this enum. Implements the Enum interface for PathPaymentStrictReceiveResultCode

type PathPaymentStrictReceiveResultSuccess

type PathPaymentStrictReceiveResultSuccess struct {
	Offers []ClaimAtom
	Last   SimplePaymentResult
}

PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defines as:

struct
     {
         ClaimAtom offers<>;
         SimplePaymentResult last;
     }

func (*PathPaymentStrictReceiveResultSuccess) DecodeFrom

func (s *PathPaymentStrictReceiveResultSuccess) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PathPaymentStrictReceiveResultSuccess) EncodeTo

func (s *PathPaymentStrictReceiveResultSuccess) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictReceiveResultSuccess) MarshalBinary

func (s PathPaymentStrictReceiveResultSuccess) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*PathPaymentStrictReceiveResultSuccess) UnmarshalBinary

func (s *PathPaymentStrictReceiveResultSuccess) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PathPaymentStrictSendOp

type PathPaymentStrictSendOp struct {
	SendAsset   Asset
	SendAmount  Int64
	Destination MuxedAccount
	DestAsset   Asset
	DestMin     Int64
	Path        []Asset `xdrmaxsize:"5"`
}

PathPaymentStrictSendOp is an XDR Struct defines as:

struct PathPaymentStrictSendOp
 {
     Asset sendAsset;  // asset we pay with
     int64 sendAmount; // amount of sendAsset to send (excluding fees)

     MuxedAccount destination; // recipient of the payment
     Asset destAsset;          // what they end up with
     int64 destMin;            // the minimum amount of dest asset to
                               // be received
                               // The operation will fail if it can't be met

     Asset path<5>; // additional hops it must go through to get there
 };

func (*PathPaymentStrictSendOp) DecodeFrom

func (s *PathPaymentStrictSendOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PathPaymentStrictSendOp) EncodeTo

func (s *PathPaymentStrictSendOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictSendOp) MarshalBinary

func (s PathPaymentStrictSendOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*PathPaymentStrictSendOp) UnmarshalBinary

func (s *PathPaymentStrictSendOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PathPaymentStrictSendResult

type PathPaymentStrictSendResult struct {
	Code     PathPaymentStrictSendResultCode
	Success  *PathPaymentStrictSendResultSuccess
	NoIssuer *Asset
}

PathPaymentStrictSendResult is an XDR Union defines as:

union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code)
 {
 case PATH_PAYMENT_STRICT_SEND_SUCCESS:
     struct
     {
         ClaimAtom offers<>;
         SimplePaymentResult last;
     } success;
 case PATH_PAYMENT_STRICT_SEND_MALFORMED:
 case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED:
 case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST:
 case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED:
 case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION:
 case PATH_PAYMENT_STRICT_SEND_NO_TRUST:
 case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED:
 case PATH_PAYMENT_STRICT_SEND_LINE_FULL:
     void;
 case PATH_PAYMENT_STRICT_SEND_NO_ISSUER:
     Asset noIssuer; // the asset that caused the error
 case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS:
 case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF:
 case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN:
     void;
 };

func NewPathPaymentStrictSendResult

func NewPathPaymentStrictSendResult(code PathPaymentStrictSendResultCode, value interface{}) (result PathPaymentStrictSendResult, err error)

NewPathPaymentStrictSendResult creates a new PathPaymentStrictSendResult.

func (PathPaymentStrictSendResult) ArmForSwitch

func (u PathPaymentStrictSendResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of PathPaymentStrictSendResult

func (*PathPaymentStrictSendResult) DecodeFrom

func (u *PathPaymentStrictSendResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PathPaymentStrictSendResult) DestAmount

func (pr *PathPaymentStrictSendResult) DestAmount() Int64

DestAmount returns the amount received, denominated in the destination asset, in the course of this path payment

func (PathPaymentStrictSendResult) EncodeTo

func (u PathPaymentStrictSendResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictSendResult) GetNoIssuer

func (u PathPaymentStrictSendResult) GetNoIssuer() (result Asset, ok bool)

GetNoIssuer retrieves the NoIssuer value from the union, returning ok if the union's switch indicated the value is valid.

func (PathPaymentStrictSendResult) GetSuccess

GetSuccess retrieves the Success value from the union, returning ok if the union's switch indicated the value is valid.

func (PathPaymentStrictSendResult) MarshalBinary

func (s PathPaymentStrictSendResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (PathPaymentStrictSendResult) MustNoIssuer

func (u PathPaymentStrictSendResult) MustNoIssuer() Asset

MustNoIssuer retrieves the NoIssuer value from the union, panicing if the value is not set.

func (PathPaymentStrictSendResult) MustSuccess

MustSuccess retrieves the Success value from the union, panicing if the value is not set.

func (PathPaymentStrictSendResult) SwitchFieldName

func (u PathPaymentStrictSendResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*PathPaymentStrictSendResult) UnmarshalBinary

func (s *PathPaymentStrictSendResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PathPaymentStrictSendResultCode

type PathPaymentStrictSendResultCode int32

PathPaymentStrictSendResultCode is an XDR Enum defines as:

enum PathPaymentStrictSendResultCode
 {
     // codes considered as "success" for the operation
     PATH_PAYMENT_STRICT_SEND_SUCCESS = 0, // success

     // codes considered as "failure" for the operation
     PATH_PAYMENT_STRICT_SEND_MALFORMED = -1, // bad input
     PATH_PAYMENT_STRICT_SEND_UNDERFUNDED =
         -2, // not enough funds in source account
     PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST =
         -3, // no trust line on source account
     PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED =
         -4, // source not authorized to transfer
     PATH_PAYMENT_STRICT_SEND_NO_DESTINATION =
         -5, // destination account does not exist
     PATH_PAYMENT_STRICT_SEND_NO_TRUST =
         -6, // dest missing a trust line for asset
     PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED =
         -7, // dest not authorized to hold asset
     PATH_PAYMENT_STRICT_SEND_LINE_FULL = -8, // dest would go above their limit
     PATH_PAYMENT_STRICT_SEND_NO_ISSUER = -9, // missing issuer on one asset
     PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS =
         -10, // not enough offers to satisfy path
     PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF =
         -11, // would cross one of its own offers
     PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN = -12 // could not satisfy destMin
 };
const (
	PathPaymentStrictSendResultCodePathPaymentStrictSendSuccess          PathPaymentStrictSendResultCode = 0
	PathPaymentStrictSendResultCodePathPaymentStrictSendMalformed        PathPaymentStrictSendResultCode = -1
	PathPaymentStrictSendResultCodePathPaymentStrictSendUnderfunded      PathPaymentStrictSendResultCode = -2
	PathPaymentStrictSendResultCodePathPaymentStrictSendSrcNoTrust       PathPaymentStrictSendResultCode = -3
	PathPaymentStrictSendResultCodePathPaymentStrictSendSrcNotAuthorized PathPaymentStrictSendResultCode = -4
	PathPaymentStrictSendResultCodePathPaymentStrictSendNoDestination    PathPaymentStrictSendResultCode = -5
	PathPaymentStrictSendResultCodePathPaymentStrictSendNoTrust          PathPaymentStrictSendResultCode = -6
	PathPaymentStrictSendResultCodePathPaymentStrictSendNotAuthorized    PathPaymentStrictSendResultCode = -7
	PathPaymentStrictSendResultCodePathPaymentStrictSendLineFull         PathPaymentStrictSendResultCode = -8
	PathPaymentStrictSendResultCodePathPaymentStrictSendNoIssuer         PathPaymentStrictSendResultCode = -9
	PathPaymentStrictSendResultCodePathPaymentStrictSendTooFewOffers     PathPaymentStrictSendResultCode = -10
	PathPaymentStrictSendResultCodePathPaymentStrictSendOfferCrossSelf   PathPaymentStrictSendResultCode = -11
	PathPaymentStrictSendResultCodePathPaymentStrictSendUnderDestmin     PathPaymentStrictSendResultCode = -12
)

func (*PathPaymentStrictSendResultCode) DecodeFrom

func (e *PathPaymentStrictSendResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PathPaymentStrictSendResultCode) EncodeTo

func (e PathPaymentStrictSendResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictSendResultCode) MarshalBinary

func (s PathPaymentStrictSendResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (PathPaymentStrictSendResultCode) String

String returns the name of `e`

func (*PathPaymentStrictSendResultCode) UnmarshalBinary

func (s *PathPaymentStrictSendResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (PathPaymentStrictSendResultCode) ValidEnum

ValidEnum validates a proposed value for this enum. Implements the Enum interface for PathPaymentStrictSendResultCode

type PathPaymentStrictSendResultSuccess

type PathPaymentStrictSendResultSuccess struct {
	Offers []ClaimAtom
	Last   SimplePaymentResult
}

PathPaymentStrictSendResultSuccess is an XDR NestedStruct defines as:

struct
     {
         ClaimAtom offers<>;
         SimplePaymentResult last;
     }

func (*PathPaymentStrictSendResultSuccess) DecodeFrom

func (s *PathPaymentStrictSendResultSuccess) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PathPaymentStrictSendResultSuccess) EncodeTo

func (s *PathPaymentStrictSendResultSuccess) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PathPaymentStrictSendResultSuccess) MarshalBinary

func (s PathPaymentStrictSendResultSuccess) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*PathPaymentStrictSendResultSuccess) UnmarshalBinary

func (s *PathPaymentStrictSendResultSuccess) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PaymentOp

type PaymentOp struct {
	Destination MuxedAccount
	Asset       Asset
	Amount      Int64
}

PaymentOp is an XDR Struct defines as:

struct PaymentOp
 {
     MuxedAccount destination; // recipient of the payment
     Asset asset;              // what they end up with
     int64 amount;             // amount they end up with
 };

func (*PaymentOp) DecodeFrom

func (s *PaymentOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PaymentOp) EncodeTo

func (s *PaymentOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PaymentOp) MarshalBinary

func (s PaymentOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*PaymentOp) UnmarshalBinary

func (s *PaymentOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PaymentResult

type PaymentResult struct {
	Code PaymentResultCode
}

PaymentResult is an XDR Union defines as:

union PaymentResult switch (PaymentResultCode code)
 {
 case PAYMENT_SUCCESS:
     void;
 case PAYMENT_MALFORMED:
 case PAYMENT_UNDERFUNDED:
 case PAYMENT_SRC_NO_TRUST:
 case PAYMENT_SRC_NOT_AUTHORIZED:
 case PAYMENT_NO_DESTINATION:
 case PAYMENT_NO_TRUST:
 case PAYMENT_NOT_AUTHORIZED:
 case PAYMENT_LINE_FULL:
 case PAYMENT_NO_ISSUER:
     void;
 };

func NewPaymentResult

func NewPaymentResult(code PaymentResultCode, value interface{}) (result PaymentResult, err error)

NewPaymentResult creates a new PaymentResult.

func (PaymentResult) ArmForSwitch

func (u PaymentResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of PaymentResult

func (*PaymentResult) DecodeFrom

func (u *PaymentResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PaymentResult) EncodeTo

func (u PaymentResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PaymentResult) MarshalBinary

func (s PaymentResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (PaymentResult) SwitchFieldName

func (u PaymentResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*PaymentResult) UnmarshalBinary

func (s *PaymentResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PaymentResultCode

type PaymentResultCode int32

PaymentResultCode is an XDR Enum defines as:

enum PaymentResultCode
 {
     // codes considered as "success" for the operation
     PAYMENT_SUCCESS = 0, // payment successfully completed

     // codes considered as "failure" for the operation
     PAYMENT_MALFORMED = -1,          // bad input
     PAYMENT_UNDERFUNDED = -2,        // not enough funds in source account
     PAYMENT_SRC_NO_TRUST = -3,       // no trust line on source account
     PAYMENT_SRC_NOT_AUTHORIZED = -4, // source not authorized to transfer
     PAYMENT_NO_DESTINATION = -5,     // destination account does not exist
     PAYMENT_NO_TRUST = -6,       // destination missing a trust line for asset
     PAYMENT_NOT_AUTHORIZED = -7, // destination not authorized to hold asset
     PAYMENT_LINE_FULL = -8,      // destination would go above their limit
     PAYMENT_NO_ISSUER = -9       // missing issuer on asset
 };
const (
	PaymentResultCodePaymentSuccess          PaymentResultCode = 0
	PaymentResultCodePaymentMalformed        PaymentResultCode = -1
	PaymentResultCodePaymentUnderfunded      PaymentResultCode = -2
	PaymentResultCodePaymentSrcNoTrust       PaymentResultCode = -3
	PaymentResultCodePaymentSrcNotAuthorized PaymentResultCode = -4
	PaymentResultCodePaymentNoDestination    PaymentResultCode = -5
	PaymentResultCodePaymentNoTrust          PaymentResultCode = -6
	PaymentResultCodePaymentNotAuthorized    PaymentResultCode = -7
	PaymentResultCodePaymentLineFull         PaymentResultCode = -8
	PaymentResultCodePaymentNoIssuer         PaymentResultCode = -9
)

func (*PaymentResultCode) DecodeFrom

func (e *PaymentResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PaymentResultCode) EncodeTo

func (e PaymentResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PaymentResultCode) MarshalBinary

func (s PaymentResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (PaymentResultCode) String

func (e PaymentResultCode) String() string

String returns the name of `e`

func (*PaymentResultCode) UnmarshalBinary

func (s *PaymentResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (PaymentResultCode) ValidEnum

func (e PaymentResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for PaymentResultCode

type PeerAddress

type PeerAddress struct {
	Ip          PeerAddressIp
	Port        Uint32
	NumFailures Uint32
}

PeerAddress is an XDR Struct defines as:

struct PeerAddress
 {
     union switch (IPAddrType type)
     {
     case IPv4:
         opaque ipv4[4];
     case IPv6:
         opaque ipv6[16];
     }
     ip;
     uint32 port;
     uint32 numFailures;
 };

func (*PeerAddress) DecodeFrom

func (s *PeerAddress) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PeerAddress) EncodeTo

func (s *PeerAddress) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PeerAddress) MarshalBinary

func (s PeerAddress) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*PeerAddress) UnmarshalBinary

func (s *PeerAddress) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PeerAddressIp

type PeerAddressIp struct {
	Type IpAddrType
	Ipv4 *[4]byte  `xdrmaxsize:"4"`
	Ipv6 *[16]byte `xdrmaxsize:"16"`
}

PeerAddressIp is an XDR NestedUnion defines as:

union switch (IPAddrType type)
     {
     case IPv4:
         opaque ipv4[4];
     case IPv6:
         opaque ipv6[16];
     }

func NewPeerAddressIp

func NewPeerAddressIp(aType IpAddrType, value interface{}) (result PeerAddressIp, err error)

NewPeerAddressIp creates a new PeerAddressIp.

func (PeerAddressIp) ArmForSwitch

func (u PeerAddressIp) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of PeerAddressIp

func (*PeerAddressIp) DecodeFrom

func (u *PeerAddressIp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PeerAddressIp) EncodeTo

func (u PeerAddressIp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PeerAddressIp) GetIpv4

func (u PeerAddressIp) GetIpv4() (result [4]byte, ok bool)

GetIpv4 retrieves the Ipv4 value from the union, returning ok if the union's switch indicated the value is valid.

func (PeerAddressIp) GetIpv6

func (u PeerAddressIp) GetIpv6() (result [16]byte, ok bool)

GetIpv6 retrieves the Ipv6 value from the union, returning ok if the union's switch indicated the value is valid.

func (PeerAddressIp) MarshalBinary

func (s PeerAddressIp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (PeerAddressIp) MustIpv4

func (u PeerAddressIp) MustIpv4() [4]byte

MustIpv4 retrieves the Ipv4 value from the union, panicing if the value is not set.

func (PeerAddressIp) MustIpv6

func (u PeerAddressIp) MustIpv6() [16]byte

MustIpv6 retrieves the Ipv6 value from the union, panicing if the value is not set.

func (PeerAddressIp) SwitchFieldName

func (u PeerAddressIp) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*PeerAddressIp) UnmarshalBinary

func (s *PeerAddressIp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PeerStatList

type PeerStatList []PeerStats

PeerStatList is an XDR Typedef defines as:

typedef PeerStats PeerStatList<25>;

func (*PeerStatList) DecodeFrom

func (s *PeerStatList) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PeerStatList) EncodeTo

func (s PeerStatList) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PeerStatList) MarshalBinary

func (s PeerStatList) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*PeerStatList) UnmarshalBinary

func (s *PeerStatList) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (PeerStatList) XDRMaxSize

func (e PeerStatList) XDRMaxSize() int

XDRMaxSize implements the Sized interface for PeerStatList

type PeerStats

type PeerStats struct {
	Id                        NodeId
	VersionStr                string `xdrmaxsize:"100"`
	MessagesRead              Uint64
	MessagesWritten           Uint64
	BytesRead                 Uint64
	BytesWritten              Uint64
	SecondsConnected          Uint64
	UniqueFloodBytesRecv      Uint64
	DuplicateFloodBytesRecv   Uint64
	UniqueFetchBytesRecv      Uint64
	DuplicateFetchBytesRecv   Uint64
	UniqueFloodMessageRecv    Uint64
	DuplicateFloodMessageRecv Uint64
	UniqueFetchMessageRecv    Uint64
	DuplicateFetchMessageRecv Uint64
}

PeerStats is an XDR Struct defines as:

struct PeerStats
 {
     NodeID id;
     string versionStr<100>;
     uint64 messagesRead;
     uint64 messagesWritten;
     uint64 bytesRead;
     uint64 bytesWritten;
     uint64 secondsConnected;

     uint64 uniqueFloodBytesRecv;
     uint64 duplicateFloodBytesRecv;
     uint64 uniqueFetchBytesRecv;
     uint64 duplicateFetchBytesRecv;

     uint64 uniqueFloodMessageRecv;
     uint64 duplicateFloodMessageRecv;
     uint64 uniqueFetchMessageRecv;
     uint64 duplicateFetchMessageRecv;
 };

func (*PeerStats) DecodeFrom

func (s *PeerStats) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PeerStats) EncodeTo

func (s *PeerStats) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PeerStats) MarshalBinary

func (s PeerStats) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*PeerStats) UnmarshalBinary

func (s *PeerStats) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PersistedScpState

type PersistedScpState struct {
	V  int32
	V0 *PersistedScpStateV0
	V1 *PersistedScpStateV1
}

PersistedScpState is an XDR Union defines as:

union PersistedSCPState switch (int v)
 {
 case 0:
 	PersistedSCPStateV0 v0;
 case 1:
 	PersistedSCPStateV1 v1;
 };

func NewPersistedScpState

func NewPersistedScpState(v int32, value interface{}) (result PersistedScpState, err error)

NewPersistedScpState creates a new PersistedScpState.

func (PersistedScpState) ArmForSwitch

func (u PersistedScpState) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of PersistedScpState

func (*PersistedScpState) DecodeFrom

func (u *PersistedScpState) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PersistedScpState) EncodeTo

func (u PersistedScpState) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PersistedScpState) GetV0

func (u PersistedScpState) GetV0() (result PersistedScpStateV0, ok bool)

GetV0 retrieves the V0 value from the union, returning ok if the union's switch indicated the value is valid.

func (PersistedScpState) GetV1

func (u PersistedScpState) GetV1() (result PersistedScpStateV1, ok bool)

GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.

func (PersistedScpState) MarshalBinary

func (s PersistedScpState) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (PersistedScpState) MustV0

MustV0 retrieves the V0 value from the union, panicing if the value is not set.

func (PersistedScpState) MustV1

MustV1 retrieves the V1 value from the union, panicing if the value is not set.

func (PersistedScpState) SwitchFieldName

func (u PersistedScpState) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*PersistedScpState) UnmarshalBinary

func (s *PersistedScpState) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PersistedScpStateV0

type PersistedScpStateV0 struct {
	ScpEnvelopes []ScpEnvelope
	QuorumSets   []ScpQuorumSet
	TxSets       []StoredTransactionSet
}

PersistedScpStateV0 is an XDR Struct defines as:

struct PersistedSCPStateV0
 {
 	SCPEnvelope scpEnvelopes<>;
 	SCPQuorumSet quorumSets<>;
 	StoredTransactionSet txSets<>;
 };

func (*PersistedScpStateV0) DecodeFrom

func (s *PersistedScpStateV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PersistedScpStateV0) EncodeTo

func (s *PersistedScpStateV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PersistedScpStateV0) MarshalBinary

func (s PersistedScpStateV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*PersistedScpStateV0) UnmarshalBinary

func (s *PersistedScpStateV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PersistedScpStateV1

type PersistedScpStateV1 struct {
	ScpEnvelopes []ScpEnvelope
	QuorumSets   []ScpQuorumSet
}

PersistedScpStateV1 is an XDR Struct defines as:

struct PersistedSCPStateV1
 {
 	// Tx sets are saved separately
 	SCPEnvelope scpEnvelopes<>;
 	SCPQuorumSet quorumSets<>;
 };

func (*PersistedScpStateV1) DecodeFrom

func (s *PersistedScpStateV1) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PersistedScpStateV1) EncodeTo

func (s *PersistedScpStateV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PersistedScpStateV1) MarshalBinary

func (s PersistedScpStateV1) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*PersistedScpStateV1) UnmarshalBinary

func (s *PersistedScpStateV1) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PoolId

type PoolId Hash

PoolId is an XDR Typedef defines as:

typedef Hash PoolID;

func NewPoolId

func NewPoolId(a, b Asset, fee Int32) (PoolId, error)

func (*PoolId) DecodeFrom

func (s *PoolId) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PoolId) EncodeTo

func (s *PoolId) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PoolId) MarshalBinary

func (s PoolId) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*PoolId) UnmarshalBinary

func (s *PoolId) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PreconditionType

type PreconditionType int32

PreconditionType is an XDR Enum defines as:

enum PreconditionType
 {
     PRECOND_NONE = 0,
     PRECOND_TIME = 1,
     PRECOND_V2 = 2
 };
const (
	PreconditionTypePrecondNone PreconditionType = 0
	PreconditionTypePrecondTime PreconditionType = 1
	PreconditionTypePrecondV2   PreconditionType = 2
)

func (*PreconditionType) DecodeFrom

func (e *PreconditionType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PreconditionType) EncodeTo

func (e PreconditionType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PreconditionType) GoString

func (pt PreconditionType) GoString() string

GoString implements fmt.GoStringer.

func (PreconditionType) MarshalBinary

func (s PreconditionType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (PreconditionType) String

func (e PreconditionType) String() string

String returns the name of `e`

func (*PreconditionType) UnmarshalBinary

func (s *PreconditionType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (PreconditionType) ValidEnum

func (e PreconditionType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for PreconditionType

type Preconditions

type Preconditions struct {
	Type       PreconditionType
	TimeBounds *TimeBounds
	V2         *PreconditionsV2
}

Preconditions is an XDR Union defines as:

union Preconditions switch (PreconditionType type)
 {
 case PRECOND_NONE:
     void;
 case PRECOND_TIME:
     TimeBounds timeBounds;
 case PRECOND_V2:
     PreconditionsV2 v2;
 };

func NewPreconditions

func NewPreconditions(aType PreconditionType, value interface{}) (result Preconditions, err error)

NewPreconditions creates a new Preconditions.

func NewPreconditionsWithTimeBounds

func NewPreconditionsWithTimeBounds(timebounds *TimeBounds) Preconditions

NewPreconditionsWithTimebounds constructs the simplest possible `Preconditions` instance given the (possibly empty) timebounds.

func (Preconditions) ArmForSwitch

func (u Preconditions) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of Preconditions

func (*Preconditions) DecodeFrom

func (u *Preconditions) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Preconditions) EncodeTo

func (u Preconditions) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Preconditions) GetTimeBounds

func (u Preconditions) GetTimeBounds() (result TimeBounds, ok bool)

GetTimeBounds retrieves the TimeBounds value from the union, returning ok if the union's switch indicated the value is valid.

func (Preconditions) GetV2

func (u Preconditions) GetV2() (result PreconditionsV2, ok bool)

GetV2 retrieves the V2 value from the union, returning ok if the union's switch indicated the value is valid.

func (Preconditions) GoString

func (p Preconditions) GoString() string

GoString implements fmt.GoStringer.

func (Preconditions) MarshalBinary

func (s Preconditions) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (Preconditions) MustTimeBounds

func (u Preconditions) MustTimeBounds() TimeBounds

MustTimeBounds retrieves the TimeBounds value from the union, panicing if the value is not set.

func (Preconditions) MustV2

func (u Preconditions) MustV2() PreconditionsV2

MustV2 retrieves the V2 value from the union, panicing if the value is not set.

func (Preconditions) SwitchFieldName

func (u Preconditions) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*Preconditions) UnmarshalBinary

func (s *Preconditions) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PreconditionsV2

type PreconditionsV2 struct {
	TimeBounds      *TimeBounds
	LedgerBounds    *LedgerBounds
	MinSeqNum       *SequenceNumber
	MinSeqAge       Duration
	MinSeqLedgerGap Uint32
	ExtraSigners    []SignerKey `xdrmaxsize:"2"`
}

PreconditionsV2 is an XDR Struct defines as:

struct PreconditionsV2
 {
     TimeBounds* timeBounds;

     // Transaction only valid for ledger numbers n such that
     // minLedger <= n < maxLedger (if maxLedger == 0, then
     // only minLedger is checked)
     LedgerBounds* ledgerBounds;

     // If NULL, only valid when sourceAccount's sequence number
     // is seqNum - 1.  Otherwise, valid when sourceAccount's
     // sequence number n satisfies minSeqNum <= n < tx.seqNum.
     // Note that after execution the account's sequence number
     // is always raised to tx.seqNum, and a transaction is not
     // valid if tx.seqNum is too high to ensure replay protection.
     SequenceNumber* minSeqNum;

     // For the transaction to be valid, the current ledger time must
     // be at least minSeqAge greater than sourceAccount's seqTime.
     Duration minSeqAge;

     // For the transaction to be valid, the current ledger number
     // must be at least minSeqLedgerGap greater than sourceAccount's
     // seqLedger.
     uint32 minSeqLedgerGap;

     // For the transaction to be valid, there must be a signature
     // corresponding to every Signer in this array, even if the
     // signature is not otherwise required by the sourceAccount or
     // operations.
     SignerKey extraSigners<2>;
 };

func (*PreconditionsV2) DecodeFrom

func (s *PreconditionsV2) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*PreconditionsV2) EncodeTo

func (s *PreconditionsV2) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PreconditionsV2) MarshalBinary

func (s PreconditionsV2) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*PreconditionsV2) UnmarshalBinary

func (s *PreconditionsV2) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Price

type Price struct {
	N Int32
	D Int32
}

Price is an XDR Struct defines as:

struct Price
 {
     int32 n; // numerator
     int32 d; // denominator
 };

func (Price) Cheaper

func (p Price) Cheaper(q Price) bool

Cheaper indicates if the Price's value is lower, taking into account denormalized representation (e.g. Price{1, 2}.Cheaper(Price{2,4}) == false )

func (*Price) DecodeFrom

func (s *Price) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Price) EncodeTo

func (s *Price) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Price) Equal

func (p Price) Equal(q Price) bool

Equal returns whether the price's value is the same, taking into account denormalized representation (e.g. Price{1, 2}.EqualValue(Price{2,4}) == true )

func (*Price) Invert

func (p *Price) Invert()

Invert inverts Price.

func (Price) MarshalBinary

func (s Price) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Price) Normalize

func (p *Price) Normalize()

Normalize sets Price to its rational canonical form

func (Price) String

func (p Price) String() string

String returns a string representation of `p`

func (*Price) UnmarshalBinary

func (s *Price) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PublicKey

type PublicKey struct {
	Type    PublicKeyType
	Ed25519 *Uint256
}

PublicKey is an XDR Union defines as:

union PublicKey switch (PublicKeyType type)
 {
 case PUBLIC_KEY_TYPE_ED25519:
     uint256 ed25519;
 };

func NewPublicKey

func NewPublicKey(aType PublicKeyType, value interface{}) (result PublicKey, err error)

NewPublicKey creates a new PublicKey.

func (PublicKey) ArmForSwitch

func (u PublicKey) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of PublicKey

func (*PublicKey) DecodeFrom

func (u *PublicKey) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PublicKey) EncodeTo

func (u PublicKey) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PublicKey) GetEd25519

func (u PublicKey) GetEd25519() (result Uint256, ok bool)

GetEd25519 retrieves the Ed25519 value from the union, returning ok if the union's switch indicated the value is valid.

func (PublicKey) MarshalBinary

func (s PublicKey) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (PublicKey) MustEd25519

func (u PublicKey) MustEd25519() Uint256

MustEd25519 retrieves the Ed25519 value from the union, panicing if the value is not set.

func (PublicKey) SwitchFieldName

func (u PublicKey) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*PublicKey) UnmarshalBinary

func (s *PublicKey) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type PublicKeyType

type PublicKeyType int32

PublicKeyType is an XDR Enum defines as:

enum PublicKeyType
 {
     PUBLIC_KEY_TYPE_ED25519 = KEY_TYPE_ED25519
 };
const (
	PublicKeyTypePublicKeyTypeEd25519 PublicKeyType = 0
)

func (*PublicKeyType) DecodeFrom

func (e *PublicKeyType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (PublicKeyType) EncodeTo

func (e PublicKeyType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (PublicKeyType) MarshalBinary

func (s PublicKeyType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (PublicKeyType) String

func (e PublicKeyType) String() string

String returns the name of `e`

func (*PublicKeyType) UnmarshalBinary

func (s *PublicKeyType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (PublicKeyType) ValidEnum

func (e PublicKeyType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for PublicKeyType

type RestoreFootprintOp

type RestoreFootprintOp struct {
	Ext ExtensionPoint
}

RestoreFootprintOp is an XDR Struct defines as:

struct RestoreFootprintOp
 {
     ExtensionPoint ext;
 };

func (*RestoreFootprintOp) DecodeFrom

func (s *RestoreFootprintOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*RestoreFootprintOp) EncodeTo

func (s *RestoreFootprintOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (RestoreFootprintOp) MarshalBinary

func (s RestoreFootprintOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*RestoreFootprintOp) UnmarshalBinary

func (s *RestoreFootprintOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type RestoreFootprintResult

type RestoreFootprintResult struct {
	Code RestoreFootprintResultCode
}

RestoreFootprintResult is an XDR Union defines as:

union RestoreFootprintResult switch (RestoreFootprintResultCode code)
 {
 case RESTORE_FOOTPRINT_SUCCESS:
     void;
 case RESTORE_FOOTPRINT_MALFORMED:
 case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED:
 case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE:
     void;
 };

func NewRestoreFootprintResult

func NewRestoreFootprintResult(code RestoreFootprintResultCode, value interface{}) (result RestoreFootprintResult, err error)

NewRestoreFootprintResult creates a new RestoreFootprintResult.

func (RestoreFootprintResult) ArmForSwitch

func (u RestoreFootprintResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of RestoreFootprintResult

func (*RestoreFootprintResult) DecodeFrom

func (u *RestoreFootprintResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (RestoreFootprintResult) EncodeTo

func (u RestoreFootprintResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (RestoreFootprintResult) MarshalBinary

func (s RestoreFootprintResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (RestoreFootprintResult) SwitchFieldName

func (u RestoreFootprintResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*RestoreFootprintResult) UnmarshalBinary

func (s *RestoreFootprintResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type RestoreFootprintResultCode

type RestoreFootprintResultCode int32

RestoreFootprintResultCode is an XDR Enum defines as:

enum RestoreFootprintResultCode
 {
     // codes considered as "success" for the operation
     RESTORE_FOOTPRINT_SUCCESS = 0,

     // codes considered as "failure" for the operation
     RESTORE_FOOTPRINT_MALFORMED = -1,
     RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED = -2,
     RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE = -3
 };
const (
	RestoreFootprintResultCodeRestoreFootprintSuccess                   RestoreFootprintResultCode = 0
	RestoreFootprintResultCodeRestoreFootprintMalformed                 RestoreFootprintResultCode = -1
	RestoreFootprintResultCodeRestoreFootprintResourceLimitExceeded     RestoreFootprintResultCode = -2
	RestoreFootprintResultCodeRestoreFootprintInsufficientRefundableFee RestoreFootprintResultCode = -3
)

func (*RestoreFootprintResultCode) DecodeFrom

func (e *RestoreFootprintResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (RestoreFootprintResultCode) EncodeTo

func (e RestoreFootprintResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (RestoreFootprintResultCode) MarshalBinary

func (s RestoreFootprintResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (RestoreFootprintResultCode) String

String returns the name of `e`

func (*RestoreFootprintResultCode) UnmarshalBinary

func (s *RestoreFootprintResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (RestoreFootprintResultCode) ValidEnum

func (e RestoreFootprintResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for RestoreFootprintResultCode

type RevokeSponsorshipOp

type RevokeSponsorshipOp struct {
	Type      RevokeSponsorshipType
	LedgerKey *LedgerKey
	Signer    *RevokeSponsorshipOpSigner
}

RevokeSponsorshipOp is an XDR Union defines as:

union RevokeSponsorshipOp switch (RevokeSponsorshipType type)
 {
 case REVOKE_SPONSORSHIP_LEDGER_ENTRY:
     LedgerKey ledgerKey;
 case REVOKE_SPONSORSHIP_SIGNER:
     struct
     {
         AccountID accountID;
         SignerKey signerKey;
     } signer;
 };

func NewRevokeSponsorshipOp

func NewRevokeSponsorshipOp(aType RevokeSponsorshipType, value interface{}) (result RevokeSponsorshipOp, err error)

NewRevokeSponsorshipOp creates a new RevokeSponsorshipOp.

func (RevokeSponsorshipOp) ArmForSwitch

func (u RevokeSponsorshipOp) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of RevokeSponsorshipOp

func (*RevokeSponsorshipOp) DecodeFrom

func (u *RevokeSponsorshipOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (RevokeSponsorshipOp) EncodeTo

func (u RevokeSponsorshipOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (RevokeSponsorshipOp) GetLedgerKey

func (u RevokeSponsorshipOp) GetLedgerKey() (result LedgerKey, ok bool)

GetLedgerKey retrieves the LedgerKey value from the union, returning ok if the union's switch indicated the value is valid.

func (RevokeSponsorshipOp) GetSigner

func (u RevokeSponsorshipOp) GetSigner() (result RevokeSponsorshipOpSigner, ok bool)

GetSigner retrieves the Signer value from the union, returning ok if the union's switch indicated the value is valid.

func (RevokeSponsorshipOp) MarshalBinary

func (s RevokeSponsorshipOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (RevokeSponsorshipOp) MustLedgerKey

func (u RevokeSponsorshipOp) MustLedgerKey() LedgerKey

MustLedgerKey retrieves the LedgerKey value from the union, panicing if the value is not set.

func (RevokeSponsorshipOp) MustSigner

MustSigner retrieves the Signer value from the union, panicing if the value is not set.

func (RevokeSponsorshipOp) SwitchFieldName

func (u RevokeSponsorshipOp) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*RevokeSponsorshipOp) UnmarshalBinary

func (s *RevokeSponsorshipOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type RevokeSponsorshipOpSigner

type RevokeSponsorshipOpSigner struct {
	AccountId AccountId
	SignerKey SignerKey
}

RevokeSponsorshipOpSigner is an XDR NestedStruct defines as:

struct
     {
         AccountID accountID;
         SignerKey signerKey;
     }

func (*RevokeSponsorshipOpSigner) DecodeFrom

func (s *RevokeSponsorshipOpSigner) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*RevokeSponsorshipOpSigner) EncodeTo

func (s *RevokeSponsorshipOpSigner) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (RevokeSponsorshipOpSigner) MarshalBinary

func (s RevokeSponsorshipOpSigner) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*RevokeSponsorshipOpSigner) UnmarshalBinary

func (s *RevokeSponsorshipOpSigner) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type RevokeSponsorshipResult

type RevokeSponsorshipResult struct {
	Code RevokeSponsorshipResultCode
}

RevokeSponsorshipResult is an XDR Union defines as:

union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code)
 {
 case REVOKE_SPONSORSHIP_SUCCESS:
     void;
 case REVOKE_SPONSORSHIP_DOES_NOT_EXIST:
 case REVOKE_SPONSORSHIP_NOT_SPONSOR:
 case REVOKE_SPONSORSHIP_LOW_RESERVE:
 case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE:
 case REVOKE_SPONSORSHIP_MALFORMED:
     void;
 };

func NewRevokeSponsorshipResult

func NewRevokeSponsorshipResult(code RevokeSponsorshipResultCode, value interface{}) (result RevokeSponsorshipResult, err error)

NewRevokeSponsorshipResult creates a new RevokeSponsorshipResult.

func (RevokeSponsorshipResult) ArmForSwitch

func (u RevokeSponsorshipResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of RevokeSponsorshipResult

func (*RevokeSponsorshipResult) DecodeFrom

func (u *RevokeSponsorshipResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (RevokeSponsorshipResult) EncodeTo

func (u RevokeSponsorshipResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (RevokeSponsorshipResult) MarshalBinary

func (s RevokeSponsorshipResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (RevokeSponsorshipResult) SwitchFieldName

func (u RevokeSponsorshipResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*RevokeSponsorshipResult) UnmarshalBinary

func (s *RevokeSponsorshipResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type RevokeSponsorshipResultCode

type RevokeSponsorshipResultCode int32

RevokeSponsorshipResultCode is an XDR Enum defines as:

enum RevokeSponsorshipResultCode
 {
     // codes considered as "success" for the operation
     REVOKE_SPONSORSHIP_SUCCESS = 0,

     // codes considered as "failure" for the operation
     REVOKE_SPONSORSHIP_DOES_NOT_EXIST = -1,
     REVOKE_SPONSORSHIP_NOT_SPONSOR = -2,
     REVOKE_SPONSORSHIP_LOW_RESERVE = -3,
     REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE = -4,
     REVOKE_SPONSORSHIP_MALFORMED = -5
 };
const (
	RevokeSponsorshipResultCodeRevokeSponsorshipSuccess          RevokeSponsorshipResultCode = 0
	RevokeSponsorshipResultCodeRevokeSponsorshipDoesNotExist     RevokeSponsorshipResultCode = -1
	RevokeSponsorshipResultCodeRevokeSponsorshipNotSponsor       RevokeSponsorshipResultCode = -2
	RevokeSponsorshipResultCodeRevokeSponsorshipLowReserve       RevokeSponsorshipResultCode = -3
	RevokeSponsorshipResultCodeRevokeSponsorshipOnlyTransferable RevokeSponsorshipResultCode = -4
	RevokeSponsorshipResultCodeRevokeSponsorshipMalformed        RevokeSponsorshipResultCode = -5
)

func (*RevokeSponsorshipResultCode) DecodeFrom

func (e *RevokeSponsorshipResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (RevokeSponsorshipResultCode) EncodeTo

func (e RevokeSponsorshipResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (RevokeSponsorshipResultCode) MarshalBinary

func (s RevokeSponsorshipResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (RevokeSponsorshipResultCode) String

String returns the name of `e`

func (*RevokeSponsorshipResultCode) UnmarshalBinary

func (s *RevokeSponsorshipResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (RevokeSponsorshipResultCode) ValidEnum

func (e RevokeSponsorshipResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for RevokeSponsorshipResultCode

type RevokeSponsorshipType

type RevokeSponsorshipType int32

RevokeSponsorshipType is an XDR Enum defines as:

enum RevokeSponsorshipType
 {
     REVOKE_SPONSORSHIP_LEDGER_ENTRY = 0,
     REVOKE_SPONSORSHIP_SIGNER = 1
 };
const (
	RevokeSponsorshipTypeRevokeSponsorshipLedgerEntry RevokeSponsorshipType = 0
	RevokeSponsorshipTypeRevokeSponsorshipSigner      RevokeSponsorshipType = 1
)

func (*RevokeSponsorshipType) DecodeFrom

func (e *RevokeSponsorshipType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (RevokeSponsorshipType) EncodeTo

func (e RevokeSponsorshipType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (RevokeSponsorshipType) MarshalBinary

func (s RevokeSponsorshipType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (RevokeSponsorshipType) String

func (e RevokeSponsorshipType) String() string

String returns the name of `e`

func (*RevokeSponsorshipType) UnmarshalBinary

func (s *RevokeSponsorshipType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (RevokeSponsorshipType) ValidEnum

func (e RevokeSponsorshipType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for RevokeSponsorshipType

type ScAddress

type ScAddress struct {
	Type       ScAddressType
	AccountId  *AccountId
	ContractId *Hash
}

ScAddress is an XDR Union defines as:

union SCAddress switch (SCAddressType type)
 {
 case SC_ADDRESS_TYPE_ACCOUNT:
     AccountID accountId;
 case SC_ADDRESS_TYPE_CONTRACT:
     Hash contractId;
 };

func NewScAddress

func NewScAddress(aType ScAddressType, value interface{}) (result ScAddress, err error)

NewScAddress creates a new ScAddress.

func (ScAddress) ArmForSwitch

func (u ScAddress) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ScAddress

func (*ScAddress) DecodeFrom

func (u *ScAddress) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScAddress) EncodeTo

func (u ScAddress) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScAddress) Equals

func (s ScAddress) Equals(o ScAddress) bool

func (ScAddress) GetAccountId

func (u ScAddress) GetAccountId() (result AccountId, ok bool)

GetAccountId retrieves the AccountId value from the union, returning ok if the union's switch indicated the value is valid.

func (ScAddress) GetContractId

func (u ScAddress) GetContractId() (result Hash, ok bool)

GetContractId retrieves the ContractId value from the union, returning ok if the union's switch indicated the value is valid.

func (ScAddress) MarshalBinary

func (s ScAddress) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScAddress) MustAccountId

func (u ScAddress) MustAccountId() AccountId

MustAccountId retrieves the AccountId value from the union, panicing if the value is not set.

func (ScAddress) MustContractId

func (u ScAddress) MustContractId() Hash

MustContractId retrieves the ContractId value from the union, panicing if the value is not set.

func (ScAddress) String

func (address ScAddress) String() (string, error)

func (ScAddress) SwitchFieldName

func (u ScAddress) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ScAddress) UnmarshalBinary

func (s *ScAddress) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScAddressType

type ScAddressType int32

ScAddressType is an XDR Enum defines as:

enum SCAddressType
 {
     SC_ADDRESS_TYPE_ACCOUNT = 0,
     SC_ADDRESS_TYPE_CONTRACT = 1
 };
const (
	ScAddressTypeScAddressTypeAccount  ScAddressType = 0
	ScAddressTypeScAddressTypeContract ScAddressType = 1
)

func (*ScAddressType) DecodeFrom

func (e *ScAddressType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScAddressType) EncodeTo

func (e ScAddressType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScAddressType) MarshalBinary

func (s ScAddressType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScAddressType) String

func (e ScAddressType) String() string

String returns the name of `e`

func (*ScAddressType) UnmarshalBinary

func (s *ScAddressType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ScAddressType) ValidEnum

func (e ScAddressType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ScAddressType

type ScBytes

type ScBytes []byte

ScBytes is an XDR Typedef defines as:

typedef opaque SCBytes<>;

func (*ScBytes) DecodeFrom

func (s *ScBytes) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScBytes) EncodeTo

func (s ScBytes) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScBytes) Equals

func (s ScBytes) Equals(o ScBytes) bool

func (ScBytes) MarshalBinary

func (s ScBytes) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScBytes) UnmarshalBinary

func (s *ScBytes) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScContractInstance

type ScContractInstance struct {
	Executable ContractExecutable
	Storage    *ScMap
}

ScContractInstance is an XDR Struct defines as:

struct SCContractInstance {
     ContractExecutable executable;
     SCMap* storage;
 };

func (*ScContractInstance) DecodeFrom

func (s *ScContractInstance) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScContractInstance) EncodeTo

func (s *ScContractInstance) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScContractInstance) MarshalBinary

func (s ScContractInstance) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScContractInstance) UnmarshalBinary

func (s *ScContractInstance) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScEnvMetaEntry

type ScEnvMetaEntry struct {
	Kind             ScEnvMetaKind
	InterfaceVersion *Uint64
}

ScEnvMetaEntry is an XDR Union defines as:

union SCEnvMetaEntry switch (SCEnvMetaKind kind)
 {
 case SC_ENV_META_KIND_INTERFACE_VERSION:
     uint64 interfaceVersion;
 };

func NewScEnvMetaEntry

func NewScEnvMetaEntry(kind ScEnvMetaKind, value interface{}) (result ScEnvMetaEntry, err error)

NewScEnvMetaEntry creates a new ScEnvMetaEntry.

func (ScEnvMetaEntry) ArmForSwitch

func (u ScEnvMetaEntry) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ScEnvMetaEntry

func (*ScEnvMetaEntry) DecodeFrom

func (u *ScEnvMetaEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScEnvMetaEntry) EncodeTo

func (u ScEnvMetaEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScEnvMetaEntry) GetInterfaceVersion

func (u ScEnvMetaEntry) GetInterfaceVersion() (result Uint64, ok bool)

GetInterfaceVersion retrieves the InterfaceVersion value from the union, returning ok if the union's switch indicated the value is valid.

func (ScEnvMetaEntry) MarshalBinary

func (s ScEnvMetaEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScEnvMetaEntry) MustInterfaceVersion

func (u ScEnvMetaEntry) MustInterfaceVersion() Uint64

MustInterfaceVersion retrieves the InterfaceVersion value from the union, panicing if the value is not set.

func (ScEnvMetaEntry) SwitchFieldName

func (u ScEnvMetaEntry) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ScEnvMetaEntry) UnmarshalBinary

func (s *ScEnvMetaEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScEnvMetaKind

type ScEnvMetaKind int32

ScEnvMetaKind is an XDR Enum defines as:

enum SCEnvMetaKind
 {
     SC_ENV_META_KIND_INTERFACE_VERSION = 0
 };
const (
	ScEnvMetaKindScEnvMetaKindInterfaceVersion ScEnvMetaKind = 0
)

func (*ScEnvMetaKind) DecodeFrom

func (e *ScEnvMetaKind) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScEnvMetaKind) EncodeTo

func (e ScEnvMetaKind) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScEnvMetaKind) MarshalBinary

func (s ScEnvMetaKind) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScEnvMetaKind) String

func (e ScEnvMetaKind) String() string

String returns the name of `e`

func (*ScEnvMetaKind) UnmarshalBinary

func (s *ScEnvMetaKind) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ScEnvMetaKind) ValidEnum

func (e ScEnvMetaKind) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ScEnvMetaKind

type ScError

type ScError struct {
	Type         ScErrorType
	ContractCode *Uint32
	Code         *ScErrorCode
}

ScError is an XDR Union defines as:

union SCError switch (SCErrorType type)
 {
 case SCE_CONTRACT:
     uint32 contractCode;
 case SCE_WASM_VM:
 case SCE_CONTEXT:
 case SCE_STORAGE:
 case SCE_OBJECT:
 case SCE_CRYPTO:
 case SCE_EVENTS:
 case SCE_BUDGET:
 case SCE_VALUE:
 case SCE_AUTH:
     SCErrorCode code;
 };

func NewScError

func NewScError(aType ScErrorType, value interface{}) (result ScError, err error)

NewScError creates a new ScError.

func (ScError) ArmForSwitch

func (u ScError) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ScError

func (*ScError) DecodeFrom

func (u *ScError) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScError) EncodeTo

func (u ScError) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScError) Equals

func (s ScError) Equals(o ScError) bool

func (ScError) GetCode

func (u ScError) GetCode() (result ScErrorCode, ok bool)

GetCode retrieves the Code value from the union, returning ok if the union's switch indicated the value is valid.

func (ScError) GetContractCode

func (u ScError) GetContractCode() (result Uint32, ok bool)

GetContractCode retrieves the ContractCode value from the union, returning ok if the union's switch indicated the value is valid.

func (ScError) MarshalBinary

func (s ScError) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScError) MustCode

func (u ScError) MustCode() ScErrorCode

MustCode retrieves the Code value from the union, panicing if the value is not set.

func (ScError) MustContractCode

func (u ScError) MustContractCode() Uint32

MustContractCode retrieves the ContractCode value from the union, panicing if the value is not set.

func (ScError) SwitchFieldName

func (u ScError) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ScError) UnmarshalBinary

func (s *ScError) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScErrorCode

type ScErrorCode int32

ScErrorCode is an XDR Enum defines as:

enum SCErrorCode
 {
     SCEC_ARITH_DOMAIN = 0,      // Some arithmetic was undefined (overflow, divide-by-zero).
     SCEC_INDEX_BOUNDS = 1,      // Something was indexed beyond its bounds.
     SCEC_INVALID_INPUT = 2,     // User provided some otherwise-bad data.
     SCEC_MISSING_VALUE = 3,     // Some value was required but not provided.
     SCEC_EXISTING_VALUE = 4,    // Some value was provided where not allowed.
     SCEC_EXCEEDED_LIMIT = 5,    // Some arbitrary limit -- gas or otherwise -- was hit.
     SCEC_INVALID_ACTION = 6,    // Data was valid but action requested was not.
     SCEC_INTERNAL_ERROR = 7,    // The host detected an error in its own logic.
     SCEC_UNEXPECTED_TYPE = 8,   // Some type wasn't as expected.
     SCEC_UNEXPECTED_SIZE = 9    // Something's size wasn't as expected.
 };
const (
	ScErrorCodeScecArithDomain    ScErrorCode = 0
	ScErrorCodeScecIndexBounds    ScErrorCode = 1
	ScErrorCodeScecInvalidInput   ScErrorCode = 2
	ScErrorCodeScecMissingValue   ScErrorCode = 3
	ScErrorCodeScecExistingValue  ScErrorCode = 4
	ScErrorCodeScecExceededLimit  ScErrorCode = 5
	ScErrorCodeScecInvalidAction  ScErrorCode = 6
	ScErrorCodeScecInternalError  ScErrorCode = 7
	ScErrorCodeScecUnexpectedType ScErrorCode = 8
	ScErrorCodeScecUnexpectedSize ScErrorCode = 9
)

func (*ScErrorCode) DecodeFrom

func (e *ScErrorCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScErrorCode) EncodeTo

func (e ScErrorCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScErrorCode) MarshalBinary

func (s ScErrorCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScErrorCode) String

func (e ScErrorCode) String() string

String returns the name of `e`

func (*ScErrorCode) UnmarshalBinary

func (s *ScErrorCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ScErrorCode) ValidEnum

func (e ScErrorCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ScErrorCode

type ScErrorType

type ScErrorType int32

ScErrorType is an XDR Enum defines as:

enum SCErrorType
 {
     SCE_CONTRACT = 0,          // Contract-specific, user-defined codes.
     SCE_WASM_VM = 1,           // Errors while interpreting WASM bytecode.
     SCE_CONTEXT = 2,           // Errors in the contract's host context.
     SCE_STORAGE = 3,           // Errors accessing host storage.
     SCE_OBJECT = 4,            // Errors working with host objects.
     SCE_CRYPTO = 5,            // Errors in cryptographic operations.
     SCE_EVENTS = 6,            // Errors while emitting events.
     SCE_BUDGET = 7,            // Errors relating to budget limits.
     SCE_VALUE = 8,             // Errors working with host values or SCVals.
     SCE_AUTH = 9               // Errors from the authentication subsystem.
 };
const (
	ScErrorTypeSceContract ScErrorType = 0
	ScErrorTypeSceWasmVm   ScErrorType = 1
	ScErrorTypeSceContext  ScErrorType = 2
	ScErrorTypeSceStorage  ScErrorType = 3
	ScErrorTypeSceObject   ScErrorType = 4
	ScErrorTypeSceCrypto   ScErrorType = 5
	ScErrorTypeSceEvents   ScErrorType = 6
	ScErrorTypeSceBudget   ScErrorType = 7
	ScErrorTypeSceValue    ScErrorType = 8
	ScErrorTypeSceAuth     ScErrorType = 9
)

func (*ScErrorType) DecodeFrom

func (e *ScErrorType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScErrorType) EncodeTo

func (e ScErrorType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScErrorType) MarshalBinary

func (s ScErrorType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScErrorType) String

func (e ScErrorType) String() string

String returns the name of `e`

func (*ScErrorType) UnmarshalBinary

func (s *ScErrorType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ScErrorType) ValidEnum

func (e ScErrorType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ScErrorType

type ScMap

type ScMap []ScMapEntry

ScMap is an XDR Typedef defines as:

typedef SCMapEntry SCMap<>;

func (*ScMap) DecodeFrom

func (s *ScMap) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScMap) EncodeTo

func (s ScMap) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*ScMap) Equals

func (s *ScMap) Equals(o *ScMap) bool

func (ScMap) MarshalBinary

func (s ScMap) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScMap) UnmarshalBinary

func (s *ScMap) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScMapEntry

type ScMapEntry struct {
	Key ScVal
	Val ScVal
}

ScMapEntry is an XDR Struct defines as:

struct SCMapEntry
 {
     SCVal key;
     SCVal val;
 };

func (*ScMapEntry) DecodeFrom

func (s *ScMapEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScMapEntry) EncodeTo

func (s *ScMapEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScMapEntry) Equals

func (s ScMapEntry) Equals(o ScMapEntry) bool

func (ScMapEntry) MarshalBinary

func (s ScMapEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScMapEntry) UnmarshalBinary

func (s *ScMapEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScMetaEntry

type ScMetaEntry struct {
	Kind ScMetaKind
	V0   *ScMetaV0
}

ScMetaEntry is an XDR Union defines as:

union SCMetaEntry switch (SCMetaKind kind)
 {
 case SC_META_V0:
     SCMetaV0 v0;
 };

func NewScMetaEntry

func NewScMetaEntry(kind ScMetaKind, value interface{}) (result ScMetaEntry, err error)

NewScMetaEntry creates a new ScMetaEntry.

func (ScMetaEntry) ArmForSwitch

func (u ScMetaEntry) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ScMetaEntry

func (*ScMetaEntry) DecodeFrom

func (u *ScMetaEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScMetaEntry) EncodeTo

func (u ScMetaEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScMetaEntry) GetV0

func (u ScMetaEntry) GetV0() (result ScMetaV0, ok bool)

GetV0 retrieves the V0 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScMetaEntry) MarshalBinary

func (s ScMetaEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScMetaEntry) MustV0

func (u ScMetaEntry) MustV0() ScMetaV0

MustV0 retrieves the V0 value from the union, panicing if the value is not set.

func (ScMetaEntry) SwitchFieldName

func (u ScMetaEntry) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ScMetaEntry) UnmarshalBinary

func (s *ScMetaEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScMetaKind

type ScMetaKind int32

ScMetaKind is an XDR Enum defines as:

enum SCMetaKind
 {
     SC_META_V0 = 0
 };
const (
	ScMetaKindScMetaV0 ScMetaKind = 0
)

func (*ScMetaKind) DecodeFrom

func (e *ScMetaKind) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScMetaKind) EncodeTo

func (e ScMetaKind) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScMetaKind) MarshalBinary

func (s ScMetaKind) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScMetaKind) String

func (e ScMetaKind) String() string

String returns the name of `e`

func (*ScMetaKind) UnmarshalBinary

func (s *ScMetaKind) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ScMetaKind) ValidEnum

func (e ScMetaKind) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ScMetaKind

type ScMetaV0

type ScMetaV0 struct {
	Key string
	Val string
}

ScMetaV0 is an XDR Struct defines as:

struct SCMetaV0
 {
     string key<>;
     string val<>;
 };

func (*ScMetaV0) DecodeFrom

func (s *ScMetaV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScMetaV0) EncodeTo

func (s *ScMetaV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScMetaV0) MarshalBinary

func (s ScMetaV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScMetaV0) UnmarshalBinary

func (s *ScMetaV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScNonceKey

type ScNonceKey struct {
	Nonce Int64
}

ScNonceKey is an XDR Struct defines as:

struct SCNonceKey {
     int64 nonce;
 };

func (*ScNonceKey) DecodeFrom

func (s *ScNonceKey) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScNonceKey) EncodeTo

func (s *ScNonceKey) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScNonceKey) Equals

func (s ScNonceKey) Equals(o ScNonceKey) bool

func (ScNonceKey) MarshalBinary

func (s ScNonceKey) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScNonceKey) UnmarshalBinary

func (s *ScNonceKey) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecEntry

type ScSpecEntry struct {
	Kind           ScSpecEntryKind
	FunctionV0     *ScSpecFunctionV0
	UdtStructV0    *ScSpecUdtStructV0
	UdtUnionV0     *ScSpecUdtUnionV0
	UdtEnumV0      *ScSpecUdtEnumV0
	UdtErrorEnumV0 *ScSpecUdtErrorEnumV0
}

ScSpecEntry is an XDR Union defines as:

union SCSpecEntry switch (SCSpecEntryKind kind)
 {
 case SC_SPEC_ENTRY_FUNCTION_V0:
     SCSpecFunctionV0 functionV0;
 case SC_SPEC_ENTRY_UDT_STRUCT_V0:
     SCSpecUDTStructV0 udtStructV0;
 case SC_SPEC_ENTRY_UDT_UNION_V0:
     SCSpecUDTUnionV0 udtUnionV0;
 case SC_SPEC_ENTRY_UDT_ENUM_V0:
     SCSpecUDTEnumV0 udtEnumV0;
 case SC_SPEC_ENTRY_UDT_ERROR_ENUM_V0:
     SCSpecUDTErrorEnumV0 udtErrorEnumV0;
 };

func NewScSpecEntry

func NewScSpecEntry(kind ScSpecEntryKind, value interface{}) (result ScSpecEntry, err error)

NewScSpecEntry creates a new ScSpecEntry.

func (ScSpecEntry) ArmForSwitch

func (u ScSpecEntry) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ScSpecEntry

func (*ScSpecEntry) DecodeFrom

func (u *ScSpecEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScSpecEntry) EncodeTo

func (u ScSpecEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecEntry) GetFunctionV0

func (u ScSpecEntry) GetFunctionV0() (result ScSpecFunctionV0, ok bool)

GetFunctionV0 retrieves the FunctionV0 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScSpecEntry) GetUdtEnumV0

func (u ScSpecEntry) GetUdtEnumV0() (result ScSpecUdtEnumV0, ok bool)

GetUdtEnumV0 retrieves the UdtEnumV0 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScSpecEntry) GetUdtErrorEnumV0

func (u ScSpecEntry) GetUdtErrorEnumV0() (result ScSpecUdtErrorEnumV0, ok bool)

GetUdtErrorEnumV0 retrieves the UdtErrorEnumV0 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScSpecEntry) GetUdtStructV0

func (u ScSpecEntry) GetUdtStructV0() (result ScSpecUdtStructV0, ok bool)

GetUdtStructV0 retrieves the UdtStructV0 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScSpecEntry) GetUdtUnionV0

func (u ScSpecEntry) GetUdtUnionV0() (result ScSpecUdtUnionV0, ok bool)

GetUdtUnionV0 retrieves the UdtUnionV0 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScSpecEntry) MarshalBinary

func (s ScSpecEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScSpecEntry) MustFunctionV0

func (u ScSpecEntry) MustFunctionV0() ScSpecFunctionV0

MustFunctionV0 retrieves the FunctionV0 value from the union, panicing if the value is not set.

func (ScSpecEntry) MustUdtEnumV0

func (u ScSpecEntry) MustUdtEnumV0() ScSpecUdtEnumV0

MustUdtEnumV0 retrieves the UdtEnumV0 value from the union, panicing if the value is not set.

func (ScSpecEntry) MustUdtErrorEnumV0

func (u ScSpecEntry) MustUdtErrorEnumV0() ScSpecUdtErrorEnumV0

MustUdtErrorEnumV0 retrieves the UdtErrorEnumV0 value from the union, panicing if the value is not set.

func (ScSpecEntry) MustUdtStructV0

func (u ScSpecEntry) MustUdtStructV0() ScSpecUdtStructV0

MustUdtStructV0 retrieves the UdtStructV0 value from the union, panicing if the value is not set.

func (ScSpecEntry) MustUdtUnionV0

func (u ScSpecEntry) MustUdtUnionV0() ScSpecUdtUnionV0

MustUdtUnionV0 retrieves the UdtUnionV0 value from the union, panicing if the value is not set.

func (ScSpecEntry) SwitchFieldName

func (u ScSpecEntry) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ScSpecEntry) UnmarshalBinary

func (s *ScSpecEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecEntryKind

type ScSpecEntryKind int32

ScSpecEntryKind is an XDR Enum defines as:

enum SCSpecEntryKind
 {
     SC_SPEC_ENTRY_FUNCTION_V0 = 0,
     SC_SPEC_ENTRY_UDT_STRUCT_V0 = 1,
     SC_SPEC_ENTRY_UDT_UNION_V0 = 2,
     SC_SPEC_ENTRY_UDT_ENUM_V0 = 3,
     SC_SPEC_ENTRY_UDT_ERROR_ENUM_V0 = 4
 };
const (
	ScSpecEntryKindScSpecEntryFunctionV0     ScSpecEntryKind = 0
	ScSpecEntryKindScSpecEntryUdtStructV0    ScSpecEntryKind = 1
	ScSpecEntryKindScSpecEntryUdtUnionV0     ScSpecEntryKind = 2
	ScSpecEntryKindScSpecEntryUdtEnumV0      ScSpecEntryKind = 3
	ScSpecEntryKindScSpecEntryUdtErrorEnumV0 ScSpecEntryKind = 4
)

func (*ScSpecEntryKind) DecodeFrom

func (e *ScSpecEntryKind) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScSpecEntryKind) EncodeTo

func (e ScSpecEntryKind) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecEntryKind) MarshalBinary

func (s ScSpecEntryKind) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScSpecEntryKind) String

func (e ScSpecEntryKind) String() string

String returns the name of `e`

func (*ScSpecEntryKind) UnmarshalBinary

func (s *ScSpecEntryKind) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ScSpecEntryKind) ValidEnum

func (e ScSpecEntryKind) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ScSpecEntryKind

type ScSpecFunctionInputV0

type ScSpecFunctionInputV0 struct {
	Doc  string `xdrmaxsize:"1024"`
	Name string `xdrmaxsize:"30"`
	Type ScSpecTypeDef
}

ScSpecFunctionInputV0 is an XDR Struct defines as:

struct SCSpecFunctionInputV0
 {
     string doc<SC_SPEC_DOC_LIMIT>;
     string name<30>;
     SCSpecTypeDef type;
 };

func (*ScSpecFunctionInputV0) DecodeFrom

func (s *ScSpecFunctionInputV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecFunctionInputV0) EncodeTo

func (s *ScSpecFunctionInputV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecFunctionInputV0) MarshalBinary

func (s ScSpecFunctionInputV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecFunctionInputV0) UnmarshalBinary

func (s *ScSpecFunctionInputV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecFunctionV0

type ScSpecFunctionV0 struct {
	Doc     string `xdrmaxsize:"1024"`
	Name    ScSymbol
	Inputs  []ScSpecFunctionInputV0 `xdrmaxsize:"10"`
	Outputs []ScSpecTypeDef         `xdrmaxsize:"1"`
}

ScSpecFunctionV0 is an XDR Struct defines as:

struct SCSpecFunctionV0
 {
     string doc<SC_SPEC_DOC_LIMIT>;
     SCSymbol name;
     SCSpecFunctionInputV0 inputs<10>;
     SCSpecTypeDef outputs<1>;
 };

func (*ScSpecFunctionV0) DecodeFrom

func (s *ScSpecFunctionV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecFunctionV0) EncodeTo

func (s *ScSpecFunctionV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecFunctionV0) MarshalBinary

func (s ScSpecFunctionV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecFunctionV0) UnmarshalBinary

func (s *ScSpecFunctionV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecType

type ScSpecType int32

ScSpecType is an XDR Enum defines as:

enum SCSpecType
 {
     SC_SPEC_TYPE_VAL = 0,

     // Types with no parameters.
     SC_SPEC_TYPE_BOOL = 1,
     SC_SPEC_TYPE_VOID = 2,
     SC_SPEC_TYPE_ERROR = 3,
     SC_SPEC_TYPE_U32 = 4,
     SC_SPEC_TYPE_I32 = 5,
     SC_SPEC_TYPE_U64 = 6,
     SC_SPEC_TYPE_I64 = 7,
     SC_SPEC_TYPE_TIMEPOINT = 8,
     SC_SPEC_TYPE_DURATION = 9,
     SC_SPEC_TYPE_U128 = 10,
     SC_SPEC_TYPE_I128 = 11,
     SC_SPEC_TYPE_U256 = 12,
     SC_SPEC_TYPE_I256 = 13,
     SC_SPEC_TYPE_BYTES = 14,
     SC_SPEC_TYPE_STRING = 16,
     SC_SPEC_TYPE_SYMBOL = 17,
     SC_SPEC_TYPE_ADDRESS = 19,

     // Types with parameters.
     SC_SPEC_TYPE_OPTION = 1000,
     SC_SPEC_TYPE_RESULT = 1001,
     SC_SPEC_TYPE_VEC = 1002,
     SC_SPEC_TYPE_MAP = 1004,
     SC_SPEC_TYPE_TUPLE = 1005,
     SC_SPEC_TYPE_BYTES_N = 1006,
     SC_SPEC_TYPE_HASH = 1007,

     // User defined types.
     SC_SPEC_TYPE_UDT = 2000
 };
const (
	ScSpecTypeScSpecTypeVal       ScSpecType = 0
	ScSpecTypeScSpecTypeBool      ScSpecType = 1
	ScSpecTypeScSpecTypeVoid      ScSpecType = 2
	ScSpecTypeScSpecTypeError     ScSpecType = 3
	ScSpecTypeScSpecTypeU32       ScSpecType = 4
	ScSpecTypeScSpecTypeI32       ScSpecType = 5
	ScSpecTypeScSpecTypeU64       ScSpecType = 6
	ScSpecTypeScSpecTypeI64       ScSpecType = 7
	ScSpecTypeScSpecTypeTimepoint ScSpecType = 8
	ScSpecTypeScSpecTypeDuration  ScSpecType = 9
	ScSpecTypeScSpecTypeU128      ScSpecType = 10
	ScSpecTypeScSpecTypeI128      ScSpecType = 11
	ScSpecTypeScSpecTypeU256      ScSpecType = 12
	ScSpecTypeScSpecTypeI256      ScSpecType = 13
	ScSpecTypeScSpecTypeBytes     ScSpecType = 14
	ScSpecTypeScSpecTypeString    ScSpecType = 16
	ScSpecTypeScSpecTypeSymbol    ScSpecType = 17
	ScSpecTypeScSpecTypeAddress   ScSpecType = 19
	ScSpecTypeScSpecTypeOption    ScSpecType = 1000
	ScSpecTypeScSpecTypeResult    ScSpecType = 1001
	ScSpecTypeScSpecTypeVec       ScSpecType = 1002
	ScSpecTypeScSpecTypeMap       ScSpecType = 1004
	ScSpecTypeScSpecTypeTuple     ScSpecType = 1005
	ScSpecTypeScSpecTypeBytesN    ScSpecType = 1006
	ScSpecTypeScSpecTypeHash      ScSpecType = 1007
	ScSpecTypeScSpecTypeUdt       ScSpecType = 2000
)

func (*ScSpecType) DecodeFrom

func (e *ScSpecType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScSpecType) EncodeTo

func (e ScSpecType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecType) MarshalBinary

func (s ScSpecType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScSpecType) String

func (e ScSpecType) String() string

String returns the name of `e`

func (*ScSpecType) UnmarshalBinary

func (s *ScSpecType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ScSpecType) ValidEnum

func (e ScSpecType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ScSpecType

type ScSpecTypeBytesN

type ScSpecTypeBytesN struct {
	N Uint32
}

ScSpecTypeBytesN is an XDR Struct defines as:

struct SCSpecTypeBytesN
 {
     uint32 n;
 };

func (*ScSpecTypeBytesN) DecodeFrom

func (s *ScSpecTypeBytesN) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecTypeBytesN) EncodeTo

func (s *ScSpecTypeBytesN) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecTypeBytesN) MarshalBinary

func (s ScSpecTypeBytesN) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecTypeBytesN) UnmarshalBinary

func (s *ScSpecTypeBytesN) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecTypeDef

type ScSpecTypeDef struct {
	Type   ScSpecType
	Option *ScSpecTypeOption
	Result *ScSpecTypeResult
	Vec    *ScSpecTypeVec
	Map    *ScSpecTypeMap
	Tuple  *ScSpecTypeTuple
	BytesN *ScSpecTypeBytesN
	Hash   *ScSpectTypeHash
	Udt    *ScSpecTypeUdt
}

ScSpecTypeDef is an XDR Union defines as:

union SCSpecTypeDef switch (SCSpecType type)
 {
 case SC_SPEC_TYPE_VAL:
 case SC_SPEC_TYPE_BOOL:
 case SC_SPEC_TYPE_VOID:
 case SC_SPEC_TYPE_ERROR:
 case SC_SPEC_TYPE_U32:
 case SC_SPEC_TYPE_I32:
 case SC_SPEC_TYPE_U64:
 case SC_SPEC_TYPE_I64:
 case SC_SPEC_TYPE_TIMEPOINT:
 case SC_SPEC_TYPE_DURATION:
 case SC_SPEC_TYPE_U128:
 case SC_SPEC_TYPE_I128:
 case SC_SPEC_TYPE_U256:
 case SC_SPEC_TYPE_I256:
 case SC_SPEC_TYPE_BYTES:
 case SC_SPEC_TYPE_STRING:
 case SC_SPEC_TYPE_SYMBOL:
 case SC_SPEC_TYPE_ADDRESS:
     void;
 case SC_SPEC_TYPE_OPTION:
     SCSpecTypeOption option;
 case SC_SPEC_TYPE_RESULT:
     SCSpecTypeResult result;
 case SC_SPEC_TYPE_VEC:
     SCSpecTypeVec vec;
 case SC_SPEC_TYPE_MAP:
     SCSpecTypeMap map;
 case SC_SPEC_TYPE_TUPLE:
     SCSpecTypeTuple tuple;
 case SC_SPEC_TYPE_BYTES_N:
     SCSpecTypeBytesN bytesN;
 case SC_SPEC_TYPE_HASH:
     SCSpectTypeHash hash;
 case SC_SPEC_TYPE_UDT:
     SCSpecTypeUDT udt;
 };

func NewScSpecTypeDef

func NewScSpecTypeDef(aType ScSpecType, value interface{}) (result ScSpecTypeDef, err error)

NewScSpecTypeDef creates a new ScSpecTypeDef.

func (ScSpecTypeDef) ArmForSwitch

func (u ScSpecTypeDef) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ScSpecTypeDef

func (*ScSpecTypeDef) DecodeFrom

func (u *ScSpecTypeDef) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScSpecTypeDef) EncodeTo

func (u ScSpecTypeDef) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecTypeDef) GetBytesN

func (u ScSpecTypeDef) GetBytesN() (result ScSpecTypeBytesN, ok bool)

GetBytesN retrieves the BytesN value from the union, returning ok if the union's switch indicated the value is valid.

func (ScSpecTypeDef) GetHash

func (u ScSpecTypeDef) GetHash() (result ScSpectTypeHash, ok bool)

GetHash retrieves the Hash value from the union, returning ok if the union's switch indicated the value is valid.

func (ScSpecTypeDef) GetMap

func (u ScSpecTypeDef) GetMap() (result ScSpecTypeMap, ok bool)

GetMap retrieves the Map value from the union, returning ok if the union's switch indicated the value is valid.

func (ScSpecTypeDef) GetOption

func (u ScSpecTypeDef) GetOption() (result ScSpecTypeOption, ok bool)

GetOption retrieves the Option value from the union, returning ok if the union's switch indicated the value is valid.

func (ScSpecTypeDef) GetResult

func (u ScSpecTypeDef) GetResult() (result ScSpecTypeResult, ok bool)

GetResult retrieves the Result value from the union, returning ok if the union's switch indicated the value is valid.

func (ScSpecTypeDef) GetTuple

func (u ScSpecTypeDef) GetTuple() (result ScSpecTypeTuple, ok bool)

GetTuple retrieves the Tuple value from the union, returning ok if the union's switch indicated the value is valid.

func (ScSpecTypeDef) GetUdt

func (u ScSpecTypeDef) GetUdt() (result ScSpecTypeUdt, ok bool)

GetUdt retrieves the Udt value from the union, returning ok if the union's switch indicated the value is valid.

func (ScSpecTypeDef) GetVec

func (u ScSpecTypeDef) GetVec() (result ScSpecTypeVec, ok bool)

GetVec retrieves the Vec value from the union, returning ok if the union's switch indicated the value is valid.

func (ScSpecTypeDef) MarshalBinary

func (s ScSpecTypeDef) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScSpecTypeDef) MustBytesN

func (u ScSpecTypeDef) MustBytesN() ScSpecTypeBytesN

MustBytesN retrieves the BytesN value from the union, panicing if the value is not set.

func (ScSpecTypeDef) MustHash

func (u ScSpecTypeDef) MustHash() ScSpectTypeHash

MustHash retrieves the Hash value from the union, panicing if the value is not set.

func (ScSpecTypeDef) MustMap

func (u ScSpecTypeDef) MustMap() ScSpecTypeMap

MustMap retrieves the Map value from the union, panicing if the value is not set.

func (ScSpecTypeDef) MustOption

func (u ScSpecTypeDef) MustOption() ScSpecTypeOption

MustOption retrieves the Option value from the union, panicing if the value is not set.

func (ScSpecTypeDef) MustResult

func (u ScSpecTypeDef) MustResult() ScSpecTypeResult

MustResult retrieves the Result value from the union, panicing if the value is not set.

func (ScSpecTypeDef) MustTuple

func (u ScSpecTypeDef) MustTuple() ScSpecTypeTuple

MustTuple retrieves the Tuple value from the union, panicing if the value is not set.

func (ScSpecTypeDef) MustUdt

func (u ScSpecTypeDef) MustUdt() ScSpecTypeUdt

MustUdt retrieves the Udt value from the union, panicing if the value is not set.

func (ScSpecTypeDef) MustVec

func (u ScSpecTypeDef) MustVec() ScSpecTypeVec

MustVec retrieves the Vec value from the union, panicing if the value is not set.

func (ScSpecTypeDef) SwitchFieldName

func (u ScSpecTypeDef) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ScSpecTypeDef) UnmarshalBinary

func (s *ScSpecTypeDef) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecTypeMap

type ScSpecTypeMap struct {
	KeyType   ScSpecTypeDef
	ValueType ScSpecTypeDef
}

ScSpecTypeMap is an XDR Struct defines as:

struct SCSpecTypeMap
 {
     SCSpecTypeDef keyType;
     SCSpecTypeDef valueType;
 };

func (*ScSpecTypeMap) DecodeFrom

func (s *ScSpecTypeMap) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecTypeMap) EncodeTo

func (s *ScSpecTypeMap) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecTypeMap) MarshalBinary

func (s ScSpecTypeMap) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecTypeMap) UnmarshalBinary

func (s *ScSpecTypeMap) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecTypeOption

type ScSpecTypeOption struct {
	ValueType ScSpecTypeDef
}

ScSpecTypeOption is an XDR Struct defines as:

struct SCSpecTypeOption
 {
     SCSpecTypeDef valueType;
 };

func (*ScSpecTypeOption) DecodeFrom

func (s *ScSpecTypeOption) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecTypeOption) EncodeTo

func (s *ScSpecTypeOption) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecTypeOption) MarshalBinary

func (s ScSpecTypeOption) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecTypeOption) UnmarshalBinary

func (s *ScSpecTypeOption) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecTypeResult

type ScSpecTypeResult struct {
	OkType    ScSpecTypeDef
	ErrorType ScSpecTypeDef
}

ScSpecTypeResult is an XDR Struct defines as:

struct SCSpecTypeResult
 {
     SCSpecTypeDef okType;
     SCSpecTypeDef errorType;
 };

func (*ScSpecTypeResult) DecodeFrom

func (s *ScSpecTypeResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecTypeResult) EncodeTo

func (s *ScSpecTypeResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecTypeResult) MarshalBinary

func (s ScSpecTypeResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecTypeResult) UnmarshalBinary

func (s *ScSpecTypeResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecTypeTuple

type ScSpecTypeTuple struct {
	ValueTypes []ScSpecTypeDef `xdrmaxsize:"12"`
}

ScSpecTypeTuple is an XDR Struct defines as:

struct SCSpecTypeTuple
 {
     SCSpecTypeDef valueTypes<12>;
 };

func (*ScSpecTypeTuple) DecodeFrom

func (s *ScSpecTypeTuple) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecTypeTuple) EncodeTo

func (s *ScSpecTypeTuple) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecTypeTuple) MarshalBinary

func (s ScSpecTypeTuple) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecTypeTuple) UnmarshalBinary

func (s *ScSpecTypeTuple) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecTypeUdt

type ScSpecTypeUdt struct {
	Name string `xdrmaxsize:"60"`
}

ScSpecTypeUdt is an XDR Struct defines as:

struct SCSpecTypeUDT
 {
     string name<60>;
 };

func (*ScSpecTypeUdt) DecodeFrom

func (s *ScSpecTypeUdt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecTypeUdt) EncodeTo

func (s *ScSpecTypeUdt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecTypeUdt) MarshalBinary

func (s ScSpecTypeUdt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecTypeUdt) UnmarshalBinary

func (s *ScSpecTypeUdt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecTypeVec

type ScSpecTypeVec struct {
	ElementType ScSpecTypeDef
}

ScSpecTypeVec is an XDR Struct defines as:

struct SCSpecTypeVec
 {
     SCSpecTypeDef elementType;
 };

func (*ScSpecTypeVec) DecodeFrom

func (s *ScSpecTypeVec) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecTypeVec) EncodeTo

func (s *ScSpecTypeVec) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecTypeVec) MarshalBinary

func (s ScSpecTypeVec) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecTypeVec) UnmarshalBinary

func (s *ScSpecTypeVec) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecUdtEnumCaseV0

type ScSpecUdtEnumCaseV0 struct {
	Doc   string `xdrmaxsize:"1024"`
	Name  string `xdrmaxsize:"60"`
	Value Uint32
}

ScSpecUdtEnumCaseV0 is an XDR Struct defines as:

struct SCSpecUDTEnumCaseV0
 {
     string doc<SC_SPEC_DOC_LIMIT>;
     string name<60>;
     uint32 value;
 };

func (*ScSpecUdtEnumCaseV0) DecodeFrom

func (s *ScSpecUdtEnumCaseV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecUdtEnumCaseV0) EncodeTo

func (s *ScSpecUdtEnumCaseV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecUdtEnumCaseV0) MarshalBinary

func (s ScSpecUdtEnumCaseV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecUdtEnumCaseV0) UnmarshalBinary

func (s *ScSpecUdtEnumCaseV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecUdtEnumV0

type ScSpecUdtEnumV0 struct {
	Doc   string                `xdrmaxsize:"1024"`
	Lib   string                `xdrmaxsize:"80"`
	Name  string                `xdrmaxsize:"60"`
	Cases []ScSpecUdtEnumCaseV0 `xdrmaxsize:"50"`
}

ScSpecUdtEnumV0 is an XDR Struct defines as:

struct SCSpecUDTEnumV0
 {
     string doc<SC_SPEC_DOC_LIMIT>;
     string lib<80>;
     string name<60>;
     SCSpecUDTEnumCaseV0 cases<50>;
 };

func (*ScSpecUdtEnumV0) DecodeFrom

func (s *ScSpecUdtEnumV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecUdtEnumV0) EncodeTo

func (s *ScSpecUdtEnumV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecUdtEnumV0) MarshalBinary

func (s ScSpecUdtEnumV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecUdtEnumV0) UnmarshalBinary

func (s *ScSpecUdtEnumV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecUdtErrorEnumCaseV0

type ScSpecUdtErrorEnumCaseV0 struct {
	Doc   string `xdrmaxsize:"1024"`
	Name  string `xdrmaxsize:"60"`
	Value Uint32
}

ScSpecUdtErrorEnumCaseV0 is an XDR Struct defines as:

struct SCSpecUDTErrorEnumCaseV0
 {
     string doc<SC_SPEC_DOC_LIMIT>;
     string name<60>;
     uint32 value;
 };

func (*ScSpecUdtErrorEnumCaseV0) DecodeFrom

func (s *ScSpecUdtErrorEnumCaseV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecUdtErrorEnumCaseV0) EncodeTo

func (s *ScSpecUdtErrorEnumCaseV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecUdtErrorEnumCaseV0) MarshalBinary

func (s ScSpecUdtErrorEnumCaseV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecUdtErrorEnumCaseV0) UnmarshalBinary

func (s *ScSpecUdtErrorEnumCaseV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecUdtErrorEnumV0

type ScSpecUdtErrorEnumV0 struct {
	Doc   string                     `xdrmaxsize:"1024"`
	Lib   string                     `xdrmaxsize:"80"`
	Name  string                     `xdrmaxsize:"60"`
	Cases []ScSpecUdtErrorEnumCaseV0 `xdrmaxsize:"50"`
}

ScSpecUdtErrorEnumV0 is an XDR Struct defines as:

struct SCSpecUDTErrorEnumV0
 {
     string doc<SC_SPEC_DOC_LIMIT>;
     string lib<80>;
     string name<60>;
     SCSpecUDTErrorEnumCaseV0 cases<50>;
 };

func (*ScSpecUdtErrorEnumV0) DecodeFrom

func (s *ScSpecUdtErrorEnumV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecUdtErrorEnumV0) EncodeTo

func (s *ScSpecUdtErrorEnumV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecUdtErrorEnumV0) MarshalBinary

func (s ScSpecUdtErrorEnumV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecUdtErrorEnumV0) UnmarshalBinary

func (s *ScSpecUdtErrorEnumV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecUdtStructFieldV0

type ScSpecUdtStructFieldV0 struct {
	Doc  string `xdrmaxsize:"1024"`
	Name string `xdrmaxsize:"30"`
	Type ScSpecTypeDef
}

ScSpecUdtStructFieldV0 is an XDR Struct defines as:

struct SCSpecUDTStructFieldV0
 {
     string doc<SC_SPEC_DOC_LIMIT>;
     string name<30>;
     SCSpecTypeDef type;
 };

func (*ScSpecUdtStructFieldV0) DecodeFrom

func (s *ScSpecUdtStructFieldV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecUdtStructFieldV0) EncodeTo

func (s *ScSpecUdtStructFieldV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecUdtStructFieldV0) MarshalBinary

func (s ScSpecUdtStructFieldV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecUdtStructFieldV0) UnmarshalBinary

func (s *ScSpecUdtStructFieldV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecUdtStructV0

type ScSpecUdtStructV0 struct {
	Doc    string                   `xdrmaxsize:"1024"`
	Lib    string                   `xdrmaxsize:"80"`
	Name   string                   `xdrmaxsize:"60"`
	Fields []ScSpecUdtStructFieldV0 `xdrmaxsize:"40"`
}

ScSpecUdtStructV0 is an XDR Struct defines as:

struct SCSpecUDTStructV0
 {
     string doc<SC_SPEC_DOC_LIMIT>;
     string lib<80>;
     string name<60>;
     SCSpecUDTStructFieldV0 fields<40>;
 };

func (*ScSpecUdtStructV0) DecodeFrom

func (s *ScSpecUdtStructV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecUdtStructV0) EncodeTo

func (s *ScSpecUdtStructV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecUdtStructV0) MarshalBinary

func (s ScSpecUdtStructV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecUdtStructV0) UnmarshalBinary

func (s *ScSpecUdtStructV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecUdtUnionCaseTupleV0

type ScSpecUdtUnionCaseTupleV0 struct {
	Doc  string          `xdrmaxsize:"1024"`
	Name string          `xdrmaxsize:"60"`
	Type []ScSpecTypeDef `xdrmaxsize:"12"`
}

ScSpecUdtUnionCaseTupleV0 is an XDR Struct defines as:

struct SCSpecUDTUnionCaseTupleV0
 {
     string doc<SC_SPEC_DOC_LIMIT>;
     string name<60>;
     SCSpecTypeDef type<12>;
 };

func (*ScSpecUdtUnionCaseTupleV0) DecodeFrom

func (s *ScSpecUdtUnionCaseTupleV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecUdtUnionCaseTupleV0) EncodeTo

func (s *ScSpecUdtUnionCaseTupleV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecUdtUnionCaseTupleV0) MarshalBinary

func (s ScSpecUdtUnionCaseTupleV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecUdtUnionCaseTupleV0) UnmarshalBinary

func (s *ScSpecUdtUnionCaseTupleV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecUdtUnionCaseV0

type ScSpecUdtUnionCaseV0 struct {
	Kind      ScSpecUdtUnionCaseV0Kind
	VoidCase  *ScSpecUdtUnionCaseVoidV0
	TupleCase *ScSpecUdtUnionCaseTupleV0
}

ScSpecUdtUnionCaseV0 is an XDR Union defines as:

union SCSpecUDTUnionCaseV0 switch (SCSpecUDTUnionCaseV0Kind kind)
 {
 case SC_SPEC_UDT_UNION_CASE_VOID_V0:
     SCSpecUDTUnionCaseVoidV0 voidCase;
 case SC_SPEC_UDT_UNION_CASE_TUPLE_V0:
     SCSpecUDTUnionCaseTupleV0 tupleCase;
 };

func NewScSpecUdtUnionCaseV0

func NewScSpecUdtUnionCaseV0(kind ScSpecUdtUnionCaseV0Kind, value interface{}) (result ScSpecUdtUnionCaseV0, err error)

NewScSpecUdtUnionCaseV0 creates a new ScSpecUdtUnionCaseV0.

func (ScSpecUdtUnionCaseV0) ArmForSwitch

func (u ScSpecUdtUnionCaseV0) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ScSpecUdtUnionCaseV0

func (*ScSpecUdtUnionCaseV0) DecodeFrom

func (u *ScSpecUdtUnionCaseV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScSpecUdtUnionCaseV0) EncodeTo

func (u ScSpecUdtUnionCaseV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecUdtUnionCaseV0) GetTupleCase

func (u ScSpecUdtUnionCaseV0) GetTupleCase() (result ScSpecUdtUnionCaseTupleV0, ok bool)

GetTupleCase retrieves the TupleCase value from the union, returning ok if the union's switch indicated the value is valid.

func (ScSpecUdtUnionCaseV0) GetVoidCase

func (u ScSpecUdtUnionCaseV0) GetVoidCase() (result ScSpecUdtUnionCaseVoidV0, ok bool)

GetVoidCase retrieves the VoidCase value from the union, returning ok if the union's switch indicated the value is valid.

func (ScSpecUdtUnionCaseV0) MarshalBinary

func (s ScSpecUdtUnionCaseV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScSpecUdtUnionCaseV0) MustTupleCase

MustTupleCase retrieves the TupleCase value from the union, panicing if the value is not set.

func (ScSpecUdtUnionCaseV0) MustVoidCase

MustVoidCase retrieves the VoidCase value from the union, panicing if the value is not set.

func (ScSpecUdtUnionCaseV0) SwitchFieldName

func (u ScSpecUdtUnionCaseV0) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ScSpecUdtUnionCaseV0) UnmarshalBinary

func (s *ScSpecUdtUnionCaseV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecUdtUnionCaseV0Kind

type ScSpecUdtUnionCaseV0Kind int32

ScSpecUdtUnionCaseV0Kind is an XDR Enum defines as:

enum SCSpecUDTUnionCaseV0Kind
 {
     SC_SPEC_UDT_UNION_CASE_VOID_V0 = 0,
     SC_SPEC_UDT_UNION_CASE_TUPLE_V0 = 1
 };
const (
	ScSpecUdtUnionCaseV0KindScSpecUdtUnionCaseVoidV0  ScSpecUdtUnionCaseV0Kind = 0
	ScSpecUdtUnionCaseV0KindScSpecUdtUnionCaseTupleV0 ScSpecUdtUnionCaseV0Kind = 1
)

func (*ScSpecUdtUnionCaseV0Kind) DecodeFrom

func (e *ScSpecUdtUnionCaseV0Kind) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScSpecUdtUnionCaseV0Kind) EncodeTo

func (e ScSpecUdtUnionCaseV0Kind) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecUdtUnionCaseV0Kind) MarshalBinary

func (s ScSpecUdtUnionCaseV0Kind) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScSpecUdtUnionCaseV0Kind) String

func (e ScSpecUdtUnionCaseV0Kind) String() string

String returns the name of `e`

func (*ScSpecUdtUnionCaseV0Kind) UnmarshalBinary

func (s *ScSpecUdtUnionCaseV0Kind) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ScSpecUdtUnionCaseV0Kind) ValidEnum

func (e ScSpecUdtUnionCaseV0Kind) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ScSpecUdtUnionCaseV0Kind

type ScSpecUdtUnionCaseVoidV0

type ScSpecUdtUnionCaseVoidV0 struct {
	Doc  string `xdrmaxsize:"1024"`
	Name string `xdrmaxsize:"60"`
}

ScSpecUdtUnionCaseVoidV0 is an XDR Struct defines as:

struct SCSpecUDTUnionCaseVoidV0
 {
     string doc<SC_SPEC_DOC_LIMIT>;
     string name<60>;
 };

func (*ScSpecUdtUnionCaseVoidV0) DecodeFrom

func (s *ScSpecUdtUnionCaseVoidV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecUdtUnionCaseVoidV0) EncodeTo

func (s *ScSpecUdtUnionCaseVoidV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecUdtUnionCaseVoidV0) MarshalBinary

func (s ScSpecUdtUnionCaseVoidV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecUdtUnionCaseVoidV0) UnmarshalBinary

func (s *ScSpecUdtUnionCaseVoidV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpecUdtUnionV0

type ScSpecUdtUnionV0 struct {
	Doc   string                 `xdrmaxsize:"1024"`
	Lib   string                 `xdrmaxsize:"80"`
	Name  string                 `xdrmaxsize:"60"`
	Cases []ScSpecUdtUnionCaseV0 `xdrmaxsize:"50"`
}

ScSpecUdtUnionV0 is an XDR Struct defines as:

struct SCSpecUDTUnionV0
 {
     string doc<SC_SPEC_DOC_LIMIT>;
     string lib<80>;
     string name<60>;
     SCSpecUDTUnionCaseV0 cases<50>;
 };

func (*ScSpecUdtUnionV0) DecodeFrom

func (s *ScSpecUdtUnionV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpecUdtUnionV0) EncodeTo

func (s *ScSpecUdtUnionV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpecUdtUnionV0) MarshalBinary

func (s ScSpecUdtUnionV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpecUdtUnionV0) UnmarshalBinary

func (s *ScSpecUdtUnionV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSpectTypeHash

type ScSpectTypeHash struct {
	N Uint32
}

ScSpectTypeHash is an XDR Struct defines as:

struct SCSpectTypeHash
 {
     uint32 n;
 };

func (*ScSpectTypeHash) DecodeFrom

func (s *ScSpectTypeHash) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScSpectTypeHash) EncodeTo

func (s *ScSpectTypeHash) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSpectTypeHash) MarshalBinary

func (s ScSpectTypeHash) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSpectTypeHash) UnmarshalBinary

func (s *ScSpectTypeHash) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScString

type ScString string

ScString is an XDR Typedef defines as:

typedef string SCString<>;

func (*ScString) DecodeFrom

func (s *ScString) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScString) EncodeTo

func (s ScString) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScString) MarshalBinary

func (s ScString) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScString) UnmarshalBinary

func (s *ScString) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScSymbol

type ScSymbol string

ScSymbol is an XDR Typedef defines as:

typedef string SCSymbol<SCSYMBOL_LIMIT>;

func (*ScSymbol) DecodeFrom

func (s *ScSymbol) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScSymbol) EncodeTo

func (s ScSymbol) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScSymbol) MarshalBinary

func (s ScSymbol) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScSymbol) UnmarshalBinary

func (s *ScSymbol) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ScSymbol) XDRMaxSize

func (e ScSymbol) XDRMaxSize() int

XDRMaxSize implements the Sized interface for ScSymbol

type ScVal

type ScVal struct {
	Type      ScValType
	B         *bool
	Error     *ScError
	U32       *Uint32
	I32       *Int32
	U64       *Uint64
	I64       *Int64
	Timepoint *TimePoint
	Duration  *Duration
	U128      *UInt128Parts
	I128      *Int128Parts
	U256      *UInt256Parts
	I256      *Int256Parts
	Bytes     *ScBytes
	Str       *ScString
	Sym       *ScSymbol
	Vec       **ScVec
	Map       **ScMap
	Address   *ScAddress
	NonceKey  *ScNonceKey
	Instance  *ScContractInstance
}

ScVal is an XDR Union defines as:

union SCVal switch (SCValType type)
 {

 case SCV_BOOL:
     bool b;
 case SCV_VOID:
     void;
 case SCV_ERROR:
     SCError error;

 case SCV_U32:
     uint32 u32;
 case SCV_I32:
     int32 i32;

 case SCV_U64:
     uint64 u64;
 case SCV_I64:
     int64 i64;
 case SCV_TIMEPOINT:
     TimePoint timepoint;
 case SCV_DURATION:
     Duration duration;

 case SCV_U128:
     UInt128Parts u128;
 case SCV_I128:
     Int128Parts i128;

 case SCV_U256:
     UInt256Parts u256;
 case SCV_I256:
     Int256Parts i256;

 case SCV_BYTES:
     SCBytes bytes;
 case SCV_STRING:
     SCString str;
 case SCV_SYMBOL:
     SCSymbol sym;

 // Vec and Map are recursive so need to live
 // behind an option, due to xdrpp limitations.
 case SCV_VEC:
     SCVec *vec;
 case SCV_MAP:
     SCMap *map;

 case SCV_ADDRESS:
     SCAddress address;

 // Special SCVals reserved for system-constructed contract-data
 // ledger keys, not generally usable elsewhere.
 case SCV_LEDGER_KEY_CONTRACT_INSTANCE:
     void;
 case SCV_LEDGER_KEY_NONCE:
     SCNonceKey nonce_key;

 case SCV_CONTRACT_INSTANCE:
     SCContractInstance instance;
 };

func NewScVal

func NewScVal(aType ScValType, value interface{}) (result ScVal, err error)

NewScVal creates a new ScVal.

func (ScVal) ArmForSwitch

func (u ScVal) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ScVal

func (*ScVal) DecodeFrom

func (u *ScVal) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScVal) EncodeTo

func (u ScVal) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScVal) Equals

func (s ScVal) Equals(o ScVal) bool

func (ScVal) GetAddress

func (u ScVal) GetAddress() (result ScAddress, ok bool)

GetAddress retrieves the Address value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetB

func (u ScVal) GetB() (result bool, ok bool)

GetB retrieves the B value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetBytes

func (u ScVal) GetBytes() (result ScBytes, ok bool)

GetBytes retrieves the Bytes value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetDuration

func (u ScVal) GetDuration() (result Duration, ok bool)

GetDuration retrieves the Duration value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetError

func (u ScVal) GetError() (result ScError, ok bool)

GetError retrieves the Error value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetI128

func (u ScVal) GetI128() (result Int128Parts, ok bool)

GetI128 retrieves the I128 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetI256

func (u ScVal) GetI256() (result Int256Parts, ok bool)

GetI256 retrieves the I256 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetI32

func (u ScVal) GetI32() (result Int32, ok bool)

GetI32 retrieves the I32 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetI64

func (u ScVal) GetI64() (result Int64, ok bool)

GetI64 retrieves the I64 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetInstance

func (u ScVal) GetInstance() (result ScContractInstance, ok bool)

GetInstance retrieves the Instance value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetMap

func (u ScVal) GetMap() (result *ScMap, ok bool)

GetMap retrieves the Map value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetNonceKey

func (u ScVal) GetNonceKey() (result ScNonceKey, ok bool)

GetNonceKey retrieves the NonceKey value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetStr

func (u ScVal) GetStr() (result ScString, ok bool)

GetStr retrieves the Str value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetSym

func (u ScVal) GetSym() (result ScSymbol, ok bool)

GetSym retrieves the Sym value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetTimepoint

func (u ScVal) GetTimepoint() (result TimePoint, ok bool)

GetTimepoint retrieves the Timepoint value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetU128

func (u ScVal) GetU128() (result UInt128Parts, ok bool)

GetU128 retrieves the U128 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetU256

func (u ScVal) GetU256() (result UInt256Parts, ok bool)

GetU256 retrieves the U256 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetU32

func (u ScVal) GetU32() (result Uint32, ok bool)

GetU32 retrieves the U32 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetU64

func (u ScVal) GetU64() (result Uint64, ok bool)

GetU64 retrieves the U64 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) GetVec

func (u ScVal) GetVec() (result *ScVec, ok bool)

GetVec retrieves the Vec value from the union, returning ok if the union's switch indicated the value is valid.

func (ScVal) IsBool

func (s ScVal) IsBool() bool

IsBool returns true if the given ScVal is a boolean

func (ScVal) MarshalBinary

func (s ScVal) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScVal) MustAddress

func (u ScVal) MustAddress() ScAddress

MustAddress retrieves the Address value from the union, panicing if the value is not set.

func (ScVal) MustB

func (u ScVal) MustB() bool

MustB retrieves the B value from the union, panicing if the value is not set.

func (ScVal) MustBytes

func (u ScVal) MustBytes() ScBytes

MustBytes retrieves the Bytes value from the union, panicing if the value is not set.

func (ScVal) MustDuration

func (u ScVal) MustDuration() Duration

MustDuration retrieves the Duration value from the union, panicing if the value is not set.

func (ScVal) MustError

func (u ScVal) MustError() ScError

MustError retrieves the Error value from the union, panicing if the value is not set.

func (ScVal) MustI128

func (u ScVal) MustI128() Int128Parts

MustI128 retrieves the I128 value from the union, panicing if the value is not set.

func (ScVal) MustI256

func (u ScVal) MustI256() Int256Parts

MustI256 retrieves the I256 value from the union, panicing if the value is not set.

func (ScVal) MustI32

func (u ScVal) MustI32() Int32

MustI32 retrieves the I32 value from the union, panicing if the value is not set.

func (ScVal) MustI64

func (u ScVal) MustI64() Int64

MustI64 retrieves the I64 value from the union, panicing if the value is not set.

func (ScVal) MustInstance

func (u ScVal) MustInstance() ScContractInstance

MustInstance retrieves the Instance value from the union, panicing if the value is not set.

func (ScVal) MustMap

func (u ScVal) MustMap() *ScMap

MustMap retrieves the Map value from the union, panicing if the value is not set.

func (ScVal) MustNonceKey

func (u ScVal) MustNonceKey() ScNonceKey

MustNonceKey retrieves the NonceKey value from the union, panicing if the value is not set.

func (ScVal) MustStr

func (u ScVal) MustStr() ScString

MustStr retrieves the Str value from the union, panicing if the value is not set.

func (ScVal) MustSym

func (u ScVal) MustSym() ScSymbol

MustSym retrieves the Sym value from the union, panicing if the value is not set.

func (ScVal) MustTimepoint

func (u ScVal) MustTimepoint() TimePoint

MustTimepoint retrieves the Timepoint value from the union, panicing if the value is not set.

func (ScVal) MustU128

func (u ScVal) MustU128() UInt128Parts

MustU128 retrieves the U128 value from the union, panicing if the value is not set.

func (ScVal) MustU256

func (u ScVal) MustU256() UInt256Parts

MustU256 retrieves the U256 value from the union, panicing if the value is not set.

func (ScVal) MustU32

func (u ScVal) MustU32() Uint32

MustU32 retrieves the U32 value from the union, panicing if the value is not set.

func (ScVal) MustU64

func (u ScVal) MustU64() Uint64

MustU64 retrieves the U64 value from the union, panicing if the value is not set.

func (ScVal) MustVec

func (u ScVal) MustVec() *ScVec

MustVec retrieves the Vec value from the union, panicing if the value is not set.

func (ScVal) String

func (s ScVal) String() string

func (ScVal) SwitchFieldName

func (u ScVal) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ScVal) UnmarshalBinary

func (s *ScVal) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScValType

type ScValType int32

ScValType is an XDR Enum defines as:

enum SCValType
 {
     SCV_BOOL = 0,
     SCV_VOID = 1,
     SCV_ERROR = 2,

     // 32 bits is the smallest type in WASM or XDR; no need for u8/u16.
     SCV_U32 = 3,
     SCV_I32 = 4,

     // 64 bits is naturally supported by both WASM and XDR also.
     SCV_U64 = 5,
     SCV_I64 = 6,

     // Time-related u64 subtypes with their own functions and formatting.
     SCV_TIMEPOINT = 7,
     SCV_DURATION = 8,

     // 128 bits is naturally supported by Rust and we use it for Soroban
     // fixed-point arithmetic prices / balances / similar "quantities". These
     // are represented in XDR as a pair of 2 u64s.
     SCV_U128 = 9,
     SCV_I128 = 10,

     // 256 bits is the size of sha256 output, ed25519 keys, and the EVM machine
     // word, so for interop use we include this even though it requires a small
     // amount of Rust guest and/or host library code.
     SCV_U256 = 11,
     SCV_I256 = 12,

     // Bytes come in 3 flavors, 2 of which have meaningfully different
     // formatting and validity-checking / domain-restriction.
     SCV_BYTES = 13,
     SCV_STRING = 14,
     SCV_SYMBOL = 15,

     // Vecs and maps are just polymorphic containers of other ScVals.
     SCV_VEC = 16,
     SCV_MAP = 17,

     // Address is the universal identifier for contracts and classic
     // accounts.
     SCV_ADDRESS = 18,

     // The following are the internal SCVal variants that are not
     // exposed to the contracts.
     SCV_CONTRACT_INSTANCE = 19,

     // SCV_LEDGER_KEY_CONTRACT_INSTANCE and SCV_LEDGER_KEY_NONCE are unique
     // symbolic SCVals used as the key for ledger entries for a contract's
     // instance and an address' nonce, respectively.
     SCV_LEDGER_KEY_CONTRACT_INSTANCE = 20,
     SCV_LEDGER_KEY_NONCE = 21
 };
const (
	ScValTypeScvBool                      ScValType = 0
	ScValTypeScvVoid                      ScValType = 1
	ScValTypeScvError                     ScValType = 2
	ScValTypeScvU32                       ScValType = 3
	ScValTypeScvI32                       ScValType = 4
	ScValTypeScvU64                       ScValType = 5
	ScValTypeScvI64                       ScValType = 6
	ScValTypeScvTimepoint                 ScValType = 7
	ScValTypeScvDuration                  ScValType = 8
	ScValTypeScvU128                      ScValType = 9
	ScValTypeScvI128                      ScValType = 10
	ScValTypeScvU256                      ScValType = 11
	ScValTypeScvI256                      ScValType = 12
	ScValTypeScvBytes                     ScValType = 13
	ScValTypeScvString                    ScValType = 14
	ScValTypeScvSymbol                    ScValType = 15
	ScValTypeScvVec                       ScValType = 16
	ScValTypeScvMap                       ScValType = 17
	ScValTypeScvAddress                   ScValType = 18
	ScValTypeScvContractInstance          ScValType = 19
	ScValTypeScvLedgerKeyContractInstance ScValType = 20
	ScValTypeScvLedgerKeyNonce            ScValType = 21
)

func (*ScValType) DecodeFrom

func (e *ScValType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScValType) EncodeTo

func (e ScValType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScValType) MarshalBinary

func (s ScValType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScValType) String

func (e ScValType) String() string

String returns the name of `e`

func (*ScValType) UnmarshalBinary

func (s *ScValType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ScValType) ValidEnum

func (e ScValType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ScValType

type ScVec

type ScVec []ScVal

ScVec is an XDR Typedef defines as:

typedef SCVal SCVec<>;

func (*ScVec) DecodeFrom

func (s *ScVec) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScVec) EncodeTo

func (s ScVec) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*ScVec) Equals

func (s *ScVec) Equals(o *ScVec) bool

func (ScVec) MarshalBinary

func (s ScVec) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScVec) UnmarshalBinary

func (s *ScVec) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpBallot

type ScpBallot struct {
	Counter Uint32
	Value   Value
}

ScpBallot is an XDR Struct defines as:

struct SCPBallot
 {
     uint32 counter; // n
     Value value;    // x
 };

func (*ScpBallot) DecodeFrom

func (s *ScpBallot) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpBallot) EncodeTo

func (s *ScpBallot) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpBallot) MarshalBinary

func (s ScpBallot) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpBallot) UnmarshalBinary

func (s *ScpBallot) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpEnvelope

type ScpEnvelope struct {
	Statement ScpStatement
	Signature Signature
}

ScpEnvelope is an XDR Struct defines as:

struct SCPEnvelope
 {
     SCPStatement statement;
     Signature signature;
 };

func (*ScpEnvelope) DecodeFrom

func (s *ScpEnvelope) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpEnvelope) EncodeTo

func (s *ScpEnvelope) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpEnvelope) MarshalBinary

func (s ScpEnvelope) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpEnvelope) Scan

func (t *ScpEnvelope) Scan(src any) error

Scan reads from src into an ScpEnvelope struct

func (*ScpEnvelope) UnmarshalBinary

func (s *ScpEnvelope) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpHistoryEntry

type ScpHistoryEntry struct {
	V  int32
	V0 *ScpHistoryEntryV0
}

ScpHistoryEntry is an XDR Union defines as:

union SCPHistoryEntry switch (int v)
 {
 case 0:
     SCPHistoryEntryV0 v0;
 };

func NewScpHistoryEntry

func NewScpHistoryEntry(v int32, value interface{}) (result ScpHistoryEntry, err error)

NewScpHistoryEntry creates a new ScpHistoryEntry.

func (ScpHistoryEntry) ArmForSwitch

func (u ScpHistoryEntry) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ScpHistoryEntry

func (*ScpHistoryEntry) DecodeFrom

func (u *ScpHistoryEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScpHistoryEntry) EncodeTo

func (u ScpHistoryEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpHistoryEntry) GetV0

func (u ScpHistoryEntry) GetV0() (result ScpHistoryEntryV0, ok bool)

GetV0 retrieves the V0 value from the union, returning ok if the union's switch indicated the value is valid.

func (ScpHistoryEntry) MarshalBinary

func (s ScpHistoryEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScpHistoryEntry) MustV0

MustV0 retrieves the V0 value from the union, panicing if the value is not set.

func (ScpHistoryEntry) SwitchFieldName

func (u ScpHistoryEntry) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ScpHistoryEntry) UnmarshalBinary

func (s *ScpHistoryEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpHistoryEntryV0

type ScpHistoryEntryV0 struct {
	QuorumSets     []ScpQuorumSet
	LedgerMessages LedgerScpMessages
}

ScpHistoryEntryV0 is an XDR Struct defines as:

struct SCPHistoryEntryV0
 {
     SCPQuorumSet quorumSets<>; // additional quorum sets used by ledgerMessages
     LedgerSCPMessages ledgerMessages;
 };

func (*ScpHistoryEntryV0) DecodeFrom

func (s *ScpHistoryEntryV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpHistoryEntryV0) EncodeTo

func (s *ScpHistoryEntryV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpHistoryEntryV0) MarshalBinary

func (s ScpHistoryEntryV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpHistoryEntryV0) UnmarshalBinary

func (s *ScpHistoryEntryV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpNomination

type ScpNomination struct {
	QuorumSetHash Hash
	Votes         []Value
	Accepted      []Value
}

ScpNomination is an XDR Struct defines as:

struct SCPNomination
 {
     Hash quorumSetHash; // D
     Value votes<>;      // X
     Value accepted<>;   // Y
 };

func (*ScpNomination) DecodeFrom

func (s *ScpNomination) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpNomination) EncodeTo

func (s *ScpNomination) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpNomination) MarshalBinary

func (s ScpNomination) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpNomination) UnmarshalBinary

func (s *ScpNomination) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpQuorumSet

type ScpQuorumSet struct {
	Threshold  Uint32
	Validators []NodeId
	InnerSets  []ScpQuorumSet
}

ScpQuorumSet is an XDR Struct defines as:

struct SCPQuorumSet
 {
     uint32 threshold;
     NodeID validators<>;
     SCPQuorumSet innerSets<>;
 };

func (*ScpQuorumSet) DecodeFrom

func (s *ScpQuorumSet) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpQuorumSet) EncodeTo

func (s *ScpQuorumSet) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpQuorumSet) MarshalBinary

func (s ScpQuorumSet) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpQuorumSet) Scan

func (t *ScpQuorumSet) Scan(src any) error

Scan reads from src into an ScpEnvelope struct

func (*ScpQuorumSet) UnmarshalBinary

func (s *ScpQuorumSet) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpStatement

type ScpStatement struct {
	NodeId    NodeId
	SlotIndex Uint64
	Pledges   ScpStatementPledges
}

ScpStatement is an XDR Struct defines as:

struct SCPStatement
 {
     NodeID nodeID;    // v
     uint64 slotIndex; // i

     union switch (SCPStatementType type)
     {
     case SCP_ST_PREPARE:
         struct
         {
             Hash quorumSetHash;       // D
             SCPBallot ballot;         // b
             SCPBallot* prepared;      // p
             SCPBallot* preparedPrime; // p'
             uint32 nC;                // c.n
             uint32 nH;                // h.n
         } prepare;
     case SCP_ST_CONFIRM:
         struct
         {
             SCPBallot ballot;   // b
             uint32 nPrepared;   // p.n
             uint32 nCommit;     // c.n
             uint32 nH;          // h.n
             Hash quorumSetHash; // D
         } confirm;
     case SCP_ST_EXTERNALIZE:
         struct
         {
             SCPBallot commit;         // c
             uint32 nH;                // h.n
             Hash commitQuorumSetHash; // D used before EXTERNALIZE
         } externalize;
     case SCP_ST_NOMINATE:
         SCPNomination nominate;
     }
     pledges;
 };

func (*ScpStatement) DecodeFrom

func (s *ScpStatement) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpStatement) EncodeTo

func (s *ScpStatement) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpStatement) MarshalBinary

func (s ScpStatement) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpStatement) UnmarshalBinary

func (s *ScpStatement) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpStatementConfirm

type ScpStatementConfirm struct {
	Ballot        ScpBallot
	NPrepared     Uint32
	NCommit       Uint32
	NH            Uint32
	QuorumSetHash Hash
}

ScpStatementConfirm is an XDR NestedStruct defines as:

struct
         {
             SCPBallot ballot;   // b
             uint32 nPrepared;   // p.n
             uint32 nCommit;     // c.n
             uint32 nH;          // h.n
             Hash quorumSetHash; // D
         }

func (*ScpStatementConfirm) DecodeFrom

func (s *ScpStatementConfirm) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpStatementConfirm) EncodeTo

func (s *ScpStatementConfirm) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpStatementConfirm) MarshalBinary

func (s ScpStatementConfirm) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpStatementConfirm) UnmarshalBinary

func (s *ScpStatementConfirm) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpStatementExternalize

type ScpStatementExternalize struct {
	Commit              ScpBallot
	NH                  Uint32
	CommitQuorumSetHash Hash
}

ScpStatementExternalize is an XDR NestedStruct defines as:

struct
         {
             SCPBallot commit;         // c
             uint32 nH;                // h.n
             Hash commitQuorumSetHash; // D used before EXTERNALIZE
         }

func (*ScpStatementExternalize) DecodeFrom

func (s *ScpStatementExternalize) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpStatementExternalize) EncodeTo

func (s *ScpStatementExternalize) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpStatementExternalize) MarshalBinary

func (s ScpStatementExternalize) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpStatementExternalize) UnmarshalBinary

func (s *ScpStatementExternalize) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpStatementPledges

type ScpStatementPledges struct {
	Type        ScpStatementType
	Prepare     *ScpStatementPrepare
	Confirm     *ScpStatementConfirm
	Externalize *ScpStatementExternalize
	Nominate    *ScpNomination
}

ScpStatementPledges is an XDR NestedUnion defines as:

union switch (SCPStatementType type)
     {
     case SCP_ST_PREPARE:
         struct
         {
             Hash quorumSetHash;       // D
             SCPBallot ballot;         // b
             SCPBallot* prepared;      // p
             SCPBallot* preparedPrime; // p'
             uint32 nC;                // c.n
             uint32 nH;                // h.n
         } prepare;
     case SCP_ST_CONFIRM:
         struct
         {
             SCPBallot ballot;   // b
             uint32 nPrepared;   // p.n
             uint32 nCommit;     // c.n
             uint32 nH;          // h.n
             Hash quorumSetHash; // D
         } confirm;
     case SCP_ST_EXTERNALIZE:
         struct
         {
             SCPBallot commit;         // c
             uint32 nH;                // h.n
             Hash commitQuorumSetHash; // D used before EXTERNALIZE
         } externalize;
     case SCP_ST_NOMINATE:
         SCPNomination nominate;
     }

func NewScpStatementPledges

func NewScpStatementPledges(aType ScpStatementType, value interface{}) (result ScpStatementPledges, err error)

NewScpStatementPledges creates a new ScpStatementPledges.

func (ScpStatementPledges) ArmForSwitch

func (u ScpStatementPledges) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of ScpStatementPledges

func (*ScpStatementPledges) DecodeFrom

func (u *ScpStatementPledges) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScpStatementPledges) EncodeTo

func (u ScpStatementPledges) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpStatementPledges) GetConfirm

func (u ScpStatementPledges) GetConfirm() (result ScpStatementConfirm, ok bool)

GetConfirm retrieves the Confirm value from the union, returning ok if the union's switch indicated the value is valid.

func (ScpStatementPledges) GetExternalize

func (u ScpStatementPledges) GetExternalize() (result ScpStatementExternalize, ok bool)

GetExternalize retrieves the Externalize value from the union, returning ok if the union's switch indicated the value is valid.

func (ScpStatementPledges) GetNominate

func (u ScpStatementPledges) GetNominate() (result ScpNomination, ok bool)

GetNominate retrieves the Nominate value from the union, returning ok if the union's switch indicated the value is valid.

func (ScpStatementPledges) GetPrepare

func (u ScpStatementPledges) GetPrepare() (result ScpStatementPrepare, ok bool)

GetPrepare retrieves the Prepare value from the union, returning ok if the union's switch indicated the value is valid.

func (ScpStatementPledges) MarshalBinary

func (s ScpStatementPledges) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScpStatementPledges) MustConfirm

func (u ScpStatementPledges) MustConfirm() ScpStatementConfirm

MustConfirm retrieves the Confirm value from the union, panicing if the value is not set.

func (ScpStatementPledges) MustExternalize

func (u ScpStatementPledges) MustExternalize() ScpStatementExternalize

MustExternalize retrieves the Externalize value from the union, panicing if the value is not set.

func (ScpStatementPledges) MustNominate

func (u ScpStatementPledges) MustNominate() ScpNomination

MustNominate retrieves the Nominate value from the union, panicing if the value is not set.

func (ScpStatementPledges) MustPrepare

func (u ScpStatementPledges) MustPrepare() ScpStatementPrepare

MustPrepare retrieves the Prepare value from the union, panicing if the value is not set.

func (ScpStatementPledges) SwitchFieldName

func (u ScpStatementPledges) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*ScpStatementPledges) UnmarshalBinary

func (s *ScpStatementPledges) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpStatementPrepare

type ScpStatementPrepare struct {
	QuorumSetHash Hash
	Ballot        ScpBallot
	Prepared      *ScpBallot
	PreparedPrime *ScpBallot
	NC            Uint32
	NH            Uint32
}

ScpStatementPrepare is an XDR NestedStruct defines as:

struct
         {
             Hash quorumSetHash;       // D
             SCPBallot ballot;         // b
             SCPBallot* prepared;      // p
             SCPBallot* preparedPrime; // p'
             uint32 nC;                // c.n
             uint32 nH;                // h.n
         }

func (*ScpStatementPrepare) DecodeFrom

func (s *ScpStatementPrepare) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*ScpStatementPrepare) EncodeTo

func (s *ScpStatementPrepare) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpStatementPrepare) MarshalBinary

func (s ScpStatementPrepare) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*ScpStatementPrepare) UnmarshalBinary

func (s *ScpStatementPrepare) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ScpStatementType

type ScpStatementType int32

ScpStatementType is an XDR Enum defines as:

enum SCPStatementType
 {
     SCP_ST_PREPARE = 0,
     SCP_ST_CONFIRM = 1,
     SCP_ST_EXTERNALIZE = 2,
     SCP_ST_NOMINATE = 3
 };
const (
	ScpStatementTypeScpStPrepare     ScpStatementType = 0
	ScpStatementTypeScpStConfirm     ScpStatementType = 1
	ScpStatementTypeScpStExternalize ScpStatementType = 2
	ScpStatementTypeScpStNominate    ScpStatementType = 3
)

func (*ScpStatementType) DecodeFrom

func (e *ScpStatementType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ScpStatementType) EncodeTo

func (e ScpStatementType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ScpStatementType) MarshalBinary

func (s ScpStatementType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ScpStatementType) String

func (e ScpStatementType) String() string

String returns the name of `e`

func (*ScpStatementType) UnmarshalBinary

func (s *ScpStatementType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ScpStatementType) ValidEnum

func (e ScpStatementType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ScpStatementType

type SendMore

type SendMore struct {
	NumMessages Uint32
}

SendMore is an XDR Struct defines as:

struct SendMore
 {
     uint32 numMessages;
 };

func (*SendMore) DecodeFrom

func (s *SendMore) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SendMore) EncodeTo

func (s *SendMore) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SendMore) MarshalBinary

func (s SendMore) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SendMore) UnmarshalBinary

func (s *SendMore) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SendMoreExtended

type SendMoreExtended struct {
	NumMessages Uint32
	NumBytes    Uint32
}

SendMoreExtended is an XDR Struct defines as:

struct SendMoreExtended
 {
     uint32 numMessages;
     uint32 numBytes;
 };

func (*SendMoreExtended) DecodeFrom

func (s *SendMoreExtended) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SendMoreExtended) EncodeTo

func (s *SendMoreExtended) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SendMoreExtended) MarshalBinary

func (s SendMoreExtended) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SendMoreExtended) UnmarshalBinary

func (s *SendMoreExtended) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SequenceNumber

type SequenceNumber Int64

SequenceNumber is an XDR Typedef defines as:

typedef int64 SequenceNumber;

func (*SequenceNumber) DecodeFrom

func (s *SequenceNumber) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SequenceNumber) EncodeTo

func (s SequenceNumber) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SequenceNumber) MarshalBinary

func (s SequenceNumber) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SequenceNumber) UnmarshalBinary

func (s *SequenceNumber) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SerializedLedgerCloseMeta

type SerializedLedgerCloseMeta struct {
	V  int32
	V0 *LedgerCloseMeta
}

SerializedLedgerCloseMeta is an XDR Union defines as:

union SerializedLedgerCloseMeta switch (int v)
 {
 case 0:
     LedgerCloseMeta v0;
 };

func NewSerializedLedgerCloseMeta

func NewSerializedLedgerCloseMeta(v int32, value interface{}) (result SerializedLedgerCloseMeta, err error)

NewSerializedLedgerCloseMeta creates a new SerializedLedgerCloseMeta.

func (SerializedLedgerCloseMeta) ArmForSwitch

func (u SerializedLedgerCloseMeta) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of SerializedLedgerCloseMeta

func (*SerializedLedgerCloseMeta) DecodeFrom

func (u *SerializedLedgerCloseMeta) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SerializedLedgerCloseMeta) EncodeTo

func (u SerializedLedgerCloseMeta) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SerializedLedgerCloseMeta) GetV0

func (u SerializedLedgerCloseMeta) GetV0() (result LedgerCloseMeta, ok bool)

GetV0 retrieves the V0 value from the union, returning ok if the union's switch indicated the value is valid.

func (SerializedLedgerCloseMeta) MarshalBinary

func (s SerializedLedgerCloseMeta) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SerializedLedgerCloseMeta) MustV0

MustV0 retrieves the V0 value from the union, panicing if the value is not set.

func (SerializedLedgerCloseMeta) SwitchFieldName

func (u SerializedLedgerCloseMeta) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*SerializedLedgerCloseMeta) UnmarshalBinary

func (s *SerializedLedgerCloseMeta) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SetOptionsOp

type SetOptionsOp struct {
	InflationDest *AccountId
	ClearFlags    *Uint32
	SetFlags      *Uint32
	MasterWeight  *Uint32
	LowThreshold  *Uint32
	MedThreshold  *Uint32
	HighThreshold *Uint32
	HomeDomain    *String32
	Signer        *Signer
}

SetOptionsOp is an XDR Struct defines as:

struct SetOptionsOp
 {
     AccountID* inflationDest; // sets the inflation destination

     uint32* clearFlags; // which flags to clear
     uint32* setFlags;   // which flags to set

     // account threshold manipulation
     uint32* masterWeight; // weight of the master account
     uint32* lowThreshold;
     uint32* medThreshold;
     uint32* highThreshold;

     string32* homeDomain; // sets the home domain

     // Add, update or remove a signer for the account
     // signer is deleted if the weight is 0
     Signer* signer;
 };

func (*SetOptionsOp) DecodeFrom

func (s *SetOptionsOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SetOptionsOp) EncodeTo

func (s *SetOptionsOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SetOptionsOp) GoString

func (s SetOptionsOp) GoString() string

GoString implements fmt.GoStringer.

func (SetOptionsOp) MarshalBinary

func (s SetOptionsOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SetOptionsOp) UnmarshalBinary

func (s *SetOptionsOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SetOptionsResult

type SetOptionsResult struct {
	Code SetOptionsResultCode
}

SetOptionsResult is an XDR Union defines as:

union SetOptionsResult switch (SetOptionsResultCode code)
 {
 case SET_OPTIONS_SUCCESS:
     void;
 case SET_OPTIONS_LOW_RESERVE:
 case SET_OPTIONS_TOO_MANY_SIGNERS:
 case SET_OPTIONS_BAD_FLAGS:
 case SET_OPTIONS_INVALID_INFLATION:
 case SET_OPTIONS_CANT_CHANGE:
 case SET_OPTIONS_UNKNOWN_FLAG:
 case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE:
 case SET_OPTIONS_BAD_SIGNER:
 case SET_OPTIONS_INVALID_HOME_DOMAIN:
 case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED:
     void;
 };

func NewSetOptionsResult

func NewSetOptionsResult(code SetOptionsResultCode, value interface{}) (result SetOptionsResult, err error)

NewSetOptionsResult creates a new SetOptionsResult.

func (SetOptionsResult) ArmForSwitch

func (u SetOptionsResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of SetOptionsResult

func (*SetOptionsResult) DecodeFrom

func (u *SetOptionsResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SetOptionsResult) EncodeTo

func (u SetOptionsResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SetOptionsResult) MarshalBinary

func (s SetOptionsResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SetOptionsResult) SwitchFieldName

func (u SetOptionsResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*SetOptionsResult) UnmarshalBinary

func (s *SetOptionsResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SetOptionsResultCode

type SetOptionsResultCode int32

SetOptionsResultCode is an XDR Enum defines as:

enum SetOptionsResultCode
 {
     // codes considered as "success" for the operation
     SET_OPTIONS_SUCCESS = 0,
     // codes considered as "failure" for the operation
     SET_OPTIONS_LOW_RESERVE = -1,      // not enough funds to add a signer
     SET_OPTIONS_TOO_MANY_SIGNERS = -2, // max number of signers already reached
     SET_OPTIONS_BAD_FLAGS = -3,        // invalid combination of clear/set flags
     SET_OPTIONS_INVALID_INFLATION = -4,      // inflation account does not exist
     SET_OPTIONS_CANT_CHANGE = -5,            // can no longer change this option
     SET_OPTIONS_UNKNOWN_FLAG = -6,           // can't set an unknown flag
     SET_OPTIONS_THRESHOLD_OUT_OF_RANGE = -7, // bad value for weight/threshold
     SET_OPTIONS_BAD_SIGNER = -8,             // signer cannot be masterkey
     SET_OPTIONS_INVALID_HOME_DOMAIN = -9,    // malformed home domain
     SET_OPTIONS_AUTH_REVOCABLE_REQUIRED =
         -10 // auth revocable is required for clawback
 };
const (
	SetOptionsResultCodeSetOptionsSuccess               SetOptionsResultCode = 0
	SetOptionsResultCodeSetOptionsLowReserve            SetOptionsResultCode = -1
	SetOptionsResultCodeSetOptionsTooManySigners        SetOptionsResultCode = -2
	SetOptionsResultCodeSetOptionsBadFlags              SetOptionsResultCode = -3
	SetOptionsResultCodeSetOptionsInvalidInflation      SetOptionsResultCode = -4
	SetOptionsResultCodeSetOptionsCantChange            SetOptionsResultCode = -5
	SetOptionsResultCodeSetOptionsUnknownFlag           SetOptionsResultCode = -6
	SetOptionsResultCodeSetOptionsThresholdOutOfRange   SetOptionsResultCode = -7
	SetOptionsResultCodeSetOptionsBadSigner             SetOptionsResultCode = -8
	SetOptionsResultCodeSetOptionsInvalidHomeDomain     SetOptionsResultCode = -9
	SetOptionsResultCodeSetOptionsAuthRevocableRequired SetOptionsResultCode = -10
)

func (*SetOptionsResultCode) DecodeFrom

func (e *SetOptionsResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SetOptionsResultCode) EncodeTo

func (e SetOptionsResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SetOptionsResultCode) MarshalBinary

func (s SetOptionsResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SetOptionsResultCode) String

func (e SetOptionsResultCode) String() string

String returns the name of `e`

func (*SetOptionsResultCode) UnmarshalBinary

func (s *SetOptionsResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (SetOptionsResultCode) ValidEnum

func (e SetOptionsResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for SetOptionsResultCode

type SetTrustLineFlagsOp

type SetTrustLineFlagsOp struct {
	Trustor    AccountId
	Asset      Asset
	ClearFlags Uint32
	SetFlags   Uint32
}

SetTrustLineFlagsOp is an XDR Struct defines as:

struct SetTrustLineFlagsOp
 {
     AccountID trustor;
     Asset asset;

     uint32 clearFlags; // which flags to clear
     uint32 setFlags;   // which flags to set
 };

func (*SetTrustLineFlagsOp) DecodeFrom

func (s *SetTrustLineFlagsOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SetTrustLineFlagsOp) EncodeTo

func (s *SetTrustLineFlagsOp) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SetTrustLineFlagsOp) MarshalBinary

func (s SetTrustLineFlagsOp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SetTrustLineFlagsOp) UnmarshalBinary

func (s *SetTrustLineFlagsOp) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SetTrustLineFlagsResult

type SetTrustLineFlagsResult struct {
	Code SetTrustLineFlagsResultCode
}

SetTrustLineFlagsResult is an XDR Union defines as:

union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code)
 {
 case SET_TRUST_LINE_FLAGS_SUCCESS:
     void;
 case SET_TRUST_LINE_FLAGS_MALFORMED:
 case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE:
 case SET_TRUST_LINE_FLAGS_CANT_REVOKE:
 case SET_TRUST_LINE_FLAGS_INVALID_STATE:
 case SET_TRUST_LINE_FLAGS_LOW_RESERVE:
     void;
 };

func NewSetTrustLineFlagsResult

func NewSetTrustLineFlagsResult(code SetTrustLineFlagsResultCode, value interface{}) (result SetTrustLineFlagsResult, err error)

NewSetTrustLineFlagsResult creates a new SetTrustLineFlagsResult.

func (SetTrustLineFlagsResult) ArmForSwitch

func (u SetTrustLineFlagsResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of SetTrustLineFlagsResult

func (*SetTrustLineFlagsResult) DecodeFrom

func (u *SetTrustLineFlagsResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SetTrustLineFlagsResult) EncodeTo

func (u SetTrustLineFlagsResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SetTrustLineFlagsResult) MarshalBinary

func (s SetTrustLineFlagsResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SetTrustLineFlagsResult) SwitchFieldName

func (u SetTrustLineFlagsResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*SetTrustLineFlagsResult) UnmarshalBinary

func (s *SetTrustLineFlagsResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SetTrustLineFlagsResultCode

type SetTrustLineFlagsResultCode int32

SetTrustLineFlagsResultCode is an XDR Enum defines as:

enum SetTrustLineFlagsResultCode
 {
     // codes considered as "success" for the operation
     SET_TRUST_LINE_FLAGS_SUCCESS = 0,

     // codes considered as "failure" for the operation
     SET_TRUST_LINE_FLAGS_MALFORMED = -1,
     SET_TRUST_LINE_FLAGS_NO_TRUST_LINE = -2,
     SET_TRUST_LINE_FLAGS_CANT_REVOKE = -3,
     SET_TRUST_LINE_FLAGS_INVALID_STATE = -4,
     SET_TRUST_LINE_FLAGS_LOW_RESERVE = -5 // claimable balances can't be created
                                           // on revoke due to low reserves
 };
const (
	SetTrustLineFlagsResultCodeSetTrustLineFlagsSuccess      SetTrustLineFlagsResultCode = 0
	SetTrustLineFlagsResultCodeSetTrustLineFlagsMalformed    SetTrustLineFlagsResultCode = -1
	SetTrustLineFlagsResultCodeSetTrustLineFlagsNoTrustLine  SetTrustLineFlagsResultCode = -2
	SetTrustLineFlagsResultCodeSetTrustLineFlagsCantRevoke   SetTrustLineFlagsResultCode = -3
	SetTrustLineFlagsResultCodeSetTrustLineFlagsInvalidState SetTrustLineFlagsResultCode = -4
	SetTrustLineFlagsResultCodeSetTrustLineFlagsLowReserve   SetTrustLineFlagsResultCode = -5
)

func (*SetTrustLineFlagsResultCode) DecodeFrom

func (e *SetTrustLineFlagsResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SetTrustLineFlagsResultCode) EncodeTo

func (e SetTrustLineFlagsResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SetTrustLineFlagsResultCode) MarshalBinary

func (s SetTrustLineFlagsResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SetTrustLineFlagsResultCode) String

String returns the name of `e`

func (*SetTrustLineFlagsResultCode) UnmarshalBinary

func (s *SetTrustLineFlagsResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (SetTrustLineFlagsResultCode) ValidEnum

func (e SetTrustLineFlagsResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for SetTrustLineFlagsResultCode

type Signature

type Signature []byte

Signature is an XDR Typedef defines as:

typedef opaque Signature<64>;

func (*Signature) DecodeFrom

func (s *Signature) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Signature) EncodeTo

func (s Signature) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Signature) MarshalBinary

func (s Signature) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Signature) UnmarshalBinary

func (s *Signature) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (Signature) XDRMaxSize

func (e Signature) XDRMaxSize() int

XDRMaxSize implements the Sized interface for Signature

type SignatureHint

type SignatureHint [4]byte

SignatureHint is an XDR Typedef defines as:

typedef opaque SignatureHint[4];

func (*SignatureHint) DecodeFrom

func (s *SignatureHint) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SignatureHint) EncodeTo

func (s *SignatureHint) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SignatureHint) MarshalBinary

func (s SignatureHint) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SignatureHint) UnmarshalBinary

func (s *SignatureHint) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (SignatureHint) XDRMaxSize

func (e SignatureHint) XDRMaxSize() int

XDRMaxSize implements the Sized interface for SignatureHint

type SignedSurveyRequestMessage

type SignedSurveyRequestMessage struct {
	RequestSignature Signature
	Request          SurveyRequestMessage
}

SignedSurveyRequestMessage is an XDR Struct defines as:

struct SignedSurveyRequestMessage
 {
     Signature requestSignature;
     SurveyRequestMessage request;
 };

func (*SignedSurveyRequestMessage) DecodeFrom

func (s *SignedSurveyRequestMessage) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SignedSurveyRequestMessage) EncodeTo

func (s *SignedSurveyRequestMessage) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SignedSurveyRequestMessage) MarshalBinary

func (s SignedSurveyRequestMessage) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SignedSurveyRequestMessage) UnmarshalBinary

func (s *SignedSurveyRequestMessage) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SignedSurveyResponseMessage

type SignedSurveyResponseMessage struct {
	ResponseSignature Signature
	Response          SurveyResponseMessage
}

SignedSurveyResponseMessage is an XDR Struct defines as:

struct SignedSurveyResponseMessage
 {
     Signature responseSignature;
     SurveyResponseMessage response;
 };

func (*SignedSurveyResponseMessage) DecodeFrom

func (s *SignedSurveyResponseMessage) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SignedSurveyResponseMessage) EncodeTo

func (s *SignedSurveyResponseMessage) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SignedSurveyResponseMessage) MarshalBinary

func (s SignedSurveyResponseMessage) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SignedSurveyResponseMessage) UnmarshalBinary

func (s *SignedSurveyResponseMessage) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Signer

type Signer struct {
	Key    SignerKey
	Weight Uint32
}

Signer is an XDR Struct defines as:

struct Signer
 {
     SignerKey key;
     uint32 weight; // really only need 1 byte
 };

func SortSignersByKey

func SortSignersByKey(signers []Signer) []Signer

SortSignersByKey returns a new []Signer array sorted by signer key.

func (*Signer) DecodeFrom

func (s *Signer) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Signer) EncodeTo

func (s *Signer) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Signer) GoString

func (s Signer) GoString() string

GoString implements fmt.GoStringer.

func (Signer) MarshalBinary

func (s Signer) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Signer) UnmarshalBinary

func (s *Signer) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SignerKey

type SignerKey struct {
	Type                 SignerKeyType
	Ed25519              *Uint256
	PreAuthTx            *Uint256
	HashX                *Uint256
	Ed25519SignedPayload *SignerKeyEd25519SignedPayload
}

SignerKey is an XDR Union defines as:

union SignerKey switch (SignerKeyType type)
 {
 case SIGNER_KEY_TYPE_ED25519:
     uint256 ed25519;
 case SIGNER_KEY_TYPE_PRE_AUTH_TX:
     /* SHA-256 Hash of TransactionSignaturePayload structure */
     uint256 preAuthTx;
 case SIGNER_KEY_TYPE_HASH_X:
     /* Hash of random 256 bit preimage X */
     uint256 hashX;
 case SIGNER_KEY_TYPE_ED25519_SIGNED_PAYLOAD:
     struct
     {
         /* Public key that must sign the payload. */
         uint256 ed25519;
         /* Payload to be raw signed by ed25519. */
         opaque payload<64>;
     } ed25519SignedPayload;
 };

func MustSigner

func MustSigner(address string) SignerKey

func NewSignerKey

func NewSignerKey(aType SignerKeyType, value interface{}) (result SignerKey, err error)

NewSignerKey creates a new SignerKey.

func (*SignerKey) Address

func (skey *SignerKey) Address() string

Address returns the strkey encoded form of this signer key. This method will panic if the SignerKey is of an unknown type.

func (SignerKey) ArmForSwitch

func (u SignerKey) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of SignerKey

func (*SignerKey) DecodeFrom

func (u *SignerKey) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SignerKey) EncodeTo

func (u SignerKey) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*SignerKey) Equals

func (skey *SignerKey) Equals(other SignerKey) bool

Equals returns true if `other` is equivalent to `skey`

func (*SignerKey) GetAddress

func (skey *SignerKey) GetAddress() (string, error)

GetAddress returns the strkey encoded form of this signer key, and an error if the SignerKey is of an unknown type.

func (SignerKey) GetEd25519

func (u SignerKey) GetEd25519() (result Uint256, ok bool)

GetEd25519 retrieves the Ed25519 value from the union, returning ok if the union's switch indicated the value is valid.

func (SignerKey) GetEd25519SignedPayload

func (u SignerKey) GetEd25519SignedPayload() (result SignerKeyEd25519SignedPayload, ok bool)

GetEd25519SignedPayload retrieves the Ed25519SignedPayload value from the union, returning ok if the union's switch indicated the value is valid.

func (SignerKey) GetHashX

func (u SignerKey) GetHashX() (result Uint256, ok bool)

GetHashX retrieves the HashX value from the union, returning ok if the union's switch indicated the value is valid.

func (SignerKey) GetPreAuthTx

func (u SignerKey) GetPreAuthTx() (result Uint256, ok bool)

GetPreAuthTx retrieves the PreAuthTx value from the union, returning ok if the union's switch indicated the value is valid.

func (SignerKey) MarshalBinary

func (s SignerKey) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SignerKey) MustEd25519

func (u SignerKey) MustEd25519() Uint256

MustEd25519 retrieves the Ed25519 value from the union, panicing if the value is not set.

func (SignerKey) MustEd25519SignedPayload

func (u SignerKey) MustEd25519SignedPayload() SignerKeyEd25519SignedPayload

MustEd25519SignedPayload retrieves the Ed25519SignedPayload value from the union, panicing if the value is not set.

func (SignerKey) MustHashX

func (u SignerKey) MustHashX() Uint256

MustHashX retrieves the HashX value from the union, panicing if the value is not set.

func (SignerKey) MustPreAuthTx

func (u SignerKey) MustPreAuthTx() Uint256

MustPreAuthTx retrieves the PreAuthTx value from the union, panicing if the value is not set.

func (*SignerKey) SetAddress

func (skey *SignerKey) SetAddress(address string) error

SetAddress modifies the receiver, setting it's value to the SignerKey form of the provided address.

func (SignerKey) SwitchFieldName

func (u SignerKey) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*SignerKey) UnmarshalBinary

func (s *SignerKey) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SignerKeyEd25519SignedPayload

type SignerKeyEd25519SignedPayload struct {
	Ed25519 Uint256
	Payload []byte `xdrmaxsize:"64"`
}

SignerKeyEd25519SignedPayload is an XDR NestedStruct defines as:

struct
     {
         /* Public key that must sign the payload. */
         uint256 ed25519;
         /* Payload to be raw signed by ed25519. */
         opaque payload<64>;
     }

func (*SignerKeyEd25519SignedPayload) DecodeFrom

func (s *SignerKeyEd25519SignedPayload) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SignerKeyEd25519SignedPayload) EncodeTo

func (s *SignerKeyEd25519SignedPayload) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SignerKeyEd25519SignedPayload) MarshalBinary

func (s SignerKeyEd25519SignedPayload) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SignerKeyEd25519SignedPayload) UnmarshalBinary

func (s *SignerKeyEd25519SignedPayload) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SignerKeyType

type SignerKeyType int32

SignerKeyType is an XDR Enum defines as:

enum SignerKeyType
 {
     SIGNER_KEY_TYPE_ED25519 = KEY_TYPE_ED25519,
     SIGNER_KEY_TYPE_PRE_AUTH_TX = KEY_TYPE_PRE_AUTH_TX,
     SIGNER_KEY_TYPE_HASH_X = KEY_TYPE_HASH_X,
     SIGNER_KEY_TYPE_ED25519_SIGNED_PAYLOAD = KEY_TYPE_ED25519_SIGNED_PAYLOAD
 };
const (
	SignerKeyTypeSignerKeyTypeEd25519              SignerKeyType = 0
	SignerKeyTypeSignerKeyTypePreAuthTx            SignerKeyType = 1
	SignerKeyTypeSignerKeyTypeHashX                SignerKeyType = 2
	SignerKeyTypeSignerKeyTypeEd25519SignedPayload SignerKeyType = 3
)

func (*SignerKeyType) DecodeFrom

func (e *SignerKeyType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SignerKeyType) EncodeTo

func (e SignerKeyType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SignerKeyType) MarshalBinary

func (s SignerKeyType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SignerKeyType) String

func (e SignerKeyType) String() string

String returns the name of `e`

func (*SignerKeyType) UnmarshalBinary

func (s *SignerKeyType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (SignerKeyType) ValidEnum

func (e SignerKeyType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for SignerKeyType

type SimplePaymentResult

type SimplePaymentResult struct {
	Destination AccountId
	Asset       Asset
	Amount      Int64
}

SimplePaymentResult is an XDR Struct defines as:

struct SimplePaymentResult
 {
     AccountID destination;
     Asset asset;
     int64 amount;
 };

func (*SimplePaymentResult) DecodeFrom

func (s *SimplePaymentResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SimplePaymentResult) EncodeTo

func (s *SimplePaymentResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SimplePaymentResult) MarshalBinary

func (s SimplePaymentResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SimplePaymentResult) UnmarshalBinary

func (s *SimplePaymentResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SorobanAddressCredentials

type SorobanAddressCredentials struct {
	Address                   ScAddress
	Nonce                     Int64
	SignatureExpirationLedger Uint32
	Signature                 ScVal
}

SorobanAddressCredentials is an XDR Struct defines as:

struct SorobanAddressCredentials
 {
     SCAddress address;
     int64 nonce;
     uint32 signatureExpirationLedger;
     SCVal signature;
 };

func (*SorobanAddressCredentials) DecodeFrom

func (s *SorobanAddressCredentials) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SorobanAddressCredentials) EncodeTo

func (s *SorobanAddressCredentials) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SorobanAddressCredentials) MarshalBinary

func (s SorobanAddressCredentials) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SorobanAddressCredentials) UnmarshalBinary

func (s *SorobanAddressCredentials) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SorobanAuthorizationEntry

type SorobanAuthorizationEntry struct {
	Credentials    SorobanCredentials
	RootInvocation SorobanAuthorizedInvocation
}

SorobanAuthorizationEntry is an XDR Struct defines as:

struct SorobanAuthorizationEntry
 {
     SorobanCredentials credentials;
     SorobanAuthorizedInvocation rootInvocation;
 };

func (*SorobanAuthorizationEntry) DecodeFrom

func (s *SorobanAuthorizationEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SorobanAuthorizationEntry) EncodeTo

func (s *SorobanAuthorizationEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SorobanAuthorizationEntry) MarshalBinary

func (s SorobanAuthorizationEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SorobanAuthorizationEntry) UnmarshalBinary

func (s *SorobanAuthorizationEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SorobanAuthorizedFunction

type SorobanAuthorizedFunction struct {
	Type                 SorobanAuthorizedFunctionType
	ContractFn           *InvokeContractArgs
	CreateContractHostFn *CreateContractArgs
}

SorobanAuthorizedFunction is an XDR Union defines as:

union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type)
 {
 case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN:
     InvokeContractArgs contractFn;
 case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN:
     CreateContractArgs createContractHostFn;
 };

func NewSorobanAuthorizedFunction

func NewSorobanAuthorizedFunction(aType SorobanAuthorizedFunctionType, value interface{}) (result SorobanAuthorizedFunction, err error)

NewSorobanAuthorizedFunction creates a new SorobanAuthorizedFunction.

func (SorobanAuthorizedFunction) ArmForSwitch

func (u SorobanAuthorizedFunction) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of SorobanAuthorizedFunction

func (*SorobanAuthorizedFunction) DecodeFrom

func (u *SorobanAuthorizedFunction) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SorobanAuthorizedFunction) EncodeTo

func (u SorobanAuthorizedFunction) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SorobanAuthorizedFunction) GetContractFn

func (u SorobanAuthorizedFunction) GetContractFn() (result InvokeContractArgs, ok bool)

GetContractFn retrieves the ContractFn value from the union, returning ok if the union's switch indicated the value is valid.

func (SorobanAuthorizedFunction) GetCreateContractHostFn

func (u SorobanAuthorizedFunction) GetCreateContractHostFn() (result CreateContractArgs, ok bool)

GetCreateContractHostFn retrieves the CreateContractHostFn value from the union, returning ok if the union's switch indicated the value is valid.

func (SorobanAuthorizedFunction) MarshalBinary

func (s SorobanAuthorizedFunction) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SorobanAuthorizedFunction) MustContractFn

func (u SorobanAuthorizedFunction) MustContractFn() InvokeContractArgs

MustContractFn retrieves the ContractFn value from the union, panicing if the value is not set.

func (SorobanAuthorizedFunction) MustCreateContractHostFn

func (u SorobanAuthorizedFunction) MustCreateContractHostFn() CreateContractArgs

MustCreateContractHostFn retrieves the CreateContractHostFn value from the union, panicing if the value is not set.

func (SorobanAuthorizedFunction) SwitchFieldName

func (u SorobanAuthorizedFunction) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*SorobanAuthorizedFunction) UnmarshalBinary

func (s *SorobanAuthorizedFunction) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SorobanAuthorizedFunctionType

type SorobanAuthorizedFunctionType int32

SorobanAuthorizedFunctionType is an XDR Enum defines as:

enum SorobanAuthorizedFunctionType
 {
     SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN = 0,
     SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1
 };
const (
	SorobanAuthorizedFunctionTypeSorobanAuthorizedFunctionTypeContractFn           SorobanAuthorizedFunctionType = 0
	SorobanAuthorizedFunctionTypeSorobanAuthorizedFunctionTypeCreateContractHostFn SorobanAuthorizedFunctionType = 1
)

func (*SorobanAuthorizedFunctionType) DecodeFrom

func (e *SorobanAuthorizedFunctionType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SorobanAuthorizedFunctionType) EncodeTo

func (e SorobanAuthorizedFunctionType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SorobanAuthorizedFunctionType) MarshalBinary

func (s SorobanAuthorizedFunctionType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SorobanAuthorizedFunctionType) String

String returns the name of `e`

func (*SorobanAuthorizedFunctionType) UnmarshalBinary

func (s *SorobanAuthorizedFunctionType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (SorobanAuthorizedFunctionType) ValidEnum

func (e SorobanAuthorizedFunctionType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for SorobanAuthorizedFunctionType

type SorobanAuthorizedInvocation

type SorobanAuthorizedInvocation struct {
	Function       SorobanAuthorizedFunction
	SubInvocations []SorobanAuthorizedInvocation
}

SorobanAuthorizedInvocation is an XDR Struct defines as:

struct SorobanAuthorizedInvocation
 {
     SorobanAuthorizedFunction function;
     SorobanAuthorizedInvocation subInvocations<>;
 };

func (*SorobanAuthorizedInvocation) DecodeFrom

func (s *SorobanAuthorizedInvocation) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SorobanAuthorizedInvocation) EncodeTo

func (s *SorobanAuthorizedInvocation) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SorobanAuthorizedInvocation) MarshalBinary

func (s SorobanAuthorizedInvocation) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SorobanAuthorizedInvocation) UnmarshalBinary

func (s *SorobanAuthorizedInvocation) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SorobanCredentials

type SorobanCredentials struct {
	Type    SorobanCredentialsType
	Address *SorobanAddressCredentials
}

SorobanCredentials is an XDR Union defines as:

union SorobanCredentials switch (SorobanCredentialsType type)
 {
 case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT:
     void;
 case SOROBAN_CREDENTIALS_ADDRESS:
     SorobanAddressCredentials address;
 };

func NewSorobanCredentials

func NewSorobanCredentials(aType SorobanCredentialsType, value interface{}) (result SorobanCredentials, err error)

NewSorobanCredentials creates a new SorobanCredentials.

func (SorobanCredentials) ArmForSwitch

func (u SorobanCredentials) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of SorobanCredentials

func (*SorobanCredentials) DecodeFrom

func (u *SorobanCredentials) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SorobanCredentials) EncodeTo

func (u SorobanCredentials) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SorobanCredentials) GetAddress

func (u SorobanCredentials) GetAddress() (result SorobanAddressCredentials, ok bool)

GetAddress retrieves the Address value from the union, returning ok if the union's switch indicated the value is valid.

func (SorobanCredentials) MarshalBinary

func (s SorobanCredentials) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SorobanCredentials) MustAddress

MustAddress retrieves the Address value from the union, panicing if the value is not set.

func (SorobanCredentials) SwitchFieldName

func (u SorobanCredentials) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*SorobanCredentials) UnmarshalBinary

func (s *SorobanCredentials) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SorobanCredentialsType

type SorobanCredentialsType int32

SorobanCredentialsType is an XDR Enum defines as:

enum SorobanCredentialsType
 {
     SOROBAN_CREDENTIALS_SOURCE_ACCOUNT = 0,
     SOROBAN_CREDENTIALS_ADDRESS = 1
 };
const (
	SorobanCredentialsTypeSorobanCredentialsSourceAccount SorobanCredentialsType = 0
	SorobanCredentialsTypeSorobanCredentialsAddress       SorobanCredentialsType = 1
)

func (*SorobanCredentialsType) DecodeFrom

func (e *SorobanCredentialsType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SorobanCredentialsType) EncodeTo

func (e SorobanCredentialsType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SorobanCredentialsType) MarshalBinary

func (s SorobanCredentialsType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SorobanCredentialsType) String

func (e SorobanCredentialsType) String() string

String returns the name of `e`

func (*SorobanCredentialsType) UnmarshalBinary

func (s *SorobanCredentialsType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (SorobanCredentialsType) ValidEnum

func (e SorobanCredentialsType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for SorobanCredentialsType

type SorobanResources

type SorobanResources struct {
	Footprint    LedgerFootprint
	Instructions Uint32
	ReadBytes    Uint32
	WriteBytes   Uint32
}

SorobanResources is an XDR Struct defines as:

struct SorobanResources
 {
     // The ledger footprint of the transaction.
     LedgerFootprint footprint;
     // The maximum number of instructions this transaction can use
     uint32 instructions;

     // The maximum number of bytes this transaction can read from ledger
     uint32 readBytes;
     // The maximum number of bytes this transaction can write to ledger
     uint32 writeBytes;
 };

func (*SorobanResources) DecodeFrom

func (s *SorobanResources) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SorobanResources) EncodeTo

func (s *SorobanResources) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SorobanResources) MarshalBinary

func (s SorobanResources) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SorobanResources) UnmarshalBinary

func (s *SorobanResources) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SorobanTransactionData

type SorobanTransactionData struct {
	Ext         ExtensionPoint
	Resources   SorobanResources
	ResourceFee Int64
}

SorobanTransactionData is an XDR Struct defines as:

struct SorobanTransactionData
 {
     ExtensionPoint ext;
     SorobanResources resources;
     // Amount of the transaction `fee` allocated to the Soroban resource fees.
     // The fraction of `resourceFee` corresponding to `resources` specified
     // above is *not* refundable (i.e. fees for instructions, ledger I/O), as
     // well as fees for the transaction size.
     // The remaining part of the fee is refundable and the charged value is
     // based on the actual consumption of refundable resources (events, ledger
     // rent bumps).
     // The `inclusionFee` used for prioritization of the transaction is defined
     // as `tx.fee - resourceFee`.
     int64 resourceFee;
 };

func (*SorobanTransactionData) DecodeFrom

func (s *SorobanTransactionData) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SorobanTransactionData) EncodeTo

func (s *SorobanTransactionData) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SorobanTransactionData) MarshalBinary

func (s SorobanTransactionData) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SorobanTransactionData) UnmarshalBinary

func (s *SorobanTransactionData) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SorobanTransactionMeta

type SorobanTransactionMeta struct {
	Ext              SorobanTransactionMetaExt
	Events           []ContractEvent
	ReturnValue      ScVal
	DiagnosticEvents []DiagnosticEvent
}

SorobanTransactionMeta is an XDR Struct defines as:

struct SorobanTransactionMeta
 {
     SorobanTransactionMetaExt ext;

     ContractEvent events<>;             // custom events populated by the
                                         // contracts themselves.
     SCVal returnValue;                  // return value of the host fn invocation

     // Diagnostics events that are not hashed.
     // This will contain all contract and diagnostic events. Even ones
     // that were emitted in a failed contract call.
     DiagnosticEvent diagnosticEvents<>;
 };

func (*SorobanTransactionMeta) DecodeFrom

func (s *SorobanTransactionMeta) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SorobanTransactionMeta) EncodeTo

func (s *SorobanTransactionMeta) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SorobanTransactionMeta) MarshalBinary

func (s SorobanTransactionMeta) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SorobanTransactionMeta) UnmarshalBinary

func (s *SorobanTransactionMeta) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SorobanTransactionMetaExt

type SorobanTransactionMetaExt struct {
	V  int32
	V1 *SorobanTransactionMetaExtV1
}

SorobanTransactionMetaExt is an XDR Union defines as:

union SorobanTransactionMetaExt switch (int v)
 {
 case 0:
     void;
 case 1:
     SorobanTransactionMetaExtV1 v1;
 };

func NewSorobanTransactionMetaExt

func NewSorobanTransactionMetaExt(v int32, value interface{}) (result SorobanTransactionMetaExt, err error)

NewSorobanTransactionMetaExt creates a new SorobanTransactionMetaExt.

func (SorobanTransactionMetaExt) ArmForSwitch

func (u SorobanTransactionMetaExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of SorobanTransactionMetaExt

func (*SorobanTransactionMetaExt) DecodeFrom

func (u *SorobanTransactionMetaExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SorobanTransactionMetaExt) EncodeTo

func (u SorobanTransactionMetaExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SorobanTransactionMetaExt) GetV1

GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.

func (SorobanTransactionMetaExt) MarshalBinary

func (s SorobanTransactionMetaExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SorobanTransactionMetaExt) MustV1

MustV1 retrieves the V1 value from the union, panicing if the value is not set.

func (SorobanTransactionMetaExt) SwitchFieldName

func (u SorobanTransactionMetaExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*SorobanTransactionMetaExt) UnmarshalBinary

func (s *SorobanTransactionMetaExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SorobanTransactionMetaExtV1

type SorobanTransactionMetaExtV1 struct {
	Ext                                  ExtensionPoint
	TotalNonRefundableResourceFeeCharged Int64
	TotalRefundableResourceFeeCharged    Int64
	RentFeeCharged                       Int64
}

SorobanTransactionMetaExtV1 is an XDR Struct defines as:

struct SorobanTransactionMetaExtV1
 {
     ExtensionPoint ext;

     // The following are the components of the overall Soroban resource fee
     // charged for the transaction.
     // The following relation holds:
     // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged`
     // where `resourceFeeCharged` is the overall fee charged for the
     // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee`
     // i.e.we never charge more than the declared resource fee.
     // The inclusion fee for charged the Soroban transaction can be found using
     // the following equation:
     // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.

     // Total amount (in stroops) that has been charged for non-refundable
     // Soroban resources.
     // Non-refundable resources are charged based on the usage declared in
     // the transaction envelope (such as `instructions`, `readBytes` etc.) and
     // is charged regardless of the success of the transaction.
     int64 totalNonRefundableResourceFeeCharged;
     // Total amount (in stroops) that has been charged for refundable
     // Soroban resource fees.
     // Currently this comprises the rent fee (`rentFeeCharged`) and the
     // fee for the events and return value.
     // Refundable resources are charged based on the actual resources usage.
     // Since currently refundable resources are only used for the successful
     // transactions, this will be `0` for failed transactions.
     int64 totalRefundableResourceFeeCharged;
     // Amount (in stroops) that has been charged for rent.
     // This is a part of `totalNonRefundableResourceFeeCharged`.
     int64 rentFeeCharged;
 };

func (*SorobanTransactionMetaExtV1) DecodeFrom

func (s *SorobanTransactionMetaExtV1) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SorobanTransactionMetaExtV1) EncodeTo

func (s *SorobanTransactionMetaExtV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SorobanTransactionMetaExtV1) MarshalBinary

func (s SorobanTransactionMetaExtV1) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SorobanTransactionMetaExtV1) UnmarshalBinary

func (s *SorobanTransactionMetaExtV1) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SponsorshipDescriptor

type SponsorshipDescriptor = *AccountId

SponsorshipDescriptor is an XDR Typedef defines as:

typedef AccountID* SponsorshipDescriptor;

type StateArchivalSettings

type StateArchivalSettings struct {
	MaxEntryTtl                    Uint32
	MinTemporaryTtl                Uint32
	MinPersistentTtl               Uint32
	PersistentRentRateDenominator  Int64
	TempRentRateDenominator        Int64
	MaxEntriesToArchive            Uint32
	BucketListSizeWindowSampleSize Uint32
	BucketListWindowSamplePeriod   Uint32
	EvictionScanSize               Uint32
	StartingEvictionScanLevel      Uint32
}

StateArchivalSettings is an XDR Struct defines as:

struct StateArchivalSettings {
     uint32 maxEntryTTL;
     uint32 minTemporaryTTL;
     uint32 minPersistentTTL;

     // rent_fee = wfee_rate_average / rent_rate_denominator_for_type
     int64 persistentRentRateDenominator;
     int64 tempRentRateDenominator;

     // max number of entries that emit archival meta in a single ledger
     uint32 maxEntriesToArchive;

     // Number of snapshots to use when calculating average BucketList size
     uint32 bucketListSizeWindowSampleSize;

     // How often to sample the BucketList size for the average, in ledgers
     uint32 bucketListWindowSamplePeriod;

     // Maximum number of bytes that we scan for eviction per ledger
     uint32 evictionScanSize;

     // Lowest BucketList level to be scanned to evict entries
     uint32 startingEvictionScanLevel;
 };

func (*StateArchivalSettings) DecodeFrom

func (s *StateArchivalSettings) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*StateArchivalSettings) EncodeTo

func (s *StateArchivalSettings) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (StateArchivalSettings) MarshalBinary

func (s StateArchivalSettings) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*StateArchivalSettings) UnmarshalBinary

func (s *StateArchivalSettings) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type StellarMessage

type StellarMessage struct {
	Type                        MessageType
	Error                       *Error
	Hello                       *Hello
	Auth                        *Auth
	DontHave                    *DontHave
	Peers                       *[]PeerAddress `xdrmaxsize:"100"`
	TxSetHash                   *Uint256
	TxSet                       *TransactionSet
	GeneralizedTxSet            *GeneralizedTransactionSet
	Transaction                 *TransactionEnvelope
	SignedSurveyRequestMessage  *SignedSurveyRequestMessage
	SignedSurveyResponseMessage *SignedSurveyResponseMessage
	QSetHash                    *Uint256
	QSet                        *ScpQuorumSet
	Envelope                    *ScpEnvelope
	GetScpLedgerSeq             *Uint32
	SendMoreMessage             *SendMore
	SendMoreExtendedMessage     *SendMoreExtended
	FloodAdvert                 *FloodAdvert
	FloodDemand                 *FloodDemand
}

StellarMessage is an XDR Union defines as:

union StellarMessage switch (MessageType type)
 {
 case ERROR_MSG:
     Error error;
 case HELLO:
     Hello hello;
 case AUTH:
     Auth auth;
 case DONT_HAVE:
     DontHave dontHave;
 case GET_PEERS:
     void;
 case PEERS:
     PeerAddress peers<100>;

 case GET_TX_SET:
     uint256 txSetHash;
 case TX_SET:
     TransactionSet txSet;
 case GENERALIZED_TX_SET:
     GeneralizedTransactionSet generalizedTxSet;

 case TRANSACTION:
     TransactionEnvelope transaction;

 case SURVEY_REQUEST:
     SignedSurveyRequestMessage signedSurveyRequestMessage;

 case SURVEY_RESPONSE:
     SignedSurveyResponseMessage signedSurveyResponseMessage;

 // SCP
 case GET_SCP_QUORUMSET:
     uint256 qSetHash;
 case SCP_QUORUMSET:
     SCPQuorumSet qSet;
 case SCP_MESSAGE:
     SCPEnvelope envelope;
 case GET_SCP_STATE:
     uint32 getSCPLedgerSeq; // ledger seq requested ; if 0, requests the latest
 case SEND_MORE:
     SendMore sendMoreMessage;
 case SEND_MORE_EXTENDED:
     SendMoreExtended sendMoreExtendedMessage;
 // Pull mode
 case FLOOD_ADVERT:
      FloodAdvert floodAdvert;
 case FLOOD_DEMAND:
      FloodDemand floodDemand;
 };

func NewStellarMessage

func NewStellarMessage(aType MessageType, value interface{}) (result StellarMessage, err error)

NewStellarMessage creates a new StellarMessage.

func (StellarMessage) ArmForSwitch

func (u StellarMessage) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of StellarMessage

func (*StellarMessage) DecodeFrom

func (u *StellarMessage) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (StellarMessage) EncodeTo

func (u StellarMessage) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (StellarMessage) GetAuth

func (u StellarMessage) GetAuth() (result Auth, ok bool)

GetAuth retrieves the Auth value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetDontHave

func (u StellarMessage) GetDontHave() (result DontHave, ok bool)

GetDontHave retrieves the DontHave value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetEnvelope

func (u StellarMessage) GetEnvelope() (result ScpEnvelope, ok bool)

GetEnvelope retrieves the Envelope value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetError

func (u StellarMessage) GetError() (result Error, ok bool)

GetError retrieves the Error value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetFloodAdvert

func (u StellarMessage) GetFloodAdvert() (result FloodAdvert, ok bool)

GetFloodAdvert retrieves the FloodAdvert value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetFloodDemand

func (u StellarMessage) GetFloodDemand() (result FloodDemand, ok bool)

GetFloodDemand retrieves the FloodDemand value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetGeneralizedTxSet

func (u StellarMessage) GetGeneralizedTxSet() (result GeneralizedTransactionSet, ok bool)

GetGeneralizedTxSet retrieves the GeneralizedTxSet value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetGetScpLedgerSeq

func (u StellarMessage) GetGetScpLedgerSeq() (result Uint32, ok bool)

GetGetScpLedgerSeq retrieves the GetScpLedgerSeq value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetHello

func (u StellarMessage) GetHello() (result Hello, ok bool)

GetHello retrieves the Hello value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetPeers

func (u StellarMessage) GetPeers() (result []PeerAddress, ok bool)

GetPeers retrieves the Peers value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetQSet

func (u StellarMessage) GetQSet() (result ScpQuorumSet, ok bool)

GetQSet retrieves the QSet value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetQSetHash

func (u StellarMessage) GetQSetHash() (result Uint256, ok bool)

GetQSetHash retrieves the QSetHash value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetSendMoreExtendedMessage

func (u StellarMessage) GetSendMoreExtendedMessage() (result SendMoreExtended, ok bool)

GetSendMoreExtendedMessage retrieves the SendMoreExtendedMessage value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetSendMoreMessage

func (u StellarMessage) GetSendMoreMessage() (result SendMore, ok bool)

GetSendMoreMessage retrieves the SendMoreMessage value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetSignedSurveyRequestMessage

func (u StellarMessage) GetSignedSurveyRequestMessage() (result SignedSurveyRequestMessage, ok bool)

GetSignedSurveyRequestMessage retrieves the SignedSurveyRequestMessage value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetSignedSurveyResponseMessage

func (u StellarMessage) GetSignedSurveyResponseMessage() (result SignedSurveyResponseMessage, ok bool)

GetSignedSurveyResponseMessage retrieves the SignedSurveyResponseMessage value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetTransaction

func (u StellarMessage) GetTransaction() (result TransactionEnvelope, ok bool)

GetTransaction retrieves the Transaction value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetTxSet

func (u StellarMessage) GetTxSet() (result TransactionSet, ok bool)

GetTxSet retrieves the TxSet value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) GetTxSetHash

func (u StellarMessage) GetTxSetHash() (result Uint256, ok bool)

GetTxSetHash retrieves the TxSetHash value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarMessage) MarshalBinary

func (s StellarMessage) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (StellarMessage) MustAuth

func (u StellarMessage) MustAuth() Auth

MustAuth retrieves the Auth value from the union, panicing if the value is not set.

func (StellarMessage) MustDontHave

func (u StellarMessage) MustDontHave() DontHave

MustDontHave retrieves the DontHave value from the union, panicing if the value is not set.

func (StellarMessage) MustEnvelope

func (u StellarMessage) MustEnvelope() ScpEnvelope

MustEnvelope retrieves the Envelope value from the union, panicing if the value is not set.

func (StellarMessage) MustError

func (u StellarMessage) MustError() Error

MustError retrieves the Error value from the union, panicing if the value is not set.

func (StellarMessage) MustFloodAdvert

func (u StellarMessage) MustFloodAdvert() FloodAdvert

MustFloodAdvert retrieves the FloodAdvert value from the union, panicing if the value is not set.

func (StellarMessage) MustFloodDemand

func (u StellarMessage) MustFloodDemand() FloodDemand

MustFloodDemand retrieves the FloodDemand value from the union, panicing if the value is not set.

func (StellarMessage) MustGeneralizedTxSet

func (u StellarMessage) MustGeneralizedTxSet() GeneralizedTransactionSet

MustGeneralizedTxSet retrieves the GeneralizedTxSet value from the union, panicing if the value is not set.

func (StellarMessage) MustGetScpLedgerSeq

func (u StellarMessage) MustGetScpLedgerSeq() Uint32

MustGetScpLedgerSeq retrieves the GetScpLedgerSeq value from the union, panicing if the value is not set.

func (StellarMessage) MustHello

func (u StellarMessage) MustHello() Hello

MustHello retrieves the Hello value from the union, panicing if the value is not set.

func (StellarMessage) MustPeers

func (u StellarMessage) MustPeers() []PeerAddress

MustPeers retrieves the Peers value from the union, panicing if the value is not set.

func (StellarMessage) MustQSet

func (u StellarMessage) MustQSet() ScpQuorumSet

MustQSet retrieves the QSet value from the union, panicing if the value is not set.

func (StellarMessage) MustQSetHash

func (u StellarMessage) MustQSetHash() Uint256

MustQSetHash retrieves the QSetHash value from the union, panicing if the value is not set.

func (StellarMessage) MustSendMoreExtendedMessage

func (u StellarMessage) MustSendMoreExtendedMessage() SendMoreExtended

MustSendMoreExtendedMessage retrieves the SendMoreExtendedMessage value from the union, panicing if the value is not set.

func (StellarMessage) MustSendMoreMessage

func (u StellarMessage) MustSendMoreMessage() SendMore

MustSendMoreMessage retrieves the SendMoreMessage value from the union, panicing if the value is not set.

func (StellarMessage) MustSignedSurveyRequestMessage

func (u StellarMessage) MustSignedSurveyRequestMessage() SignedSurveyRequestMessage

MustSignedSurveyRequestMessage retrieves the SignedSurveyRequestMessage value from the union, panicing if the value is not set.

func (StellarMessage) MustSignedSurveyResponseMessage

func (u StellarMessage) MustSignedSurveyResponseMessage() SignedSurveyResponseMessage

MustSignedSurveyResponseMessage retrieves the SignedSurveyResponseMessage value from the union, panicing if the value is not set.

func (StellarMessage) MustTransaction

func (u StellarMessage) MustTransaction() TransactionEnvelope

MustTransaction retrieves the Transaction value from the union, panicing if the value is not set.

func (StellarMessage) MustTxSet

func (u StellarMessage) MustTxSet() TransactionSet

MustTxSet retrieves the TxSet value from the union, panicing if the value is not set.

func (StellarMessage) MustTxSetHash

func (u StellarMessage) MustTxSetHash() Uint256

MustTxSetHash retrieves the TxSetHash value from the union, panicing if the value is not set.

func (StellarMessage) SwitchFieldName

func (u StellarMessage) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*StellarMessage) UnmarshalBinary

func (s *StellarMessage) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type StellarValue

type StellarValue struct {
	TxSetHash Hash
	CloseTime TimePoint
	Upgrades  []UpgradeType `xdrmaxsize:"6"`
	Ext       StellarValueExt
}

StellarValue is an XDR Struct defines as:

struct StellarValue
 {
     Hash txSetHash;      // transaction set to apply to previous ledger
     TimePoint closeTime; // network close time

     // upgrades to apply to the previous ledger (usually empty)
     // this is a vector of encoded 'LedgerUpgrade' so that nodes can drop
     // unknown steps during consensus if needed.
     // see notes below on 'LedgerUpgrade' for more detail
     // max size is dictated by number of upgrade types (+ room for future)
     UpgradeType upgrades<6>;

     // reserved for future use
     union switch (StellarValueType v)
     {
     case STELLAR_VALUE_BASIC:
         void;
     case STELLAR_VALUE_SIGNED:
         LedgerCloseValueSignature lcValueSignature;
     }
     ext;
 };

func (*StellarValue) DecodeFrom

func (s *StellarValue) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*StellarValue) EncodeTo

func (s *StellarValue) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (StellarValue) MarshalBinary

func (s StellarValue) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*StellarValue) UnmarshalBinary

func (s *StellarValue) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type StellarValueExt

type StellarValueExt struct {
	V                StellarValueType
	LcValueSignature *LedgerCloseValueSignature
}

StellarValueExt is an XDR NestedUnion defines as:

union switch (StellarValueType v)
     {
     case STELLAR_VALUE_BASIC:
         void;
     case STELLAR_VALUE_SIGNED:
         LedgerCloseValueSignature lcValueSignature;
     }

func NewStellarValueExt

func NewStellarValueExt(v StellarValueType, value interface{}) (result StellarValueExt, err error)

NewStellarValueExt creates a new StellarValueExt.

func (StellarValueExt) ArmForSwitch

func (u StellarValueExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of StellarValueExt

func (*StellarValueExt) DecodeFrom

func (u *StellarValueExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (StellarValueExt) EncodeTo

func (u StellarValueExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (StellarValueExt) GetLcValueSignature

func (u StellarValueExt) GetLcValueSignature() (result LedgerCloseValueSignature, ok bool)

GetLcValueSignature retrieves the LcValueSignature value from the union, returning ok if the union's switch indicated the value is valid.

func (StellarValueExt) MarshalBinary

func (s StellarValueExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (StellarValueExt) MustLcValueSignature

func (u StellarValueExt) MustLcValueSignature() LedgerCloseValueSignature

MustLcValueSignature retrieves the LcValueSignature value from the union, panicing if the value is not set.

func (StellarValueExt) SwitchFieldName

func (u StellarValueExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*StellarValueExt) UnmarshalBinary

func (s *StellarValueExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type StellarValueType

type StellarValueType int32

StellarValueType is an XDR Enum defines as:

enum StellarValueType
 {
     STELLAR_VALUE_BASIC = 0,
     STELLAR_VALUE_SIGNED = 1
 };
const (
	StellarValueTypeStellarValueBasic  StellarValueType = 0
	StellarValueTypeStellarValueSigned StellarValueType = 1
)

func (*StellarValueType) DecodeFrom

func (e *StellarValueType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (StellarValueType) EncodeTo

func (e StellarValueType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (StellarValueType) MarshalBinary

func (s StellarValueType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (StellarValueType) String

func (e StellarValueType) String() string

String returns the name of `e`

func (*StellarValueType) UnmarshalBinary

func (s *StellarValueType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (StellarValueType) ValidEnum

func (e StellarValueType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for StellarValueType

type StoredDebugTransactionSet

type StoredDebugTransactionSet struct {
	TxSet     StoredTransactionSet
	LedgerSeq Uint32
	ScpValue  StellarValue
}

StoredDebugTransactionSet is an XDR Struct defines as:

struct StoredDebugTransactionSet
 {
 	StoredTransactionSet txSet;
 	uint32 ledgerSeq;
 	StellarValue scpValue;
 };

func (*StoredDebugTransactionSet) DecodeFrom

func (s *StoredDebugTransactionSet) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*StoredDebugTransactionSet) EncodeTo

func (s *StoredDebugTransactionSet) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (StoredDebugTransactionSet) MarshalBinary

func (s StoredDebugTransactionSet) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*StoredDebugTransactionSet) UnmarshalBinary

func (s *StoredDebugTransactionSet) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type StoredTransactionSet

type StoredTransactionSet struct {
	V                int32
	TxSet            *TransactionSet
	GeneralizedTxSet *GeneralizedTransactionSet
}

StoredTransactionSet is an XDR Union defines as:

union StoredTransactionSet switch (int v)
 {
 case 0:
 	TransactionSet txSet;
 case 1:
 	GeneralizedTransactionSet generalizedTxSet;
 };

func NewStoredTransactionSet

func NewStoredTransactionSet(v int32, value interface{}) (result StoredTransactionSet, err error)

NewStoredTransactionSet creates a new StoredTransactionSet.

func (StoredTransactionSet) ArmForSwitch

func (u StoredTransactionSet) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of StoredTransactionSet

func (*StoredTransactionSet) DecodeFrom

func (u *StoredTransactionSet) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (StoredTransactionSet) EncodeTo

func (u StoredTransactionSet) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (StoredTransactionSet) GetGeneralizedTxSet

func (u StoredTransactionSet) GetGeneralizedTxSet() (result GeneralizedTransactionSet, ok bool)

GetGeneralizedTxSet retrieves the GeneralizedTxSet value from the union, returning ok if the union's switch indicated the value is valid.

func (StoredTransactionSet) GetTxSet

func (u StoredTransactionSet) GetTxSet() (result TransactionSet, ok bool)

GetTxSet retrieves the TxSet value from the union, returning ok if the union's switch indicated the value is valid.

func (StoredTransactionSet) MarshalBinary

func (s StoredTransactionSet) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (StoredTransactionSet) MustGeneralizedTxSet

func (u StoredTransactionSet) MustGeneralizedTxSet() GeneralizedTransactionSet

MustGeneralizedTxSet retrieves the GeneralizedTxSet value from the union, panicing if the value is not set.

func (StoredTransactionSet) MustTxSet

func (u StoredTransactionSet) MustTxSet() TransactionSet

MustTxSet retrieves the TxSet value from the union, panicing if the value is not set.

func (StoredTransactionSet) SwitchFieldName

func (u StoredTransactionSet) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*StoredTransactionSet) UnmarshalBinary

func (s *StoredTransactionSet) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type String32

type String32 string

String32 is an XDR Typedef defines as:

typedef string string32<32>;

func String32Ptr

func String32Ptr(val string) *String32

func (*String32) DecodeFrom

func (s *String32) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (String32) EncodeTo

func (s String32) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (String32) MarshalBinary

func (s String32) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*String32) UnmarshalBinary

func (s *String32) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (String32) XDRMaxSize

func (e String32) XDRMaxSize() int

XDRMaxSize implements the Sized interface for String32

type String64

type String64 string

String64 is an XDR Typedef defines as:

typedef string string64<64>;

func (*String64) DecodeFrom

func (s *String64) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (String64) EncodeTo

func (s String64) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (String64) MarshalBinary

func (s String64) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*String64) UnmarshalBinary

func (s *String64) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (String64) XDRMaxSize

func (e String64) XDRMaxSize() int

XDRMaxSize implements the Sized interface for String64

type SurveyMessageCommandType

type SurveyMessageCommandType int32

SurveyMessageCommandType is an XDR Enum defines as:

enum SurveyMessageCommandType
 {
     SURVEY_TOPOLOGY = 0
 };
const (
	SurveyMessageCommandTypeSurveyTopology SurveyMessageCommandType = 0
)

func (*SurveyMessageCommandType) DecodeFrom

func (e *SurveyMessageCommandType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SurveyMessageCommandType) EncodeTo

func (e SurveyMessageCommandType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SurveyMessageCommandType) MarshalBinary

func (s SurveyMessageCommandType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SurveyMessageCommandType) String

func (e SurveyMessageCommandType) String() string

String returns the name of `e`

func (*SurveyMessageCommandType) UnmarshalBinary

func (s *SurveyMessageCommandType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (SurveyMessageCommandType) ValidEnum

func (e SurveyMessageCommandType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for SurveyMessageCommandType

type SurveyMessageResponseType

type SurveyMessageResponseType int32

SurveyMessageResponseType is an XDR Enum defines as:

enum SurveyMessageResponseType
 {
     SURVEY_TOPOLOGY_RESPONSE_V0 = 0,
     SURVEY_TOPOLOGY_RESPONSE_V1 = 1
 };
const (
	SurveyMessageResponseTypeSurveyTopologyResponseV0 SurveyMessageResponseType = 0
	SurveyMessageResponseTypeSurveyTopologyResponseV1 SurveyMessageResponseType = 1
)

func (*SurveyMessageResponseType) DecodeFrom

func (e *SurveyMessageResponseType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SurveyMessageResponseType) EncodeTo

func (e SurveyMessageResponseType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SurveyMessageResponseType) MarshalBinary

func (s SurveyMessageResponseType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SurveyMessageResponseType) String

func (e SurveyMessageResponseType) String() string

String returns the name of `e`

func (*SurveyMessageResponseType) UnmarshalBinary

func (s *SurveyMessageResponseType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (SurveyMessageResponseType) ValidEnum

func (e SurveyMessageResponseType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for SurveyMessageResponseType

type SurveyRequestMessage

type SurveyRequestMessage struct {
	SurveyorPeerId NodeId
	SurveyedPeerId NodeId
	LedgerNum      Uint32
	EncryptionKey  Curve25519Public
	CommandType    SurveyMessageCommandType
}

SurveyRequestMessage is an XDR Struct defines as:

struct SurveyRequestMessage
 {
     NodeID surveyorPeerID;
     NodeID surveyedPeerID;
     uint32 ledgerNum;
     Curve25519Public encryptionKey;
     SurveyMessageCommandType commandType;
 };

func (*SurveyRequestMessage) DecodeFrom

func (s *SurveyRequestMessage) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SurveyRequestMessage) EncodeTo

func (s *SurveyRequestMessage) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SurveyRequestMessage) MarshalBinary

func (s SurveyRequestMessage) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SurveyRequestMessage) UnmarshalBinary

func (s *SurveyRequestMessage) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SurveyResponseBody

type SurveyResponseBody struct {
	Type                   SurveyMessageResponseType
	TopologyResponseBodyV0 *TopologyResponseBodyV0
	TopologyResponseBodyV1 *TopologyResponseBodyV1
}

SurveyResponseBody is an XDR Union defines as:

union SurveyResponseBody switch (SurveyMessageResponseType type)
 {
 case SURVEY_TOPOLOGY_RESPONSE_V0:
     TopologyResponseBodyV0 topologyResponseBodyV0;
 case SURVEY_TOPOLOGY_RESPONSE_V1:
     TopologyResponseBodyV1 topologyResponseBodyV1;
 };

func NewSurveyResponseBody

func NewSurveyResponseBody(aType SurveyMessageResponseType, value interface{}) (result SurveyResponseBody, err error)

NewSurveyResponseBody creates a new SurveyResponseBody.

func (SurveyResponseBody) ArmForSwitch

func (u SurveyResponseBody) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of SurveyResponseBody

func (*SurveyResponseBody) DecodeFrom

func (u *SurveyResponseBody) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (SurveyResponseBody) EncodeTo

func (u SurveyResponseBody) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SurveyResponseBody) GetTopologyResponseBodyV0

func (u SurveyResponseBody) GetTopologyResponseBodyV0() (result TopologyResponseBodyV0, ok bool)

GetTopologyResponseBodyV0 retrieves the TopologyResponseBodyV0 value from the union, returning ok if the union's switch indicated the value is valid.

func (SurveyResponseBody) GetTopologyResponseBodyV1

func (u SurveyResponseBody) GetTopologyResponseBodyV1() (result TopologyResponseBodyV1, ok bool)

GetTopologyResponseBodyV1 retrieves the TopologyResponseBodyV1 value from the union, returning ok if the union's switch indicated the value is valid.

func (SurveyResponseBody) MarshalBinary

func (s SurveyResponseBody) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (SurveyResponseBody) MustTopologyResponseBodyV0

func (u SurveyResponseBody) MustTopologyResponseBodyV0() TopologyResponseBodyV0

MustTopologyResponseBodyV0 retrieves the TopologyResponseBodyV0 value from the union, panicing if the value is not set.

func (SurveyResponseBody) MustTopologyResponseBodyV1

func (u SurveyResponseBody) MustTopologyResponseBodyV1() TopologyResponseBodyV1

MustTopologyResponseBodyV1 retrieves the TopologyResponseBodyV1 value from the union, panicing if the value is not set.

func (SurveyResponseBody) SwitchFieldName

func (u SurveyResponseBody) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*SurveyResponseBody) UnmarshalBinary

func (s *SurveyResponseBody) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type SurveyResponseMessage

type SurveyResponseMessage struct {
	SurveyorPeerId NodeId
	SurveyedPeerId NodeId
	LedgerNum      Uint32
	CommandType    SurveyMessageCommandType
	EncryptedBody  EncryptedBody
}

SurveyResponseMessage is an XDR Struct defines as:

struct SurveyResponseMessage
 {
     NodeID surveyorPeerID;
     NodeID surveyedPeerID;
     uint32 ledgerNum;
     SurveyMessageCommandType commandType;
     EncryptedBody encryptedBody;
 };

func (*SurveyResponseMessage) DecodeFrom

func (s *SurveyResponseMessage) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*SurveyResponseMessage) EncodeTo

func (s *SurveyResponseMessage) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (SurveyResponseMessage) MarshalBinary

func (s SurveyResponseMessage) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*SurveyResponseMessage) UnmarshalBinary

func (s *SurveyResponseMessage) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type ThresholdIndexes

type ThresholdIndexes int32

ThresholdIndexes is an XDR Enum defines as:

enum ThresholdIndexes
 {
     THRESHOLD_MASTER_WEIGHT = 0,
     THRESHOLD_LOW = 1,
     THRESHOLD_MED = 2,
     THRESHOLD_HIGH = 3
 };
const (
	ThresholdIndexesThresholdMasterWeight ThresholdIndexes = 0
	ThresholdIndexesThresholdLow          ThresholdIndexes = 1
	ThresholdIndexesThresholdMed          ThresholdIndexes = 2
	ThresholdIndexesThresholdHigh         ThresholdIndexes = 3
)

func (*ThresholdIndexes) DecodeFrom

func (e *ThresholdIndexes) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (ThresholdIndexes) EncodeTo

func (e ThresholdIndexes) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (ThresholdIndexes) MarshalBinary

func (s ThresholdIndexes) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (ThresholdIndexes) String

func (e ThresholdIndexes) String() string

String returns the name of `e`

func (*ThresholdIndexes) UnmarshalBinary

func (s *ThresholdIndexes) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (ThresholdIndexes) ValidEnum

func (e ThresholdIndexes) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for ThresholdIndexes

type Thresholds

type Thresholds [4]byte

Thresholds is an XDR Typedef defines as:

typedef opaque Thresholds[4];

func NewThreshold

func NewThreshold(masterKey, low, medium, high byte) Thresholds

func (*Thresholds) DecodeFrom

func (s *Thresholds) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Thresholds) EncodeTo

func (s *Thresholds) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Thresholds) MarshalBinary

func (s Thresholds) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (Thresholds) MasterKeyWeight

func (t Thresholds) MasterKeyWeight() byte

func (*Thresholds) Scan

func (t *Thresholds) Scan(src any) error

Scan reads from src into an Thresholds struct

func (Thresholds) ThresholdHigh

func (t Thresholds) ThresholdHigh() byte

func (Thresholds) ThresholdLow

func (t Thresholds) ThresholdLow() byte

func (Thresholds) ThresholdMedium

func (t Thresholds) ThresholdMedium() byte

func (*Thresholds) UnmarshalBinary

func (s *Thresholds) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (Thresholds) XDRMaxSize

func (e Thresholds) XDRMaxSize() int

XDRMaxSize implements the Sized interface for Thresholds

type TimeBounds

type TimeBounds struct {
	MinTime TimePoint
	MaxTime TimePoint
}

TimeBounds is an XDR Struct defines as:

struct TimeBounds
 {
     TimePoint minTime;
     TimePoint maxTime; // 0 here means no maxTime
 };

func (*TimeBounds) DecodeFrom

func (s *TimeBounds) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TimeBounds) EncodeTo

func (s *TimeBounds) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*TimeBounds) GoString

func (t *TimeBounds) GoString() string

GoString implements fmt.GoStringer.

func (TimeBounds) MarshalBinary

func (s TimeBounds) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TimeBounds) UnmarshalBinary

func (s *TimeBounds) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TimePoint

type TimePoint Uint64

TimePoint is an XDR Typedef defines as:

typedef uint64 TimePoint;

func (*TimePoint) DecodeFrom

func (s *TimePoint) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TimePoint) EncodeTo

func (s TimePoint) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TimePoint) MarshalBinary

func (s TimePoint) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TimePoint) UnmarshalBinary

func (s *TimePoint) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TopologyResponseBodyV0

type TopologyResponseBodyV0 struct {
	InboundPeers           PeerStatList
	OutboundPeers          PeerStatList
	TotalInboundPeerCount  Uint32
	TotalOutboundPeerCount Uint32
}

TopologyResponseBodyV0 is an XDR Struct defines as:

struct TopologyResponseBodyV0
 {
     PeerStatList inboundPeers;
     PeerStatList outboundPeers;

     uint32 totalInboundPeerCount;
     uint32 totalOutboundPeerCount;
 };

func (*TopologyResponseBodyV0) DecodeFrom

func (s *TopologyResponseBodyV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TopologyResponseBodyV0) EncodeTo

func (s *TopologyResponseBodyV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TopologyResponseBodyV0) MarshalBinary

func (s TopologyResponseBodyV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TopologyResponseBodyV0) UnmarshalBinary

func (s *TopologyResponseBodyV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TopologyResponseBodyV1

type TopologyResponseBodyV1 struct {
	InboundPeers           PeerStatList
	OutboundPeers          PeerStatList
	TotalInboundPeerCount  Uint32
	TotalOutboundPeerCount Uint32
	MaxInboundPeerCount    Uint32
	MaxOutboundPeerCount   Uint32
}

TopologyResponseBodyV1 is an XDR Struct defines as:

struct TopologyResponseBodyV1
 {
     PeerStatList inboundPeers;
     PeerStatList outboundPeers;

     uint32 totalInboundPeerCount;
     uint32 totalOutboundPeerCount;

     uint32 maxInboundPeerCount;
     uint32 maxOutboundPeerCount;
 };

func (*TopologyResponseBodyV1) DecodeFrom

func (s *TopologyResponseBodyV1) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TopologyResponseBodyV1) EncodeTo

func (s *TopologyResponseBodyV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TopologyResponseBodyV1) MarshalBinary

func (s TopologyResponseBodyV1) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TopologyResponseBodyV1) UnmarshalBinary

func (s *TopologyResponseBodyV1) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Transaction

type Transaction struct {
	SourceAccount MuxedAccount
	Fee           Uint32
	SeqNum        SequenceNumber
	Cond          Preconditions
	Memo          Memo
	Operations    []Operation `xdrmaxsize:"100"`
	Ext           TransactionExt
}

Transaction is an XDR Struct defines as:

struct Transaction
 {
     // account used to run the transaction
     MuxedAccount sourceAccount;

     // the fee the sourceAccount will pay
     uint32 fee;

     // sequence number to consume in the account
     SequenceNumber seqNum;

     // validity conditions
     Preconditions cond;

     Memo memo;

     Operation operations<MAX_OPS_PER_TX>;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     case 1:
         SorobanTransactionData sorobanData;
     }
     ext;
 };

func (*Transaction) DecodeFrom

func (s *Transaction) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Transaction) EncodeTo

func (s *Transaction) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*Transaction) ExtraSigners

func (tx *Transaction) ExtraSigners() []SignerKey

ExtraSigners extracts the extra signers (if any) from the transaction's Preconditions.

func (*Transaction) LedgerBounds

func (tx *Transaction) LedgerBounds() *LedgerBounds

LedgerBounds extracts the ledgerbounds (if any) from the transaction's Preconditions.

func (Transaction) MarshalBinary

func (s Transaction) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Transaction) MinSeqAge

func (tx *Transaction) MinSeqAge() *Duration

MinSeqAge extracts the min seq age (if any) from the transaction's Preconditions.

func (*Transaction) MinSeqLedgerGap

func (tx *Transaction) MinSeqLedgerGap() *Uint32

MinSeqLedgerGap extracts the min seq ledger gap (if any) from the transaction's Preconditions.

func (*Transaction) MinSeqNum

func (tx *Transaction) MinSeqNum() *SequenceNumber

MinSeqNum extracts the min seq number (if any) from the transaction's Preconditions.

func (*Transaction) TimeBounds

func (tx *Transaction) TimeBounds() *TimeBounds

TimeBounds extracts the timebounds (if any) from the transaction's Preconditions.

func (*Transaction) UnmarshalBinary

func (s *Transaction) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionEnvelope

type TransactionEnvelope struct {
	Type    EnvelopeType
	V0      *TransactionV0Envelope
	V1      *TransactionV1Envelope
	FeeBump *FeeBumpTransactionEnvelope
}

TransactionEnvelope is an XDR Union defines as:

union TransactionEnvelope switch (EnvelopeType type)
 {
 case ENVELOPE_TYPE_TX_V0:
     TransactionV0Envelope v0;
 case ENVELOPE_TYPE_TX:
     TransactionV1Envelope v1;
 case ENVELOPE_TYPE_TX_FEE_BUMP:
     FeeBumpTransactionEnvelope feeBump;
 };

func NewTransactionEnvelope

func NewTransactionEnvelope(aType EnvelopeType, value interface{}) (result TransactionEnvelope, err error)

NewTransactionEnvelope creates a new TransactionEnvelope.

func (TransactionEnvelope) ArmForSwitch

func (u TransactionEnvelope) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionEnvelope

func (*TransactionEnvelope) DecodeFrom

func (u *TransactionEnvelope) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionEnvelope) EncodeTo

func (u TransactionEnvelope) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionEnvelope) ExtraSigners

func (e TransactionEnvelope) ExtraSigners() []SignerKey

ExtraSigners returns the extra signers set in the transaction envelope. Note for fee bump transactions, ExtraSigners() returns the field from the inner transaction

func (TransactionEnvelope) Fee

func (e TransactionEnvelope) Fee() uint32

Fee returns the fee defined for the transaction envelope If the transaction envelope is for a fee bump transaction, Fee() returns the fee defined in the inner transaction

func (TransactionEnvelope) FeeBumpAccount

func (e TransactionEnvelope) FeeBumpAccount() MuxedAccount

FeeBumpAccount returns the account paying for the fee bump transaction

func (TransactionEnvelope) FeeBumpFee

func (e TransactionEnvelope) FeeBumpFee() int64

FeeBumpFee returns the fee defined for the fee bump transaction

func (TransactionEnvelope) FeeBumpSignatures

func (e TransactionEnvelope) FeeBumpSignatures() []DecoratedSignature

FeeBumpSignatures returns the list of signatures for the fee bump transaction

func (TransactionEnvelope) GetFeeBump

func (u TransactionEnvelope) GetFeeBump() (result FeeBumpTransactionEnvelope, ok bool)

GetFeeBump retrieves the FeeBump value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionEnvelope) GetV0

func (u TransactionEnvelope) GetV0() (result TransactionV0Envelope, ok bool)

GetV0 retrieves the V0 value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionEnvelope) GetV1

func (u TransactionEnvelope) GetV1() (result TransactionV1Envelope, ok bool)

GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionEnvelope) GoString

func (e TransactionEnvelope) GoString() string

GoString implements fmt.GoStringer.

func (TransactionEnvelope) IsFeeBump

func (e TransactionEnvelope) IsFeeBump() bool

IsFeeBump returns true if the transaction envelope is a fee bump transaction

func (TransactionEnvelope) LedgerBounds

func (e TransactionEnvelope) LedgerBounds() *LedgerBounds

LedgerBounds returns the ledger bounds set in the transaction envelope. Note for fee bump transactions, LedgerBounds() returns the ledger bounds of the inner transaction

func (TransactionEnvelope) MarshalBinary

func (s TransactionEnvelope) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionEnvelope) Memo

func (e TransactionEnvelope) Memo() Memo

Memo returns the memo set in the transaction envelope Note for fee bump transactions, Memo() returns the memo of the inner transaction

func (TransactionEnvelope) MinSeqAge

func (e TransactionEnvelope) MinSeqAge() *Duration

MinSeqAge returns the min seq age set in the transaction envelope. Note for fee bump transactions, MinSeqAge() returns the field from the inner transaction

func (TransactionEnvelope) MinSeqLedgerGap

func (e TransactionEnvelope) MinSeqLedgerGap() *Uint32

MinSeqLedgerGap returns the min seq ledger gap set in the transaction. envelope. Note for fee bump transactions, MinSeqLedgerGap() returns the field from the inner transaction

func (TransactionEnvelope) MinSeqNum

func (e TransactionEnvelope) MinSeqNum() *int64

MinSeqNum returns the minimum sequence number set in the transaction envelope

Note for fee bump transactions, MinSeqNum() returns the sequence number of the inner transaction

func (TransactionEnvelope) MustFeeBump

MustFeeBump retrieves the FeeBump value from the union, panicing if the value is not set.

func (TransactionEnvelope) MustV0

MustV0 retrieves the V0 value from the union, panicing if the value is not set.

func (TransactionEnvelope) MustV1

MustV1 retrieves the V1 value from the union, panicing if the value is not set.

func (TransactionEnvelope) Operations

func (e TransactionEnvelope) Operations() []Operation

Operations returns the operations set in the transaction envelope Note for fee bump transactions, Operations() returns the operations of the inner transaction

func (TransactionEnvelope) Preconditions

func (e TransactionEnvelope) Preconditions() Preconditions

Preconditions returns the preconditions on the transaction. If the transaction is a V0 envelope (aka before preconditions existed), this returns a new precondition (timebound if present, empty otherwise). If the transaction is a fee bump, it returns the preconditions of the *inner* transaction.

func (*TransactionEnvelope) Scan

func (t *TransactionEnvelope) Scan(src any) error

Scan reads from src into an TransactionEnvelope struct

func (TransactionEnvelope) SeqNum

func (e TransactionEnvelope) SeqNum() int64

SeqNum returns the sequence number set in the transaction envelope Note for fee bump transactions, SeqNum() returns the sequence number of the inner transaction

func (TransactionEnvelope) Signatures

func (e TransactionEnvelope) Signatures() []DecoratedSignature

Signatures returns the list of signatures included in the transaction envelope If the transaction envelope is for a fee bump transaction, Signatures() returns the signatures for the inner transaction

func (TransactionEnvelope) SourceAccount

func (e TransactionEnvelope) SourceAccount() MuxedAccount

SourceAccount returns the source account for the transaction If the transaction envelope is for a fee bump transaction, SourceAccount() returns the source account of the inner transaction

func (TransactionEnvelope) SwitchFieldName

func (u TransactionEnvelope) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (TransactionEnvelope) TimeBounds

func (e TransactionEnvelope) TimeBounds() *TimeBounds

TimeBounds returns the time bounds set in the transaction envelope Note for fee bump transactions, TimeBounds() returns the time bounds of the inner transaction

func (*TransactionEnvelope) UnmarshalBinary

func (s *TransactionEnvelope) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionExt

type TransactionExt struct {
	V           int32
	SorobanData *SorobanTransactionData
}

TransactionExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     case 1:
         SorobanTransactionData sorobanData;
     }

func NewTransactionExt

func NewTransactionExt(v int32, value interface{}) (result TransactionExt, err error)

NewTransactionExt creates a new TransactionExt.

func (TransactionExt) ArmForSwitch

func (u TransactionExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionExt

func (*TransactionExt) DecodeFrom

func (u *TransactionExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionExt) EncodeTo

func (u TransactionExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionExt) GetSorobanData

func (u TransactionExt) GetSorobanData() (result SorobanTransactionData, ok bool)

GetSorobanData retrieves the SorobanData value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionExt) MarshalBinary

func (s TransactionExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionExt) MustSorobanData

func (u TransactionExt) MustSorobanData() SorobanTransactionData

MustSorobanData retrieves the SorobanData value from the union, panicing if the value is not set.

func (TransactionExt) SwitchFieldName

func (u TransactionExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionExt) UnmarshalBinary

func (s *TransactionExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionHistoryEntry

type TransactionHistoryEntry struct {
	LedgerSeq Uint32
	TxSet     TransactionSet
	Ext       TransactionHistoryEntryExt
}

TransactionHistoryEntry is an XDR Struct defines as:

struct TransactionHistoryEntry
 {
     uint32 ledgerSeq;
     TransactionSet txSet;

     // when v != 0, txSet must be empty
     union switch (int v)
     {
     case 0:
         void;
     case 1:
         GeneralizedTransactionSet generalizedTxSet;
     }
     ext;
 };

func (*TransactionHistoryEntry) DecodeFrom

func (s *TransactionHistoryEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionHistoryEntry) EncodeTo

func (s *TransactionHistoryEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionHistoryEntry) MarshalBinary

func (s TransactionHistoryEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionHistoryEntry) UnmarshalBinary

func (s *TransactionHistoryEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionHistoryEntryExt

type TransactionHistoryEntryExt struct {
	V                int32
	GeneralizedTxSet *GeneralizedTransactionSet
}

TransactionHistoryEntryExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     case 1:
         GeneralizedTransactionSet generalizedTxSet;
     }

func NewTransactionHistoryEntryExt

func NewTransactionHistoryEntryExt(v int32, value interface{}) (result TransactionHistoryEntryExt, err error)

NewTransactionHistoryEntryExt creates a new TransactionHistoryEntryExt.

func (TransactionHistoryEntryExt) ArmForSwitch

func (u TransactionHistoryEntryExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionHistoryEntryExt

func (*TransactionHistoryEntryExt) DecodeFrom

func (u *TransactionHistoryEntryExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionHistoryEntryExt) EncodeTo

func (u TransactionHistoryEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionHistoryEntryExt) GetGeneralizedTxSet

func (u TransactionHistoryEntryExt) GetGeneralizedTxSet() (result GeneralizedTransactionSet, ok bool)

GetGeneralizedTxSet retrieves the GeneralizedTxSet value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionHistoryEntryExt) MarshalBinary

func (s TransactionHistoryEntryExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionHistoryEntryExt) MustGeneralizedTxSet

func (u TransactionHistoryEntryExt) MustGeneralizedTxSet() GeneralizedTransactionSet

MustGeneralizedTxSet retrieves the GeneralizedTxSet value from the union, panicing if the value is not set.

func (TransactionHistoryEntryExt) SwitchFieldName

func (u TransactionHistoryEntryExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionHistoryEntryExt) UnmarshalBinary

func (s *TransactionHistoryEntryExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionHistoryResultEntry

type TransactionHistoryResultEntry struct {
	LedgerSeq   Uint32
	TxResultSet TransactionResultSet
	Ext         TransactionHistoryResultEntryExt
}

TransactionHistoryResultEntry is an XDR Struct defines as:

struct TransactionHistoryResultEntry
 {
     uint32 ledgerSeq;
     TransactionResultSet txResultSet;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*TransactionHistoryResultEntry) DecodeFrom

func (s *TransactionHistoryResultEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionHistoryResultEntry) EncodeTo

func (s *TransactionHistoryResultEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionHistoryResultEntry) MarshalBinary

func (s TransactionHistoryResultEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionHistoryResultEntry) UnmarshalBinary

func (s *TransactionHistoryResultEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionHistoryResultEntryExt

type TransactionHistoryResultEntryExt struct {
	V int32
}

TransactionHistoryResultEntryExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewTransactionHistoryResultEntryExt

func NewTransactionHistoryResultEntryExt(v int32, value interface{}) (result TransactionHistoryResultEntryExt, err error)

NewTransactionHistoryResultEntryExt creates a new TransactionHistoryResultEntryExt.

func (TransactionHistoryResultEntryExt) ArmForSwitch

func (u TransactionHistoryResultEntryExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionHistoryResultEntryExt

func (*TransactionHistoryResultEntryExt) DecodeFrom

func (u *TransactionHistoryResultEntryExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionHistoryResultEntryExt) EncodeTo

func (u TransactionHistoryResultEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionHistoryResultEntryExt) MarshalBinary

func (s TransactionHistoryResultEntryExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionHistoryResultEntryExt) SwitchFieldName

func (u TransactionHistoryResultEntryExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionHistoryResultEntryExt) UnmarshalBinary

func (s *TransactionHistoryResultEntryExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionMeta

type TransactionMeta struct {
	V          int32
	Operations *[]OperationMeta
	V1         *TransactionMetaV1
	V2         *TransactionMetaV2
	V3         *TransactionMetaV3
}

TransactionMeta is an XDR Union defines as:

union TransactionMeta switch (int v)
 {
 case 0:
     OperationMeta operations<>;
 case 1:
     TransactionMetaV1 v1;
 case 2:
     TransactionMetaV2 v2;
 case 3:
     TransactionMetaV3 v3;
 };

func NewTransactionMeta

func NewTransactionMeta(v int32, value interface{}) (result TransactionMeta, err error)

NewTransactionMeta creates a new TransactionMeta.

func (TransactionMeta) ArmForSwitch

func (u TransactionMeta) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionMeta

func (*TransactionMeta) DecodeFrom

func (u *TransactionMeta) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionMeta) EncodeTo

func (u TransactionMeta) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*TransactionMeta) GetDiagnosticEvents

func (t *TransactionMeta) GetDiagnosticEvents() ([]DiagnosticEvent, error)

GetDiagnosticEvents returns all contract events emitted by a given operation.

func (TransactionMeta) GetOperations

func (u TransactionMeta) GetOperations() (result []OperationMeta, ok bool)

GetOperations retrieves the Operations value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionMeta) GetV1

func (u TransactionMeta) GetV1() (result TransactionMetaV1, ok bool)

GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionMeta) GetV2

func (u TransactionMeta) GetV2() (result TransactionMetaV2, ok bool)

GetV2 retrieves the V2 value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionMeta) GetV3

func (u TransactionMeta) GetV3() (result TransactionMetaV3, ok bool)

GetV3 retrieves the V3 value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionMeta) MarshalBinary

func (s TransactionMeta) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionMeta) MustOperations

func (u TransactionMeta) MustOperations() []OperationMeta

MustOperations retrieves the Operations value from the union, panicing if the value is not set.

func (TransactionMeta) MustV1

MustV1 retrieves the V1 value from the union, panicing if the value is not set.

func (TransactionMeta) MustV2

MustV2 retrieves the V2 value from the union, panicing if the value is not set.

func (TransactionMeta) MustV3

MustV3 retrieves the V3 value from the union, panicing if the value is not set.

func (*TransactionMeta) OperationsMeta

func (transactionMeta *TransactionMeta) OperationsMeta() []OperationMeta

Operations is a helper on TransactionMeta that returns operations meta from `TransactionMeta.Operations` or `TransactionMeta.V1.Operations`.

func (*TransactionMeta) Scan

func (t *TransactionMeta) Scan(src any) error

Scan reads from src into an TransactionMeta struct

func (TransactionMeta) SwitchFieldName

func (u TransactionMeta) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionMeta) UnmarshalBinary

func (s *TransactionMeta) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionMetaV1

type TransactionMetaV1 struct {
	TxChanges  LedgerEntryChanges
	Operations []OperationMeta
}

TransactionMetaV1 is an XDR Struct defines as:

struct TransactionMetaV1
 {
     LedgerEntryChanges txChanges; // tx level changes if any
     OperationMeta operations<>;   // meta for each operation
 };

func (*TransactionMetaV1) DecodeFrom

func (s *TransactionMetaV1) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionMetaV1) EncodeTo

func (s *TransactionMetaV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionMetaV1) MarshalBinary

func (s TransactionMetaV1) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionMetaV1) UnmarshalBinary

func (s *TransactionMetaV1) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionMetaV2

type TransactionMetaV2 struct {
	TxChangesBefore LedgerEntryChanges
	Operations      []OperationMeta
	TxChangesAfter  LedgerEntryChanges
}

TransactionMetaV2 is an XDR Struct defines as:

struct TransactionMetaV2
 {
     LedgerEntryChanges txChangesBefore; // tx level changes before operations
                                         // are applied if any
     OperationMeta operations<>;         // meta for each operation
     LedgerEntryChanges txChangesAfter;  // tx level changes after operations are
                                         // applied if any
 };

func (*TransactionMetaV2) DecodeFrom

func (s *TransactionMetaV2) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionMetaV2) EncodeTo

func (s *TransactionMetaV2) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionMetaV2) MarshalBinary

func (s TransactionMetaV2) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionMetaV2) UnmarshalBinary

func (s *TransactionMetaV2) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionMetaV3

type TransactionMetaV3 struct {
	Ext             ExtensionPoint
	TxChangesBefore LedgerEntryChanges
	Operations      []OperationMeta
	TxChangesAfter  LedgerEntryChanges
	SorobanMeta     *SorobanTransactionMeta
}

TransactionMetaV3 is an XDR Struct defines as:

struct TransactionMetaV3
 {
     ExtensionPoint ext;

     LedgerEntryChanges txChangesBefore;  // tx level changes before operations
                                          // are applied if any
     OperationMeta operations<>;          // meta for each operation
     LedgerEntryChanges txChangesAfter;   // tx level changes after operations are
                                          // applied if any
     SorobanTransactionMeta* sorobanMeta; // Soroban-specific meta (only for
                                          // Soroban transactions).
 };

func (*TransactionMetaV3) DecodeFrom

func (s *TransactionMetaV3) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionMetaV3) EncodeTo

func (s *TransactionMetaV3) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionMetaV3) MarshalBinary

func (s TransactionMetaV3) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionMetaV3) UnmarshalBinary

func (s *TransactionMetaV3) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionPhase

type TransactionPhase struct {
	V            int32
	V0Components *[]TxSetComponent
}

TransactionPhase is an XDR Union defines as:

union TransactionPhase switch (int v)
 {
 case 0:
     TxSetComponent v0Components<>;
 };

func NewTransactionPhase

func NewTransactionPhase(v int32, value interface{}) (result TransactionPhase, err error)

NewTransactionPhase creates a new TransactionPhase.

func (TransactionPhase) ArmForSwitch

func (u TransactionPhase) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionPhase

func (*TransactionPhase) DecodeFrom

func (u *TransactionPhase) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionPhase) EncodeTo

func (u TransactionPhase) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionPhase) GetV0Components

func (u TransactionPhase) GetV0Components() (result []TxSetComponent, ok bool)

GetV0Components retrieves the V0Components value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionPhase) MarshalBinary

func (s TransactionPhase) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionPhase) MustV0Components

func (u TransactionPhase) MustV0Components() []TxSetComponent

MustV0Components retrieves the V0Components value from the union, panicing if the value is not set.

func (TransactionPhase) SwitchFieldName

func (u TransactionPhase) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionPhase) UnmarshalBinary

func (s *TransactionPhase) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionResult

type TransactionResult struct {
	FeeCharged Int64
	Result     TransactionResultResult
	Ext        TransactionResultExt
}

TransactionResult is an XDR Struct defines as:

struct TransactionResult
 {
     int64 feeCharged; // actual fee charged for the transaction

     union switch (TransactionResultCode code)
     {
     case txFEE_BUMP_INNER_SUCCESS:
     case txFEE_BUMP_INNER_FAILED:
         InnerTransactionResultPair innerResultPair;
     case txSUCCESS:
     case txFAILED:
         OperationResult results<>;
     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:
     // case txFEE_BUMP_INNER_FAILED: handled above
     case txBAD_SPONSORSHIP:
     case txBAD_MIN_SEQ_AGE_OR_GAP:
     case txMALFORMED:
     case txSOROBAN_INVALID:
         void;
     }
     result;

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*TransactionResult) DecodeFrom

func (s *TransactionResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionResult) EncodeTo

func (s *TransactionResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionResult) ExtractBalanceID

func (r TransactionResult) ExtractBalanceID(opIndex int) (*ClaimableBalanceId, error)

ExtractBalanceID will parse the operation result at `opIndex` within the given `txResult`, returning the internal XDR structure for the claimable balance ID.

If the specified operation index does not point to a successful `CreateClaimableBalance` operation result, this function panics.

func (TransactionResult) ExtractBalanceIDHex

func (r TransactionResult) ExtractBalanceIDHex(opIndex int) (string, error)

ExtractBalanceIDHex works like `ExtractBalanceID`, but will return the hex encoding of the resulting value.

func (TransactionResult) InnerHash

func (r TransactionResult) InnerHash() Hash

InnerHash returns the hash of the inner transaction. This function can only be called on fee bump transactions.

func (TransactionResult) MarshalBinary

func (s TransactionResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionResult) OperationResults

func (r TransactionResult) OperationResults() ([]OperationResult, bool)

OperationResults returns the operation results for the transaction

func (*TransactionResult) Scan

func (t *TransactionResult) Scan(src any) error

Scan reads from src into an TransactionResult struct

func (TransactionResult) Successful

func (r TransactionResult) Successful() bool

Successful returns true if the transaction succeeded

func (*TransactionResult) UnmarshalBinary

func (s *TransactionResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionResultCode

type TransactionResultCode int32

TransactionResultCode is an XDR Enum defines as:

enum TransactionResultCode
 {
     txFEE_BUMP_INNER_SUCCESS = 1, // fee bump inner transaction succeeded
     txSUCCESS = 0,                // all operations succeeded

     txFAILED = -1, // one of the operations failed (none were applied)

     txTOO_EARLY = -2,         // ledger closeTime before minTime
     txTOO_LATE = -3,          // ledger closeTime after maxTime
     txMISSING_OPERATION = -4, // no operation was specified
     txBAD_SEQ = -5,           // sequence number does not match source account

     txBAD_AUTH = -6,             // too few valid signatures / wrong network
     txINSUFFICIENT_BALANCE = -7, // fee would bring account below reserve
     txNO_ACCOUNT = -8,           // source account not found
     txINSUFFICIENT_FEE = -9,     // fee is too small
     txBAD_AUTH_EXTRA = -10,      // unused signatures attached to transaction
     txINTERNAL_ERROR = -11,      // an unknown error occurred

     txNOT_SUPPORTED = -12,          // transaction type not supported
     txFEE_BUMP_INNER_FAILED = -13,  // fee bump inner transaction failed
     txBAD_SPONSORSHIP = -14,        // sponsorship not confirmed
     txBAD_MIN_SEQ_AGE_OR_GAP = -15, // minSeqAge or minSeqLedgerGap conditions not met
     txMALFORMED = -16,              // precondition is invalid
     txSOROBAN_INVALID = -17         // soroban-specific preconditions were not met
 };
const (
	TransactionResultCodeTxFeeBumpInnerSuccess TransactionResultCode = 1
	TransactionResultCodeTxSuccess             TransactionResultCode = 0
	TransactionResultCodeTxFailed              TransactionResultCode = -1
	TransactionResultCodeTxTooEarly            TransactionResultCode = -2
	TransactionResultCodeTxTooLate             TransactionResultCode = -3
	TransactionResultCodeTxMissingOperation    TransactionResultCode = -4
	TransactionResultCodeTxBadSeq              TransactionResultCode = -5
	TransactionResultCodeTxBadAuth             TransactionResultCode = -6
	TransactionResultCodeTxInsufficientBalance TransactionResultCode = -7
	TransactionResultCodeTxNoAccount           TransactionResultCode = -8
	TransactionResultCodeTxInsufficientFee     TransactionResultCode = -9
	TransactionResultCodeTxBadAuthExtra        TransactionResultCode = -10
	TransactionResultCodeTxInternalError       TransactionResultCode = -11
	TransactionResultCodeTxNotSupported        TransactionResultCode = -12
	TransactionResultCodeTxFeeBumpInnerFailed  TransactionResultCode = -13
	TransactionResultCodeTxBadSponsorship      TransactionResultCode = -14
	TransactionResultCodeTxBadMinSeqAgeOrGap   TransactionResultCode = -15
	TransactionResultCodeTxMalformed           TransactionResultCode = -16
	TransactionResultCodeTxSorobanInvalid      TransactionResultCode = -17
)

func (*TransactionResultCode) DecodeFrom

func (e *TransactionResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionResultCode) EncodeTo

func (e TransactionResultCode) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionResultCode) MarshalBinary

func (s TransactionResultCode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionResultCode) String

func (e TransactionResultCode) String() string

String returns the name of `e`

func (*TransactionResultCode) UnmarshalBinary

func (s *TransactionResultCode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (TransactionResultCode) ValidEnum

func (e TransactionResultCode) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for TransactionResultCode

type TransactionResultExt

type TransactionResultExt struct {
	V int32
}

TransactionResultExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewTransactionResultExt

func NewTransactionResultExt(v int32, value interface{}) (result TransactionResultExt, err error)

NewTransactionResultExt creates a new TransactionResultExt.

func (TransactionResultExt) ArmForSwitch

func (u TransactionResultExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionResultExt

func (*TransactionResultExt) DecodeFrom

func (u *TransactionResultExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionResultExt) EncodeTo

func (u TransactionResultExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionResultExt) MarshalBinary

func (s TransactionResultExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionResultExt) SwitchFieldName

func (u TransactionResultExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionResultExt) UnmarshalBinary

func (s *TransactionResultExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionResultMeta

type TransactionResultMeta struct {
	Result            TransactionResultPair
	FeeProcessing     LedgerEntryChanges
	TxApplyProcessing TransactionMeta
}

TransactionResultMeta is an XDR Struct defines as:

struct TransactionResultMeta
 {
     TransactionResultPair result;
     LedgerEntryChanges feeProcessing;
     TransactionMeta txApplyProcessing;
 };

func (*TransactionResultMeta) DecodeFrom

func (s *TransactionResultMeta) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionResultMeta) EncodeTo

func (s *TransactionResultMeta) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionResultMeta) MarshalBinary

func (s TransactionResultMeta) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionResultMeta) UnmarshalBinary

func (s *TransactionResultMeta) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionResultPair

type TransactionResultPair struct {
	TransactionHash Hash
	Result          TransactionResult
}

TransactionResultPair is an XDR Struct defines as:

struct TransactionResultPair
 {
     Hash transactionHash;
     TransactionResult result; // result for the transaction
 };

func (*TransactionResultPair) DecodeFrom

func (s *TransactionResultPair) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionResultPair) EncodeTo

func (s *TransactionResultPair) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionResultPair) InnerHash

func (r TransactionResultPair) InnerHash() Hash

InnerHash returns the hash of the inner transaction. This function can only be called on fee bump transactions.

func (TransactionResultPair) MarshalBinary

func (s TransactionResultPair) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionResultPair) OperationResults

func (r TransactionResultPair) OperationResults() ([]OperationResult, bool)

OperationResults returns the operation results for the transaction

func (*TransactionResultPair) Scan

func (t *TransactionResultPair) Scan(src any) error

Scan reads from src into an TransactionResultPair struct

func (TransactionResultPair) Successful

func (r TransactionResultPair) Successful() bool

Successful returns true if the transaction succeeded

func (*TransactionResultPair) UnmarshalBinary

func (s *TransactionResultPair) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionResultResult

type TransactionResultResult struct {
	Code            TransactionResultCode
	InnerResultPair *InnerTransactionResultPair
	Results         *[]OperationResult
}

TransactionResultResult is an XDR NestedUnion defines as:

union switch (TransactionResultCode code)
     {
     case txFEE_BUMP_INNER_SUCCESS:
     case txFEE_BUMP_INNER_FAILED:
         InnerTransactionResultPair innerResultPair;
     case txSUCCESS:
     case txFAILED:
         OperationResult results<>;
     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:
     // case txFEE_BUMP_INNER_FAILED: handled above
     case txBAD_SPONSORSHIP:
     case txBAD_MIN_SEQ_AGE_OR_GAP:
     case txMALFORMED:
     case txSOROBAN_INVALID:
         void;
     }

func NewTransactionResultResult

func NewTransactionResultResult(code TransactionResultCode, value interface{}) (result TransactionResultResult, err error)

NewTransactionResultResult creates a new TransactionResultResult.

func (TransactionResultResult) ArmForSwitch

func (u TransactionResultResult) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionResultResult

func (*TransactionResultResult) DecodeFrom

func (u *TransactionResultResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionResultResult) EncodeTo

func (u TransactionResultResult) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionResultResult) GetInnerResultPair

func (u TransactionResultResult) GetInnerResultPair() (result InnerTransactionResultPair, ok bool)

GetInnerResultPair retrieves the InnerResultPair value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionResultResult) GetResults

func (u TransactionResultResult) GetResults() (result []OperationResult, ok bool)

GetResults retrieves the Results value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionResultResult) MarshalBinary

func (s TransactionResultResult) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionResultResult) MustInnerResultPair

func (u TransactionResultResult) MustInnerResultPair() InnerTransactionResultPair

MustInnerResultPair retrieves the InnerResultPair value from the union, panicing if the value is not set.

func (TransactionResultResult) MustResults

func (u TransactionResultResult) MustResults() []OperationResult

MustResults retrieves the Results value from the union, panicing if the value is not set.

func (TransactionResultResult) SwitchFieldName

func (u TransactionResultResult) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionResultResult) UnmarshalBinary

func (s *TransactionResultResult) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionResultSet

type TransactionResultSet struct {
	Results []TransactionResultPair
}

TransactionResultSet is an XDR Struct defines as:

struct TransactionResultSet
 {
     TransactionResultPair results<>;
 };

func (*TransactionResultSet) DecodeFrom

func (s *TransactionResultSet) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionResultSet) EncodeTo

func (s *TransactionResultSet) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionResultSet) MarshalBinary

func (s TransactionResultSet) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionResultSet) UnmarshalBinary

func (s *TransactionResultSet) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionSet

type TransactionSet struct {
	PreviousLedgerHash Hash
	Txs                []TransactionEnvelope
}

TransactionSet is an XDR Struct defines as:

struct TransactionSet
 {
     Hash previousLedgerHash;
     TransactionEnvelope txs<>;
 };

func (*TransactionSet) DecodeFrom

func (s *TransactionSet) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionSet) EncodeTo

func (s *TransactionSet) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionSet) MarshalBinary

func (s TransactionSet) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionSet) UnmarshalBinary

func (s *TransactionSet) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionSetV1

type TransactionSetV1 struct {
	PreviousLedgerHash Hash
	Phases             []TransactionPhase
}

TransactionSetV1 is an XDR Struct defines as:

struct TransactionSetV1
 {
     Hash previousLedgerHash;
     TransactionPhase phases<>;
 };

func (*TransactionSetV1) DecodeFrom

func (s *TransactionSetV1) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionSetV1) EncodeTo

func (s *TransactionSetV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionSetV1) MarshalBinary

func (s TransactionSetV1) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionSetV1) UnmarshalBinary

func (s *TransactionSetV1) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionSignaturePayload

type TransactionSignaturePayload struct {
	NetworkId         Hash
	TaggedTransaction TransactionSignaturePayloadTaggedTransaction
}

TransactionSignaturePayload is an XDR Struct defines as:

struct TransactionSignaturePayload
 {
     Hash networkId;
     union switch (EnvelopeType type)
     {
     // Backwards Compatibility: Use ENVELOPE_TYPE_TX to sign ENVELOPE_TYPE_TX_V0
     case ENVELOPE_TYPE_TX:
         Transaction tx;
     case ENVELOPE_TYPE_TX_FEE_BUMP:
         FeeBumpTransaction feeBump;
     }
     taggedTransaction;
 };

func (*TransactionSignaturePayload) DecodeFrom

func (s *TransactionSignaturePayload) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionSignaturePayload) EncodeTo

func (s *TransactionSignaturePayload) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionSignaturePayload) MarshalBinary

func (s TransactionSignaturePayload) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionSignaturePayload) UnmarshalBinary

func (s *TransactionSignaturePayload) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionSignaturePayloadTaggedTransaction

type TransactionSignaturePayloadTaggedTransaction struct {
	Type    EnvelopeType
	Tx      *Transaction
	FeeBump *FeeBumpTransaction
}

TransactionSignaturePayloadTaggedTransaction is an XDR NestedUnion defines as:

union switch (EnvelopeType type)
     {
     // Backwards Compatibility: Use ENVELOPE_TYPE_TX to sign ENVELOPE_TYPE_TX_V0
     case ENVELOPE_TYPE_TX:
         Transaction tx;
     case ENVELOPE_TYPE_TX_FEE_BUMP:
         FeeBumpTransaction feeBump;
     }

func NewTransactionSignaturePayloadTaggedTransaction

func NewTransactionSignaturePayloadTaggedTransaction(aType EnvelopeType, value interface{}) (result TransactionSignaturePayloadTaggedTransaction, err error)

NewTransactionSignaturePayloadTaggedTransaction creates a new TransactionSignaturePayloadTaggedTransaction.

func (TransactionSignaturePayloadTaggedTransaction) ArmForSwitch

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionSignaturePayloadTaggedTransaction

func (*TransactionSignaturePayloadTaggedTransaction) DecodeFrom

func (u *TransactionSignaturePayloadTaggedTransaction) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionSignaturePayloadTaggedTransaction) EncodeTo

func (u TransactionSignaturePayloadTaggedTransaction) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionSignaturePayloadTaggedTransaction) GetFeeBump

GetFeeBump retrieves the FeeBump value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionSignaturePayloadTaggedTransaction) GetTx

GetTx retrieves the Tx value from the union, returning ok if the union's switch indicated the value is valid.

func (TransactionSignaturePayloadTaggedTransaction) MarshalBinary

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionSignaturePayloadTaggedTransaction) MustFeeBump

MustFeeBump retrieves the FeeBump value from the union, panicing if the value is not set.

func (TransactionSignaturePayloadTaggedTransaction) MustTx

MustTx retrieves the Tx value from the union, panicing if the value is not set.

func (TransactionSignaturePayloadTaggedTransaction) SwitchFieldName

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionSignaturePayloadTaggedTransaction) UnmarshalBinary

func (s *TransactionSignaturePayloadTaggedTransaction) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionV0

type TransactionV0 struct {
	SourceAccountEd25519 Uint256
	Fee                  Uint32
	SeqNum               SequenceNumber
	TimeBounds           *TimeBounds
	Memo                 Memo
	Operations           []Operation `xdrmaxsize:"100"`
	Ext                  TransactionV0Ext
}

TransactionV0 is an XDR Struct defines as:

struct TransactionV0
 {
     uint256 sourceAccountEd25519;
     uint32 fee;
     SequenceNumber seqNum;
     TimeBounds* timeBounds;
     Memo memo;
     Operation operations<MAX_OPS_PER_TX>;
     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*TransactionV0) DecodeFrom

func (s *TransactionV0) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionV0) EncodeTo

func (s *TransactionV0) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionV0) MarshalBinary

func (s TransactionV0) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionV0) UnmarshalBinary

func (s *TransactionV0) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionV0Envelope

type TransactionV0Envelope struct {
	Tx         TransactionV0
	Signatures []DecoratedSignature `xdrmaxsize:"20"`
}

TransactionV0Envelope is an XDR Struct defines as:

struct TransactionV0Envelope
 {
     TransactionV0 tx;
     /* Each decorated signature is a signature over the SHA256 hash of
      * a TransactionSignaturePayload */
     DecoratedSignature signatures<20>;
 };

func (*TransactionV0Envelope) DecodeFrom

func (s *TransactionV0Envelope) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionV0Envelope) EncodeTo

func (s *TransactionV0Envelope) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionV0Envelope) MarshalBinary

func (s TransactionV0Envelope) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionV0Envelope) UnmarshalBinary

func (s *TransactionV0Envelope) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionV0Ext

type TransactionV0Ext struct {
	V int32
}

TransactionV0Ext is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewTransactionV0Ext

func NewTransactionV0Ext(v int32, value interface{}) (result TransactionV0Ext, err error)

NewTransactionV0Ext creates a new TransactionV0Ext.

func (TransactionV0Ext) ArmForSwitch

func (u TransactionV0Ext) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionV0Ext

func (*TransactionV0Ext) DecodeFrom

func (u *TransactionV0Ext) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TransactionV0Ext) EncodeTo

func (u TransactionV0Ext) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionV0Ext) MarshalBinary

func (s TransactionV0Ext) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TransactionV0Ext) SwitchFieldName

func (u TransactionV0Ext) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TransactionV0Ext) UnmarshalBinary

func (s *TransactionV0Ext) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TransactionV1Envelope

type TransactionV1Envelope struct {
	Tx         Transaction
	Signatures []DecoratedSignature `xdrmaxsize:"20"`
}

TransactionV1Envelope is an XDR Struct defines as:

struct TransactionV1Envelope
 {
     Transaction tx;
     /* Each decorated signature is a signature over the SHA256 hash of
      * a TransactionSignaturePayload */
     DecoratedSignature signatures<20>;
 };

func (*TransactionV1Envelope) DecodeFrom

func (s *TransactionV1Envelope) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TransactionV1Envelope) EncodeTo

func (s *TransactionV1Envelope) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TransactionV1Envelope) MarshalBinary

func (s TransactionV1Envelope) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TransactionV1Envelope) UnmarshalBinary

func (s *TransactionV1Envelope) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrieIndex

type TrieIndex struct {
	Version Uint32
	Root    TrieNode
}

TrieIndex is an XDR Struct defines as:

struct TrieIndex {
     uint32 version_; // goxdr gives an error if we simply use "version" as an identifier
     TrieNode root;
 };

func (*TrieIndex) DecodeFrom

func (s *TrieIndex) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TrieIndex) EncodeTo

func (s *TrieIndex) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrieIndex) MarshalBinary

func (s TrieIndex) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TrieIndex) UnmarshalBinary

func (s *TrieIndex) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrieNode

type TrieNode struct {
	Prefix   Value
	Value    Value
	Children []TrieNodeChild
}

TrieNode is an XDR Struct defines as:

struct TrieNode {
     Value prefix;
     Value value;
     TrieNodeChild children<>;
 };

func (*TrieNode) DecodeFrom

func (s *TrieNode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TrieNode) EncodeTo

func (s *TrieNode) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrieNode) MarshalBinary

func (s TrieNode) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TrieNode) UnmarshalBinary

func (s *TrieNode) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrieNodeChild

type TrieNodeChild struct {
	Key  [1]byte `xdrmaxsize:"1"`
	Node TrieNode
}

TrieNodeChild is an XDR Struct defines as:

struct TrieNodeChild {
     opaque key[1];
     TrieNode node;
 };

func (*TrieNodeChild) DecodeFrom

func (s *TrieNodeChild) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TrieNodeChild) EncodeTo

func (s *TrieNodeChild) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrieNodeChild) MarshalBinary

func (s TrieNodeChild) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TrieNodeChild) UnmarshalBinary

func (s *TrieNodeChild) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineAsset

type TrustLineAsset struct {
	Type            AssetType
	AlphaNum4       *AlphaNum4
	AlphaNum12      *AlphaNum12
	LiquidityPoolId *PoolId
}

TrustLineAsset is an XDR Union defines as:

union TrustLineAsset switch (AssetType type)
 {
 case ASSET_TYPE_NATIVE: // Not credit
     void;

 case ASSET_TYPE_CREDIT_ALPHANUM4:
     AlphaNum4 alphaNum4;

 case ASSET_TYPE_CREDIT_ALPHANUM12:
     AlphaNum12 alphaNum12;

 case ASSET_TYPE_POOL_SHARE:
     PoolID liquidityPoolID;

     // add other asset types here in the future
 };

func NewTrustLineAsset

func NewTrustLineAsset(aType AssetType, value interface{}) (result TrustLineAsset, err error)

NewTrustLineAsset creates a new TrustLineAsset.

func (TrustLineAsset) ArmForSwitch

func (u TrustLineAsset) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TrustLineAsset

func (*TrustLineAsset) DecodeFrom

func (u *TrustLineAsset) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TrustLineAsset) EncodeTo

func (u TrustLineAsset) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrustLineAsset) Equals

func (a TrustLineAsset) Equals(other TrustLineAsset) bool

func (TrustLineAsset) Extract

func (a TrustLineAsset) Extract(typ interface{}, code interface{}, issuer interface{}) error

MustExtract behaves as Extract, but panics if an error occurs.

func (TrustLineAsset) GetAlphaNum12

func (u TrustLineAsset) GetAlphaNum12() (result AlphaNum12, ok bool)

GetAlphaNum12 retrieves the AlphaNum12 value from the union, returning ok if the union's switch indicated the value is valid.

func (TrustLineAsset) GetAlphaNum4

func (u TrustLineAsset) GetAlphaNum4() (result AlphaNum4, ok bool)

GetAlphaNum4 retrieves the AlphaNum4 value from the union, returning ok if the union's switch indicated the value is valid.

func (TrustLineAsset) GetLiquidityPoolId

func (u TrustLineAsset) GetLiquidityPoolId() (result PoolId, ok bool)

GetLiquidityPoolId retrieves the LiquidityPoolId value from the union, returning ok if the union's switch indicated the value is valid.

func (TrustLineAsset) MarshalBinary

func (s TrustLineAsset) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TrustLineAsset) MustAlphaNum12

func (u TrustLineAsset) MustAlphaNum12() AlphaNum12

MustAlphaNum12 retrieves the AlphaNum12 value from the union, panicing if the value is not set.

func (TrustLineAsset) MustAlphaNum4

func (u TrustLineAsset) MustAlphaNum4() AlphaNum4

MustAlphaNum4 retrieves the AlphaNum4 value from the union, panicing if the value is not set.

func (TrustLineAsset) MustExtract

func (a TrustLineAsset) MustExtract(typ interface{}, code interface{}, issuer interface{})

MustExtract behaves as Extract, but panics if an error occurs.

func (TrustLineAsset) MustLiquidityPoolId

func (u TrustLineAsset) MustLiquidityPoolId() PoolId

MustLiquidityPoolId retrieves the LiquidityPoolId value from the union, panicing if the value is not set.

func (TrustLineAsset) SwitchFieldName

func (u TrustLineAsset) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (TrustLineAsset) ToAsset

func (tla TrustLineAsset) ToAsset() Asset

ToAsset converts TrustLineAsset to Asset. Panics on type other than AssetTypeAssetTypeNative, AssetTypeAssetTypeCreditAlphanum4 or AssetTypeAssetTypeCreditAlphanum12.

func (*TrustLineAsset) UnmarshalBinary

func (s *TrustLineAsset) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineEntry

type TrustLineEntry struct {
	AccountId AccountId
	Asset     TrustLineAsset
	Balance   Int64
	Limit     Int64
	Flags     Uint32
	Ext       TrustLineEntryExt
}

TrustLineEntry is an XDR Struct defines as:

struct TrustLineEntry
 {
     AccountID accountID;  // account this trustline belongs to
     TrustLineAsset asset; // type of asset (with issuer)
     int64 balance;        // how much of this asset the user has.
                           // Asset defines the unit for this;

     int64 limit;  // balance cannot be above this
     uint32 flags; // see TrustLineFlags

     // reserved for future use
     union switch (int v)
     {
     case 0:
         void;
     case 1:
         struct
         {
             Liabilities liabilities;

             union switch (int v)
             {
             case 0:
                 void;
             case 2:
                 TrustLineEntryExtensionV2 v2;
             }
             ext;
         } v1;
     }
     ext;
 };

func (*TrustLineEntry) DecodeFrom

func (s *TrustLineEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TrustLineEntry) EncodeTo

func (s *TrustLineEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (*TrustLineEntry) Liabilities

func (trustLine *TrustLineEntry) Liabilities() Liabilities

Liabilities returns TrustLineEntry's liabilities

func (TrustLineEntry) MarshalBinary

func (s TrustLineEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TrustLineEntry) UnmarshalBinary

func (s *TrustLineEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineEntryExt

type TrustLineEntryExt struct {
	V  int32
	V1 *TrustLineEntryV1
}

TrustLineEntryExt is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     case 1:
         struct
         {
             Liabilities liabilities;

             union switch (int v)
             {
             case 0:
                 void;
             case 2:
                 TrustLineEntryExtensionV2 v2;
             }
             ext;
         } v1;
     }

func NewTrustLineEntryExt

func NewTrustLineEntryExt(v int32, value interface{}) (result TrustLineEntryExt, err error)

NewTrustLineEntryExt creates a new TrustLineEntryExt.

func (TrustLineEntryExt) ArmForSwitch

func (u TrustLineEntryExt) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TrustLineEntryExt

func (*TrustLineEntryExt) DecodeFrom

func (u *TrustLineEntryExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TrustLineEntryExt) EncodeTo

func (u TrustLineEntryExt) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrustLineEntryExt) GetV1

func (u TrustLineEntryExt) GetV1() (result TrustLineEntryV1, ok bool)

GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.

func (TrustLineEntryExt) MarshalBinary

func (s TrustLineEntryExt) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TrustLineEntryExt) MustV1

MustV1 retrieves the V1 value from the union, panicing if the value is not set.

func (TrustLineEntryExt) SwitchFieldName

func (u TrustLineEntryExt) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TrustLineEntryExt) UnmarshalBinary

func (s *TrustLineEntryExt) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineEntryExtensionV2

type TrustLineEntryExtensionV2 struct {
	LiquidityPoolUseCount Int32
	Ext                   TrustLineEntryExtensionV2Ext
}

TrustLineEntryExtensionV2 is an XDR Struct defines as:

struct TrustLineEntryExtensionV2
 {
     int32 liquidityPoolUseCount;

     union switch (int v)
     {
     case 0:
         void;
     }
     ext;
 };

func (*TrustLineEntryExtensionV2) DecodeFrom

func (s *TrustLineEntryExtensionV2) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TrustLineEntryExtensionV2) EncodeTo

func (s *TrustLineEntryExtensionV2) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrustLineEntryExtensionV2) MarshalBinary

func (s TrustLineEntryExtensionV2) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TrustLineEntryExtensionV2) UnmarshalBinary

func (s *TrustLineEntryExtensionV2) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineEntryExtensionV2Ext

type TrustLineEntryExtensionV2Ext struct {
	V int32
}

TrustLineEntryExtensionV2Ext is an XDR NestedUnion defines as:

union switch (int v)
     {
     case 0:
         void;
     }

func NewTrustLineEntryExtensionV2Ext

func NewTrustLineEntryExtensionV2Ext(v int32, value interface{}) (result TrustLineEntryExtensionV2Ext, err error)

NewTrustLineEntryExtensionV2Ext creates a new TrustLineEntryExtensionV2Ext.

func (TrustLineEntryExtensionV2Ext) ArmForSwitch

func (u TrustLineEntryExtensionV2Ext) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TrustLineEntryExtensionV2Ext

func (*TrustLineEntryExtensionV2Ext) DecodeFrom

func (u *TrustLineEntryExtensionV2Ext) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TrustLineEntryExtensionV2Ext) EncodeTo

func (u TrustLineEntryExtensionV2Ext) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrustLineEntryExtensionV2Ext) MarshalBinary

func (s TrustLineEntryExtensionV2Ext) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TrustLineEntryExtensionV2Ext) SwitchFieldName

func (u TrustLineEntryExtensionV2Ext) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TrustLineEntryExtensionV2Ext) UnmarshalBinary

func (s *TrustLineEntryExtensionV2Ext) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineEntryV1

type TrustLineEntryV1 struct {
	Liabilities Liabilities
	Ext         TrustLineEntryV1Ext
}

TrustLineEntryV1 is an XDR NestedStruct defines as:

struct
         {
             Liabilities liabilities;

             union switch (int v)
             {
             case 0:
                 void;
             case 2:
                 TrustLineEntryExtensionV2 v2;
             }
             ext;
         }

func (*TrustLineEntryV1) DecodeFrom

func (s *TrustLineEntryV1) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TrustLineEntryV1) EncodeTo

func (s *TrustLineEntryV1) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrustLineEntryV1) MarshalBinary

func (s TrustLineEntryV1) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TrustLineEntryV1) UnmarshalBinary

func (s *TrustLineEntryV1) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineEntryV1Ext

type TrustLineEntryV1Ext struct {
	V  int32
	V2 *TrustLineEntryExtensionV2
}

TrustLineEntryV1Ext is an XDR NestedUnion defines as:

union switch (int v)
             {
             case 0:
                 void;
             case 2:
                 TrustLineEntryExtensionV2 v2;
             }

func NewTrustLineEntryV1Ext

func NewTrustLineEntryV1Ext(v int32, value interface{}) (result TrustLineEntryV1Ext, err error)

NewTrustLineEntryV1Ext creates a new TrustLineEntryV1Ext.

func (TrustLineEntryV1Ext) ArmForSwitch

func (u TrustLineEntryV1Ext) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TrustLineEntryV1Ext

func (*TrustLineEntryV1Ext) DecodeFrom

func (u *TrustLineEntryV1Ext) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TrustLineEntryV1Ext) EncodeTo

func (u TrustLineEntryV1Ext) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrustLineEntryV1Ext) GetV2

func (u TrustLineEntryV1Ext) GetV2() (result TrustLineEntryExtensionV2, ok bool)

GetV2 retrieves the V2 value from the union, returning ok if the union's switch indicated the value is valid.

func (TrustLineEntryV1Ext) MarshalBinary

func (s TrustLineEntryV1Ext) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TrustLineEntryV1Ext) MustV2

MustV2 retrieves the V2 value from the union, panicing if the value is not set.

func (TrustLineEntryV1Ext) SwitchFieldName

func (u TrustLineEntryV1Ext) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TrustLineEntryV1Ext) UnmarshalBinary

func (s *TrustLineEntryV1Ext) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TrustLineFlags

type TrustLineFlags int32

TrustLineFlags is an XDR Enum defines as:

enum TrustLineFlags
 {
     // issuer has authorized account to perform transactions with its credit
     AUTHORIZED_FLAG = 1,
     // issuer has authorized account to maintain and reduce liabilities for its
     // credit
     AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG = 2,
     // issuer has specified that it may clawback its credit, and that claimable
     // balances created with its credit may also be clawed back
     TRUSTLINE_CLAWBACK_ENABLED_FLAG = 4
 };
const (
	TrustLineFlagsAuthorizedFlag                      TrustLineFlags = 1
	TrustLineFlagsAuthorizedToMaintainLiabilitiesFlag TrustLineFlags = 2
	TrustLineFlagsTrustlineClawbackEnabledFlag        TrustLineFlags = 4
)

func (*TrustLineFlags) DecodeFrom

func (e *TrustLineFlags) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TrustLineFlags) EncodeTo

func (e TrustLineFlags) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TrustLineFlags) IsAuthorized

func (e TrustLineFlags) IsAuthorized() bool

IsAuthorized returns true if issuer has authorized account to perform transactions with its credit

func (TrustLineFlags) IsAuthorizedToMaintainLiabilitiesFlag

func (e TrustLineFlags) IsAuthorizedToMaintainLiabilitiesFlag() bool

IsAuthorizedToMaintainLiabilitiesFlag returns true if the issuer has authorized the account to maintain and reduce liabilities for its credit

func (TrustLineFlags) IsClawbackEnabledFlag

func (e TrustLineFlags) IsClawbackEnabledFlag() bool

IsClawbackEnabledFlag returns true if the issuer has authorized the account to claw assets back

func (TrustLineFlags) MarshalBinary

func (s TrustLineFlags) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TrustLineFlags) String

func (e TrustLineFlags) String() string

String returns the name of `e`

func (*TrustLineFlags) UnmarshalBinary

func (s *TrustLineFlags) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (TrustLineFlags) ValidEnum

func (e TrustLineFlags) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for TrustLineFlags

type TtlEntry

type TtlEntry struct {
	KeyHash            Hash
	LiveUntilLedgerSeq Uint32
}

TtlEntry is an XDR Struct defines as:

struct TTLEntry {
     // Hash of the LedgerKey that is associated with this TTLEntry
     Hash keyHash;
     uint32 liveUntilLedgerSeq;
 };

func (*TtlEntry) DecodeFrom

func (s *TtlEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TtlEntry) EncodeTo

func (s *TtlEntry) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TtlEntry) MarshalBinary

func (s TtlEntry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TtlEntry) UnmarshalBinary

func (s *TtlEntry) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TxAdvertVector

type TxAdvertVector []Hash

TxAdvertVector is an XDR Typedef defines as:

typedef Hash TxAdvertVector<TX_ADVERT_VECTOR_MAX_SIZE>;

func (*TxAdvertVector) DecodeFrom

func (s *TxAdvertVector) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TxAdvertVector) EncodeTo

func (s TxAdvertVector) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TxAdvertVector) MarshalBinary

func (s TxAdvertVector) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TxAdvertVector) UnmarshalBinary

func (s *TxAdvertVector) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (TxAdvertVector) XDRMaxSize

func (e TxAdvertVector) XDRMaxSize() int

XDRMaxSize implements the Sized interface for TxAdvertVector

type TxDemandVector

type TxDemandVector []Hash

TxDemandVector is an XDR Typedef defines as:

typedef Hash TxDemandVector<TX_DEMAND_VECTOR_MAX_SIZE>;

func (*TxDemandVector) DecodeFrom

func (s *TxDemandVector) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TxDemandVector) EncodeTo

func (s TxDemandVector) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TxDemandVector) MarshalBinary

func (s TxDemandVector) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TxDemandVector) UnmarshalBinary

func (s *TxDemandVector) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (TxDemandVector) XDRMaxSize

func (e TxDemandVector) XDRMaxSize() int

XDRMaxSize implements the Sized interface for TxDemandVector

type TxSetComponent

type TxSetComponent struct {
	Type                  TxSetComponentType
	TxsMaybeDiscountedFee *TxSetComponentTxsMaybeDiscountedFee
}

TxSetComponent is an XDR Union defines as:

union TxSetComponent switch (TxSetComponentType type)
 {
 case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE:
   struct
   {
     int64* baseFee;
     TransactionEnvelope txs<>;
   } txsMaybeDiscountedFee;
 };

func NewTxSetComponent

func NewTxSetComponent(aType TxSetComponentType, value interface{}) (result TxSetComponent, err error)

NewTxSetComponent creates a new TxSetComponent.

func (TxSetComponent) ArmForSwitch

func (u TxSetComponent) ArmForSwitch(sw int32) (string, bool)

ArmForSwitch returns which field name should be used for storing the value for an instance of TxSetComponent

func (*TxSetComponent) DecodeFrom

func (u *TxSetComponent) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TxSetComponent) EncodeTo

func (u TxSetComponent) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TxSetComponent) GetTxsMaybeDiscountedFee

func (u TxSetComponent) GetTxsMaybeDiscountedFee() (result TxSetComponentTxsMaybeDiscountedFee, ok bool)

GetTxsMaybeDiscountedFee retrieves the TxsMaybeDiscountedFee value from the union, returning ok if the union's switch indicated the value is valid.

func (TxSetComponent) MarshalBinary

func (s TxSetComponent) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TxSetComponent) MustTxsMaybeDiscountedFee

func (u TxSetComponent) MustTxsMaybeDiscountedFee() TxSetComponentTxsMaybeDiscountedFee

MustTxsMaybeDiscountedFee retrieves the TxsMaybeDiscountedFee value from the union, panicing if the value is not set.

func (TxSetComponent) SwitchFieldName

func (u TxSetComponent) SwitchFieldName() string

SwitchFieldName returns the field name in which this union's discriminant is stored

func (*TxSetComponent) UnmarshalBinary

func (s *TxSetComponent) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TxSetComponentTxsMaybeDiscountedFee

type TxSetComponentTxsMaybeDiscountedFee struct {
	BaseFee *Int64
	Txs     []TransactionEnvelope
}

TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defines as:

struct
   {
     int64* baseFee;
     TransactionEnvelope txs<>;
   }

func (*TxSetComponentTxsMaybeDiscountedFee) DecodeFrom

func (s *TxSetComponentTxsMaybeDiscountedFee) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*TxSetComponentTxsMaybeDiscountedFee) EncodeTo

func (s *TxSetComponentTxsMaybeDiscountedFee) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TxSetComponentTxsMaybeDiscountedFee) MarshalBinary

func (s TxSetComponentTxsMaybeDiscountedFee) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*TxSetComponentTxsMaybeDiscountedFee) UnmarshalBinary

func (s *TxSetComponentTxsMaybeDiscountedFee) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type TxSetComponentType

type TxSetComponentType int32

TxSetComponentType is an XDR Enum defines as:

enum TxSetComponentType
 {
   // txs with effective fee <= bid derived from a base fee (if any).
   // If base fee is not specified, no discount is applied.
   TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE = 0
 };
const (
	TxSetComponentTypeTxsetCompTxsMaybeDiscountedFee TxSetComponentType = 0
)

func (*TxSetComponentType) DecodeFrom

func (e *TxSetComponentType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (TxSetComponentType) EncodeTo

func (e TxSetComponentType) EncodeTo(enc *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (TxSetComponentType) MarshalBinary

func (s TxSetComponentType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (TxSetComponentType) String

func (e TxSetComponentType) String() string

String returns the name of `e`

func (*TxSetComponentType) UnmarshalBinary

func (s *TxSetComponentType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (TxSetComponentType) ValidEnum

func (e TxSetComponentType) ValidEnum(v int32) bool

ValidEnum validates a proposed value for this enum. Implements the Enum interface for TxSetComponentType

type UInt128Parts

type UInt128Parts struct {
	Hi Uint64
	Lo Uint64
}

UInt128Parts is an XDR Struct defines as:

struct UInt128Parts {
     uint64 hi;
     uint64 lo;
 };

func (*UInt128Parts) DecodeFrom

func (s *UInt128Parts) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*UInt128Parts) EncodeTo

func (s *UInt128Parts) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (UInt128Parts) MarshalBinary

func (s UInt128Parts) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*UInt128Parts) UnmarshalBinary

func (s *UInt128Parts) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type UInt256Parts

type UInt256Parts struct {
	HiHi Uint64
	HiLo Uint64
	LoHi Uint64
	LoLo Uint64
}

UInt256Parts is an XDR Struct defines as:

struct UInt256Parts {
     uint64 hi_hi;
     uint64 hi_lo;
     uint64 lo_hi;
     uint64 lo_lo;
 };

func (*UInt256Parts) DecodeFrom

func (s *UInt256Parts) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*UInt256Parts) EncodeTo

func (s *UInt256Parts) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (UInt256Parts) MarshalBinary

func (s UInt256Parts) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*UInt256Parts) UnmarshalBinary

func (s *UInt256Parts) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Uint256

type Uint256 [32]byte

Uint256 is an XDR Typedef defines as:

typedef opaque uint256[32];

func (*Uint256) DecodeFrom

func (s *Uint256) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*Uint256) EncodeTo

func (s *Uint256) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Uint256) Equals

func (s Uint256) Equals(o Uint256) bool

func (Uint256) MarshalBinary

func (s Uint256) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (Uint256) String

func (u Uint256) String() string

String returns a display friendly form of the uint256

func (*Uint256) UnmarshalBinary

func (s *Uint256) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (Uint256) XDRMaxSize

func (e Uint256) XDRMaxSize() int

XDRMaxSize implements the Sized interface for Uint256

type Uint32

type Uint32 uint32

Uint32 is an XDR Typedef defines as:

typedef unsigned int uint32;

func (*Uint32) DecodeFrom

func (s *Uint32) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Uint32) EncodeTo

func (s Uint32) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Uint32) GoString

func (u Uint32) GoString() string

GoString prints Uint32 as decimal instead of hexadecimal numbers.

func (Uint32) MarshalBinary

func (s Uint32) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Uint32) UnmarshalBinary

func (s *Uint32) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Uint64

type Uint64 uint64

Uint64 is an XDR Typedef defines as:

typedef unsigned hyper uint64;

func (*Uint64) DecodeFrom

func (s *Uint64) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Uint64) EncodeTo

func (s Uint64) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Uint64) MarshalBinary

func (s Uint64) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Uint64) UnmarshalBinary

func (s *Uint64) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type UpgradeEntryMeta

type UpgradeEntryMeta struct {
	Upgrade LedgerUpgrade
	Changes LedgerEntryChanges
}

UpgradeEntryMeta is an XDR Struct defines as:

struct UpgradeEntryMeta
 {
     LedgerUpgrade upgrade;
     LedgerEntryChanges changes;
 };

func (*UpgradeEntryMeta) DecodeFrom

func (s *UpgradeEntryMeta) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (*UpgradeEntryMeta) EncodeTo

func (s *UpgradeEntryMeta) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (UpgradeEntryMeta) MarshalBinary

func (s UpgradeEntryMeta) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*UpgradeEntryMeta) UnmarshalBinary

func (s *UpgradeEntryMeta) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type UpgradeType

type UpgradeType []byte

UpgradeType is an XDR Typedef defines as:

typedef opaque UpgradeType<128>;

func (*UpgradeType) DecodeFrom

func (s *UpgradeType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (UpgradeType) EncodeTo

func (s UpgradeType) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (UpgradeType) MarshalBinary

func (s UpgradeType) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*UpgradeType) UnmarshalBinary

func (s *UpgradeType) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (UpgradeType) XDRMaxSize

func (e UpgradeType) XDRMaxSize() int

XDRMaxSize implements the Sized interface for UpgradeType

type Value

type Value []byte

Value is an XDR Typedef defines as:

typedef opaque Value<>;

func (*Value) DecodeFrom

func (s *Value) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)

DecodeFrom decodes this value using the Decoder.

func (Value) EncodeTo

func (s Value) EncodeTo(e *xdr.Encoder) error

EncodeTo encodes this value using the Encoder.

func (Value) MarshalBinary

func (s Value) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Value) UnmarshalBinary

func (s *Value) UnmarshalBinary(inp []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL