Documentation
¶
Overview ¶
Package xdr contains the generated code for parsing the xdr structures used for stellar.
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(d *xdr.Decoder) (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 UnmarshalWithOptions(r io.Reader, v interface{}, options xdr.DecodeOptions) (int, error)
- type AccountId
- func (aid AccountId) Address() string
- func (u AccountId) ArmForSwitch(sw int32) (string, bool)
- func (s *AccountId) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (s AccountId) EncodeTo(e *xdr.Encoder) error
- 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() (key LedgerKey, err error)
- func (s AccountId) MarshalBinary() ([]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 AllowTrustOp
- 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 (u *Asset) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u Asset) EncodeTo(e *xdr.Encoder) error
- 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) GetCode() string
- func (a *Asset) GetIssuer() string
- func (a Asset) GoString() string
- func (a *Asset) LessThan(b Asset) bool
- func (s Asset) MarshalBinary() ([]byte, error)
- func (u Asset) MustAlphaNum12() AlphaNum12
- func (u Asset) MustAlphaNum4() AlphaNum4
- func (a Asset) MustExtract(typ interface{}, code interface{}, issuer interface{})
- 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
- type AssetCode
- func (u AssetCode) ArmForSwitch(sw int32) (string, bool)
- func (u *AssetCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u AssetCode) EncodeTo(e *xdr.Encoder) error
- 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
- func (e *AssetType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (e AssetType) EncodeTo(enc *xdr.Encoder) error
- func (s AssetType) MarshalBinary() ([]byte, error)
- func (e AssetType) String() string
- func (s *AssetType) UnmarshalBinary(inp []byte) error
- func (e AssetType) ValidEnum(v int32) bool
- type BytesDecoder
- type ChangeTrustAsset
- func (u ChangeTrustAsset) ArmForSwitch(sw int32) (string, bool)
- func (u *ChangeTrustAsset) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u ChangeTrustAsset) EncodeTo(e *xdr.Encoder) error
- func (u ChangeTrustAsset) GetAlphaNum12() (result AlphaNum12, ok bool)
- func (u ChangeTrustAsset) GetAlphaNum4() (result AlphaNum4, ok bool)
- func (s ChangeTrustAsset) MarshalBinary() ([]byte, error)
- func (u ChangeTrustAsset) MustAlphaNum12() AlphaNum12
- func (u ChangeTrustAsset) MustAlphaNum4() AlphaNum4
- func (u ChangeTrustAsset) SwitchFieldName() string
- func (tla ChangeTrustAsset) ToAsset() Asset
- func (s *ChangeTrustAsset) UnmarshalBinary(inp []byte) error
- type ChangeTrustOp
- type CryptoKeyType
- func (e *CryptoKeyType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (e CryptoKeyType) EncodeTo(enc *xdr.Encoder) error
- func (s CryptoKeyType) MarshalBinary() ([]byte, error)
- func (e CryptoKeyType) String() string
- func (s *CryptoKeyType) UnmarshalBinary(inp []byte) error
- func (e CryptoKeyType) ValidEnum(v int32) bool
- type DecoderFrom
- type DecoratedSignature
- type Duration
- type EncoderTo
- type EncodingBuffer
- func (e *EncodingBuffer) LedgerKeyUnsafeMarshalBinaryCompress(key LedgerKey) ([]byte, error)
- func (e *EncodingBuffer) MarshalBase64(encodable EncoderTo) (string, error)
- func (e *EncodingBuffer) MarshalBinary(encodable EncoderTo) ([]byte, error)
- func (e *EncodingBuffer) MarshalHex(encodable EncoderTo) (string, error)
- func (e *EncodingBuffer) UnsafeMarshalBase64(encodable EncoderTo) ([]byte, error)
- func (e *EncodingBuffer) UnsafeMarshalBinary(encodable EncoderTo) ([]byte, error)
- func (e *EncodingBuffer) UnsafeMarshalHex(encodable EncoderTo) ([]byte, error)
- type EnvelopeType
- func (e *EnvelopeType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (e EnvelopeType) EncodeTo(enc *xdr.Encoder) error
- func (s EnvelopeType) MarshalBinary() ([]byte, error)
- func (e EnvelopeType) String() string
- func (s *EnvelopeType) UnmarshalBinary(inp []byte) error
- func (e EnvelopeType) ValidEnum(v int32) bool
- type ExtensionPoint
- func (u ExtensionPoint) ArmForSwitch(sw int32) (string, bool)
- func (u *ExtensionPoint) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u ExtensionPoint) EncodeTo(e *xdr.Encoder) error
- func (s ExtensionPoint) MarshalBinary() ([]byte, error)
- func (u ExtensionPoint) SwitchFieldName() string
- func (s *ExtensionPoint) UnmarshalBinary(inp []byte) error
- type FeeBumpTransaction
- type FeeBumpTransactionEnvelope
- type FeeBumpTransactionExt
- func (u FeeBumpTransactionExt) ArmForSwitch(sw int32) (string, bool)
- func (u *FeeBumpTransactionExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u FeeBumpTransactionExt) EncodeTo(e *xdr.Encoder) error
- func (s FeeBumpTransactionExt) MarshalBinary() ([]byte, error)
- func (u FeeBumpTransactionExt) SwitchFieldName() string
- func (s *FeeBumpTransactionExt) UnmarshalBinary(inp []byte) error
- type FeeBumpTransactionInnerTx
- func (u FeeBumpTransactionInnerTx) ArmForSwitch(sw int32) (string, bool)
- func (u *FeeBumpTransactionInnerTx) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u FeeBumpTransactionInnerTx) EncodeTo(e *xdr.Encoder) error
- 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
- func (s *Hash) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (s *Hash) EncodeTo(e *xdr.Encoder) error
- func (s Hash) Equals(o Hash) bool
- func (h Hash) HexString() string
- func (s Hash) MarshalBinary() ([]byte, error)
- func (s *Hash) UnmarshalBinary(inp []byte) error
- func (e Hash) XDRMaxSize() int
- type Int128Parts
- type Int32
- type Int64
- type Keyer
- type LedgerBounds
- type LedgerEntry
- type LedgerEntryData
- func (u LedgerEntryData) ArmForSwitch(sw int32) (string, bool)
- func (u *LedgerEntryData) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u LedgerEntryData) EncodeTo(e *xdr.Encoder) error
- func (u LedgerEntryData) GetTrustLine() (result TrustLineEntry, ok bool)
- func (s LedgerEntryData) MarshalBinary() ([]byte, error)
- 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) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u LedgerEntryExt) EncodeTo(e *xdr.Encoder) error
- 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
- func (u LedgerEntryExtensionV1Ext) ArmForSwitch(sw int32) (string, bool)
- func (u *LedgerEntryExtensionV1Ext) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u LedgerEntryExtensionV1Ext) EncodeTo(e *xdr.Encoder) error
- func (s LedgerEntryExtensionV1Ext) MarshalBinary() ([]byte, error)
- func (u LedgerEntryExtensionV1Ext) SwitchFieldName() string
- func (s *LedgerEntryExtensionV1Ext) UnmarshalBinary(inp []byte) error
- type LedgerEntryType
- func (e *LedgerEntryType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (e LedgerEntryType) EncodeTo(enc *xdr.Encoder) error
- func (s LedgerEntryType) MarshalBinary() ([]byte, error)
- func (e LedgerEntryType) String() string
- func (s *LedgerEntryType) UnmarshalBinary(inp []byte) error
- func (e LedgerEntryType) ValidEnum(v int32) bool
- type LedgerKey
- func (u LedgerKey) ArmForSwitch(sw int32) (string, bool)
- func (u *LedgerKey) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u LedgerKey) EncodeTo(e *xdr.Encoder) error
- func (u LedgerKey) GetAccount() (result LedgerKeyAccount, ok bool)
- func (u LedgerKey) GetTrustLine() (result LedgerKeyTrustLine, ok bool)
- func (s LedgerKey) MarshalBinary() ([]byte, error)
- func (u LedgerKey) MustAccount() LedgerKeyAccount
- func (u LedgerKey) MustTrustLine() LedgerKeyTrustLine
- func (u LedgerKey) SwitchFieldName() string
- func (s *LedgerKey) UnmarshalBinary(inp []byte) error
- type LedgerKeyAccount
- type LedgerKeyTrustLine
- type Liabilities
- type LiquidityPoolType
- func (e *LiquidityPoolType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (e LiquidityPoolType) EncodeTo(enc *xdr.Encoder) error
- func (s LiquidityPoolType) MarshalBinary() ([]byte, error)
- func (e LiquidityPoolType) String() string
- func (s *LiquidityPoolType) UnmarshalBinary(inp []byte) error
- func (e LiquidityPoolType) ValidEnum(v int32) bool
- type Memo
- func (u Memo) ArmForSwitch(sw int32) (string, bool)
- func (u *Memo) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u Memo) EncodeTo(e *xdr.Encoder) error
- 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
- func (e *MemoType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (e MemoType) EncodeTo(enc *xdr.Encoder) error
- func (s MemoType) MarshalBinary() ([]byte, error)
- func (e MemoType) String() string
- func (s *MemoType) UnmarshalBinary(inp []byte) error
- func (e MemoType) ValidEnum(v int32) bool
- 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 (u *MuxedAccount) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u MuxedAccount) EncodeTo(e *xdr.Encoder) error
- 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 Operation
- type OperationBody
- func (u OperationBody) ArmForSwitch(sw int32) (string, bool)
- func (u *OperationBody) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u OperationBody) EncodeTo(e *xdr.Encoder) error
- func (u OperationBody) GetAllowTrustOp() (result AllowTrustOp, ok bool)
- func (u OperationBody) GetChangeTrustOp() (result ChangeTrustOp, ok bool)
- func (u OperationBody) GetDestination() (result MuxedAccount, ok bool)
- func (u OperationBody) GetPaymentOp() (result PaymentOp, ok bool)
- func (o OperationBody) GoString() string
- func (s OperationBody) MarshalBinary() ([]byte, error)
- func (u OperationBody) MustAllowTrustOp() AllowTrustOp
- func (u OperationBody) MustChangeTrustOp() ChangeTrustOp
- func (u OperationBody) MustDestination() MuxedAccount
- func (u OperationBody) MustPaymentOp() PaymentOp
- func (u OperationBody) SwitchFieldName() string
- func (s *OperationBody) UnmarshalBinary(inp []byte) error
- type OperationType
- func (e *OperationType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (e OperationType) EncodeTo(enc *xdr.Encoder) error
- func (s OperationType) MarshalBinary() ([]byte, error)
- func (e OperationType) String() string
- func (s *OperationType) UnmarshalBinary(inp []byte) error
- func (e OperationType) ValidEnum(v int32) bool
- type PaymentOp
- type PoolId
- type PreconditionType
- func (e *PreconditionType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (e PreconditionType) EncodeTo(enc *xdr.Encoder) error
- func (pt PreconditionType) GoString() string
- func (s PreconditionType) MarshalBinary() ([]byte, error)
- func (e PreconditionType) String() string
- func (s *PreconditionType) UnmarshalBinary(inp []byte) error
- func (e PreconditionType) ValidEnum(v int32) bool
- type Preconditions
- func (u Preconditions) ArmForSwitch(sw int32) (string, bool)
- func (u *Preconditions) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u Preconditions) EncodeTo(e *xdr.Encoder) error
- func (u Preconditions) GetTimeBounds() (result TimeBounds, ok bool)
- func (u Preconditions) GetV2() (result PreconditionsV2, ok bool)
- func (p Preconditions) GoString() string
- func (s Preconditions) MarshalBinary() ([]byte, error)
- func (u Preconditions) MustTimeBounds() TimeBounds
- func (u Preconditions) MustV2() PreconditionsV2
- func (u Preconditions) SwitchFieldName() string
- func (s *Preconditions) UnmarshalBinary(inp []byte) error
- type PreconditionsV2
- type PublicKey
- func (u PublicKey) ArmForSwitch(sw int32) (string, bool)
- func (u *PublicKey) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u PublicKey) EncodeTo(e *xdr.Encoder) error
- 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
- func (e *PublicKeyType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (e PublicKeyType) EncodeTo(enc *xdr.Encoder) error
- func (s PublicKeyType) MarshalBinary() ([]byte, error)
- func (e PublicKeyType) String() string
- func (s *PublicKeyType) UnmarshalBinary(inp []byte) error
- func (e PublicKeyType) ValidEnum(v int32) bool
- type SequenceNumber
- type Signature
- type SignatureHint
- type Signer
- type SignerKey
- func (skey *SignerKey) Address() string
- func (u SignerKey) ArmForSwitch(sw int32) (string, bool)
- func (u *SignerKey) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u SignerKey) EncodeTo(e *xdr.Encoder) error
- func (skey *SignerKey) Equals(other SignerKey) bool
- func (skey *SignerKey) GetAddress() (string, error)
- func (u SignerKey) GetEd25519() (result Uint256, ok bool)
- func (u SignerKey) GetEd25519SignedPayload() (result SignerKeyEd25519SignedPayload, 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) MustEd25519SignedPayload() SignerKeyEd25519SignedPayload
- 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 SignerKeyEd25519SignedPayload
- func (s *SignerKeyEd25519SignedPayload) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (s *SignerKeyEd25519SignedPayload) EncodeTo(e *xdr.Encoder) error
- func (s SignerKeyEd25519SignedPayload) MarshalBinary() ([]byte, error)
- func (s *SignerKeyEd25519SignedPayload) UnmarshalBinary(inp []byte) error
- type SignerKeyType
- func (e *SignerKeyType) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (e SignerKeyType) EncodeTo(enc *xdr.Encoder) error
- func (s SignerKeyType) MarshalBinary() ([]byte, error)
- func (e SignerKeyType) String() string
- func (s *SignerKeyType) UnmarshalBinary(inp []byte) error
- func (e SignerKeyType) ValidEnum(v int32) bool
- type SponsorshipDescriptor
- type String32
- type String64
- type TimeBounds
- type TimePoint
- type Transaction
- func (s *Transaction) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (s *Transaction) EncodeTo(e *xdr.Encoder) error
- func (tx *Transaction) ExtraSigners() []SignerKey
- func (tx *Transaction) LedgerBounds() *LedgerBounds
- func (s Transaction) MarshalBinary() ([]byte, error)
- func (tx *Transaction) MinSeqAge() *Duration
- func (tx *Transaction) MinSeqLedgerGap() *Uint32
- func (tx *Transaction) MinSeqNum() *SequenceNumber
- func (tx *Transaction) TimeBounds() *TimeBounds
- func (s *Transaction) UnmarshalBinary(inp []byte) error
- type TransactionEnvelope
- func (u TransactionEnvelope) ArmForSwitch(sw int32) (string, bool)
- func (u *TransactionEnvelope) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u TransactionEnvelope) EncodeTo(e *xdr.Encoder) error
- func (e TransactionEnvelope) ExtraSigners() []SignerKey
- 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 (e TransactionEnvelope) LedgerBounds() *LedgerBounds
- func (s TransactionEnvelope) MarshalBinary() ([]byte, error)
- func (e TransactionEnvelope) Memo() Memo
- func (e TransactionEnvelope) MinSeqAge() *Duration
- func (e TransactionEnvelope) MinSeqLedgerGap() *Uint32
- func (e TransactionEnvelope) MinSeqNum() *int64
- func (u TransactionEnvelope) MustFeeBump() FeeBumpTransactionEnvelope
- func (u TransactionEnvelope) MustV0() TransactionV0Envelope
- func (u TransactionEnvelope) MustV1() TransactionV1Envelope
- func (e TransactionEnvelope) Operations() []Operation
- func (e TransactionEnvelope) Preconditions() Preconditions
- 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
- func (u TransactionExt) ArmForSwitch(sw int32) (string, bool)
- func (u *TransactionExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u TransactionExt) EncodeTo(e *xdr.Encoder) error
- func (s TransactionExt) MarshalBinary() ([]byte, error)
- func (u TransactionExt) SwitchFieldName() string
- func (s *TransactionExt) UnmarshalBinary(inp []byte) error
- type TransactionSignaturePayload
- func (s *TransactionSignaturePayload) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (s *TransactionSignaturePayload) EncodeTo(e *xdr.Encoder) error
- func (s TransactionSignaturePayload) MarshalBinary() ([]byte, error)
- func (s *TransactionSignaturePayload) UnmarshalBinary(inp []byte) error
- type TransactionSignaturePayloadTaggedTransaction
- func (u TransactionSignaturePayloadTaggedTransaction) ArmForSwitch(sw int32) (string, bool)
- func (u *TransactionSignaturePayloadTaggedTransaction) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u TransactionSignaturePayloadTaggedTransaction) EncodeTo(e *xdr.Encoder) error
- 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
- func (u TransactionV0Ext) ArmForSwitch(sw int32) (string, bool)
- func (u *TransactionV0Ext) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u TransactionV0Ext) EncodeTo(e *xdr.Encoder) error
- func (s TransactionV0Ext) MarshalBinary() ([]byte, error)
- func (u TransactionV0Ext) SwitchFieldName() string
- func (s *TransactionV0Ext) UnmarshalBinary(inp []byte) error
- type TransactionV1Envelope
- type TrustLineAsset
- func (u TrustLineAsset) ArmForSwitch(sw int32) (string, bool)
- func (u *TrustLineAsset) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u TrustLineAsset) EncodeTo(e *xdr.Encoder) error
- 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 (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
- func (s *TrustLineEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (s *TrustLineEntry) EncodeTo(e *xdr.Encoder) error
- func (trustLine *TrustLineEntry) Liabilities() Liabilities
- func (s TrustLineEntry) MarshalBinary() ([]byte, error)
- func (s *TrustLineEntry) UnmarshalBinary(inp []byte) error
- type TrustLineEntryExt
- func (u TrustLineEntryExt) ArmForSwitch(sw int32) (string, bool)
- func (u *TrustLineEntryExt) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u TrustLineEntryExt) EncodeTo(e *xdr.Encoder) error
- 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 TrustLineEntryExtensionV2
- type TrustLineEntryExtensionV2Ext
- func (u TrustLineEntryExtensionV2Ext) ArmForSwitch(sw int32) (string, bool)
- func (u *TrustLineEntryExtensionV2Ext) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u TrustLineEntryExtensionV2Ext) EncodeTo(e *xdr.Encoder) error
- func (s TrustLineEntryExtensionV2Ext) MarshalBinary() ([]byte, error)
- func (u TrustLineEntryExtensionV2Ext) SwitchFieldName() string
- func (s *TrustLineEntryExtensionV2Ext) UnmarshalBinary(inp []byte) error
- type TrustLineEntryV1
- type TrustLineEntryV1Ext
- func (u TrustLineEntryV1Ext) ArmForSwitch(sw int32) (string, bool)
- func (u *TrustLineEntryV1Ext) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (u TrustLineEntryV1Ext) EncodeTo(e *xdr.Encoder) error
- func (u TrustLineEntryV1Ext) GetV2() (result TrustLineEntryExtensionV2, ok bool)
- func (s TrustLineEntryV1Ext) MarshalBinary() ([]byte, error)
- func (u TrustLineEntryV1Ext) MustV2() TrustLineEntryExtensionV2
- func (u TrustLineEntryV1Ext) SwitchFieldName() string
- func (s *TrustLineEntryV1Ext) UnmarshalBinary(inp []byte) error
- type TrustLineFlags
- func (e *TrustLineFlags) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (e TrustLineFlags) EncodeTo(enc *xdr.Encoder) error
- 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
- func (s *Uint256) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
- func (s *Uint256) EncodeTo(e *xdr.Encoder) error
- func (s Uint256) Equals(o Uint256) bool
- func (s Uint256) MarshalBinary() ([]byte, error)
- func (u Uint256) String() string
- func (s *Uint256) UnmarshalBinary(inp []byte) error
- func (e Uint256) XDRMaxSize() int
- type Uint32
- type Uint64
Constants ¶
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;
Variables ¶
var AssetTypeToString = map[AssetType]string{
AssetTypeAssetTypeNative: "native",
AssetTypeAssetTypeCreditAlphanum4: "credit_alphanum4",
AssetTypeAssetTypeCreditAlphanum12: "credit_alphanum12",
}
AssetTypeToString maps an xdr.AssetType to its string representation
var CommitHash string
CommitHash is the commit hash that was used to generate the xdr in this folder. During the process of updating the XDR, the text file below is being updated. Then, during compile time, the file content are being embedded into the given string.
var ErrMaxDecodingDepthReached = errors.New("maximum decoding depth reached")
var LedgerEntryTypeMap = ledgerEntryTypeMap
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 unmarshaling 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 UnmarshalWithOptions ¶
UnmarshalWithOptions works like Unmarshal but uses decoding options.
Types ¶
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) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
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) 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 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) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*AllowTrustOp) EncodeTo ¶
func (s *AllowTrustOp) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (AllowTrustOp) MarshalBinary ¶
func (s AllowTrustOp) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*AllowTrustOp) UnmarshalBinary ¶
func (s *AllowTrustOp) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type AlphaNum12 ¶
type AlphaNum12 struct {
AssetCode AssetCode12
Issuer AccountId
}
AlphaNum12 is an XDR Struct defines as:
struct AlphaNum12
{
AssetCode12 assetCode;
AccountID issuer;
};
func (*AlphaNum12) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*AlphaNum12) EncodeTo ¶
func (s *AlphaNum12) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (AlphaNum12) MarshalBinary ¶
func (s AlphaNum12) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*AlphaNum12) UnmarshalBinary ¶
func (s *AlphaNum12) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type AlphaNum4 ¶
type AlphaNum4 struct {
AssetCode AssetCode4
Issuer AccountId
}
AlphaNum4 is an XDR Struct defines as:
struct AlphaNum4
{
AssetCode4 assetCode;
AccountID issuer;
};
func (*AlphaNum4) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
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) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
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) 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 credit asset, erroring 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) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
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) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*AssetCode12) EncodeTo ¶
func (s *AssetCode12) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (AssetCode12) MarshalBinary ¶
func (s AssetCode12) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*AssetCode12) UnmarshalBinary ¶
func (s *AssetCode12) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (AssetCode12) XDRMaxSize ¶
func (e AssetCode12) XDRMaxSize() int
XDRMaxSize implements the Sized interface for AssetCode12
type AssetCode4 ¶
type AssetCode4 [4]byte
AssetCode4 is an XDR Typedef defines as:
typedef opaque AssetCode4[4];
func (*AssetCode4) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*AssetCode4) EncodeTo ¶
func (s *AssetCode4) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (AssetCode4) MarshalBinary ¶
func (s AssetCode4) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*AssetCode4) UnmarshalBinary ¶
func (s *AssetCode4) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (AssetCode4) XDRMaxSize ¶
func (e AssetCode4) XDRMaxSize() int
XDRMaxSize implements the Sized interface for AssetCode4
type AssetType ¶
type AssetType int32
func (*AssetType) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (AssetType) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*AssetType) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type BytesDecoder ¶
type BytesDecoder struct {
// contains filtered or unexported fields
}
BytesDecoder efficiently manages a byte reader and an xdr decoder so that they don't need to be allocated in every decoding call.
func NewBytesDecoder ¶
func NewBytesDecoder() *BytesDecoder
func (*BytesDecoder) DecodeBytes ¶
func (d *BytesDecoder) DecodeBytes(v DecoderFrom, b []byte) (int, error)
type ChangeTrustAsset ¶
type ChangeTrustAsset struct {
Type AssetType
AlphaNum4 *AlphaNum4
AlphaNum12 *AlphaNum12
}
func NewChangeTrustAsset ¶
func NewChangeTrustAsset(aType AssetType, value interface{}) (result ChangeTrustAsset, err error)
NewChangeTrustAsset creates a new ChangeTrustAsset.
func (ChangeTrustAsset) ArmForSwitch ¶
func (u ChangeTrustAsset) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of ChangeTrustAsset
func (*ChangeTrustAsset) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (ChangeTrustAsset) EncodeTo ¶
func (u ChangeTrustAsset) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (ChangeTrustAsset) GetAlphaNum12 ¶
func (u ChangeTrustAsset) GetAlphaNum12() (result AlphaNum12, ok bool)
GetAlphaNum12 retrieves the AlphaNum12 value from the union, returning ok if the union's switch indicated the value is valid.
func (ChangeTrustAsset) GetAlphaNum4 ¶
func (u ChangeTrustAsset) GetAlphaNum4() (result AlphaNum4, ok bool)
GetAlphaNum4 retrieves the AlphaNum4 value from the union, returning ok if the union's switch indicated the value is valid.
func (ChangeTrustAsset) 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) SwitchFieldName ¶
func (u ChangeTrustAsset) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (ChangeTrustAsset) ToAsset ¶
func (tla ChangeTrustAsset) ToAsset() Asset
ToAsset converts ChangeTrustAsset to Asset. Panics on type other than AssetTypeAssetTypeNative, AssetTypeAssetTypeCreditAlphanum4 or AssetTypeAssetTypeCreditAlphanum12.
func (*ChangeTrustAsset) UnmarshalBinary ¶
func (s *ChangeTrustAsset) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type ChangeTrustOp ¶
type ChangeTrustOp struct {
Line ChangeTrustAsset
Limit Int64
}
ChangeTrustOp is an XDR Struct defines as:
struct ChangeTrustOp
{
ChangeTrustAsset line;
// if limit is set to 0, deletes the trust line
int64 limit;
};
func (*ChangeTrustOp) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*ChangeTrustOp) EncodeTo ¶
func (s *ChangeTrustOp) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (ChangeTrustOp) MarshalBinary ¶
func (s ChangeTrustOp) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*ChangeTrustOp) UnmarshalBinary ¶
func (s *ChangeTrustOp) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type CryptoKeyType ¶
type CryptoKeyType int32
const ( CryptoKeyTypeKeyTypeEd25519 CryptoKeyType = 0 CryptoKeyTypeKeyTypePreAuthTx CryptoKeyType = 1 CryptoKeyTypeKeyTypeHashX CryptoKeyType = 2 CryptoKeyTypeKeyTypeEd25519SignedPayload CryptoKeyType = 3 CryptoKeyTypeKeyTypeMuxedEd25519 CryptoKeyType = 256 )
func (*CryptoKeyType) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (CryptoKeyType) EncodeTo ¶
func (e CryptoKeyType) EncodeTo(enc *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (CryptoKeyType) MarshalBinary ¶
func (s CryptoKeyType) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*CryptoKeyType) UnmarshalBinary ¶
func (s *CryptoKeyType) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (CryptoKeyType) ValidEnum ¶
func (e CryptoKeyType) ValidEnum(v int32) bool
ValidEnum validates a proposed value for this enum. Implements the Enum interface for CryptoKeyType
type DecoderFrom ¶
type DecoderFrom interface {
// contains filtered or unexported methods
}
type DecoratedSignature ¶
type DecoratedSignature struct {
Hint SignatureHint
Signature Signature
}
func NewDecoratedSignature ¶
func NewDecoratedSignature(sig []byte, hint [4]byte) DecoratedSignature
NewDecoratedSignature constructs a decorated signature structure directly from the given signature and hint. Note that the hint should correspond to the signer that created the signature, but this helper cannot ensure that.
func NewDecoratedSignatureForPayload ¶
func NewDecoratedSignatureForPayload( sig []byte, keyHint [4]byte, payload []byte, ) DecoratedSignature
NewDecoratedSignatureForPayload creates a decorated signature with a hint that uses the key hint, the last four bytes of signature, and the last four bytes of the input that got signed. Note that the signature should be the signature of the payload via the key being hinted, but this construction method cannot ensure that.
func (*DecoratedSignature) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*DecoratedSignature) EncodeTo ¶
func (s *DecoratedSignature) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (DecoratedSignature) MarshalBinary ¶
func (s DecoratedSignature) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*DecoratedSignature) UnmarshalBinary ¶
func (s *DecoratedSignature) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type Duration ¶
type Duration Uint64
Duration is an XDR Typedef defines as:
typedef uint64 Duration;
func (*Duration) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (Duration) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*Duration) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type EncodingBuffer ¶
type EncodingBuffer struct {
// contains filtered or unexported fields
}
EncodingBuffer reuses internal buffers between invocations to minimize allocations. For that reason, it is not thread-safe. It intentionally only allows EncodeTo method arguments, to guarantee high performance encoding.
func NewEncodingBuffer ¶
func NewEncodingBuffer() *EncodingBuffer
func (*EncodingBuffer) LedgerKeyUnsafeMarshalBinaryCompress ¶
func (e *EncodingBuffer) LedgerKeyUnsafeMarshalBinaryCompress(key LedgerKey) ([]byte, error)
LedgerKeyUnsafeMarshalBinaryCompress marshals LedgerKey to []byte but unlike MarshalBinary() it removes all unnecessary bytes, exploting the fact that XDR is padding data to 4 bytes in union discriminants etc. It's primary use is in ingest/io.StateReader that keep LedgerKeys in memory so this function decrease memory requirements.
Warning, do not use UnmarshalBinary() on data encoded using this method!
Optimizations: - Writes a single byte for union discriminants vs 4 bytes. - Removes type and code padding for Asset. - Removes padding for AccountIds
func (*EncodingBuffer) MarshalBase64 ¶
func (e *EncodingBuffer) MarshalBase64(encodable EncoderTo) (string, error)
func (*EncodingBuffer) MarshalBinary ¶
func (e *EncodingBuffer) MarshalBinary(encodable EncoderTo) ([]byte, error)
func (*EncodingBuffer) MarshalHex ¶
func (e *EncodingBuffer) MarshalHex(encodable EncoderTo) (string, error)
func (*EncodingBuffer) UnsafeMarshalBase64 ¶
func (e *EncodingBuffer) UnsafeMarshalBase64(encodable EncoderTo) ([]byte, error)
UnsafeMarshalBase64 is the base64 version of UnsafeMarshalBinary
func (*EncodingBuffer) UnsafeMarshalBinary ¶
func (e *EncodingBuffer) UnsafeMarshalBinary(encodable EncoderTo) ([]byte, error)
UnsafeMarshalBinary marshals the input XDR binary, returning a slice pointing to the internal buffer. Handled with care this improveds performance since copying is not required. Subsequent calls to marshaling methods will overwrite the returned buffer.
func (*EncodingBuffer) UnsafeMarshalHex ¶
func (e *EncodingBuffer) UnsafeMarshalHex(encodable EncoderTo) ([]byte, error)
UnsafeMarshalHex is the hex version of UnsafeMarshalBinary
type EnvelopeType ¶
type EnvelopeType int32
const ( EnvelopeTypeEnvelopeTypeTxV0 EnvelopeType = 0 EnvelopeTypeEnvelopeTypeScp EnvelopeType = 1 EnvelopeTypeEnvelopeTypeTx EnvelopeType = 2 EnvelopeTypeEnvelopeTypeAuth EnvelopeType = 3 EnvelopeTypeEnvelopeTypeScpvalue EnvelopeType = 4 EnvelopeTypeEnvelopeTypeTxFeeBump EnvelopeType = 5 EnvelopeTypeEnvelopeTypeOpId EnvelopeType = 6 EnvelopeTypeEnvelopeTypePoolRevokeOpId EnvelopeType = 7 EnvelopeTypeEnvelopeTypeContractId EnvelopeType = 8 EnvelopeTypeEnvelopeTypeSorobanAuthorization EnvelopeType = 9 )
func (*EnvelopeType) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (EnvelopeType) EncodeTo ¶
func (e EnvelopeType) EncodeTo(enc *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (EnvelopeType) MarshalBinary ¶
func (s EnvelopeType) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*EnvelopeType) UnmarshalBinary ¶
func (s *EnvelopeType) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (EnvelopeType) ValidEnum ¶
func (e EnvelopeType) ValidEnum(v int32) bool
ValidEnum validates a proposed value for this enum. Implements the Enum interface for EnvelopeType
type ExtensionPoint ¶
type ExtensionPoint struct {
V int32
}
ExtensionPoint is an XDR Union defines as:
union ExtensionPoint switch (int v)
{
case 0:
void;
};
func NewExtensionPoint ¶
func NewExtensionPoint(v int32, value interface{}) (result ExtensionPoint, err error)
NewExtensionPoint creates a new ExtensionPoint.
func (ExtensionPoint) ArmForSwitch ¶
func (u ExtensionPoint) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of ExtensionPoint
func (*ExtensionPoint) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (ExtensionPoint) EncodeTo ¶
func (u ExtensionPoint) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (ExtensionPoint) MarshalBinary ¶
func (s ExtensionPoint) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (ExtensionPoint) SwitchFieldName ¶
func (u ExtensionPoint) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*ExtensionPoint) UnmarshalBinary ¶
func (s *ExtensionPoint) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type FeeBumpTransaction ¶
type FeeBumpTransaction struct {
FeeSource MuxedAccount
Fee Int64
InnerTx FeeBumpTransactionInnerTx
Ext FeeBumpTransactionExt
}
func (*FeeBumpTransaction) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*FeeBumpTransaction) EncodeTo ¶
func (s *FeeBumpTransaction) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (FeeBumpTransaction) MarshalBinary ¶
func (s FeeBumpTransaction) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*FeeBumpTransaction) UnmarshalBinary ¶
func (s *FeeBumpTransaction) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type FeeBumpTransactionEnvelope ¶
type FeeBumpTransactionEnvelope struct {
Tx FeeBumpTransaction
Signatures []DecoratedSignature `xdrmaxsize:"20"`
}
func (*FeeBumpTransactionEnvelope) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*FeeBumpTransactionEnvelope) EncodeTo ¶
func (s *FeeBumpTransactionEnvelope) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (FeeBumpTransactionEnvelope) MarshalBinary ¶
func (s FeeBumpTransactionEnvelope) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*FeeBumpTransactionEnvelope) UnmarshalBinary ¶
func (s *FeeBumpTransactionEnvelope) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type FeeBumpTransactionExt ¶
type FeeBumpTransactionExt struct {
V int32
}
func NewFeeBumpTransactionExt ¶
func NewFeeBumpTransactionExt(v int32, value interface{}) (result FeeBumpTransactionExt, err error)
NewFeeBumpTransactionExt creates a new FeeBumpTransactionExt.
func (FeeBumpTransactionExt) ArmForSwitch ¶
func (u FeeBumpTransactionExt) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of FeeBumpTransactionExt
func (*FeeBumpTransactionExt) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (FeeBumpTransactionExt) EncodeTo ¶
func (u FeeBumpTransactionExt) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (FeeBumpTransactionExt) MarshalBinary ¶
func (s FeeBumpTransactionExt) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (FeeBumpTransactionExt) SwitchFieldName ¶
func (u FeeBumpTransactionExt) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*FeeBumpTransactionExt) UnmarshalBinary ¶
func (s *FeeBumpTransactionExt) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type FeeBumpTransactionInnerTx ¶
type FeeBumpTransactionInnerTx struct {
Type EnvelopeType
V1 *TransactionV1Envelope
}
func NewFeeBumpTransactionInnerTx ¶
func NewFeeBumpTransactionInnerTx(aType EnvelopeType, value interface{}) (result FeeBumpTransactionInnerTx, err error)
NewFeeBumpTransactionInnerTx creates a new FeeBumpTransactionInnerTx.
func (FeeBumpTransactionInnerTx) ArmForSwitch ¶
func (u FeeBumpTransactionInnerTx) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of FeeBumpTransactionInnerTx
func (*FeeBumpTransactionInnerTx) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (FeeBumpTransactionInnerTx) EncodeTo ¶
func (u FeeBumpTransactionInnerTx) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (FeeBumpTransactionInnerTx) GetV1 ¶
func (u FeeBumpTransactionInnerTx) GetV1() (result TransactionV1Envelope, ok bool)
GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.
func (FeeBumpTransactionInnerTx) GoString ¶
func (e FeeBumpTransactionInnerTx) GoString() string
GoString implements fmt.GoStringer.
func (FeeBumpTransactionInnerTx) MarshalBinary ¶
func (s FeeBumpTransactionInnerTx) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (FeeBumpTransactionInnerTx) MustV1 ¶
func (u FeeBumpTransactionInnerTx) MustV1() TransactionV1Envelope
MustV1 retrieves the V1 value from the union, panicing if the value is not set.
func (FeeBumpTransactionInnerTx) SwitchFieldName ¶
func (u FeeBumpTransactionInnerTx) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*FeeBumpTransactionInnerTx) UnmarshalBinary ¶
func (s *FeeBumpTransactionInnerTx) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type Hash ¶
type Hash [32]byte
func (*Hash) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (Hash) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*Hash) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (Hash) XDRMaxSize ¶
XDRMaxSize implements the Sized interface for Hash
type Int128Parts ¶
func (*Int128Parts) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*Int128Parts) EncodeTo ¶
func (s *Int128Parts) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (Int128Parts) MarshalBinary ¶
func (s Int128Parts) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*Int128Parts) UnmarshalBinary ¶
func (s *Int128Parts) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type Int32 ¶
type Int32 int32
Int32 is an XDR Typedef defines as:
typedef int int32;
func (*Int32) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (Int32) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*Int32) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type Int64 ¶
type Int64 int64
Int64 is an XDR Typedef defines as:
typedef hyper int64;
func (*Int64) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (Int64) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*Int64) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type LedgerBounds ¶
func (*LedgerBounds) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*LedgerBounds) EncodeTo ¶
func (s *LedgerBounds) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (LedgerBounds) MarshalBinary ¶
func (s LedgerBounds) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*LedgerBounds) UnmarshalBinary ¶
func (s *LedgerBounds) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type LedgerEntry ¶
type LedgerEntry struct {
LastModifiedLedgerSeq Uint32
Data LedgerEntryData
Ext LedgerEntryExt
}
func (*LedgerEntry) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*LedgerEntry) EncodeTo ¶
func (s *LedgerEntry) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (LedgerEntry) MarshalBinary ¶
func (s LedgerEntry) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*LedgerEntry) UnmarshalBinary ¶
func (s *LedgerEntry) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type LedgerEntryData ¶
type LedgerEntryData struct {
Type LedgerEntryType
TrustLine *TrustLineEntry
}
func NewLedgerEntryData ¶
func NewLedgerEntryData(aType LedgerEntryType, value interface{}) (result LedgerEntryData, err error)
NewLedgerEntryData creates a new LedgerEntryData.
func (LedgerEntryData) ArmForSwitch ¶
func (u LedgerEntryData) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of LedgerEntryData
func (*LedgerEntryData) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (LedgerEntryData) EncodeTo ¶
func (u LedgerEntryData) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (LedgerEntryData) GetTrustLine ¶
func (u LedgerEntryData) GetTrustLine() (result TrustLineEntry, ok bool)
GetTrustLine retrieves the TrustLine value from the union, returning ok if the union's switch indicated the value is valid.
func (LedgerEntryData) MarshalBinary ¶
func (s LedgerEntryData) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (LedgerEntryData) MustTrustLine ¶
func (u LedgerEntryData) MustTrustLine() TrustLineEntry
MustTrustLine retrieves the TrustLine value from the union, panicing if the value is not set.
func (LedgerEntryData) SwitchFieldName ¶
func (u LedgerEntryData) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*LedgerEntryData) UnmarshalBinary ¶
func (s *LedgerEntryData) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type LedgerEntryExt ¶
type LedgerEntryExt struct {
V int32
V1 *LedgerEntryExtensionV1
}
func NewLedgerEntryExt ¶
func NewLedgerEntryExt(v int32, value interface{}) (result LedgerEntryExt, err error)
NewLedgerEntryExt creates a new LedgerEntryExt.
func (LedgerEntryExt) ArmForSwitch ¶
func (u LedgerEntryExt) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of LedgerEntryExt
func (*LedgerEntryExt) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (LedgerEntryExt) EncodeTo ¶
func (u LedgerEntryExt) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (LedgerEntryExt) GetV1 ¶
func (u LedgerEntryExt) GetV1() (result LedgerEntryExtensionV1, ok bool)
GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.
func (LedgerEntryExt) MarshalBinary ¶
func (s LedgerEntryExt) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (LedgerEntryExt) MustV1 ¶
func (u LedgerEntryExt) MustV1() LedgerEntryExtensionV1
MustV1 retrieves the V1 value from the union, panicing if the value is not set.
func (LedgerEntryExt) SwitchFieldName ¶
func (u LedgerEntryExt) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*LedgerEntryExt) UnmarshalBinary ¶
func (s *LedgerEntryExt) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type LedgerEntryExtensionV1 ¶
type LedgerEntryExtensionV1 struct {
SponsoringId SponsorshipDescriptor
Ext LedgerEntryExtensionV1Ext
}
func (*LedgerEntryExtensionV1) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*LedgerEntryExtensionV1) EncodeTo ¶
func (s *LedgerEntryExtensionV1) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (LedgerEntryExtensionV1) MarshalBinary ¶
func (s LedgerEntryExtensionV1) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*LedgerEntryExtensionV1) UnmarshalBinary ¶
func (s *LedgerEntryExtensionV1) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type LedgerEntryExtensionV1Ext ¶
type LedgerEntryExtensionV1Ext struct {
V int32
}
func NewLedgerEntryExtensionV1Ext ¶
func NewLedgerEntryExtensionV1Ext(v int32, value interface{}) (result LedgerEntryExtensionV1Ext, err error)
NewLedgerEntryExtensionV1Ext creates a new LedgerEntryExtensionV1Ext.
func (LedgerEntryExtensionV1Ext) ArmForSwitch ¶
func (u LedgerEntryExtensionV1Ext) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of LedgerEntryExtensionV1Ext
func (*LedgerEntryExtensionV1Ext) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (LedgerEntryExtensionV1Ext) EncodeTo ¶
func (u LedgerEntryExtensionV1Ext) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (LedgerEntryExtensionV1Ext) MarshalBinary ¶
func (s LedgerEntryExtensionV1Ext) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (LedgerEntryExtensionV1Ext) SwitchFieldName ¶
func (u LedgerEntryExtensionV1Ext) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*LedgerEntryExtensionV1Ext) UnmarshalBinary ¶
func (s *LedgerEntryExtensionV1Ext) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type LedgerEntryType ¶
type LedgerEntryType int32
const ( LedgerEntryTypeAccount LedgerEntryType = 0 LedgerEntryTypeTrustline LedgerEntryType = 1 LedgerEntryTypeOffer LedgerEntryType = 2 LedgerEntryTypeData LedgerEntryType = 3 )
func GetBinaryCompressedLedgerKeyType ¶
func GetBinaryCompressedLedgerKeyType(compressedKey []byte) (LedgerEntryType, error)
GetBinaryCompressedLedgerKeyType gets the key type from the result of LedgerKeyUnsafeMarshalBinaryCompress
func (*LedgerEntryType) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (LedgerEntryType) EncodeTo ¶
func (e LedgerEntryType) EncodeTo(enc *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (LedgerEntryType) MarshalBinary ¶
func (s LedgerEntryType) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (LedgerEntryType) String ¶
func (e LedgerEntryType) String() string
String returns the name of `e`
func (*LedgerEntryType) UnmarshalBinary ¶
func (s *LedgerEntryType) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (LedgerEntryType) ValidEnum ¶
func (e LedgerEntryType) ValidEnum(v int32) bool
ValidEnum validates a proposed value for this enum. Implements the Enum interface for LedgerEntryType
type LedgerKey ¶
type LedgerKey struct {
Type LedgerEntryType
Account *LedgerKeyAccount
TrustLine *LedgerKeyTrustLine
}
func NewLedgerKey ¶
func NewLedgerKey(aType LedgerEntryType, value interface{}) (result LedgerKey, err error)
NewLedgerKey creates a new LedgerKey.
func (LedgerKey) ArmForSwitch ¶
ArmForSwitch returns which field name should be used for storing the value for an instance of LedgerKey
func (*LedgerKey) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (LedgerKey) GetAccount ¶
func (u LedgerKey) GetAccount() (result LedgerKeyAccount, ok bool)
GetAccount retrieves the Account value from the union, returning ok if the union's switch indicated the value is valid.
func (LedgerKey) GetTrustLine ¶
func (u LedgerKey) GetTrustLine() (result LedgerKeyTrustLine, ok bool)
GetTrustLine retrieves the TrustLine value from the union, returning ok if the union's switch indicated the value is valid.
func (LedgerKey) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (LedgerKey) MustAccount ¶
func (u LedgerKey) MustAccount() LedgerKeyAccount
MustAccount retrieves the Account value from the union, panicing if the value is not set.
func (LedgerKey) MustTrustLine ¶
func (u LedgerKey) MustTrustLine() LedgerKeyTrustLine
MustTrustLine retrieves the TrustLine value from the union, panicing if the value is not set.
func (LedgerKey) SwitchFieldName ¶
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*LedgerKey) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type LedgerKeyAccount ¶
type LedgerKeyAccount struct {
AccountId AccountId
}
func (*LedgerKeyAccount) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*LedgerKeyAccount) EncodeTo ¶
func (s *LedgerKeyAccount) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (LedgerKeyAccount) MarshalBinary ¶
func (s LedgerKeyAccount) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*LedgerKeyAccount) UnmarshalBinary ¶
func (s *LedgerKeyAccount) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type LedgerKeyTrustLine ¶
type LedgerKeyTrustLine struct {
AccountId AccountId
Asset TrustLineAsset
}
func (*LedgerKeyTrustLine) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*LedgerKeyTrustLine) EncodeTo ¶
func (s *LedgerKeyTrustLine) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (LedgerKeyTrustLine) MarshalBinary ¶
func (s LedgerKeyTrustLine) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*LedgerKeyTrustLine) UnmarshalBinary ¶
func (s *LedgerKeyTrustLine) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type Liabilities ¶
Liabilities is an XDR Struct defines as:
struct Liabilities
{
int64 buying;
int64 selling;
};
func (*Liabilities) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*Liabilities) EncodeTo ¶
func (s *Liabilities) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (Liabilities) MarshalBinary ¶
func (s Liabilities) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*Liabilities) UnmarshalBinary ¶
func (s *Liabilities) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type LiquidityPoolType ¶
type LiquidityPoolType int32
LiquidityPoolType is an XDR Enum defines as:
enum LiquidityPoolType
{
LIQUIDITY_POOL_CONSTANT_PRODUCT = 0
};
const (
LiquidityPoolTypeLiquidityPoolConstantProduct LiquidityPoolType = 0
)
func (*LiquidityPoolType) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (LiquidityPoolType) EncodeTo ¶
func (e LiquidityPoolType) EncodeTo(enc *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (LiquidityPoolType) MarshalBinary ¶
func (s LiquidityPoolType) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (LiquidityPoolType) String ¶
func (e LiquidityPoolType) String() string
String returns the name of `e`
func (*LiquidityPoolType) UnmarshalBinary ¶
func (s *LiquidityPoolType) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (LiquidityPoolType) ValidEnum ¶
func (e LiquidityPoolType) ValidEnum(v int32) bool
ValidEnum validates a proposed value for this enum. Implements the Enum interface for LiquidityPoolType
type Memo ¶
type Memo struct {
Type MemoType
Text *string `xdrmaxsize:"28"`
Id *Uint64
Hash *Hash
RetHash *Hash
}
func MemoRetHash ¶
func (Memo) ArmForSwitch ¶
ArmForSwitch returns which field name should be used for storing the value for an instance of Memo
func (*Memo) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (Memo) GetHash ¶
GetHash retrieves the Hash value from the union, returning ok if the union's switch indicated the value is valid.
func (Memo) GetId ¶
GetId retrieves the Id value from the union, returning ok if the union's switch indicated the value is valid.
func (Memo) GetRetHash ¶
GetRetHash retrieves the RetHash value from the union, returning ok if the union's switch indicated the value is valid.
func (Memo) GetText ¶
GetText retrieves the Text value from the union, returning ok if the union's switch indicated the value is valid.
func (Memo) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (Memo) MustHash ¶
MustHash retrieves the Hash value from the union, panicing if the value is not set.
func (Memo) MustId ¶
MustId retrieves the Id value from the union, panicing if the value is not set.
func (Memo) MustRetHash ¶
MustRetHash retrieves the RetHash value from the union, panicing if the value is not set.
func (Memo) MustText ¶
MustText retrieves the Text value from the union, panicing if the value is not set.
func (Memo) SwitchFieldName ¶
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*Memo) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type MemoType ¶
type MemoType int32
func (*MemoType) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (MemoType) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*MemoType) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type MuxedAccount ¶
type MuxedAccount struct {
Type CryptoKeyType
Ed25519 *Uint256
Med25519 *MuxedAccountMed25519
}
func AddressToMuxedAccount ¶
func AddressToMuxedAccount(address string) (MuxedAccount, error)
AddressToMuxedAccount returns an MuxedAccount for a given address string or SEP23 M-address. If the address is not valid the error returned will not be nil
func MustMuxedAddress ¶
func MustMuxedAddress(address string) MuxedAccount
func MustMuxedAddressPtr ¶
func MustMuxedAddressPtr(address string) *MuxedAccount
func MuxedAccountFromAccountId ¶
func MuxedAccountFromAccountId(gAddress string, id uint64) (MuxedAccount, error)
func NewMuxedAccount ¶
func NewMuxedAccount(aType CryptoKeyType, value interface{}) (result MuxedAccount, err error)
NewMuxedAccount creates a new MuxedAccount.
func (*MuxedAccount) Address ¶
func (m *MuxedAccount) Address() string
Address returns the strkey-encoded form of this MuxedAccount. In particular, it will return an M- strkey representation for CryptoKeyTypeKeyTypeMuxedEd25519 variants of the account (according to SEP23). This method will panic if the MuxedAccount is backed by a public key of an unknown type.
func (MuxedAccount) ArmForSwitch ¶
func (u MuxedAccount) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of MuxedAccount
func (*MuxedAccount) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (MuxedAccount) EncodeTo ¶
func (u MuxedAccount) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (*MuxedAccount) GetAddress ¶
func (m *MuxedAccount) GetAddress() (string, error)
GetAddress returns the strkey-encoded form of this MuxedAccount. In particular, it will return an M-strkey representation for CryptoKeyTypeKeyTypeMuxedEd25519 variants of the account (according to SEP23). In addition it will return an error if the MuxedAccount is backed by a public key of an unknown type.
func (MuxedAccount) GetEd25519 ¶
func (u MuxedAccount) GetEd25519() (result Uint256, ok bool)
GetEd25519 retrieves the Ed25519 value from the union, returning ok if the union's switch indicated the value is valid.
func (*MuxedAccount) GetId ¶
func (m *MuxedAccount) GetId() (uint64, error)
GetId retrieves the underlying memo ID if this is a fully muxed account. It will return an error if the muxed account does not have a memo ID (i.e it's of the key type Ed25519).
func (MuxedAccount) GetMed25519 ¶
func (u MuxedAccount) GetMed25519() (result MuxedAccountMed25519, ok bool)
GetMed25519 retrieves the Med25519 value from the union, returning ok if the union's switch indicated the value is valid.
func (MuxedAccount) GoString ¶
func (m MuxedAccount) GoString() string
GoString implements fmt.GoStringer.
func (MuxedAccount) MarshalBinary ¶
func (s MuxedAccount) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (MuxedAccount) MustEd25519 ¶
func (u MuxedAccount) MustEd25519() Uint256
MustEd25519 retrieves the Ed25519 value from the union, panicing if the value is not set.
func (MuxedAccount) MustMed25519 ¶
func (u MuxedAccount) MustMed25519() MuxedAccountMed25519
MustMed25519 retrieves the Med25519 value from the union, panicing if the value is not set.
func (*MuxedAccount) SetAddress ¶
func (m *MuxedAccount) SetAddress(address string) error
SetAddress modifies the receiver, setting it's value to the MuxedAccount form of the provided strkey G-address or M-address, as described in SEP23.
func (*MuxedAccount) SetEd25519Address ¶
func (m *MuxedAccount) SetEd25519Address(address string) error
SetEd25519Address modifies the receiver, setting it's value to the MuxedAccount form of the provided G-address. Unlike SetAddress(), it only supports G-addresses.
func (MuxedAccount) SwitchFieldName ¶
func (u MuxedAccount) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (MuxedAccount) ToAccountId ¶
func (m MuxedAccount) ToAccountId() AccountId
ToAccountId transforms a MuxedAccount to an AccountId, dropping the memo Id if necessary
func (*MuxedAccount) UnmarshalBinary ¶
func (s *MuxedAccount) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type MuxedAccountMed25519 ¶
func (*MuxedAccountMed25519) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*MuxedAccountMed25519) EncodeTo ¶
func (s *MuxedAccountMed25519) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (MuxedAccountMed25519) MarshalBinary ¶
func (s MuxedAccountMed25519) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*MuxedAccountMed25519) UnmarshalBinary ¶
func (s *MuxedAccountMed25519) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type Operation ¶
type Operation struct {
SourceAccount *MuxedAccount
Body OperationBody
}
func (*Operation) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (Operation) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*Operation) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type OperationBody ¶
type OperationBody struct {
Type OperationType
PaymentOp *PaymentOp
ChangeTrustOp *ChangeTrustOp
AllowTrustOp *AllowTrustOp
Destination *MuxedAccount
}
func NewOperationBody ¶
func NewOperationBody(aType OperationType, value interface{}) (result OperationBody, err error)
NewOperationBody creates a new OperationBody.
func (OperationBody) ArmForSwitch ¶
func (u OperationBody) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of OperationBody
func (*OperationBody) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (OperationBody) EncodeTo ¶
func (u OperationBody) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (OperationBody) GetAllowTrustOp ¶
func (u OperationBody) GetAllowTrustOp() (result AllowTrustOp, ok bool)
GetAllowTrustOp retrieves the AllowTrustOp value from the union, returning ok if the union's switch indicated the value is valid.
func (OperationBody) GetChangeTrustOp ¶
func (u OperationBody) GetChangeTrustOp() (result ChangeTrustOp, ok bool)
GetChangeTrustOp retrieves the ChangeTrustOp value from the union, returning ok if the union's switch indicated the value is valid.
func (OperationBody) GetDestination ¶
func (u OperationBody) GetDestination() (result MuxedAccount, ok bool)
GetDestination retrieves the Destination value from the union, returning ok if the union's switch indicated the value is valid.
func (OperationBody) GetPaymentOp ¶
func (u OperationBody) GetPaymentOp() (result PaymentOp, ok bool)
GetPaymentOp retrieves the PaymentOp value from the union, returning ok if the union's switch indicated the value is valid.
func (OperationBody) GoString ¶
func (o OperationBody) GoString() string
GoString implements fmt.GoStringer.
func (OperationBody) MarshalBinary ¶
func (s OperationBody) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (OperationBody) MustAllowTrustOp ¶
func (u OperationBody) MustAllowTrustOp() AllowTrustOp
MustAllowTrustOp retrieves the AllowTrustOp value from the union, panicing if the value is not set.
func (OperationBody) MustChangeTrustOp ¶
func (u OperationBody) MustChangeTrustOp() ChangeTrustOp
MustChangeTrustOp retrieves the ChangeTrustOp value from the union, panicing if the value is not set.
func (OperationBody) MustDestination ¶
func (u OperationBody) MustDestination() MuxedAccount
MustDestination retrieves the Destination value from the union, panicing if the value is not set.
func (OperationBody) MustPaymentOp ¶
func (u OperationBody) MustPaymentOp() PaymentOp
MustPaymentOp retrieves the PaymentOp value from the union, panicing if the value is not set.
func (OperationBody) SwitchFieldName ¶
func (u OperationBody) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*OperationBody) UnmarshalBinary ¶
func (s *OperationBody) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type OperationType ¶
type OperationType int32
const ( OperationTypePayment OperationType = 1 OperationTypePathPaymentStrictReceive OperationType = 2 OperationTypeManageSellOffer OperationType = 3 OperationTypeCreatePassiveSellOffer OperationType = 4 OperationTypeSetOptions OperationType = 5 OperationTypeChangeTrust OperationType = 6 OperationTypeAllowTrust OperationType = 7 OperationTypeAccountMerge OperationType = 8 OperationTypeInflation OperationType = 9 )
func (*OperationType) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (OperationType) EncodeTo ¶
func (e OperationType) EncodeTo(enc *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (OperationType) MarshalBinary ¶
func (s OperationType) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*OperationType) UnmarshalBinary ¶
func (s *OperationType) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (OperationType) ValidEnum ¶
func (e OperationType) ValidEnum(v int32) bool
ValidEnum validates a proposed value for this enum. Implements the Enum interface for OperationType
type PaymentOp ¶
type PaymentOp struct {
Destination MuxedAccount
Asset Asset
Amount Int64
}
func (*PaymentOp) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (PaymentOp) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*PaymentOp) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type PoolId ¶
type PoolId Hash
PoolId is an XDR Typedef defines as:
typedef Hash PoolID;
func (*PoolId) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (PoolId) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*PoolId) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type PreconditionType ¶
type PreconditionType int32
const ( PreconditionTypePrecondNone PreconditionType = 0 PreconditionTypePrecondTime PreconditionType = 1 PreconditionTypePrecondV2 PreconditionType = 2 )
func (*PreconditionType) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (PreconditionType) EncodeTo ¶
func (e PreconditionType) EncodeTo(enc *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (PreconditionType) GoString ¶
func (pt PreconditionType) GoString() string
GoString implements fmt.GoStringer.
func (PreconditionType) MarshalBinary ¶
func (s PreconditionType) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (PreconditionType) String ¶
func (e PreconditionType) String() string
String returns the name of `e`
func (*PreconditionType) UnmarshalBinary ¶
func (s *PreconditionType) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (PreconditionType) ValidEnum ¶
func (e PreconditionType) ValidEnum(v int32) bool
ValidEnum validates a proposed value for this enum. Implements the Enum interface for PreconditionType
type Preconditions ¶
type Preconditions struct {
Type PreconditionType
TimeBounds *TimeBounds
V2 *PreconditionsV2
}
func NewPreconditions ¶
func NewPreconditions(aType PreconditionType, value interface{}) (result Preconditions, err error)
NewPreconditions creates a new Preconditions.
func NewPreconditionsWithTimeBounds ¶
func NewPreconditionsWithTimeBounds(timebounds *TimeBounds) Preconditions
NewPreconditionsWithTimebounds constructs the simplest possible `Preconditions` instance given the (possibly empty) timebounds.
func (Preconditions) ArmForSwitch ¶
func (u Preconditions) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of Preconditions
func (*Preconditions) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (Preconditions) EncodeTo ¶
func (u Preconditions) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (Preconditions) GetTimeBounds ¶
func (u Preconditions) GetTimeBounds() (result TimeBounds, ok bool)
GetTimeBounds retrieves the TimeBounds value from the union, returning ok if the union's switch indicated the value is valid.
func (Preconditions) GetV2 ¶
func (u Preconditions) GetV2() (result PreconditionsV2, ok bool)
GetV2 retrieves the V2 value from the union, returning ok if the union's switch indicated the value is valid.
func (Preconditions) GoString ¶
func (p Preconditions) GoString() string
GoString implements fmt.GoStringer.
func (Preconditions) MarshalBinary ¶
func (s Preconditions) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (Preconditions) MustTimeBounds ¶
func (u Preconditions) MustTimeBounds() TimeBounds
MustTimeBounds retrieves the TimeBounds value from the union, panicing if the value is not set.
func (Preconditions) MustV2 ¶
func (u Preconditions) MustV2() PreconditionsV2
MustV2 retrieves the V2 value from the union, panicing if the value is not set.
func (Preconditions) SwitchFieldName ¶
func (u Preconditions) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*Preconditions) UnmarshalBinary ¶
func (s *Preconditions) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type PreconditionsV2 ¶
type PreconditionsV2 struct {
TimeBounds *TimeBounds
LedgerBounds *LedgerBounds
MinSeqNum *SequenceNumber
MinSeqAge Duration
MinSeqLedgerGap Uint32
ExtraSigners []SignerKey `xdrmaxsize:"2"`
}
func (*PreconditionsV2) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*PreconditionsV2) EncodeTo ¶
func (s *PreconditionsV2) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (PreconditionsV2) MarshalBinary ¶
func (s PreconditionsV2) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*PreconditionsV2) UnmarshalBinary ¶
func (s *PreconditionsV2) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type PublicKey ¶
type PublicKey struct {
Type PublicKeyType
Ed25519 *Uint256
}
PublicKey is an XDR Union defines as:
union PublicKey switch (PublicKeyType type)
{
case PUBLIC_KEY_TYPE_ED25519:
uint256 ed25519;
};
func NewPublicKey ¶
func NewPublicKey(aType PublicKeyType, value interface{}) (result PublicKey, err error)
NewPublicKey creates a new PublicKey.
func (PublicKey) ArmForSwitch ¶
ArmForSwitch returns which field name should be used for storing the value for an instance of PublicKey
func (*PublicKey) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (PublicKey) GetEd25519 ¶
GetEd25519 retrieves the Ed25519 value from the union, returning ok if the union's switch indicated the value is valid.
func (PublicKey) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (PublicKey) MustEd25519 ¶
MustEd25519 retrieves the Ed25519 value from the union, panicing if the value is not set.
func (PublicKey) SwitchFieldName ¶
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*PublicKey) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type PublicKeyType ¶
type PublicKeyType int32
const (
PublicKeyTypePublicKeyTypeEd25519 PublicKeyType = 0
)
func (*PublicKeyType) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (PublicKeyType) EncodeTo ¶
func (e PublicKeyType) EncodeTo(enc *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (PublicKeyType) MarshalBinary ¶
func (s PublicKeyType) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*PublicKeyType) UnmarshalBinary ¶
func (s *PublicKeyType) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (PublicKeyType) ValidEnum ¶
func (e PublicKeyType) ValidEnum(v int32) bool
ValidEnum validates a proposed value for this enum. Implements the Enum interface for PublicKeyType
type SequenceNumber ¶
type SequenceNumber Int64
func (*SequenceNumber) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (SequenceNumber) EncodeTo ¶
func (s SequenceNumber) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (SequenceNumber) MarshalBinary ¶
func (s SequenceNumber) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*SequenceNumber) UnmarshalBinary ¶
func (s *SequenceNumber) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type Signature ¶
type Signature []byte
Signature is an XDR Typedef defines as:
typedef opaque Signature<64>;
func (*Signature) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (Signature) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*Signature) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (Signature) XDRMaxSize ¶
XDRMaxSize implements the Sized interface for Signature
type SignatureHint ¶
type SignatureHint [4]byte
SignatureHint is an XDR Typedef defines as:
typedef opaque SignatureHint[4];
func (*SignatureHint) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*SignatureHint) EncodeTo ¶
func (s *SignatureHint) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (SignatureHint) MarshalBinary ¶
func (s SignatureHint) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*SignatureHint) UnmarshalBinary ¶
func (s *SignatureHint) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (SignatureHint) XDRMaxSize ¶
func (e SignatureHint) XDRMaxSize() int
XDRMaxSize implements the Sized interface for SignatureHint
type Signer ¶
func SortSignersByKey ¶
SortSignersByKey returns a new []Signer array sorted by signer key.
func (*Signer) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (Signer) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*Signer) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type SignerKey ¶
type SignerKey struct {
Type SignerKeyType
Ed25519 *Uint256
PreAuthTx *Uint256
HashX *Uint256
Ed25519SignedPayload *SignerKeyEd25519SignedPayload
}
SignerKey is an XDR Union defines as:
union SignerKey switch (SignerKeyType type)
{
case SIGNER_KEY_TYPE_ED25519:
uint256 ed25519;
case SIGNER_KEY_TYPE_PRE_AUTH_TX:
/* SHA-256 Hash of TransactionSignaturePayload structure */
uint256 preAuthTx;
case SIGNER_KEY_TYPE_HASH_X:
/* Hash of random 256 bit preimage X */
uint256 hashX;
case SIGNER_KEY_TYPE_ED25519_SIGNED_PAYLOAD:
struct
{
/* Public key that must sign the payload. */
uint256 ed25519;
/* Payload to be raw signed by ed25519. */
opaque payload<64>;
} ed25519SignedPayload;
};
func MustSigner ¶
func NewSignerKey ¶
func NewSignerKey(aType SignerKeyType, value interface{}) (result SignerKey, err error)
NewSignerKey creates a new SignerKey.
func (*SignerKey) Address ¶
Address returns the strkey encoded form of this signer key. This method will panic if the SignerKey is of an unknown type.
func (SignerKey) ArmForSwitch ¶
ArmForSwitch returns which field name should be used for storing the value for an instance of SignerKey
func (*SignerKey) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*SignerKey) GetAddress ¶
GetAddress returns the strkey encoded form of this signer key, and an error if the SignerKey is of an unknown type.
func (SignerKey) GetEd25519 ¶
GetEd25519 retrieves the Ed25519 value from the union, returning ok if the union's switch indicated the value is valid.
func (SignerKey) GetEd25519SignedPayload ¶
func (u SignerKey) GetEd25519SignedPayload() (result SignerKeyEd25519SignedPayload, ok bool)
GetEd25519SignedPayload retrieves the Ed25519SignedPayload value from the union, returning ok if the union's switch indicated the value is valid.
func (SignerKey) GetHashX ¶
GetHashX retrieves the HashX value from the union, returning ok if the union's switch indicated the value is valid.
func (SignerKey) GetPreAuthTx ¶
GetPreAuthTx retrieves the PreAuthTx value from the union, returning ok if the union's switch indicated the value is valid.
func (SignerKey) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (SignerKey) MustEd25519 ¶
MustEd25519 retrieves the Ed25519 value from the union, panicing if the value is not set.
func (SignerKey) MustEd25519SignedPayload ¶
func (u SignerKey) MustEd25519SignedPayload() SignerKeyEd25519SignedPayload
MustEd25519SignedPayload retrieves the Ed25519SignedPayload value from the union, panicing if the value is not set.
func (SignerKey) MustHashX ¶
MustHashX retrieves the HashX value from the union, panicing if the value is not set.
func (SignerKey) MustPreAuthTx ¶
MustPreAuthTx retrieves the PreAuthTx value from the union, panicing if the value is not set.
func (*SignerKey) SetAddress ¶
SetAddress modifies the receiver, setting it's value to the SignerKey form of the provided address.
func (SignerKey) SwitchFieldName ¶
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*SignerKey) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type SignerKeyEd25519SignedPayload ¶
SignerKeyEd25519SignedPayload is an XDR NestedStruct defines as:
struct
{
/* Public key that must sign the payload. */
uint256 ed25519;
/* Payload to be raw signed by ed25519. */
opaque payload<64>;
}
func (*SignerKeyEd25519SignedPayload) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*SignerKeyEd25519SignedPayload) EncodeTo ¶
func (s *SignerKeyEd25519SignedPayload) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (SignerKeyEd25519SignedPayload) MarshalBinary ¶
func (s SignerKeyEd25519SignedPayload) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*SignerKeyEd25519SignedPayload) UnmarshalBinary ¶
func (s *SignerKeyEd25519SignedPayload) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type SignerKeyType ¶
type SignerKeyType int32
SignerKeyType is an XDR Enum defines as:
enum SignerKeyType
{
SIGNER_KEY_TYPE_ED25519 = KEY_TYPE_ED25519,
SIGNER_KEY_TYPE_PRE_AUTH_TX = KEY_TYPE_PRE_AUTH_TX,
SIGNER_KEY_TYPE_HASH_X = KEY_TYPE_HASH_X,
SIGNER_KEY_TYPE_ED25519_SIGNED_PAYLOAD = KEY_TYPE_ED25519_SIGNED_PAYLOAD
};
const ( SignerKeyTypeSignerKeyTypeEd25519 SignerKeyType = 0 SignerKeyTypeSignerKeyTypePreAuthTx SignerKeyType = 1 SignerKeyTypeSignerKeyTypeHashX SignerKeyType = 2 SignerKeyTypeSignerKeyTypeEd25519SignedPayload SignerKeyType = 3 )
func (*SignerKeyType) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (SignerKeyType) EncodeTo ¶
func (e SignerKeyType) EncodeTo(enc *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (SignerKeyType) MarshalBinary ¶
func (s SignerKeyType) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*SignerKeyType) UnmarshalBinary ¶
func (s *SignerKeyType) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (SignerKeyType) ValidEnum ¶
func (e SignerKeyType) ValidEnum(v int32) bool
ValidEnum validates a proposed value for this enum. Implements the Enum interface for SignerKeyType
type SponsorshipDescriptor ¶
type SponsorshipDescriptor = *AccountId
type String32 ¶
type String32 string
func String32Ptr ¶
func (*String32) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (String32) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*String32) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (String32) XDRMaxSize ¶
XDRMaxSize implements the Sized interface for String32
type String64 ¶
type String64 string
String64 is an XDR Typedef defines as:
typedef string string64<64>;
func (*String64) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (String64) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*String64) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (String64) XDRMaxSize ¶
XDRMaxSize implements the Sized interface for String64
type TimeBounds ¶
func (*TimeBounds) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*TimeBounds) EncodeTo ¶
func (s *TimeBounds) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (*TimeBounds) GoString ¶
func (t *TimeBounds) GoString() string
GoString implements fmt.GoStringer.
func (TimeBounds) MarshalBinary ¶
func (s TimeBounds) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*TimeBounds) UnmarshalBinary ¶
func (s *TimeBounds) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TimePoint ¶
type TimePoint Uint64
TimePoint is an XDR Typedef defines as:
typedef uint64 TimePoint;
func (*TimePoint) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (TimePoint) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*TimePoint) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type Transaction ¶
type Transaction struct {
SourceAccount MuxedAccount
Fee Uint32
SeqNum SequenceNumber
Cond Preconditions
Memo Memo
Operations []Operation `xdrmaxsize:"100"`
Ext TransactionExt
}
func (*Transaction) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*Transaction) EncodeTo ¶
func (s *Transaction) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (*Transaction) ExtraSigners ¶
func (tx *Transaction) ExtraSigners() []SignerKey
ExtraSigners extracts the extra signers (if any) from the transaction's Preconditions.
func (*Transaction) LedgerBounds ¶
func (tx *Transaction) LedgerBounds() *LedgerBounds
LedgerBounds extracts the ledgerbounds (if any) from the transaction's Preconditions.
func (Transaction) MarshalBinary ¶
func (s Transaction) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*Transaction) MinSeqAge ¶
func (tx *Transaction) MinSeqAge() *Duration
MinSeqAge extracts the min seq age (if any) from the transaction's Preconditions.
func (*Transaction) MinSeqLedgerGap ¶
func (tx *Transaction) MinSeqLedgerGap() *Uint32
MinSeqLedgerGap extracts the min seq ledger gap (if any) from the transaction's Preconditions.
func (*Transaction) MinSeqNum ¶
func (tx *Transaction) MinSeqNum() *SequenceNumber
MinSeqNum extracts the min seq number (if any) from the transaction's Preconditions.
func (*Transaction) TimeBounds ¶
func (tx *Transaction) TimeBounds() *TimeBounds
TimeBounds extracts the timebounds (if any) from the transaction's Preconditions.
func (*Transaction) UnmarshalBinary ¶
func (s *Transaction) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TransactionEnvelope ¶
type TransactionEnvelope struct {
Type EnvelopeType
V0 *TransactionV0Envelope
V1 *TransactionV1Envelope
FeeBump *FeeBumpTransactionEnvelope
}
func NewTransactionEnvelope ¶
func NewTransactionEnvelope(aType EnvelopeType, value interface{}) (result TransactionEnvelope, err error)
NewTransactionEnvelope creates a new TransactionEnvelope.
func (TransactionEnvelope) ArmForSwitch ¶
func (u TransactionEnvelope) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionEnvelope
func (*TransactionEnvelope) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (TransactionEnvelope) EncodeTo ¶
func (u TransactionEnvelope) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (TransactionEnvelope) ExtraSigners ¶
func (e TransactionEnvelope) ExtraSigners() []SignerKey
ExtraSigners returns the extra signers set in the transaction envelope. Note for fee bump transactions, ExtraSigners() returns the field from the inner transaction
func (TransactionEnvelope) Fee ¶
func (e TransactionEnvelope) Fee() uint32
Fee returns the fee defined for the transaction envelope If the transaction envelope is for a fee bump transaction, Fee() returns the fee defined in the inner transaction
func (TransactionEnvelope) FeeBumpAccount ¶
func (e TransactionEnvelope) FeeBumpAccount() MuxedAccount
FeeBumpAccount returns the account paying for the fee bump transaction
func (TransactionEnvelope) FeeBumpFee ¶
func (e TransactionEnvelope) FeeBumpFee() int64
FeeBumpFee returns the fee defined for the fee bump transaction
func (TransactionEnvelope) FeeBumpSignatures ¶
func (e TransactionEnvelope) FeeBumpSignatures() []DecoratedSignature
FeeBumpSignatures returns the list of signatures for the fee bump transaction
func (TransactionEnvelope) GetFeeBump ¶
func (u TransactionEnvelope) GetFeeBump() (result FeeBumpTransactionEnvelope, ok bool)
GetFeeBump retrieves the FeeBump value from the union, returning ok if the union's switch indicated the value is valid.
func (TransactionEnvelope) GetV0 ¶
func (u TransactionEnvelope) GetV0() (result TransactionV0Envelope, ok bool)
GetV0 retrieves the V0 value from the union, returning ok if the union's switch indicated the value is valid.
func (TransactionEnvelope) GetV1 ¶
func (u TransactionEnvelope) GetV1() (result TransactionV1Envelope, ok bool)
GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.
func (TransactionEnvelope) GoString ¶
func (e TransactionEnvelope) GoString() string
GoString implements fmt.GoStringer.
func (TransactionEnvelope) IsFeeBump ¶
func (e TransactionEnvelope) IsFeeBump() bool
IsFeeBump returns true if the transaction envelope is a fee bump transaction
func (TransactionEnvelope) LedgerBounds ¶
func (e TransactionEnvelope) LedgerBounds() *LedgerBounds
LedgerBounds returns the ledger bounds set in the transaction envelope. Note for fee bump transactions, LedgerBounds() returns the ledger bounds of the inner transaction
func (TransactionEnvelope) MarshalBinary ¶
func (s TransactionEnvelope) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (TransactionEnvelope) Memo ¶
func (e TransactionEnvelope) Memo() Memo
Memo returns the memo set in the transaction envelope Note for fee bump transactions, Memo() returns the memo of the inner transaction
func (TransactionEnvelope) MinSeqAge ¶
func (e TransactionEnvelope) MinSeqAge() *Duration
MinSeqAge returns the min seq age set in the transaction envelope. Note for fee bump transactions, MinSeqAge() returns the field from the inner transaction
func (TransactionEnvelope) MinSeqLedgerGap ¶
func (e TransactionEnvelope) MinSeqLedgerGap() *Uint32
MinSeqLedgerGap returns the min seq ledger gap set in the transaction. envelope. Note for fee bump transactions, MinSeqLedgerGap() returns the field from the inner transaction
func (TransactionEnvelope) MinSeqNum ¶
func (e TransactionEnvelope) MinSeqNum() *int64
MinSeqNum returns the minimum sequence number set in the transaction envelope
Note for fee bump transactions, MinSeqNum() returns the sequence number of the inner transaction
func (TransactionEnvelope) MustFeeBump ¶
func (u TransactionEnvelope) MustFeeBump() FeeBumpTransactionEnvelope
MustFeeBump retrieves the FeeBump value from the union, panicing if the value is not set.
func (TransactionEnvelope) MustV0 ¶
func (u TransactionEnvelope) MustV0() TransactionV0Envelope
MustV0 retrieves the V0 value from the union, panicing if the value is not set.
func (TransactionEnvelope) MustV1 ¶
func (u TransactionEnvelope) MustV1() TransactionV1Envelope
MustV1 retrieves the V1 value from the union, panicing if the value is not set.
func (TransactionEnvelope) Operations ¶
func (e TransactionEnvelope) Operations() []Operation
Operations returns the operations set in the transaction envelope Note for fee bump transactions, Operations() returns the operations of the inner transaction
func (TransactionEnvelope) Preconditions ¶
func (e TransactionEnvelope) Preconditions() Preconditions
Preconditions returns the preconditions on the transaction. If the transaction is a V0 envelope (aka before preconditions existed), this returns a new precondition (timebound if present, empty otherwise). If the transaction is a fee bump, it returns the preconditions of the *inner* transaction.
func (TransactionEnvelope) SeqNum ¶
func (e TransactionEnvelope) SeqNum() int64
SeqNum returns the sequence number set in the transaction envelope Note for fee bump transactions, SeqNum() returns the sequence number of the inner transaction
func (TransactionEnvelope) Signatures ¶
func (e TransactionEnvelope) Signatures() []DecoratedSignature
Signatures returns the list of signatures included in the transaction envelope If the transaction envelope is for a fee bump transaction, Signatures() returns the signatures for the inner transaction
func (TransactionEnvelope) SourceAccount ¶
func (e TransactionEnvelope) SourceAccount() MuxedAccount
SourceAccount returns the source account for the transaction If the transaction envelope is for a fee bump transaction, SourceAccount() returns the source account of the inner transaction
func (TransactionEnvelope) SwitchFieldName ¶
func (u TransactionEnvelope) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (TransactionEnvelope) TimeBounds ¶
func (e TransactionEnvelope) TimeBounds() *TimeBounds
TimeBounds returns the time bounds set in the transaction envelope Note for fee bump transactions, TimeBounds() returns the time bounds of the inner transaction
func (*TransactionEnvelope) UnmarshalBinary ¶
func (s *TransactionEnvelope) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TransactionExt ¶
type TransactionExt struct {
V int32
}
func NewTransactionExt ¶
func NewTransactionExt(v int32, value interface{}) (result TransactionExt, err error)
NewTransactionExt creates a new TransactionExt.
func (TransactionExt) ArmForSwitch ¶
func (u TransactionExt) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionExt
func (*TransactionExt) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (TransactionExt) EncodeTo ¶
func (u TransactionExt) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (TransactionExt) MarshalBinary ¶
func (s TransactionExt) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (TransactionExt) SwitchFieldName ¶
func (u TransactionExt) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*TransactionExt) UnmarshalBinary ¶
func (s *TransactionExt) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TransactionSignaturePayload ¶
type TransactionSignaturePayload struct {
NetworkId Hash
TaggedTransaction TransactionSignaturePayloadTaggedTransaction
}
func (*TransactionSignaturePayload) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*TransactionSignaturePayload) EncodeTo ¶
func (s *TransactionSignaturePayload) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (TransactionSignaturePayload) MarshalBinary ¶
func (s TransactionSignaturePayload) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*TransactionSignaturePayload) UnmarshalBinary ¶
func (s *TransactionSignaturePayload) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TransactionSignaturePayloadTaggedTransaction ¶
type TransactionSignaturePayloadTaggedTransaction struct {
Type EnvelopeType
Tx *Transaction
FeeBump *FeeBumpTransaction
}
func NewTransactionSignaturePayloadTaggedTransaction ¶
func NewTransactionSignaturePayloadTaggedTransaction(aType EnvelopeType, value interface{}) (result TransactionSignaturePayloadTaggedTransaction, err error)
NewTransactionSignaturePayloadTaggedTransaction creates a new TransactionSignaturePayloadTaggedTransaction.
func (TransactionSignaturePayloadTaggedTransaction) ArmForSwitch ¶
func (u TransactionSignaturePayloadTaggedTransaction) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionSignaturePayloadTaggedTransaction
func (*TransactionSignaturePayloadTaggedTransaction) DecodeFrom ¶
func (u *TransactionSignaturePayloadTaggedTransaction) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error)
DecodeFrom decodes this value using the Decoder.
func (TransactionSignaturePayloadTaggedTransaction) EncodeTo ¶
func (u TransactionSignaturePayloadTaggedTransaction) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (TransactionSignaturePayloadTaggedTransaction) GetFeeBump ¶
func (u TransactionSignaturePayloadTaggedTransaction) GetFeeBump() (result FeeBumpTransaction, ok bool)
GetFeeBump retrieves the FeeBump value from the union, returning ok if the union's switch indicated the value is valid.
func (TransactionSignaturePayloadTaggedTransaction) GetTx ¶
func (u TransactionSignaturePayloadTaggedTransaction) GetTx() (result Transaction, ok bool)
GetTx retrieves the Tx value from the union, returning ok if the union's switch indicated the value is valid.
func (TransactionSignaturePayloadTaggedTransaction) MarshalBinary ¶
func (s TransactionSignaturePayloadTaggedTransaction) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (TransactionSignaturePayloadTaggedTransaction) MustFeeBump ¶
func (u TransactionSignaturePayloadTaggedTransaction) MustFeeBump() FeeBumpTransaction
MustFeeBump retrieves the FeeBump value from the union, panicing if the value is not set.
func (TransactionSignaturePayloadTaggedTransaction) MustTx ¶
func (u TransactionSignaturePayloadTaggedTransaction) MustTx() Transaction
MustTx retrieves the Tx value from the union, panicing if the value is not set.
func (TransactionSignaturePayloadTaggedTransaction) SwitchFieldName ¶
func (u TransactionSignaturePayloadTaggedTransaction) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*TransactionSignaturePayloadTaggedTransaction) UnmarshalBinary ¶
func (s *TransactionSignaturePayloadTaggedTransaction) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TransactionV0 ¶
type TransactionV0 struct {
SourceAccountEd25519 Uint256
Fee Uint32
SeqNum SequenceNumber
TimeBounds *TimeBounds
Memo Memo
Operations []Operation `xdrmaxsize:"100"`
Ext TransactionV0Ext
}
func (*TransactionV0) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*TransactionV0) EncodeTo ¶
func (s *TransactionV0) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (TransactionV0) MarshalBinary ¶
func (s TransactionV0) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*TransactionV0) UnmarshalBinary ¶
func (s *TransactionV0) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TransactionV0Envelope ¶
type TransactionV0Envelope struct {
Tx TransactionV0
Signatures []DecoratedSignature `xdrmaxsize:"20"`
}
func (*TransactionV0Envelope) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*TransactionV0Envelope) EncodeTo ¶
func (s *TransactionV0Envelope) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (TransactionV0Envelope) MarshalBinary ¶
func (s TransactionV0Envelope) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*TransactionV0Envelope) UnmarshalBinary ¶
func (s *TransactionV0Envelope) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TransactionV0Ext ¶
type TransactionV0Ext struct {
V int32
}
func NewTransactionV0Ext ¶
func NewTransactionV0Ext(v int32, value interface{}) (result TransactionV0Ext, err error)
NewTransactionV0Ext creates a new TransactionV0Ext.
func (TransactionV0Ext) ArmForSwitch ¶
func (u TransactionV0Ext) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of TransactionV0Ext
func (*TransactionV0Ext) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (TransactionV0Ext) EncodeTo ¶
func (u TransactionV0Ext) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (TransactionV0Ext) MarshalBinary ¶
func (s TransactionV0Ext) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (TransactionV0Ext) SwitchFieldName ¶
func (u TransactionV0Ext) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*TransactionV0Ext) UnmarshalBinary ¶
func (s *TransactionV0Ext) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TransactionV1Envelope ¶
type TransactionV1Envelope struct {
Tx Transaction
Signatures []DecoratedSignature `xdrmaxsize:"20"`
}
func (*TransactionV1Envelope) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*TransactionV1Envelope) EncodeTo ¶
func (s *TransactionV1Envelope) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (TransactionV1Envelope) MarshalBinary ¶
func (s TransactionV1Envelope) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*TransactionV1Envelope) UnmarshalBinary ¶
func (s *TransactionV1Envelope) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TrustLineAsset ¶
type TrustLineAsset struct {
Type AssetType
AlphaNum4 *AlphaNum4
AlphaNum12 *AlphaNum12
LiquidityPoolId *PoolId
}
TrustLineAsset is an XDR Union defines as:
union TrustLineAsset switch (AssetType type)
{
case ASSET_TYPE_NATIVE: // Not credit
void;
case ASSET_TYPE_CREDIT_ALPHANUM4:
AlphaNum4 alphaNum4;
case ASSET_TYPE_CREDIT_ALPHANUM12:
AlphaNum12 alphaNum12;
case ASSET_TYPE_POOL_SHARE:
PoolID liquidityPoolID;
// add other asset types here in the future
};
func NewTrustLineAsset ¶
func NewTrustLineAsset(aType AssetType, value interface{}) (result TrustLineAsset, err error)
NewTrustLineAsset creates a new TrustLineAsset.
func (TrustLineAsset) ArmForSwitch ¶
func (u TrustLineAsset) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of TrustLineAsset
func (*TrustLineAsset) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (TrustLineAsset) EncodeTo ¶
func (u TrustLineAsset) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (TrustLineAsset) Equals ¶
func (a TrustLineAsset) Equals(other TrustLineAsset) bool
func (TrustLineAsset) Extract ¶
func (a TrustLineAsset) Extract(typ interface{}, code interface{}, issuer interface{}) error
MustExtract behaves as Extract, but panics if an error occurs.
func (TrustLineAsset) GetAlphaNum12 ¶
func (u TrustLineAsset) GetAlphaNum12() (result AlphaNum12, ok bool)
GetAlphaNum12 retrieves the AlphaNum12 value from the union, returning ok if the union's switch indicated the value is valid.
func (TrustLineAsset) GetAlphaNum4 ¶
func (u TrustLineAsset) GetAlphaNum4() (result AlphaNum4, ok bool)
GetAlphaNum4 retrieves the AlphaNum4 value from the union, returning ok if the union's switch indicated the value is valid.
func (TrustLineAsset) GetLiquidityPoolId ¶
func (u TrustLineAsset) GetLiquidityPoolId() (result PoolId, ok bool)
GetLiquidityPoolId retrieves the LiquidityPoolId value from the union, returning ok if the union's switch indicated the value is valid.
func (TrustLineAsset) MarshalBinary ¶
func (s TrustLineAsset) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (TrustLineAsset) MustAlphaNum12 ¶
func (u TrustLineAsset) MustAlphaNum12() AlphaNum12
MustAlphaNum12 retrieves the AlphaNum12 value from the union, panicing if the value is not set.
func (TrustLineAsset) MustAlphaNum4 ¶
func (u TrustLineAsset) MustAlphaNum4() AlphaNum4
MustAlphaNum4 retrieves the AlphaNum4 value from the union, panicing if the value is not set.
func (TrustLineAsset) MustExtract ¶
func (a TrustLineAsset) MustExtract(typ interface{}, code interface{}, issuer interface{})
MustExtract behaves as Extract, but panics if an error occurs.
func (TrustLineAsset) MustLiquidityPoolId ¶
func (u TrustLineAsset) MustLiquidityPoolId() PoolId
MustLiquidityPoolId retrieves the LiquidityPoolId value from the union, panicing if the value is not set.
func (TrustLineAsset) SwitchFieldName ¶
func (u TrustLineAsset) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (TrustLineAsset) ToAsset ¶
func (tla TrustLineAsset) ToAsset() Asset
ToAsset converts TrustLineAsset to Asset. Panics on type other than AssetTypeAssetTypeNative, AssetTypeAssetTypeCreditAlphanum4 or AssetTypeAssetTypeCreditAlphanum12.
func (*TrustLineAsset) UnmarshalBinary ¶
func (s *TrustLineAsset) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TrustLineEntry ¶
type TrustLineEntry struct {
AccountId AccountId
Asset TrustLineAsset
Balance Int64
Limit Int64
Flags Uint32
Ext TrustLineEntryExt
}
func (*TrustLineEntry) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*TrustLineEntry) EncodeTo ¶
func (s *TrustLineEntry) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (*TrustLineEntry) Liabilities ¶
func (trustLine *TrustLineEntry) Liabilities() Liabilities
Liabilities returns TrustLineEntry's liabilities
func (TrustLineEntry) MarshalBinary ¶
func (s TrustLineEntry) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*TrustLineEntry) UnmarshalBinary ¶
func (s *TrustLineEntry) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TrustLineEntryExt ¶
type TrustLineEntryExt struct {
V int32
V1 *TrustLineEntryV1
}
func NewTrustLineEntryExt ¶
func NewTrustLineEntryExt(v int32, value interface{}) (result TrustLineEntryExt, err error)
NewTrustLineEntryExt creates a new TrustLineEntryExt.
func (TrustLineEntryExt) ArmForSwitch ¶
func (u TrustLineEntryExt) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of TrustLineEntryExt
func (*TrustLineEntryExt) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (TrustLineEntryExt) EncodeTo ¶
func (u TrustLineEntryExt) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (TrustLineEntryExt) GetV1 ¶
func (u TrustLineEntryExt) GetV1() (result TrustLineEntryV1, ok bool)
GetV1 retrieves the V1 value from the union, returning ok if the union's switch indicated the value is valid.
func (TrustLineEntryExt) MarshalBinary ¶
func (s TrustLineEntryExt) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (TrustLineEntryExt) MustV1 ¶
func (u TrustLineEntryExt) MustV1() TrustLineEntryV1
MustV1 retrieves the V1 value from the union, panicing if the value is not set.
func (TrustLineEntryExt) SwitchFieldName ¶
func (u TrustLineEntryExt) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*TrustLineEntryExt) UnmarshalBinary ¶
func (s *TrustLineEntryExt) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TrustLineEntryExtensionV2 ¶
type TrustLineEntryExtensionV2 struct {
LiquidityPoolUseCount Int32
Ext TrustLineEntryExtensionV2Ext
}
TrustLineEntryExtensionV2 is an XDR Struct defines as:
struct TrustLineEntryExtensionV2
{
int32 liquidityPoolUseCount;
union switch (int v)
{
case 0:
void;
}
ext;
};
func (*TrustLineEntryExtensionV2) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*TrustLineEntryExtensionV2) EncodeTo ¶
func (s *TrustLineEntryExtensionV2) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (TrustLineEntryExtensionV2) MarshalBinary ¶
func (s TrustLineEntryExtensionV2) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*TrustLineEntryExtensionV2) UnmarshalBinary ¶
func (s *TrustLineEntryExtensionV2) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TrustLineEntryExtensionV2Ext ¶
type TrustLineEntryExtensionV2Ext struct {
V int32
}
TrustLineEntryExtensionV2Ext is an XDR NestedUnion defines as:
union switch (int v)
{
case 0:
void;
}
func NewTrustLineEntryExtensionV2Ext ¶
func NewTrustLineEntryExtensionV2Ext(v int32, value interface{}) (result TrustLineEntryExtensionV2Ext, err error)
NewTrustLineEntryExtensionV2Ext creates a new TrustLineEntryExtensionV2Ext.
func (TrustLineEntryExtensionV2Ext) ArmForSwitch ¶
func (u TrustLineEntryExtensionV2Ext) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of TrustLineEntryExtensionV2Ext
func (*TrustLineEntryExtensionV2Ext) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (TrustLineEntryExtensionV2Ext) EncodeTo ¶
func (u TrustLineEntryExtensionV2Ext) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (TrustLineEntryExtensionV2Ext) MarshalBinary ¶
func (s TrustLineEntryExtensionV2Ext) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (TrustLineEntryExtensionV2Ext) SwitchFieldName ¶
func (u TrustLineEntryExtensionV2Ext) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*TrustLineEntryExtensionV2Ext) UnmarshalBinary ¶
func (s *TrustLineEntryExtensionV2Ext) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TrustLineEntryV1 ¶
type TrustLineEntryV1 struct {
Liabilities Liabilities
Ext TrustLineEntryV1Ext
}
TrustLineEntryV1 is an XDR NestedStruct defines as:
struct
{
Liabilities liabilities;
union switch (int v)
{
case 0:
void;
case 2:
TrustLineEntryExtensionV2 v2;
}
ext;
}
func (*TrustLineEntryV1) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (*TrustLineEntryV1) EncodeTo ¶
func (s *TrustLineEntryV1) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (TrustLineEntryV1) MarshalBinary ¶
func (s TrustLineEntryV1) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (*TrustLineEntryV1) UnmarshalBinary ¶
func (s *TrustLineEntryV1) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TrustLineEntryV1Ext ¶
type TrustLineEntryV1Ext struct {
V int32
V2 *TrustLineEntryExtensionV2
}
TrustLineEntryV1Ext is an XDR NestedUnion defines as:
union switch (int v)
{
case 0:
void;
case 2:
TrustLineEntryExtensionV2 v2;
}
func NewTrustLineEntryV1Ext ¶
func NewTrustLineEntryV1Ext(v int32, value interface{}) (result TrustLineEntryV1Ext, err error)
NewTrustLineEntryV1Ext creates a new TrustLineEntryV1Ext.
func (TrustLineEntryV1Ext) ArmForSwitch ¶
func (u TrustLineEntryV1Ext) ArmForSwitch(sw int32) (string, bool)
ArmForSwitch returns which field name should be used for storing the value for an instance of TrustLineEntryV1Ext
func (*TrustLineEntryV1Ext) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (TrustLineEntryV1Ext) EncodeTo ¶
func (u TrustLineEntryV1Ext) EncodeTo(e *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (TrustLineEntryV1Ext) GetV2 ¶
func (u TrustLineEntryV1Ext) GetV2() (result TrustLineEntryExtensionV2, ok bool)
GetV2 retrieves the V2 value from the union, returning ok if the union's switch indicated the value is valid.
func (TrustLineEntryV1Ext) MarshalBinary ¶
func (s TrustLineEntryV1Ext) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (TrustLineEntryV1Ext) MustV2 ¶
func (u TrustLineEntryV1Ext) MustV2() TrustLineEntryExtensionV2
MustV2 retrieves the V2 value from the union, panicing if the value is not set.
func (TrustLineEntryV1Ext) SwitchFieldName ¶
func (u TrustLineEntryV1Ext) SwitchFieldName() string
SwitchFieldName returns the field name in which this union's discriminant is stored
func (*TrustLineEntryV1Ext) UnmarshalBinary ¶
func (s *TrustLineEntryV1Ext) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type TrustLineFlags ¶
type TrustLineFlags int32
const ( TrustLineFlagsAuthorizedFlag TrustLineFlags = 1 TrustLineFlagsAuthorizedToMaintainLiabilitiesFlag TrustLineFlags = 2 TrustLineFlagsTrustlineClawbackEnabledFlag TrustLineFlags = 4 )
func (*TrustLineFlags) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (TrustLineFlags) EncodeTo ¶
func (e TrustLineFlags) EncodeTo(enc *xdr.Encoder) error
EncodeTo encodes this value using the Encoder.
func (TrustLineFlags) IsAuthorized ¶
func (e TrustLineFlags) IsAuthorized() bool
IsAuthorized returns true if issuer has authorized account to perform transactions with its credit
func (TrustLineFlags) IsAuthorizedToMaintainLiabilitiesFlag ¶
func (e TrustLineFlags) IsAuthorizedToMaintainLiabilitiesFlag() bool
IsAuthorizedToMaintainLiabilitiesFlag returns true if the issuer has authorized the account to maintain and reduce liabilities for its credit
func (TrustLineFlags) IsClawbackEnabledFlag ¶
func (e TrustLineFlags) IsClawbackEnabledFlag() bool
IsClawbackEnabledFlag returns true if the issuer has authorized the account to claw assets back
func (TrustLineFlags) MarshalBinary ¶
func (s TrustLineFlags) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler.
func (TrustLineFlags) String ¶
func (e TrustLineFlags) String() string
String returns the name of `e`
func (*TrustLineFlags) UnmarshalBinary ¶
func (s *TrustLineFlags) UnmarshalBinary(inp []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (TrustLineFlags) ValidEnum ¶
func (e TrustLineFlags) ValidEnum(v int32) bool
ValidEnum validates a proposed value for this enum. Implements the Enum interface for TrustLineFlags
type Uint256 ¶
type Uint256 [32]byte
Uint256 is an XDR Typedef defines as:
typedef opaque uint256[32];
func (*Uint256) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (Uint256) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*Uint256) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (Uint256) XDRMaxSize ¶
XDRMaxSize implements the Sized interface for Uint256
type Uint32 ¶
type Uint32 uint32
Uint32 is an XDR Typedef defines as:
typedef unsigned int uint32;
func (*Uint32) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (Uint32) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*Uint32) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
type Uint64 ¶
type Uint64 uint64
Uint64 is an XDR Typedef defines as:
typedef unsigned hyper uint64;
func (*Uint64) DecodeFrom ¶
DecodeFrom decodes this value using the Decoder.
func (Uint64) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (*Uint64) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
Source Files
¶
- account_id.go
- asset.go
- asset_code.go
- change_trust_asset.go
- decorated_signature.go
- go_string.go
- hash.go
- json.go
- main.go
- memo.go
- muxed_account.go
- preconditions.go
- signer_key.go
- signers.go
- string.go
- transaction.go
- transaction_envelope.go
- trust_line_asset.go
- trust_line_entry.go
- trust_line_flags.go
- uint256.go
- xdr_generated.go