Documentation ¶
Overview ¶
Package xdr contains the generated code for parsing the xdr structures used for stellar.
Package xdr is generated from:
Stellar-SCP.x Stellar-ledger-entries.x Stellar-ledger.x Stellar-overlay.x Stellar-transaction.x Stellar-types.x
DO NOT EDIT or your changes may be overwritten
Index ¶
- Constants
- Variables
- func Marshal(w io.Writer, v interface{}) (int, error)
- func MarshalBase64(v interface{}) (string, error)
- func MarshalFramed(w io.Writer, v interface{}) error
- func MarshalHex(v interface{}) (string, error)
- func ReadFrameLength(r io.Reader) (uint32, error)
- func SafeUnmarshal(data []byte, dest interface{}) error
- func SafeUnmarshalBase64(data string, dest interface{}) error
- func SafeUnmarshalHex(data string, dest interface{}) error
- func Unmarshal(r io.Reader, v interface{}) (int, error)
- func UnmarshalFramed(r io.Reader, v interface{}) (int, error)
- type AccountEntry
- func (account *AccountEntry) Liabilities() Liabilities
- func (s AccountEntry) MarshalBinary() ([]byte, error)
- func (account *AccountEntry) MasterKeyWeight() byte
- func (account *AccountEntry) NumSponsored() Uint32
- func (account *AccountEntry) NumSponsoring() Uint32
- func (account *AccountEntry) SignerSponsoringIDs() []SponsorshipDescriptor
- func (account *AccountEntry) SignerSummary() map[string]int32
- func (account *AccountEntry) SponsorPerSigner() map[string]AccountId
- func (account *AccountEntry) ThresholdHigh() byte
- func (account *AccountEntry) ThresholdLow() byte
- func (account *AccountEntry) ThresholdMedium() byte
- func (s *AccountEntry) UnmarshalBinary(inp []byte) error
- type AccountEntryExt
- func (u AccountEntryExt) ArmForSwitch(sw int32) (string, bool)
- func (u AccountEntryExt) GetV1() (result AccountEntryExtensionV1, ok bool)
- func (s AccountEntryExt) MarshalBinary() ([]byte, error)
- func (u AccountEntryExt) MustV1() AccountEntryExtensionV1
- func (u AccountEntryExt) SwitchFieldName() string
- func (s *AccountEntryExt) UnmarshalBinary(inp []byte) error
- type AccountEntryExtensionV1
- type AccountEntryExtensionV1Ext
- func (u AccountEntryExtensionV1Ext) ArmForSwitch(sw int32) (string, bool)
- func (u AccountEntryExtensionV1Ext) GetV2() (result AccountEntryExtensionV2, ok bool)
- func (s AccountEntryExtensionV1Ext) MarshalBinary() ([]byte, error)
- func (u AccountEntryExtensionV1Ext) MustV2() AccountEntryExtensionV2
- func (u AccountEntryExtensionV1Ext) SwitchFieldName() string
- func (s *AccountEntryExtensionV1Ext) UnmarshalBinary(inp []byte) error
- type AccountEntryExtensionV2
- type AccountEntryExtensionV2Ext
- type AccountFlags
- func (accountFlags AccountFlags) IsAuthClawbackEnabled() bool
- func (accountFlags AccountFlags) IsAuthImmutable() bool
- func (accountFlags AccountFlags) IsAuthRequired() bool
- func (accountFlags AccountFlags) IsAuthRevocable() bool
- func (s AccountFlags) MarshalBinary() ([]byte, error)
- func (t *AccountFlags) Scan(src interface{}) error
- func (e AccountFlags) String() string
- func (s *AccountFlags) UnmarshalBinary(inp []byte) error
- func (e AccountFlags) ValidEnum(v int32) bool
- type AccountId
- func (aid AccountId) Address() string
- func (u AccountId) ArmForSwitch(sw int32) (string, bool)
- func (aid *AccountId) Equals(other AccountId) bool
- func (aid *AccountId) GetAddress() (string, error)
- func (u AccountId) GetEd25519() (result Uint256, ok bool)
- func (a AccountId) GoString() string
- func (aid *AccountId) LedgerKey() (ret LedgerKey)
- func (s AccountId) MarshalBinary() ([]byte, error)
- func (aid AccountId) MarshalBinaryCompress() ([]byte, error)
- func (u AccountId) MustEd25519() Uint256
- func (aid *AccountId) SetAddress(address string) error
- func (u AccountId) SwitchFieldName() string
- func (aid *AccountId) ToMuxedAccount() MuxedAccount
- func (s *AccountId) UnmarshalBinary(inp []byte) error
- type AccountMergeResult
- func (u AccountMergeResult) ArmForSwitch(sw int32) (string, bool)
- func (u AccountMergeResult) GetSourceAccountBalance() (result Int64, ok bool)
- func (s AccountMergeResult) MarshalBinary() ([]byte, error)
- func (u AccountMergeResult) MustSourceAccountBalance() Int64
- func (u AccountMergeResult) SwitchFieldName() string
- func (s *AccountMergeResult) UnmarshalBinary(inp []byte) error
- type AccountMergeResultCode
- type AllowTrustOp
- type AllowTrustResult
- type AllowTrustResultCode
- type AlphaNum12
- type AlphaNum4
- type Asset
- func BuildAsset(assetType, issuer, code string) (Asset, error)
- func BuildAssets(s string) ([]Asset, error)
- func MustNewCreditAsset(code string, issuer string) Asset
- func MustNewNativeAsset() Asset
- func NewAsset(aType AssetType, value interface{}) (result Asset, err error)
- func NewCreditAsset(code string, issuer string) (Asset, error)
- func (u Asset) ArmForSwitch(sw int32) (string, bool)
- func (a Asset) Equals(other Asset) bool
- func (a Asset) Extract(typ interface{}, code interface{}, issuer interface{}) error
- func (u Asset) GetAlphaNum12() (result AlphaNum12, ok bool)
- func (u Asset) GetAlphaNum4() (result AlphaNum4, ok bool)
- func (a Asset) GoString() string
- func (s Asset) MarshalBinary() ([]byte, error)
- func (a Asset) MarshalBinaryCompress() ([]byte, error)
- func (u Asset) MustAlphaNum12() AlphaNum12
- func (u Asset) MustAlphaNum4() AlphaNum4
- func (a Asset) MustExtract(typ interface{}, code interface{}, issuer interface{})
- func (t *Asset) Scan(src interface{}) error
- func (a *Asset) SetCredit(code string, issuer AccountId) error
- func (a *Asset) SetNative() error
- func (a Asset) String() string
- func (a Asset) StringCanonical() string
- func (u Asset) SwitchFieldName() string
- func (a *Asset) ToAssetCode(code string) (AssetCode, error)
- func (a Asset) ToChangeTrustAsset() ChangeTrustAsset
- func (a Asset) ToTrustLineAsset() TrustLineAsset
- func (s *Asset) UnmarshalBinary(inp []byte) error
- func (t Asset) Value() (driver.Value, error)
- type AssetCode
- func (u AssetCode) ArmForSwitch(sw int32) (string, bool)
- func (u AssetCode) GetAssetCode12() (result AssetCode12, ok bool)
- func (u AssetCode) GetAssetCode4() (result AssetCode4, ok bool)
- func (s AssetCode) GoString() string
- func (s AssetCode) MarshalBinary() ([]byte, error)
- func (u AssetCode) MustAssetCode12() AssetCode12
- func (u AssetCode) MustAssetCode4() AssetCode4
- func (u AssetCode) SwitchFieldName() string
- func (a AssetCode) ToAsset(issuer AccountId) (asset Asset)
- func (s *AssetCode) UnmarshalBinary(inp []byte) error
- type AssetCode12
- type AssetCode4
- type AssetType
- type Auth
- type AuthCert
- type AuthenticatedMessage
- func (u AuthenticatedMessage) ArmForSwitch(sw int32) (string, bool)
- func (u AuthenticatedMessage) GetV0() (result AuthenticatedMessageV0, ok bool)
- func (s AuthenticatedMessage) MarshalBinary() ([]byte, error)
- func (u AuthenticatedMessage) MustV0() AuthenticatedMessageV0
- func (u AuthenticatedMessage) SwitchFieldName() string
- func (s *AuthenticatedMessage) UnmarshalBinary(inp []byte) error
- type AuthenticatedMessageV0
- type BeginSponsoringFutureReservesOp
- type BeginSponsoringFutureReservesResult
- func (u BeginSponsoringFutureReservesResult) ArmForSwitch(sw int32) (string, bool)
- func (s BeginSponsoringFutureReservesResult) MarshalBinary() ([]byte, error)
- func (u BeginSponsoringFutureReservesResult) SwitchFieldName() string
- func (s *BeginSponsoringFutureReservesResult) UnmarshalBinary(inp []byte) error
- type BeginSponsoringFutureReservesResultCode
- func (s BeginSponsoringFutureReservesResultCode) MarshalBinary() ([]byte, error)
- func (e BeginSponsoringFutureReservesResultCode) String() string
- func (s *BeginSponsoringFutureReservesResultCode) UnmarshalBinary(inp []byte) error
- func (e BeginSponsoringFutureReservesResultCode) ValidEnum(v int32) bool
- type BucketEntry
- func (u BucketEntry) ArmForSwitch(sw int32) (string, bool)
- func (u BucketEntry) GetDeadEntry() (result LedgerKey, ok bool)
- func (u BucketEntry) GetLiveEntry() (result LedgerEntry, ok bool)
- func (u BucketEntry) GetMetaEntry() (result BucketMetadata, ok bool)
- func (s BucketEntry) MarshalBinary() ([]byte, error)
- func (u BucketEntry) MustDeadEntry() LedgerKey
- func (u BucketEntry) MustLiveEntry() LedgerEntry
- func (u BucketEntry) MustMetaEntry() BucketMetadata
- func (u BucketEntry) SwitchFieldName() string
- func (s *BucketEntry) UnmarshalBinary(inp []byte) error
- type BucketEntryType
- type BucketMetadata
- type BucketMetadataExt
- type BumpSequenceOp
- type BumpSequenceResult
- type BumpSequenceResultCode
- type ChangeTrustAsset
- func (u ChangeTrustAsset) ArmForSwitch(sw int32) (string, bool)
- func (u ChangeTrustAsset) GetAlphaNum12() (result AlphaNum12, ok bool)
- func (u ChangeTrustAsset) GetAlphaNum4() (result AlphaNum4, ok bool)
- func (u ChangeTrustAsset) GetLiquidityPool() (result LiquidityPoolParameters, ok bool)
- func (s ChangeTrustAsset) MarshalBinary() ([]byte, error)
- func (u ChangeTrustAsset) MustAlphaNum12() AlphaNum12
- func (u ChangeTrustAsset) MustAlphaNum4() AlphaNum4
- func (u ChangeTrustAsset) MustLiquidityPool() LiquidityPoolParameters
- func (u ChangeTrustAsset) SwitchFieldName() string
- func (tla ChangeTrustAsset) ToAsset() Asset
- func (s *ChangeTrustAsset) UnmarshalBinary(inp []byte) error
- type ChangeTrustOp
- type ChangeTrustResult
- type ChangeTrustResultCode
- type ClaimAtom
- func (a ClaimAtom) AmountBought() Int64
- func (a ClaimAtom) AmountSold() Int64
- func (u ClaimAtom) ArmForSwitch(sw int32) (string, bool)
- func (a ClaimAtom) AssetBought() Asset
- func (a ClaimAtom) AssetSold() Asset
- func (u ClaimAtom) GetOrderBook() (result ClaimOfferAtom, ok bool)
- func (u ClaimAtom) GetV0() (result ClaimOfferAtomV0, ok bool)
- func (s ClaimAtom) MarshalBinary() ([]byte, error)
- func (u ClaimAtom) MustOrderBook() ClaimOfferAtom
- func (u ClaimAtom) MustV0() ClaimOfferAtomV0
- func (a ClaimAtom) OfferId() Int64
- func (a ClaimAtom) SellerId() AccountId
- func (u ClaimAtom) SwitchFieldName() string
- func (s *ClaimAtom) UnmarshalBinary(inp []byte) error
- type ClaimAtomType
- type ClaimClaimableBalanceOp
- type ClaimClaimableBalanceResult
- type ClaimClaimableBalanceResultCode
- type ClaimOfferAtom
- type ClaimOfferAtomV0
- type ClaimPredicate
- func (u ClaimPredicate) ArmForSwitch(sw int32) (string, bool)
- func (u ClaimPredicate) GetAbsBefore() (result Int64, ok bool)
- func (u ClaimPredicate) GetAndPredicates() (result []ClaimPredicate, ok bool)
- func (u ClaimPredicate) GetNotPredicate() (result *ClaimPredicate, ok bool)
- func (u ClaimPredicate) GetOrPredicates() (result []ClaimPredicate, ok bool)
- func (u ClaimPredicate) GetRelBefore() (result Int64, ok bool)
- func (s ClaimPredicate) MarshalBinary() ([]byte, error)
- func (c ClaimPredicate) MarshalJSON() ([]byte, error)
- func (u ClaimPredicate) MustAbsBefore() Int64
- func (u ClaimPredicate) MustAndPredicates() []ClaimPredicate
- func (u ClaimPredicate) MustNotPredicate() *ClaimPredicate
- func (u ClaimPredicate) MustOrPredicates() []ClaimPredicate
- func (u ClaimPredicate) MustRelBefore() Int64
- func (c *ClaimPredicate) Scan(src interface{}) error
- func (u ClaimPredicate) SwitchFieldName() string
- func (s *ClaimPredicate) UnmarshalBinary(inp []byte) error
- func (c *ClaimPredicate) UnmarshalJSON(b []byte) error
- func (c ClaimPredicate) Value() (driver.Value, error)
- type ClaimPredicateType
- type ClaimableBalanceEntry
- type ClaimableBalanceEntryExt
- func (u ClaimableBalanceEntryExt) ArmForSwitch(sw int32) (string, bool)
- func (u ClaimableBalanceEntryExt) GetV1() (result ClaimableBalanceEntryExtensionV1, ok bool)
- func (s ClaimableBalanceEntryExt) MarshalBinary() ([]byte, error)
- func (u ClaimableBalanceEntryExt) MustV1() ClaimableBalanceEntryExtensionV1
- func (u ClaimableBalanceEntryExt) SwitchFieldName() string
- func (s *ClaimableBalanceEntryExt) UnmarshalBinary(inp []byte) error
- type ClaimableBalanceEntryExtensionV1
- type ClaimableBalanceEntryExtensionV1Ext
- func (u ClaimableBalanceEntryExtensionV1Ext) ArmForSwitch(sw int32) (string, bool)
- func (s ClaimableBalanceEntryExtensionV1Ext) MarshalBinary() ([]byte, error)
- func (u ClaimableBalanceEntryExtensionV1Ext) SwitchFieldName() string
- func (s *ClaimableBalanceEntryExtensionV1Ext) UnmarshalBinary(inp []byte) error
- type ClaimableBalanceFlags
- type ClaimableBalanceId
- func (u ClaimableBalanceId) ArmForSwitch(sw int32) (string, bool)
- func (u ClaimableBalanceId) GetV0() (result Hash, ok bool)
- func (s ClaimableBalanceId) MarshalBinary() ([]byte, error)
- func (cb ClaimableBalanceId) MarshalBinaryCompress() ([]byte, error)
- func (u ClaimableBalanceId) MustV0() Hash
- func (c *ClaimableBalanceId) Scan(src interface{}) error
- func (u ClaimableBalanceId) SwitchFieldName() string
- func (s *ClaimableBalanceId) UnmarshalBinary(inp []byte) error
- func (c ClaimableBalanceId) Value() (driver.Value, error)
- type ClaimableBalanceIdType
- type Claimant
- type ClaimantType
- type ClaimantV0
- type ClawbackClaimableBalanceOp
- type ClawbackClaimableBalanceResult
- type ClawbackClaimableBalanceResultCode
- type ClawbackOp
- type ClawbackResult
- type ClawbackResultCode
- type CreateAccountOp
- type CreateAccountResult
- type CreateAccountResultCode
- type CreateClaimableBalanceOp
- type CreateClaimableBalanceResult
- func (u CreateClaimableBalanceResult) ArmForSwitch(sw int32) (string, bool)
- func (u CreateClaimableBalanceResult) GetBalanceId() (result ClaimableBalanceId, ok bool)
- func (s CreateClaimableBalanceResult) MarshalBinary() ([]byte, error)
- func (u CreateClaimableBalanceResult) MustBalanceId() ClaimableBalanceId
- func (u CreateClaimableBalanceResult) SwitchFieldName() string
- func (s *CreateClaimableBalanceResult) UnmarshalBinary(inp []byte) error
- type CreateClaimableBalanceResultCode
- type CreatePassiveSellOfferOp
- type CryptoKeyType
- type Curve25519Public
- type Curve25519Secret
- type DataEntry
- type DataEntryExt
- type DataValue
- type DecoratedSignature
- type DontHave
- type EncryptedBody
- type EndSponsoringFutureReservesResult
- func (u EndSponsoringFutureReservesResult) ArmForSwitch(sw int32) (string, bool)
- func (s EndSponsoringFutureReservesResult) MarshalBinary() ([]byte, error)
- func (u EndSponsoringFutureReservesResult) SwitchFieldName() string
- func (s *EndSponsoringFutureReservesResult) UnmarshalBinary(inp []byte) error
- type EndSponsoringFutureReservesResultCode
- type EnvelopeType
- type Error
- type ErrorCode
- type FeeBumpTransaction
- type FeeBumpTransactionEnvelope
- type FeeBumpTransactionExt
- type FeeBumpTransactionInnerTx
- func (u FeeBumpTransactionInnerTx) ArmForSwitch(sw int32) (string, bool)
- func (u FeeBumpTransactionInnerTx) GetV1() (result TransactionV1Envelope, ok bool)
- func (e FeeBumpTransactionInnerTx) GoString() string
- func (s FeeBumpTransactionInnerTx) MarshalBinary() ([]byte, error)
- func (u FeeBumpTransactionInnerTx) MustV1() TransactionV1Envelope
- func (u FeeBumpTransactionInnerTx) SwitchFieldName() string
- func (s *FeeBumpTransactionInnerTx) UnmarshalBinary(inp []byte) error
- type Hash
- type Hello
- type HmacSha256Key
- type HmacSha256Mac
- type InflationPayout
- type InflationResult
- func (u InflationResult) ArmForSwitch(sw int32) (string, bool)
- func (u InflationResult) GetPayouts() (result []InflationPayout, ok bool)
- func (s InflationResult) MarshalBinary() ([]byte, error)
- func (u InflationResult) MustPayouts() []InflationPayout
- func (u InflationResult) SwitchFieldName() string
- func (s *InflationResult) UnmarshalBinary(inp []byte) error
- type InflationResultCode
- type InnerTransactionResult
- type InnerTransactionResultExt
- type InnerTransactionResultPair
- type InnerTransactionResultResult
- func (u InnerTransactionResultResult) ArmForSwitch(sw int32) (string, bool)
- func (u InnerTransactionResultResult) GetResults() (result []OperationResult, ok bool)
- func (s InnerTransactionResultResult) MarshalBinary() ([]byte, error)
- func (u InnerTransactionResultResult) MustResults() []OperationResult
- func (u InnerTransactionResultResult) SwitchFieldName() string
- func (s *InnerTransactionResultResult) UnmarshalBinary(inp []byte) error
- type Int32
- type Int64
- type IpAddrType
- type Keyer
- type LedgerCloseMeta
- func (u LedgerCloseMeta) ArmForSwitch(sw int32) (string, bool)
- func (l LedgerCloseMeta) BucketListHash() Hash
- func (u LedgerCloseMeta) GetV0() (result LedgerCloseMetaV0, ok bool)
- func (l LedgerCloseMeta) LedgerHash() Hash
- func (l LedgerCloseMeta) LedgerSequence() uint32
- func (s LedgerCloseMeta) MarshalBinary() ([]byte, error)
- func (u LedgerCloseMeta) MustV0() LedgerCloseMetaV0
- func (l LedgerCloseMeta) PreviousLedgerHash() Hash
- func (l LedgerCloseMeta) ProtocolVersion() uint32
- func (u LedgerCloseMeta) SwitchFieldName() string
- func (s *LedgerCloseMeta) UnmarshalBinary(inp []byte) error
- type LedgerCloseMetaV0
- type LedgerCloseValueSignature
- type LedgerEntry
- type LedgerEntryChange
- func (u LedgerEntryChange) ArmForSwitch(sw int32) (string, bool)
- func (change *LedgerEntryChange) EntryType() LedgerEntryType
- func (u LedgerEntryChange) GetCreated() (result LedgerEntry, ok bool)
- func (change *LedgerEntryChange) GetLedgerEntry() (LedgerEntry, bool)
- func (u LedgerEntryChange) GetRemoved() (result LedgerKey, ok bool)
- func (u LedgerEntryChange) GetState() (result LedgerEntry, ok bool)
- func (u LedgerEntryChange) GetUpdated() (result LedgerEntry, ok bool)
- func (change *LedgerEntryChange) LedgerKey() LedgerKey
- func (s LedgerEntryChange) MarshalBinary() ([]byte, error)
- func (change LedgerEntryChange) MarshalBinaryBase64() (string, error)
- func (u LedgerEntryChange) MustCreated() LedgerEntry
- func (u LedgerEntryChange) MustRemoved() LedgerKey
- func (u LedgerEntryChange) MustState() LedgerEntry
- func (u LedgerEntryChange) MustUpdated() LedgerEntry
- func (u LedgerEntryChange) SwitchFieldName() string
- func (s *LedgerEntryChange) UnmarshalBinary(inp []byte) error
- type LedgerEntryChangeType
- type LedgerEntryChanges
- type LedgerEntryData
- func (u LedgerEntryData) ArmForSwitch(sw int32) (string, bool)
- func (u LedgerEntryData) GetAccount() (result AccountEntry, ok bool)
- func (u LedgerEntryData) GetClaimableBalance() (result ClaimableBalanceEntry, ok bool)
- func (u LedgerEntryData) GetData() (result DataEntry, ok bool)
- func (u LedgerEntryData) GetLiquidityPool() (result LiquidityPoolEntry, ok bool)
- func (u LedgerEntryData) GetOffer() (result OfferEntry, ok bool)
- func (u LedgerEntryData) GetTrustLine() (result TrustLineEntry, ok bool)
- func (s LedgerEntryData) MarshalBinary() ([]byte, error)
- func (u LedgerEntryData) MustAccount() AccountEntry
- func (u LedgerEntryData) MustClaimableBalance() ClaimableBalanceEntry
- func (u LedgerEntryData) MustData() DataEntry
- func (u LedgerEntryData) MustLiquidityPool() LiquidityPoolEntry
- func (u LedgerEntryData) MustOffer() OfferEntry
- func (u LedgerEntryData) MustTrustLine() TrustLineEntry
- func (u LedgerEntryData) SwitchFieldName() string
- func (s *LedgerEntryData) UnmarshalBinary(inp []byte) error
- type LedgerEntryExt
- func (u LedgerEntryExt) ArmForSwitch(sw int32) (string, bool)
- func (u LedgerEntryExt) GetV1() (result LedgerEntryExtensionV1, ok bool)
- func (s LedgerEntryExt) MarshalBinary() ([]byte, error)
- func (u LedgerEntryExt) MustV1() LedgerEntryExtensionV1
- func (u LedgerEntryExt) SwitchFieldName() string
- func (s *LedgerEntryExt) UnmarshalBinary(inp []byte) error
- type LedgerEntryExtensionV1
- type LedgerEntryExtensionV1Ext
- type LedgerEntryType
- type LedgerHeader
- type LedgerHeaderExt
- type LedgerHeaderHistoryEntry
- type LedgerHeaderHistoryEntryExt
- type LedgerKey
- func (u LedgerKey) ArmForSwitch(sw int32) (string, bool)
- func (key *LedgerKey) Equals(other LedgerKey) bool
- func (u LedgerKey) GetAccount() (result LedgerKeyAccount, ok bool)
- func (u LedgerKey) GetClaimableBalance() (result LedgerKeyClaimableBalance, ok bool)
- func (u LedgerKey) GetData() (result LedgerKeyData, ok bool)
- func (u LedgerKey) GetLiquidityPool() (result LedgerKeyLiquidityPool, ok bool)
- func (u LedgerKey) GetOffer() (result LedgerKeyOffer, ok bool)
- func (u LedgerKey) GetTrustLine() (result LedgerKeyTrustLine, ok bool)
- func (key *LedgerKey) LedgerKey() LedgerKey
- func (s LedgerKey) MarshalBinary() ([]byte, error)
- func (key LedgerKey) MarshalBinaryBase64() (string, error)
- func (key LedgerKey) MarshalBinaryCompress() ([]byte, error)
- func (u LedgerKey) MustAccount() LedgerKeyAccount
- func (u LedgerKey) MustClaimableBalance() LedgerKeyClaimableBalance
- func (u LedgerKey) MustData() LedgerKeyData
- func (u LedgerKey) MustLiquidityPool() LedgerKeyLiquidityPool
- func (u LedgerKey) MustOffer() LedgerKeyOffer
- func (u LedgerKey) MustTrustLine() LedgerKeyTrustLine
- func (key *LedgerKey) SetAccount(account AccountId) error
- func (key *LedgerKey) SetClaimableBalance(balanceID ClaimableBalanceId) error
- func (key *LedgerKey) SetData(account AccountId, name string) error
- func (key *LedgerKey) SetOffer(account AccountId, id uint64) error
- func (key *LedgerKey) SetTrustline(account AccountId, line TrustLineAsset) error
- func (u LedgerKey) SwitchFieldName() string
- func (s *LedgerKey) UnmarshalBinary(inp []byte) error
- type LedgerKeyAccount
- type LedgerKeyClaimableBalance
- type LedgerKeyData
- type LedgerKeyLiquidityPool
- type LedgerKeyOffer
- type LedgerKeyTrustLine
- type LedgerScpMessages
- type LedgerUpgrade
- func (u LedgerUpgrade) ArmForSwitch(sw int32) (string, bool)
- func (u LedgerUpgrade) GetNewBaseFee() (result Uint32, ok bool)
- func (u LedgerUpgrade) GetNewBaseReserve() (result Uint32, ok bool)
- func (u LedgerUpgrade) GetNewLedgerVersion() (result Uint32, ok bool)
- func (u LedgerUpgrade) GetNewMaxTxSetSize() (result Uint32, ok bool)
- func (s LedgerUpgrade) MarshalBinary() ([]byte, error)
- func (u LedgerUpgrade) MustNewBaseFee() Uint32
- func (u LedgerUpgrade) MustNewBaseReserve() Uint32
- func (u LedgerUpgrade) MustNewLedgerVersion() Uint32
- func (u LedgerUpgrade) MustNewMaxTxSetSize() Uint32
- func (t *LedgerUpgrade) Scan(src interface{}) error
- func (u LedgerUpgrade) SwitchFieldName() string
- func (s *LedgerUpgrade) UnmarshalBinary(inp []byte) error
- type LedgerUpgradeType
- type Liabilities
- type LiquidityPoolConstantProductParameters
- type LiquidityPoolEntry
- type LiquidityPoolEntryBody
- func (u LiquidityPoolEntryBody) ArmForSwitch(sw int32) (string, bool)
- func (u LiquidityPoolEntryBody) GetConstantProduct() (result LiquidityPoolEntryConstantProduct, ok bool)
- func (s LiquidityPoolEntryBody) MarshalBinary() ([]byte, error)
- func (u LiquidityPoolEntryBody) MustConstantProduct() LiquidityPoolEntryConstantProduct
- func (u LiquidityPoolEntryBody) SwitchFieldName() string
- func (s *LiquidityPoolEntryBody) UnmarshalBinary(inp []byte) error
- type LiquidityPoolEntryConstantProduct
- type LiquidityPoolParameters
- func (u LiquidityPoolParameters) ArmForSwitch(sw int32) (string, bool)
- func (u LiquidityPoolParameters) GetConstantProduct() (result LiquidityPoolConstantProductParameters, ok bool)
- func (s LiquidityPoolParameters) MarshalBinary() ([]byte, error)
- func (u LiquidityPoolParameters) MustConstantProduct() LiquidityPoolConstantProductParameters
- func (u LiquidityPoolParameters) SwitchFieldName() string
- func (s *LiquidityPoolParameters) UnmarshalBinary(inp []byte) error
- type LiquidityPoolType
- type ManageBuyOfferOp
- type ManageBuyOfferResult
- func (u ManageBuyOfferResult) ArmForSwitch(sw int32) (string, bool)
- func (u ManageBuyOfferResult) GetSuccess() (result ManageOfferSuccessResult, ok bool)
- func (s ManageBuyOfferResult) MarshalBinary() ([]byte, error)
- func (u ManageBuyOfferResult) MustSuccess() ManageOfferSuccessResult
- func (u ManageBuyOfferResult) SwitchFieldName() string
- func (s *ManageBuyOfferResult) UnmarshalBinary(inp []byte) error
- type ManageBuyOfferResultCode
- type ManageDataOp
- type ManageDataResult
- type ManageDataResultCode
- type ManageOfferEffect
- type ManageOfferSuccessResult
- type ManageOfferSuccessResultOffer
- func (u ManageOfferSuccessResultOffer) ArmForSwitch(sw int32) (string, bool)
- func (u ManageOfferSuccessResultOffer) GetOffer() (result OfferEntry, ok bool)
- func (s ManageOfferSuccessResultOffer) MarshalBinary() ([]byte, error)
- func (u ManageOfferSuccessResultOffer) MustOffer() OfferEntry
- func (u ManageOfferSuccessResultOffer) SwitchFieldName() string
- func (s *ManageOfferSuccessResultOffer) UnmarshalBinary(inp []byte) error
- type ManageSellOfferOp
- type ManageSellOfferResult
- func (u ManageSellOfferResult) ArmForSwitch(sw int32) (string, bool)
- func (u ManageSellOfferResult) GetSuccess() (result ManageOfferSuccessResult, ok bool)
- func (s ManageSellOfferResult) MarshalBinary() ([]byte, error)
- func (u ManageSellOfferResult) MustSuccess() ManageOfferSuccessResult
- func (u ManageSellOfferResult) SwitchFieldName() string
- func (s *ManageSellOfferResult) UnmarshalBinary(inp []byte) error
- type ManageSellOfferResultCode
- type Memo
- func (u Memo) ArmForSwitch(sw int32) (string, bool)
- func (u Memo) GetHash() (result Hash, ok bool)
- func (u Memo) GetId() (result Uint64, ok bool)
- func (u Memo) GetRetHash() (result Hash, ok bool)
- func (u Memo) GetText() (result string, ok bool)
- func (m Memo) GoString() string
- func (s Memo) MarshalBinary() ([]byte, error)
- func (u Memo) MustHash() Hash
- func (u Memo) MustId() Uint64
- func (u Memo) MustRetHash() Hash
- func (u Memo) MustText() string
- func (u Memo) SwitchFieldName() string
- func (s *Memo) UnmarshalBinary(inp []byte) error
- type MemoType
- type MessageType
- type MuxedAccount
- func AddressToMuxedAccount(address string) (MuxedAccount, error)
- func MustMuxedAddress(address string) MuxedAccount
- func MustMuxedAddressPtr(address string) *MuxedAccount
- func MuxedAccountFromAccountId(gAddress string, id uint64) (MuxedAccount, error)
- func NewMuxedAccount(aType CryptoKeyType, value interface{}) (result MuxedAccount, err error)
- func (m *MuxedAccount) Address() string
- func (u MuxedAccount) ArmForSwitch(sw int32) (string, bool)
- func (m *MuxedAccount) GetAddress() (string, error)
- func (u MuxedAccount) GetEd25519() (result Uint256, ok bool)
- func (m *MuxedAccount) GetId() (uint64, error)
- func (u MuxedAccount) GetMed25519() (result MuxedAccountMed25519, ok bool)
- func (m MuxedAccount) GoString() string
- func (s MuxedAccount) MarshalBinary() ([]byte, error)
- func (u MuxedAccount) MustEd25519() Uint256
- func (u MuxedAccount) MustMed25519() MuxedAccountMed25519
- func (m *MuxedAccount) SetAddress(address string) error
- func (m *MuxedAccount) SetEd25519Address(address string) error
- func (u MuxedAccount) SwitchFieldName() string
- func (m MuxedAccount) ToAccountId() AccountId
- func (s *MuxedAccount) UnmarshalBinary(inp []byte) error
- type MuxedAccountMed25519
- type NodeId
- type OfferEntry
- type OfferEntryExt
- type OfferEntryFlags
- type Operation
- type OperationBody
- func (u OperationBody) ArmForSwitch(sw int32) (string, bool)
- func (u OperationBody) GetAllowTrustOp() (result AllowTrustOp, ok bool)
- func (u OperationBody) GetBeginSponsoringFutureReservesOp() (result BeginSponsoringFutureReservesOp, ok bool)
- func (u OperationBody) GetBumpSequenceOp() (result BumpSequenceOp, ok bool)
- func (u OperationBody) GetChangeTrustOp() (result ChangeTrustOp, ok bool)
- func (u OperationBody) GetClaimClaimableBalanceOp() (result ClaimClaimableBalanceOp, ok bool)
- func (u OperationBody) GetClawbackClaimableBalanceOp() (result ClawbackClaimableBalanceOp, ok bool)
- func (u OperationBody) GetClawbackOp() (result ClawbackOp, ok bool)
- func (u OperationBody) GetCreateAccountOp() (result CreateAccountOp, ok bool)
- func (u OperationBody) GetCreateClaimableBalanceOp() (result CreateClaimableBalanceOp, ok bool)
- func (u OperationBody) GetCreatePassiveSellOfferOp() (result CreatePassiveSellOfferOp, ok bool)
- func (u OperationBody) GetDestination() (result MuxedAccount, ok bool)
- func (u OperationBody) GetManageBuyOfferOp() (result ManageBuyOfferOp, ok bool)
- func (u OperationBody) GetManageDataOp() (result ManageDataOp, ok bool)
- func (u OperationBody) GetManageSellOfferOp() (result ManageSellOfferOp, ok bool)
- func (u OperationBody) GetPathPaymentStrictReceiveOp() (result PathPaymentStrictReceiveOp, ok bool)
- func (u OperationBody) GetPathPaymentStrictSendOp() (result PathPaymentStrictSendOp, ok bool)
- func (u OperationBody) GetPaymentOp() (result PaymentOp, ok bool)
- func (u OperationBody) GetRevokeSponsorshipOp() (result RevokeSponsorshipOp, ok bool)
- func (u OperationBody) GetSetOptionsOp() (result SetOptionsOp, ok bool)
- func (u OperationBody) GetSetTrustLineFlagsOp() (result SetTrustLineFlagsOp, ok bool)
- func (o OperationBody) GoString() string
- func (s OperationBody) MarshalBinary() ([]byte, error)
- func (u OperationBody) MustAllowTrustOp() AllowTrustOp
- func (u OperationBody) MustBeginSponsoringFutureReservesOp() BeginSponsoringFutureReservesOp
- func (u OperationBody) MustBumpSequenceOp() BumpSequenceOp
- func (u OperationBody) MustChangeTrustOp() ChangeTrustOp
- func (u OperationBody) MustClaimClaimableBalanceOp() ClaimClaimableBalanceOp
- func (u OperationBody) MustClawbackClaimableBalanceOp() ClawbackClaimableBalanceOp
- func (u OperationBody) MustClawbackOp() ClawbackOp
- func (u OperationBody) MustCreateAccountOp() CreateAccountOp
- func (u OperationBody) MustCreateClaimableBalanceOp() CreateClaimableBalanceOp
- func (u OperationBody) MustCreatePassiveSellOfferOp() CreatePassiveSellOfferOp
- func (u OperationBody) MustDestination() MuxedAccount
- func (u OperationBody) MustManageBuyOfferOp() ManageBuyOfferOp
- func (u OperationBody) MustManageDataOp() ManageDataOp
- func (u OperationBody) MustManageSellOfferOp() ManageSellOfferOp
- func (u OperationBody) MustPathPaymentStrictReceiveOp() PathPaymentStrictReceiveOp
- func (u OperationBody) MustPathPaymentStrictSendOp() PathPaymentStrictSendOp
- func (u OperationBody) MustPaymentOp() PaymentOp
- func (u OperationBody) MustRevokeSponsorshipOp() RevokeSponsorshipOp
- func (u OperationBody) MustSetOptionsOp() SetOptionsOp
- func (u OperationBody) MustSetTrustLineFlagsOp() SetTrustLineFlagsOp
- func (u OperationBody) SwitchFieldName() string
- func (s *OperationBody) UnmarshalBinary(inp []byte) error
- type OperationId
- func (u OperationId) ArmForSwitch(sw int32) (string, bool)
- func (u OperationId) GetId() (result OperationIdId, ok bool)
- func (s OperationId) MarshalBinary() ([]byte, error)
- func (u OperationId) MustId() OperationIdId
- func (u OperationId) SwitchFieldName() string
- func (s *OperationId) UnmarshalBinary(inp []byte) error
- type OperationIdId
- type OperationMeta
- type OperationResult
- func (u OperationResult) ArmForSwitch(sw int32) (string, bool)
- func (u OperationResult) GetTr() (result OperationResultTr, ok bool)
- func (s OperationResult) MarshalBinary() ([]byte, error)
- func (u OperationResult) MustTr() OperationResultTr
- func (u OperationResult) SwitchFieldName() string
- func (s *OperationResult) UnmarshalBinary(inp []byte) error
- type OperationResultCode
- type OperationResultTr
- func (u OperationResultTr) ArmForSwitch(sw int32) (string, bool)
- func (u OperationResultTr) GetAccountMergeResult() (result AccountMergeResult, ok bool)
- func (u OperationResultTr) GetAllowTrustResult() (result AllowTrustResult, ok bool)
- func (u OperationResultTr) GetBeginSponsoringFutureReservesResult() (result BeginSponsoringFutureReservesResult, ok bool)
- func (u OperationResultTr) GetBumpSeqResult() (result BumpSequenceResult, ok bool)
- func (u OperationResultTr) GetChangeTrustResult() (result ChangeTrustResult, ok bool)
- func (u OperationResultTr) GetClaimClaimableBalanceResult() (result ClaimClaimableBalanceResult, ok bool)
- func (u OperationResultTr) GetClawbackClaimableBalanceResult() (result ClawbackClaimableBalanceResult, ok bool)
- func (u OperationResultTr) GetClawbackResult() (result ClawbackResult, ok bool)
- func (u OperationResultTr) GetCreateAccountResult() (result CreateAccountResult, ok bool)
- func (u OperationResultTr) GetCreateClaimableBalanceResult() (result CreateClaimableBalanceResult, ok bool)
- func (u OperationResultTr) GetCreatePassiveSellOfferResult() (result ManageSellOfferResult, ok bool)
- func (u OperationResultTr) GetEndSponsoringFutureReservesResult() (result EndSponsoringFutureReservesResult, ok bool)
- func (u OperationResultTr) GetInflationResult() (result InflationResult, ok bool)
- func (u OperationResultTr) GetManageBuyOfferResult() (result ManageBuyOfferResult, ok bool)
- func (u OperationResultTr) GetManageDataResult() (result ManageDataResult, ok bool)
- func (u OperationResultTr) GetManageSellOfferResult() (result ManageSellOfferResult, ok bool)
- func (u OperationResultTr) GetPathPaymentStrictReceiveResult() (result PathPaymentStrictReceiveResult, ok bool)
- func (u OperationResultTr) GetPathPaymentStrictSendResult() (result PathPaymentStrictSendResult, ok bool)
- func (u OperationResultTr) GetPaymentResult() (result PaymentResult, ok bool)
- func (u OperationResultTr) GetRevokeSponsorshipResult() (result RevokeSponsorshipResult, ok bool)
- func (u OperationResultTr) GetSetOptionsResult() (result SetOptionsResult, ok bool)
- func (u OperationResultTr) GetSetTrustLineFlagsResult() (result SetTrustLineFlagsResult, ok bool)
- func (s OperationResultTr) MarshalBinary() ([]byte, error)
- func (u OperationResultTr) MustAccountMergeResult() AccountMergeResult
- func (u OperationResultTr) MustAllowTrustResult() AllowTrustResult
- func (u OperationResultTr) MustBeginSponsoringFutureReservesResult() BeginSponsoringFutureReservesResult
- func (u OperationResultTr) MustBumpSeqResult() BumpSequenceResult
- func (u OperationResultTr) MustChangeTrustResult() ChangeTrustResult
- func (u OperationResultTr) MustClaimClaimableBalanceResult() ClaimClaimableBalanceResult
- func (u OperationResultTr) MustClawbackClaimableBalanceResult() ClawbackClaimableBalanceResult
- func (u OperationResultTr) MustClawbackResult() ClawbackResult
- func (u OperationResultTr) MustCreateAccountResult() CreateAccountResult
- func (u OperationResultTr) MustCreateClaimableBalanceResult() CreateClaimableBalanceResult
- func (u OperationResultTr) MustCreatePassiveSellOfferResult() ManageSellOfferResult
- func (u OperationResultTr) MustEndSponsoringFutureReservesResult() EndSponsoringFutureReservesResult
- func (u OperationResultTr) MustInflationResult() InflationResult
- func (u OperationResultTr) MustManageBuyOfferResult() ManageBuyOfferResult
- func (u OperationResultTr) MustManageDataResult() ManageDataResult
- func (u OperationResultTr) MustManageSellOfferResult() ManageSellOfferResult
- func (u OperationResultTr) MustPathPaymentStrictReceiveResult() PathPaymentStrictReceiveResult
- func (u OperationResultTr) MustPathPaymentStrictSendResult() PathPaymentStrictSendResult
- func (u OperationResultTr) MustPaymentResult() PaymentResult
- func (u OperationResultTr) MustRevokeSponsorshipResult() RevokeSponsorshipResult
- func (u OperationResultTr) MustSetOptionsResult() SetOptionsResult
- func (u OperationResultTr) MustSetTrustLineFlagsResult() SetTrustLineFlagsResult
- func (u OperationResultTr) SwitchFieldName() string
- func (s *OperationResultTr) UnmarshalBinary(inp []byte) error
- type OperationType
- type PathPaymentStrictReceiveOp
- type PathPaymentStrictReceiveResult
- func (u PathPaymentStrictReceiveResult) ArmForSwitch(sw int32) (string, bool)
- func (u PathPaymentStrictReceiveResult) GetNoIssuer() (result Asset, ok bool)
- func (u PathPaymentStrictReceiveResult) GetSuccess() (result PathPaymentStrictReceiveResultSuccess, ok bool)
- func (s PathPaymentStrictReceiveResult) MarshalBinary() ([]byte, error)
- func (u PathPaymentStrictReceiveResult) MustNoIssuer() Asset
- func (u PathPaymentStrictReceiveResult) MustSuccess() PathPaymentStrictReceiveResultSuccess
- func (pr *PathPaymentStrictReceiveResult) SendAmount() Int64
- func (u PathPaymentStrictReceiveResult) SwitchFieldName() string
- func (s *PathPaymentStrictReceiveResult) UnmarshalBinary(inp []byte) error
- type PathPaymentStrictReceiveResultCode
- type PathPaymentStrictReceiveResultSuccess
- type PathPaymentStrictSendOp
- type PathPaymentStrictSendResult
- func (u PathPaymentStrictSendResult) ArmForSwitch(sw int32) (string, bool)
- func (pr *PathPaymentStrictSendResult) DestAmount() Int64
- func (u PathPaymentStrictSendResult) GetNoIssuer() (result Asset, ok bool)
- func (u PathPaymentStrictSendResult) GetSuccess() (result PathPaymentStrictSendResultSuccess, ok bool)
- func (s PathPaymentStrictSendResult) MarshalBinary() ([]byte, error)
- func (u PathPaymentStrictSendResult) MustNoIssuer() Asset
- func (u PathPaymentStrictSendResult) MustSuccess() PathPaymentStrictSendResultSuccess
- func (u PathPaymentStrictSendResult) SwitchFieldName() string
- func (s *PathPaymentStrictSendResult) UnmarshalBinary(inp []byte) error
- type PathPaymentStrictSendResultCode
- type PathPaymentStrictSendResultSuccess
- type PaymentOp
- type PaymentResult
- type PaymentResultCode
- type PeerAddress
- type PeerAddressIp
- func (u PeerAddressIp) ArmForSwitch(sw int32) (string, bool)
- func (u PeerAddressIp) GetIpv4() (result [4]byte, ok bool)
- func (u PeerAddressIp) GetIpv6() (result [16]byte, ok bool)
- func (s PeerAddressIp) MarshalBinary() ([]byte, error)
- func (u PeerAddressIp) MustIpv4() [4]byte
- func (u PeerAddressIp) MustIpv6() [16]byte
- func (u PeerAddressIp) SwitchFieldName() string
- func (s *PeerAddressIp) UnmarshalBinary(inp []byte) error
- type PeerStatList
- type PeerStats
- type PoolId
- type Price
- type PublicKey
- func (u PublicKey) ArmForSwitch(sw int32) (string, bool)
- func (u PublicKey) GetEd25519() (result Uint256, ok bool)
- func (s PublicKey) MarshalBinary() ([]byte, error)
- func (u PublicKey) MustEd25519() Uint256
- func (u PublicKey) SwitchFieldName() string
- func (s *PublicKey) UnmarshalBinary(inp []byte) error
- type PublicKeyType
- type RevokeSponsorshipOp
- func (u RevokeSponsorshipOp) ArmForSwitch(sw int32) (string, bool)
- func (u RevokeSponsorshipOp) GetLedgerKey() (result LedgerKey, ok bool)
- func (u RevokeSponsorshipOp) GetSigner() (result RevokeSponsorshipOpSigner, ok bool)
- func (s RevokeSponsorshipOp) MarshalBinary() ([]byte, error)
- func (u RevokeSponsorshipOp) MustLedgerKey() LedgerKey
- func (u RevokeSponsorshipOp) MustSigner() RevokeSponsorshipOpSigner
- func (u RevokeSponsorshipOp) SwitchFieldName() string
- func (s *RevokeSponsorshipOp) UnmarshalBinary(inp []byte) error
- type RevokeSponsorshipOpSigner
- type RevokeSponsorshipResult
- type RevokeSponsorshipResultCode
- type RevokeSponsorshipType
- type ScpBallot
- type ScpEnvelope
- type ScpHistoryEntry
- func (u ScpHistoryEntry) ArmForSwitch(sw int32) (string, bool)
- func (u ScpHistoryEntry) GetV0() (result ScpHistoryEntryV0, ok bool)
- func (s ScpHistoryEntry) MarshalBinary() ([]byte, error)
- func (u ScpHistoryEntry) MustV0() ScpHistoryEntryV0
- func (u ScpHistoryEntry) SwitchFieldName() string
- func (s *ScpHistoryEntry) UnmarshalBinary(inp []byte) error
- type ScpHistoryEntryV0
- type ScpNomination
- type ScpQuorumSet
- type ScpStatement
- type ScpStatementConfirm
- type ScpStatementExternalize
- type ScpStatementPledges
- func (u ScpStatementPledges) ArmForSwitch(sw int32) (string, bool)
- func (u ScpStatementPledges) GetConfirm() (result ScpStatementConfirm, ok bool)
- func (u ScpStatementPledges) GetExternalize() (result ScpStatementExternalize, ok bool)
- func (u ScpStatementPledges) GetNominate() (result ScpNomination, ok bool)
- func (u ScpStatementPledges) GetPrepare() (result ScpStatementPrepare, ok bool)
- func (s ScpStatementPledges) MarshalBinary() ([]byte, error)
- func (u ScpStatementPledges) MustConfirm() ScpStatementConfirm
- func (u ScpStatementPledges) MustExternalize() ScpStatementExternalize
- func (u ScpStatementPledges) MustNominate() ScpNomination
- func (u ScpStatementPledges) MustPrepare() ScpStatementPrepare
- func (u ScpStatementPledges) SwitchFieldName() string
- func (s *ScpStatementPledges) UnmarshalBinary(inp []byte) error
- type ScpStatementPrepare
- type ScpStatementType
- type SequenceNumber
- type SetOptionsOp
- type SetOptionsResult
- type SetOptionsResultCode
- type SetTrustLineFlagsOp
- type SetTrustLineFlagsResult
- type SetTrustLineFlagsResultCode
- type Signature
- type SignatureHint
- type SignedSurveyRequestMessage
- type SignedSurveyResponseMessage
- type Signer
- type SignerKey
- func (skey *SignerKey) Address() string
- func (u SignerKey) ArmForSwitch(sw int32) (string, bool)
- func (skey *SignerKey) Equals(other SignerKey) bool
- func (skey *SignerKey) GetAddress() (string, error)
- func (u SignerKey) GetEd25519() (result Uint256, ok bool)
- func (u SignerKey) GetHashX() (result Uint256, ok bool)
- func (u SignerKey) GetPreAuthTx() (result Uint256, ok bool)
- func (s SignerKey) MarshalBinary() ([]byte, error)
- func (u SignerKey) MustEd25519() Uint256
- func (u SignerKey) MustHashX() Uint256
- func (u SignerKey) MustPreAuthTx() Uint256
- func (skey *SignerKey) SetAddress(address string) error
- func (u SignerKey) SwitchFieldName() string
- func (s *SignerKey) UnmarshalBinary(inp []byte) error
- type SignerKeyType
- type SimplePaymentResult
- type SponsorshipDescriptor
- type StellarMessage
- func (u StellarMessage) ArmForSwitch(sw int32) (string, bool)
- func (u StellarMessage) GetAuth() (result Auth, ok bool)
- func (u StellarMessage) GetDontHave() (result DontHave, ok bool)
- func (u StellarMessage) GetEnvelope() (result ScpEnvelope, ok bool)
- func (u StellarMessage) GetError() (result Error, ok bool)
- func (u StellarMessage) GetGetScpLedgerSeq() (result Uint32, ok bool)
- func (u StellarMessage) GetHello() (result Hello, ok bool)
- func (u StellarMessage) GetPeers() (result []PeerAddress, ok bool)
- func (u StellarMessage) GetQSet() (result ScpQuorumSet, ok bool)
- func (u StellarMessage) GetQSetHash() (result Uint256, ok bool)
- func (u StellarMessage) GetSignedSurveyRequestMessage() (result SignedSurveyRequestMessage, ok bool)
- func (u StellarMessage) GetSignedSurveyResponseMessage() (result SignedSurveyResponseMessage, ok bool)
- func (u StellarMessage) GetTransaction() (result TransactionEnvelope, ok bool)
- func (u StellarMessage) GetTxSet() (result TransactionSet, ok bool)
- func (u StellarMessage) GetTxSetHash() (result Uint256, ok bool)
- func (s StellarMessage) MarshalBinary() ([]byte, error)
- func (u StellarMessage) MustAuth() Auth
- func (u StellarMessage) MustDontHave() DontHave
- func (u StellarMessage) MustEnvelope() ScpEnvelope
- func (u StellarMessage) MustError() Error
- func (u StellarMessage) MustGetScpLedgerSeq() Uint32
- func (u StellarMessage) MustHello() Hello
- func (u StellarMessage) MustPeers() []PeerAddress
- func (u StellarMessage) MustQSet() ScpQuorumSet
- func (u StellarMessage) MustQSetHash() Uint256
- func (u StellarMessage) MustSignedSurveyRequestMessage() SignedSurveyRequestMessage
- func (u StellarMessage) MustSignedSurveyResponseMessage() SignedSurveyResponseMessage
- func (u StellarMessage) MustTransaction() TransactionEnvelope
- func (u StellarMessage) MustTxSet() TransactionSet
- func (u StellarMessage) MustTxSetHash() Uint256
- func (u StellarMessage) SwitchFieldName() string
- func (s *StellarMessage) UnmarshalBinary(inp []byte) error
- type StellarValue
- type StellarValueExt
- func (u StellarValueExt) ArmForSwitch(sw int32) (string, bool)
- func (u StellarValueExt) GetLcValueSignature() (result LedgerCloseValueSignature, ok bool)
- func (s StellarValueExt) MarshalBinary() ([]byte, error)
- func (u StellarValueExt) MustLcValueSignature() LedgerCloseValueSignature
- func (u StellarValueExt) SwitchFieldName() string
- func (s *StellarValueExt) UnmarshalBinary(inp []byte) error
- type StellarValueType
- type String32
- type String64
- type SurveyMessageCommandType
- type SurveyRequestMessage
- type SurveyResponseBody
- func (u SurveyResponseBody) ArmForSwitch(sw int32) (string, bool)
- func (u SurveyResponseBody) GetTopologyResponseBody() (result TopologyResponseBody, ok bool)
- func (s SurveyResponseBody) MarshalBinary() ([]byte, error)
- func (u SurveyResponseBody) MustTopologyResponseBody() TopologyResponseBody
- func (u SurveyResponseBody) SwitchFieldName() string
- func (s *SurveyResponseBody) UnmarshalBinary(inp []byte) error
- type SurveyResponseMessage
- type ThresholdIndexes
- type Thresholds
- func (s Thresholds) MarshalBinary() ([]byte, error)
- func (t Thresholds) MasterKeyWeight() byte
- func (t *Thresholds) Scan(src interface{}) error
- func (t Thresholds) ThresholdHigh() byte
- func (t Thresholds) ThresholdLow() byte
- func (t Thresholds) ThresholdMedium() byte
- func (s *Thresholds) UnmarshalBinary(inp []byte) error
- func (e Thresholds) XDRMaxSize() int
- type TimeBounds
- type TimePoint
- type TopologyResponseBody
- type Transaction
- type TransactionEnvelope
- func (u TransactionEnvelope) ArmForSwitch(sw int32) (string, bool)
- func (e TransactionEnvelope) Fee() uint32
- func (e TransactionEnvelope) FeeBumpAccount() MuxedAccount
- func (e TransactionEnvelope) FeeBumpFee() int64
- func (e TransactionEnvelope) FeeBumpSignatures() []DecoratedSignature
- func (u TransactionEnvelope) GetFeeBump() (result FeeBumpTransactionEnvelope, ok bool)
- func (u TransactionEnvelope) GetV0() (result TransactionV0Envelope, ok bool)
- func (u TransactionEnvelope) GetV1() (result TransactionV1Envelope, ok bool)
- func (e TransactionEnvelope) GoString() string
- func (e TransactionEnvelope) IsFeeBump() bool
- func (s TransactionEnvelope) MarshalBinary() ([]byte, error)
- func (e TransactionEnvelope) Memo() Memo
- func (u TransactionEnvelope) MustFeeBump() FeeBumpTransactionEnvelope
- func (u TransactionEnvelope) MustV0() TransactionV0Envelope
- func (u TransactionEnvelope) MustV1() TransactionV1Envelope
- func (e TransactionEnvelope) Operations() []Operation
- func (t *TransactionEnvelope) Scan(src interface{}) error
- func (e TransactionEnvelope) SeqNum() int64
- func (e TransactionEnvelope) Signatures() []DecoratedSignature
- func (e TransactionEnvelope) SourceAccount() MuxedAccount
- func (u TransactionEnvelope) SwitchFieldName() string
- func (e TransactionEnvelope) TimeBounds() *TimeBounds
- func (s *TransactionEnvelope) UnmarshalBinary(inp []byte) error
- type TransactionExt
- type TransactionHistoryEntry
- type TransactionHistoryEntryExt
- type TransactionHistoryResultEntry
- type TransactionHistoryResultEntryExt
- type TransactionMeta
- func (u TransactionMeta) ArmForSwitch(sw int32) (string, bool)
- func (u TransactionMeta) GetOperations() (result []OperationMeta, ok bool)
- func (u TransactionMeta) GetV1() (result TransactionMetaV1, ok bool)
- func (u TransactionMeta) GetV2() (result TransactionMetaV2, ok bool)
- func (s TransactionMeta) MarshalBinary() ([]byte, error)
- func (u TransactionMeta) MustOperations() []OperationMeta
- func (u TransactionMeta) MustV1() TransactionMetaV1
- func (u TransactionMeta) MustV2() TransactionMetaV2
- func (transactionMeta *TransactionMeta) OperationsMeta() []OperationMeta
- func (t *TransactionMeta) Scan(src interface{}) error
- func (u TransactionMeta) SwitchFieldName() string
- func (s *TransactionMeta) UnmarshalBinary(inp []byte) error
- type TransactionMetaV1
- type TransactionMetaV2
- type TransactionResult
- func (r TransactionResult) ExtractBalanceID(opIndex int) (*ClaimableBalanceId, error)
- func (r TransactionResult) ExtractBalanceIDHex(opIndex int) (string, error)
- func (s TransactionResult) MarshalBinary() ([]byte, error)
- func (r TransactionResult) OperationResults() ([]OperationResult, bool)
- func (t *TransactionResult) Scan(src interface{}) error
- func (r TransactionResult) Successful() bool
- func (s *TransactionResult) UnmarshalBinary(inp []byte) error
- type TransactionResultCode
- type TransactionResultExt
- type TransactionResultMeta
- type TransactionResultPair
- func (r TransactionResultPair) InnerHash() Hash
- func (s TransactionResultPair) MarshalBinary() ([]byte, error)
- func (r TransactionResultPair) OperationResults() ([]OperationResult, bool)
- func (t *TransactionResultPair) Scan(src interface{}) error
- func (r TransactionResultPair) Successful() bool
- func (s *TransactionResultPair) UnmarshalBinary(inp []byte) error
- type TransactionResultResult
- func (u TransactionResultResult) ArmForSwitch(sw int32) (string, bool)
- func (u TransactionResultResult) GetInnerResultPair() (result InnerTransactionResultPair, ok bool)
- func (u TransactionResultResult) GetResults() (result []OperationResult, ok bool)
- func (s TransactionResultResult) MarshalBinary() ([]byte, error)
- func (u TransactionResultResult) MustInnerResultPair() InnerTransactionResultPair
- func (u TransactionResultResult) MustResults() []OperationResult
- func (u TransactionResultResult) SwitchFieldName() string
- func (s *TransactionResultResult) UnmarshalBinary(inp []byte) error
- type TransactionResultSet
- type TransactionSet
- type TransactionSignaturePayload
- type TransactionSignaturePayloadTaggedTransaction
- func (u TransactionSignaturePayloadTaggedTransaction) ArmForSwitch(sw int32) (string, bool)
- func (u TransactionSignaturePayloadTaggedTransaction) GetFeeBump() (result FeeBumpTransaction, ok bool)
- func (u TransactionSignaturePayloadTaggedTransaction) GetTx() (result Transaction, ok bool)
- func (s TransactionSignaturePayloadTaggedTransaction) MarshalBinary() ([]byte, error)
- func (u TransactionSignaturePayloadTaggedTransaction) MustFeeBump() FeeBumpTransaction
- func (u TransactionSignaturePayloadTaggedTransaction) MustTx() Transaction
- func (u TransactionSignaturePayloadTaggedTransaction) SwitchFieldName() string
- func (s *TransactionSignaturePayloadTaggedTransaction) UnmarshalBinary(inp []byte) error
- type TransactionV0
- type TransactionV0Envelope
- type TransactionV0Ext
- type TransactionV1Envelope
- type TrustLineAsset
- func (u TrustLineAsset) ArmForSwitch(sw int32) (string, bool)
- func (a TrustLineAsset) Equals(other TrustLineAsset) bool
- func (a TrustLineAsset) Extract(typ interface{}, code interface{}, issuer interface{}) error
- func (u TrustLineAsset) GetAlphaNum12() (result AlphaNum12, ok bool)
- func (u TrustLineAsset) GetAlphaNum4() (result AlphaNum4, ok bool)
- func (u TrustLineAsset) GetLiquidityPoolId() (result PoolId, ok bool)
- func (s TrustLineAsset) MarshalBinary() ([]byte, error)
- func (a TrustLineAsset) MarshalBinaryCompress() ([]byte, error)
- func (u TrustLineAsset) MustAlphaNum12() AlphaNum12
- func (u TrustLineAsset) MustAlphaNum4() AlphaNum4
- func (a TrustLineAsset) MustExtract(typ interface{}, code interface{}, issuer interface{})
- func (u TrustLineAsset) MustLiquidityPoolId() PoolId
- func (u TrustLineAsset) SwitchFieldName() string
- func (tla TrustLineAsset) ToAsset() Asset
- func (s *TrustLineAsset) UnmarshalBinary(inp []byte) error
- type TrustLineEntry
- type TrustLineEntryExt
- func (u TrustLineEntryExt) ArmForSwitch(sw int32) (string, bool)
- func (u TrustLineEntryExt) GetV1() (result TrustLineEntryV1, ok bool)
- func (s TrustLineEntryExt) MarshalBinary() ([]byte, error)
- func (u TrustLineEntryExt) MustV1() TrustLineEntryV1
- func (u TrustLineEntryExt) SwitchFieldName() string
- func (s *TrustLineEntryExt) UnmarshalBinary(inp []byte) error
- type TrustLineEntryV1
- type TrustLineEntryV1Ext
- type TrustLineFlags
- func (e TrustLineFlags) IsAuthorized() bool
- func (e TrustLineFlags) IsAuthorizedToMaintainLiabilitiesFlag() bool
- func (e TrustLineFlags) IsClawbackEnabledFlag() bool
- func (s TrustLineFlags) MarshalBinary() ([]byte, error)
- func (e TrustLineFlags) String() string
- func (s *TrustLineFlags) UnmarshalBinary(inp []byte) error
- func (e TrustLineFlags) ValidEnum(v int32) bool
- type Uint256
- type Uint32
- type Uint64
- type UpgradeEntryMeta
- type UpgradeType
- type Value
Examples ¶
Constants ¶
const LiquidityPoolFeeV18 = 30
LiquidityPoolFeeV18 is an XDR Const defines as:
const LIQUIDITY_POOL_FEE_V18 = 30;
const MaskAccountFlags = 0x7
MaskAccountFlags is an XDR Const defines as:
const MASK_ACCOUNT_FLAGS = 0x7;
const MaskAccountFlagsV17 = 0xF
MaskAccountFlagsV17 is an XDR Const defines as:
const MASK_ACCOUNT_FLAGS_V17 = 0xF;
const MaskClaimableBalanceFlags = 0x1
MaskClaimableBalanceFlags is an XDR Const defines as:
const MASK_CLAIMABLE_BALANCE_FLAGS = 0x1;
const MaskOfferentryFlags = 1
MaskOfferentryFlags is an XDR Const defines as:
const MASK_OFFERENTRY_FLAGS = 1;
const MaskTrustlineFlags = 1
MaskTrustlineFlags is an XDR Const defines as:
const MASK_TRUSTLINE_FLAGS = 1;
const MaskTrustlineFlagsV13 = 3
MaskTrustlineFlagsV13 is an XDR Const defines as:
const MASK_TRUSTLINE_FLAGS_V13 = 3;
const MaskTrustlineFlagsV17 = 7
MaskTrustlineFlagsV17 is an XDR Const defines as:
const MASK_TRUSTLINE_FLAGS_V17 = 7;
const MaxOpsPerTx = 100
MaxOpsPerTx is an XDR Const defines as:
const MAX_OPS_PER_TX = 100;
const MaxSigners = 20
MaxSigners is an XDR Const defines as:
const MAX_SIGNERS = 20;
Variables ¶
var AssetTypeToString = map[AssetType]string{
AssetTypeAssetTypeNative: "native",
AssetTypeAssetTypeCreditAlphanum4: "credit_alphanum4",
AssetTypeAssetTypeCreditAlphanum12: "credit_alphanum12",
}
AssetTypeToString maps an xdr.AssetType to its string representation
var OperationTypeToStringMap = operationTypeMap
var StringToAssetType = map[string]AssetType{ "native": AssetTypeAssetTypeNative, "credit_alphanum4": AssetTypeAssetTypeCreditAlphanum4, "credit_alphanum12": AssetTypeAssetTypeCreditAlphanum12, }
StringToAssetType maps an strings to its xdr.AssetType representation
var ValidAssetCode = regexp.MustCompile("^[[:alnum:]]{1,12}$")
Functions ¶
func MarshalBase64 ¶
func MarshalFramed ¶
func MarshalHex ¶
func ReadFrameLength ¶
ReadFrameLength returns a length of a framed XDR object.
func SafeUnmarshal ¶
SafeUnmarshal decodes the provided reader into the destination and verifies that provided bytes are all consumed by the unmarshalling process.
func SafeUnmarshalBase64 ¶
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 ¶
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 ¶
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 UnmarshalFramed ¶
XDR and RPC define a (minimal) framing format which our metadata arrives in: a 4-byte big-endian length header that has the high bit set, followed by that length worth of XDR data. Decoding this involves just a little more work than xdr.Unmarshal.
Types ¶
type AccountEntry ¶
type AccountEntry struct { AccountId AccountId Balance Int64 SeqNum SequenceNumber NumSubEntries Uint32 InflationDest *AccountId Flags Uint32 HomeDomain String32 Thresholds Thresholds Signers []Signer `xdrmaxsize:"20"` Ext AccountEntryExt }
AccountEntry is an XDR Struct defines as:
struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags string32 homeDomain; // can be used for reverse federation and memo lookup // fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds; Signer signers<MAX_SIGNERS>; // possible signers for this account // reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; };
func (*AccountEntry) Liabilities ¶
func (account *AccountEntry) Liabilities() Liabilities
Liabilities returns AccountEntry's liabilities
func (AccountEntry) MarshalBinary ¶
func (s AccountEntry) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*AccountEntry) MasterKeyWeight ¶
func (account *AccountEntry) MasterKeyWeight() byte
func (*AccountEntry) NumSponsored ¶
func (account *AccountEntry) NumSponsored() Uint32
NumSponsored returns NumSponsored value for account.
func (*AccountEntry) NumSponsoring ¶
func (account *AccountEntry) NumSponsoring() Uint32
NumSponsoring returns NumSponsoring value for account.
func (*AccountEntry) SignerSponsoringIDs ¶
func (account *AccountEntry) SignerSponsoringIDs() []SponsorshipDescriptor
SignerSponsoringIDs returns SignerSponsoringIDs value for account. This will return a slice of nil values if V2 extension does not exist.
func (*AccountEntry) SignerSummary ¶
func (account *AccountEntry) SignerSummary() map[string]int32
func (*AccountEntry) SponsorPerSigner ¶
func (account *AccountEntry) SponsorPerSigner() map[string]AccountId
SponsorPerSigner returns a mapping of signer to its sponsor
func (*AccountEntry) ThresholdHigh ¶
func (account *AccountEntry) ThresholdHigh() byte
func (*AccountEntry) ThresholdLow ¶
func (account *AccountEntry) ThresholdLow() byte
func (*AccountEntry) ThresholdMedium ¶
func (account *AccountEntry) ThresholdMedium() byte
func (*AccountEntry) UnmarshalBinary ¶
func (s *AccountEntry) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type AccountEntryExt ¶
type AccountEntryExt struct { V int32 V1 *AccountEntryExtensionV1 }
AccountEntryExt is an XDR NestedUnion defines as:
union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; }
func NewAccountEntryExt ¶
func NewAccountEntryExt(v int32, value interface{}) (result AccountEntryExt, err error)
NewAccountEntryExt creates a new AccountEntryExt.
func (AccountEntryExt) ArmForSwitch ¶
func (u AccountEntryExt) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of AccountEntryExt
func (AccountEntryExt) GetV1 ¶
func (u AccountEntryExt) GetV1() (result AccountEntryExtensionV1, ok bool)
GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.
func (AccountEntryExt) MarshalBinary ¶
func (s AccountEntryExt) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (AccountEntryExt) MustV1 ¶
func (u AccountEntryExt) MustV1() AccountEntryExtensionV1
MustV1 retrieves the V1 value from the union, panicing if the value is not set.
func (AccountEntryExt) SwitchFieldName ¶
func (u AccountEntryExt) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*AccountEntryExt) UnmarshalBinary ¶
func (s *AccountEntryExt) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type AccountEntryExtensionV1 ¶
type AccountEntryExtensionV1 struct { Liabilities Liabilities Ext AccountEntryExtensionV1Ext }
AccountEntryExtensionV1 is an XDR Struct defines as:
struct AccountEntryExtensionV1 { Liabilities liabilities; union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; };
func (AccountEntryExtensionV1) MarshalBinary ¶
func (s AccountEntryExtensionV1) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*AccountEntryExtensionV1) UnmarshalBinary ¶
func (s *AccountEntryExtensionV1) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type AccountEntryExtensionV1Ext ¶
type AccountEntryExtensionV1Ext struct { V int32 V2 *AccountEntryExtensionV2 }
AccountEntryExtensionV1Ext is an XDR NestedUnion defines as:
union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; }
func NewAccountEntryExtensionV1Ext ¶
func NewAccountEntryExtensionV1Ext(v int32, value interface{}) (result AccountEntryExtensionV1Ext, err error)
NewAccountEntryExtensionV1Ext creates a new AccountEntryExtensionV1Ext.
func (AccountEntryExtensionV1Ext) ArmForSwitch ¶
func (u AccountEntryExtensionV1Ext) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of AccountEntryExtensionV1Ext
func (AccountEntryExtensionV1Ext) GetV2 ¶
func (u AccountEntryExtensionV1Ext) GetV2() (result AccountEntryExtensionV2, ok bool)
GetV2 retrieves the V2 value from the union, returning ok if the union's switch indicated the value is valid.
func (AccountEntryExtensionV1Ext) MarshalBinary ¶
func (s AccountEntryExtensionV1Ext) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (AccountEntryExtensionV1Ext) MustV2 ¶
func (u AccountEntryExtensionV1Ext) MustV2() AccountEntryExtensionV2
MustV2 retrieves the V2 value from the union, panicing if the value is not set.
func (AccountEntryExtensionV1Ext) SwitchFieldName ¶
func (u AccountEntryExtensionV1Ext) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*AccountEntryExtensionV1Ext) UnmarshalBinary ¶
func (s *AccountEntryExtensionV1Ext) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type AccountEntryExtensionV2 ¶
type AccountEntryExtensionV2 struct { NumSponsored Uint32 NumSponsoring Uint32 SignerSponsoringIDs []SponsorshipDescriptor `xdrmaxsize:"20"` Ext AccountEntryExtensionV2Ext }
AccountEntryExtensionV2 is an XDR Struct defines as:
struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs<MAX_SIGNERS>; union switch (int v) { case 0: void; } ext; };
func (AccountEntryExtensionV2) MarshalBinary ¶
func (s AccountEntryExtensionV2) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*AccountEntryExtensionV2) UnmarshalBinary ¶
func (s *AccountEntryExtensionV2) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type AccountEntryExtensionV2Ext ¶
type AccountEntryExtensionV2Ext struct {
V int32
}
AccountEntryExtensionV2Ext is an XDR NestedUnion defines as:
union switch (int v) { case 0: void; }
func NewAccountEntryExtensionV2Ext ¶
func NewAccountEntryExtensionV2Ext(v int32, value interface{}) (result AccountEntryExtensionV2Ext, err error)
NewAccountEntryExtensionV2Ext creates a new AccountEntryExtensionV2Ext.
func (AccountEntryExtensionV2Ext) ArmForSwitch ¶
func (u AccountEntryExtensionV2Ext) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of AccountEntryExtensionV2Ext
func (AccountEntryExtensionV2Ext) MarshalBinary ¶
func (s AccountEntryExtensionV2Ext) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (AccountEntryExtensionV2Ext) SwitchFieldName ¶
func (u AccountEntryExtensionV2Ext) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*AccountEntryExtensionV2Ext) UnmarshalBinary ¶
func (s *AccountEntryExtensionV2Ext) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type AccountFlags ¶
type AccountFlags int32
AccountFlags is an XDR Enum defines as:
enum AccountFlags { // masks for each flag // Flags set on issuer accounts // TrustLines are created with authorized set to "false" requiring // the issuer to set it for each TrustLine AUTH_REQUIRED_FLAG = 0x1, // If set, the authorized flag in TrustLines can be cleared // otherwise, authorization cannot be revoked AUTH_REVOCABLE_FLAG = 0x2, // Once set, causes all AUTH_* flags to be read-only AUTH_IMMUTABLE_FLAG = 0x4, // Trustlines are created with clawback enabled set to "true", // and claimable balances created from those trustlines are created // with clawback enabled set to "true" AUTH_CLAWBACK_ENABLED_FLAG = 0x8 };
const ( AccountFlagsAuthRequiredFlag AccountFlags = 1 AccountFlagsAuthRevocableFlag AccountFlags = 2 AccountFlagsAuthImmutableFlag AccountFlags = 4 AccountFlagsAuthClawbackEnabledFlag AccountFlags = 8 )
func (AccountFlags) IsAuthClawbackEnabled ¶
func (accountFlags AccountFlags) IsAuthClawbackEnabled() bool
IsAuthClawbackEnabled returns true if the account has the "AUTH_CLAWBACK_ENABLED" option turned on.
func (AccountFlags) IsAuthImmutable ¶
func (accountFlags AccountFlags) IsAuthImmutable() bool
IsAuthImmutable returns true if the account has the "AUTH_IMMUTABLE" option turned on.
func (AccountFlags) IsAuthRequired ¶
func (accountFlags AccountFlags) IsAuthRequired() bool
IsAuthRequired returns true if the account has the "AUTH_REQUIRED" option turned on.
func (AccountFlags) IsAuthRevocable ¶
func (accountFlags AccountFlags) IsAuthRevocable() bool
IsAuthRevocable returns true if the account has the "AUTH_REVOCABLE" option turned on.
func (AccountFlags) MarshalBinary ¶
func (s AccountFlags) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*AccountFlags) Scan ¶
func (t *AccountFlags) Scan(src interface{}) error
Scan reads from src into an AccountFlags
func (*AccountFlags) 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 ¶
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 MustAddressPtr ¶
func NewAccountId ¶
func NewAccountId(aType PublicKeyType, value interface{}) (result AccountId, err error)
NewAccountId creates a new AccountId.
func (AccountId) Address ¶
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 ¶
ArmForSwitch returns which field name should be used for storing the value for an instance of PublicKey
func (*AccountId) GetAddress ¶
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 ¶
GetEd25519 retrieves the Ed25519 value from the union, returning ok if the union's switch indicated the value is valid.
func (AccountId) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (AccountId) MarshalBinaryCompress ¶
MarshalBinaryCompress marshals AccountId to []byte but unlike MarshalBinary() it removes all unnecessary bytes, exploting the fact that XDR is padding data to 4 bytes in union discriminants etc. It's primary use is in ingest/io.StateReader that keep LedgerKeys in memory so this function decrease memory requirements.
Warning, do not use UnmarshalBinary() on data encoded using this method!
func (AccountId) MustEd25519 ¶
MustEd25519 retrieves the Ed25519 value from the union, panicing if the value is not set.
func (*AccountId) SetAddress ¶
SetAddress modifies the receiver, setting it's value to the AccountId form of the provided address.
func (AccountId) SwitchFieldName ¶
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 ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type AccountMergeResult ¶
type AccountMergeResult struct { Code AccountMergeResultCode SourceAccountBalance *Int64 }
AccountMergeResult is an XDR Union defines as:
union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account default: void; };
func NewAccountMergeResult ¶
func NewAccountMergeResult(code AccountMergeResultCode, value interface{}) (result AccountMergeResult, err error)
NewAccountMergeResult creates a new AccountMergeResult.
func (AccountMergeResult) ArmForSwitch ¶
func (u AccountMergeResult) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of AccountMergeResult
func (AccountMergeResult) 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) 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 ¶
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) MarshalBinary ¶
func (s AllowTrustOp) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*AllowTrustOp) UnmarshalBinary ¶
func (s *AllowTrustOp) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type AllowTrustResult ¶
type AllowTrustResult struct {
Code AllowTrustResultCode
}
AllowTrustResult is an XDR Union defines as:
union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; default: void; };
func NewAllowTrustResult ¶
func NewAllowTrustResult(code AllowTrustResultCode, value interface{}) (result AllowTrustResult, err error)
NewAllowTrustResult creates a new AllowTrustResult.
func (AllowTrustResult) ArmForSwitch ¶
func (u AllowTrustResult) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of AllowTrustResult
func (AllowTrustResult) 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 };
const ( AllowTrustResultCodeAllowTrustSuccess AllowTrustResultCode = 0 AllowTrustResultCodeAllowTrustMalformed AllowTrustResultCode = -1 AllowTrustResultCodeAllowTrustNoTrustLine AllowTrustResultCode = -2 AllowTrustResultCodeAllowTrustTrustNotRequired AllowTrustResultCode = -3 AllowTrustResultCodeAllowTrustCantRevoke AllowTrustResultCode = -4 AllowTrustResultCodeAllowTrustSelfNotAllowed AllowTrustResultCode = -5 )
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) 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) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*AlphaNum4) UnmarshalBinary ¶
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 ¶
BuildAsset creates a new asset from a given `assetType`, `code`, and `issuer`.
Valid assetTypes are:
- `native`
- `credit_alphanum4`
- `credit_alphanum12`
func BuildAssets ¶
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 ¶
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 NewCreditAsset ¶
NewCreditAsset returns a new general asset, returning an error if it can't.
func (Asset) ArmForSwitch ¶
ArmForSwitch returns which field name should be used for storing the value for an instance of Asset
func (Asset) Extract ¶
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 ¶
GetAlphaNum4 retrieves the AlphaNum4 value from the union, returning ok if the union's switch indicated the value is valid.
func (Asset) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (Asset) MarshalBinaryCompress ¶
MarshalBinaryCompress marshals Asset to []byte but unlike MarshalBinary() it removes all unnecessary bytes, exploting the fact that XDR is padding data to 4 bytes in union discriminants etc. It's primary use is in ingest/io.StateReader that keep LedgerKeys in memory so this function decrease memory requirements.
Warning, do not use UnmarshalBinary() on data encoded using this method!
func (Asset) MustAlphaNum12 ¶
func (u Asset) MustAlphaNum12() AlphaNum12
MustAlphaNum12 retrieves the AlphaNum12 value from the union, panicing if the value is not set.
func (Asset) MustAlphaNum4 ¶
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) SetCredit ¶
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) StringCanonical ¶
StringCanonical returns a display friendly form of the asset following its canonical representation
func (Asset) SwitchFieldName ¶
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*Asset) ToAssetCode ¶
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 ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
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 ¶
MustNewAssetCodeFromString returns a new allow trust asset, panicking if it can't.
func NewAssetCode ¶
NewAssetCode creates a new AssetCode.
func NewAssetCodeFromString ¶
NewAssetCodeFromString returns a new allow trust asset, panicking if it can't.
func (AssetCode) ArmForSwitch ¶
ArmForSwitch returns which field name should be used for storing the value for an instance of AssetCode
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) MarshalBinary ¶
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 ¶
SwitchFieldName returns the field name in which this union's discriminant is stored
func (AssetCode) ToAsset ¶
ToAsset for AssetCode converts the xdr.AssetCode to a standard xdr.Asset.
func (*AssetCode) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type AssetCode12 ¶
type AssetCode12 [12]byte
AssetCode12 is an XDR Typedef defines as:
typedef opaque AssetCode12[12];
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) 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 };
func (AssetType) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*AssetType) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type Auth ¶
type Auth struct {
Unused int32
}
Auth is an XDR Struct defines as:
struct Auth { // Empty message, just to confirm // establishment of MAC keys. int unused; };
func (Auth) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*Auth) UnmarshalBinary ¶
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) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*AuthCert) UnmarshalBinary ¶
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) 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 ¶
func (u AuthenticatedMessage) MustV0() AuthenticatedMessageV0
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) 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) MarshalBinary ¶
func (s BeginSponsoringFutureReservesOp) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*BeginSponsoringFutureReservesOp) UnmarshalBinary ¶
func (s *BeginSponsoringFutureReservesOp) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type BeginSponsoringFutureReservesResult ¶
type BeginSponsoringFutureReservesResult struct {
Code BeginSponsoringFutureReservesResultCode
}
BeginSponsoringFutureReservesResult is an XDR Union defines as:
union BeginSponsoringFutureReservesResult switch (BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; default: void; };
func NewBeginSponsoringFutureReservesResult ¶
func NewBeginSponsoringFutureReservesResult(code BeginSponsoringFutureReservesResultCode, value interface{}) (result BeginSponsoringFutureReservesResult, err error)
NewBeginSponsoringFutureReservesResult creates a new BeginSponsoringFutureReservesResult.
func (BeginSponsoringFutureReservesResult) ArmForSwitch ¶
func (u BeginSponsoringFutureReservesResult) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of BeginSponsoringFutureReservesResult
func (BeginSponsoringFutureReservesResult) 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) MarshalBinary ¶
func (s BeginSponsoringFutureReservesResultCode) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (BeginSponsoringFutureReservesResultCode) String ¶
func (e BeginSponsoringFutureReservesResultCode) String() string
String returns the name of `e`
func (*BeginSponsoringFutureReservesResultCode) UnmarshalBinary ¶
func (s *BeginSponsoringFutureReservesResultCode) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (BeginSponsoringFutureReservesResultCode) ValidEnum ¶
func (e BeginSponsoringFutureReservesResultCode) ValidEnum(v int32) bool
ValidEnum validates a proposed value for this enum. Implements the Enum interface for BeginSponsoringFutureReservesResultCode
type BucketEntry ¶
type BucketEntry struct { Type BucketEntryType LiveEntry *LedgerEntry DeadEntry *LedgerKey MetaEntry *BucketMetadata }
BucketEntry is an XDR Union defines as:
union BucketEntry switch (BucketEntryType type) { case LIVEENTRY: case INITENTRY: LedgerEntry liveEntry; case DEADENTRY: LedgerKey deadEntry; case METAENTRY: BucketMetadata metaEntry; };
func NewBucketEntry ¶
func NewBucketEntry(aType BucketEntryType, value interface{}) (result BucketEntry, err error)
NewBucketEntry creates a new BucketEntry.
func (BucketEntry) ArmForSwitch ¶
func (u BucketEntry) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of BucketEntry
func (BucketEntry) 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) 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) 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) 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) MarshalBinary ¶
func (s BumpSequenceOp) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*BumpSequenceOp) UnmarshalBinary ¶
func (s *BumpSequenceOp) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type BumpSequenceResult ¶
type BumpSequenceResult struct {
Code BumpSequenceResultCode
}
BumpSequenceResult is an XDR Union defines as:
union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; default: void; };
func NewBumpSequenceResult ¶
func NewBumpSequenceResult(code BumpSequenceResultCode, value interface{}) (result BumpSequenceResult, err error)
NewBumpSequenceResult creates a new BumpSequenceResult.
func (BumpSequenceResult) ArmForSwitch ¶
func (u BumpSequenceResult) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of BumpSequenceResult
func (BumpSequenceResult) 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) 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 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) 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) MarshalBinary ¶
func (s ChangeTrustOp) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*ChangeTrustOp) UnmarshalBinary ¶
func (s *ChangeTrustOp) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type ChangeTrustResult ¶
type ChangeTrustResult struct {
Code ChangeTrustResultCode
}
ChangeTrustResult is an XDR Union defines as:
union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; default: void; };
func NewChangeTrustResult ¶
func NewChangeTrustResult(code ChangeTrustResultCode, value interface{}) (result ChangeTrustResult, err error)
NewChangeTrustResult creates a new ChangeTrustResult.
func (ChangeTrustResult) ArmForSwitch ¶
func (u ChangeTrustResult) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of ChangeTrustResult
func (ChangeTrustResult) 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) 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 }
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; };
func NewClaimAtom ¶
func NewClaimAtom(aType ClaimAtomType, value interface{}) (result ClaimAtom, err error)
NewClaimAtom creates a new ClaimAtom.
func (ClaimAtom) AmountBought ¶
func (ClaimAtom) AmountSold ¶
func (ClaimAtom) ArmForSwitch ¶
ArmForSwitch returns which field name should be used for storing the value for an instance of ClaimAtom
func (ClaimAtom) AssetBought ¶
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 ¶
MarshalBinary implements encoding.BinaryMarshaler.
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) SwitchFieldName ¶
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*ClaimAtom) UnmarshalBinary ¶
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 };
const ( ClaimAtomTypeClaimAtomTypeV0 ClaimAtomType = 0 ClaimAtomTypeClaimAtomTypeOrderBook ClaimAtomType = 1 )
func (ClaimAtomType) MarshalBinary ¶
func (s ClaimAtomType) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
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) MarshalBinary ¶
func (s ClaimClaimableBalanceOp) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*ClaimClaimableBalanceOp) UnmarshalBinary ¶
func (s *ClaimClaimableBalanceOp) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type ClaimClaimableBalanceResult ¶
type ClaimClaimableBalanceResult struct {
Code ClaimClaimableBalanceResultCode
}
ClaimClaimableBalanceResult is an XDR Union defines as:
union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; default: void; };
func NewClaimClaimableBalanceResult ¶
func NewClaimClaimableBalanceResult(code ClaimClaimableBalanceResultCode, value interface{}) (result ClaimClaimableBalanceResult, err error)
NewClaimClaimableBalanceResult creates a new ClaimClaimableBalanceResult.
func (ClaimClaimableBalanceResult) ArmForSwitch ¶
func (u ClaimClaimableBalanceResult) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of ClaimClaimableBalanceResult
func (ClaimClaimableBalanceResult) 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) MarshalBinary ¶
func (s ClaimClaimableBalanceResultCode) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (ClaimClaimableBalanceResultCode) String ¶
func (e ClaimClaimableBalanceResultCode) String() string
String returns the name of `e`
func (*ClaimClaimableBalanceResultCode) UnmarshalBinary ¶
func (s *ClaimClaimableBalanceResultCode) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (ClaimClaimableBalanceResultCode) ValidEnum ¶
func (e ClaimClaimableBalanceResultCode) ValidEnum(v int32) bool
ValidEnum validates a proposed value for this enum. Implements the Enum interface for ClaimClaimableBalanceResultCode
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) 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) 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) GetAbsBefore ¶
func (u ClaimPredicate) GetAbsBefore() (result Int64, ok bool)
GetAbsBefore retrieves the AbsBefore value from the union, returning ok if the union's switch indicated the value is valid.
func (ClaimPredicate) GetAndPredicates ¶
func (u ClaimPredicate) GetAndPredicates() (result []ClaimPredicate, ok bool)
GetAndPredicates retrieves the AndPredicates value from the union, returning ok if the union's switch indicated the value is valid.
func (ClaimPredicate) GetNotPredicate ¶
func (u ClaimPredicate) GetNotPredicate() (result *ClaimPredicate, ok bool)
GetNotPredicate retrieves the NotPredicate value from the union, returning ok if the union's switch indicated the value is valid.
func (ClaimPredicate) GetOrPredicates ¶
func (u ClaimPredicate) GetOrPredicates() (result []ClaimPredicate, ok bool)
GetOrPredicates retrieves the OrPredicates value from the union, returning ok if the union's switch indicated the value is valid.
func (ClaimPredicate) GetRelBefore ¶
func (u ClaimPredicate) GetRelBefore() (result Int64, ok bool)
GetRelBefore retrieves the RelBefore value from the union, returning ok if the union's switch indicated the value is valid.
func (ClaimPredicate) MarshalBinary ¶
func (s ClaimPredicate) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (ClaimPredicate) MarshalJSON ¶
func (c ClaimPredicate) MarshalJSON() ([]byte, error)
func (ClaimPredicate) MustAbsBefore ¶
func (u ClaimPredicate) MustAbsBefore() Int64
MustAbsBefore retrieves the AbsBefore value from the union, panicing if the value is not set.
func (ClaimPredicate) MustAndPredicates ¶
func (u ClaimPredicate) MustAndPredicates() []ClaimPredicate
MustAndPredicates retrieves the AndPredicates value from the union, panicing if the value is not set.
func (ClaimPredicate) MustNotPredicate ¶
func (u ClaimPredicate) MustNotPredicate() *ClaimPredicate
MustNotPredicate retrieves the NotPredicate value from the union, panicing if the value is not set.
func (ClaimPredicate) MustOrPredicates ¶
func (u ClaimPredicate) MustOrPredicates() []ClaimPredicate
MustOrPredicates retrieves the OrPredicates value from the union, panicing if the value is not set.
func (ClaimPredicate) MustRelBefore ¶
func (u ClaimPredicate) MustRelBefore() Int64
MustRelBefore retrieves the RelBefore value from the union, panicing if the value is not set.
func (*ClaimPredicate) Scan ¶
func (c *ClaimPredicate) Scan(src interface{}) error
Scan reads from src into a ClaimPredicate
func (ClaimPredicate) SwitchFieldName ¶
func (u ClaimPredicate) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*ClaimPredicate) UnmarshalBinary ¶
func (s *ClaimPredicate) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (*ClaimPredicate) UnmarshalJSON ¶
func (c *ClaimPredicate) UnmarshalJSON(b []byte) error