Movatterモバイル変換


[0]ホーム

URL:


...
Go Documentation Server
GoDoc

Package stc

import "github.com/xdrpp/stc"
Overview
Index
Examples
Subdirectories

Overview ▹

Overview ▾

Stellar transaction compiler library. Provides functions formanipulating Stellar transactions, translating them back and forthbetween txrep format, and posting them.

Example (PostTransaction)

Example (PostTransaction)

Code:

var mykey PrivateKeyfmt.Sscan("SDWHLWL24OTENLATXABXY5RXBG6QFPLQU7VMKFH4RZ7EWZD2B7YRAYFS",    &mykey)var yourkey PublicKeyfmt.Sscan("GATPALHEEUERWYW275QDBNBMCM4KEHYJU34OPIZ6LKJAXK6B4IJ73V4L",    &yourkey)// Fetch account entry to get sequence numbermyacct, err := DefaultStellarNet("test").GetAccountEntry(    mykey.Public().String())if err != nil {    panic(err)}// Build a transactiontxe := NewTransactionEnvelope()txe.SetSourceAccount(mykey.Public())txe.V1().Tx.SeqNum = myacct.NextSeq()txe.V1().Tx.Memo = MemoText("Hello")txe.Append(nil, SetOptions{    SetFlags:      NewUint(uint32(stx.AUTH_REQUIRED_FLAG)),    LowThreshold:  NewUint(2),    MedThreshold:  NewUint(2),    HighThreshold: NewUint(2),    Signer:        NewSignerKey(yourkey, 1),})net := DefaultStellarNet("test")// Pay the median per-operation fee of recent ledgersfees, err := net.GetFeeStats()if err != nil {    panic(err)}txe.SetFee(fees.Percentile(50))// Sign and post the transactionnet.SignTx(&mykey, txe)result, err := net.Post(txe)if err != nil {    panic(err)}fmt.Println(result)

Example (Txrep)

Example (Txrep)

Code:

var mykey PrivateKeyfmt.Sscan("SDWHLWL24OTENLATXABXY5RXBG6QFPLQU7VMKFH4RZ7EWZD2B7YRAYFS",    &mykey)var yourkey PublicKeyfmt.Sscan("GATPALHEEUERWYW275QDBNBMCM4KEHYJU34OPIZ6LKJAXK6B4IJ73V4L",    &yourkey)// Build a transactiontxe := NewTransactionEnvelope()txe.SetSourceAccount(mykey.Public())txe.V1().Tx.SeqNum = 3319833626148865txe.V1().Tx.Memo = MemoText("Hello")txe.Append(nil, Payment{    Destination: *yourkey.ToMuxedAccount(),    Asset:       NativeAsset(),    Amount:      20000000,})// ... Can keep appending operations with txe.Appendtxe.SetFee(100)net := DefaultStellarNet("main")// Sign the transactionnet.SignTx(&mykey, txe)// Print the transaction in multi-line human-readable "txrep" formfmt.Print(net.TxToRep(txe))

Output:

type: ENVELOPE_TYPE_TXtx.sourceAccount: GDFR4HZMNZCNHFEIBWDQCC4JZVFQUGXUQ473EJ4SUPFOJ3XBG5DUCS2Gtx.fee: 100tx.seqNum: 3319833626148865tx.cond.type: PRECOND_NONEtx.memo.type: MEMO_TEXTtx.memo.text: "Hello"tx.operations.len: 1tx.operations[0].sourceAccount._present: falsetx.operations[0].body.type: PAYMENTtx.operations[0].body.paymentOp.destination: GATPALHEEUERWYW275QDBNBMCM4KEHYJU34OPIZ6LKJAXK6B4IJ73V4Ltx.operations[0].body.paymentOp.asset: XLMtx.operations[0].body.paymentOp.amount: 20000000 (2e7)tx.ext.v: 0signatures.len: 1signatures[0].hint: e1374741 (bad signature/unknown key/main is wrong network)signatures[0].signature: 3bf96c29ab95730775612b5a9a0ec630d779846ab31b2e07de8d24de927961f8667604091a3942e756e0dc14dd94465e2b6132880481e403055ec33905429502

Index ▹

Index ▾

Constants
Variables
func ConfigPath(components ...string) string
func IsTemporary(err error) bool
func MemoHash(arg [32]uint8) (ret stx.Memo)
func MemoId(arg uint64) (ret stx.Memo)
func MemoNone() stx.Memo
func MemoReturn(arg [32]uint8) (ret stx.Memo)
func MemoText(arg string) (ret stx.Memo)
func MkAsset(acc AccountID, code string) stx.Asset
func MkAssetCode(code string) stx.AssetCode
func NativeAsset() stx.Asset
func NewHyper(v int64) *int64
func NewSignerHashX(x stx.Hash, weight uint32) *stx.Signer
func NewSignerKey(pk PublicKey, weight uint32) *stx.Signer
func NewString(v string) *string
func NewUhyper(v uint64) *uint64
func NewUint(v uint32) *uint32
func ParseConfigFiles(sink ini.IniSink, paths ...string) error
func Set(t xdr.XdrType, fieldValues ...interface{})
func TxToBase64(tx *TransactionEnvelope) string
func ValidNetName(name string) bool
type AccountHints
   func (h AccountHints) String() string
type AccountID
   func DemuxAcct(macct *MuxedAccount) (*AccountID, *uint64)
   func NewAccountID(id AccountID) *AccountID
type AccountMerge
   func (arg AccountMerge) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type AllowTrust
   func (arg AllowTrust) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type BeginSponsoringFutureReserves
   func (arg BeginSponsoringFutureReserves) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type BumpSequence
   func (arg BumpSequence) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type ChangeTrust
   func (arg ChangeTrust) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type ClaimClaimableBalance
   func (arg ClaimClaimableBalance) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type Clawback
   func (arg Clawback) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type ClawbackClaimableBalance
   func (arg ClawbackClaimableBalance) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type CreateAccount
   func (arg CreateAccount) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type CreateClaimableBalance
   func (arg CreateClaimableBalance) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type CreatePassiveSellOffer
   func (arg CreatePassiveSellOffer) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type EndSponsoringFutureReserves
   func (EndSponsoringFutureReserves) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type ErrEventStream
   func (e ErrEventStream) Error() string
type FeeDist
   func (fd *FeeDist) Percentile(target int) FeeVal
   func (fd *FeeDist) UnmarshalJSON(data []byte) error
type FeePercentile
type FeeStats
   func (fs *FeeStats) Percentile(target int) FeeVal
   func (fs FeeStats) String() string
   func (fs *FeeStats) UnmarshalJSON(data []byte) error
type FeeVal
type HorizonAccountEntry
   func (ae *HorizonAccountEntry) NextSeq() stx.SequenceNumber
   func (hs *HorizonAccountEntry) String() string
   func (ae *HorizonAccountEntry) UnmarshalJSON(data []byte) error
type HorizonBalance
   func (hb *HorizonBalance) UnmarshalJSON(data []byte) error
type HorizonFlags
type HorizonSigner
type HorizonThresholds
type HorizonTxResult
   func (r HorizonTxResult) String() string
   func (r *HorizonTxResult) Success() bool
   func (r *HorizonTxResult) UnmarshalJSON(data []byte) error
type Inflation
   func (Inflation) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type LedgerHeader
type LiquidityPoolDeposit
   func (arg LiquidityPoolDeposit) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type LiquidityPoolWithdraw
   func (arg LiquidityPoolWithdraw) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type ManageBuyOffer
   func (arg ManageBuyOffer) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type ManageData
   func (arg ManageData) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type ManageSellOffer
   func (arg ManageSellOffer) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type MuxedAccount
   func MuxAcct(acct *AccountID, id *uint64) *MuxedAccount
type OperationBody
type PathPaymentStrictReceive
   func (arg PathPaymentStrictReceive) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type PathPaymentStrictSend
   func (arg PathPaymentStrictSend) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type Payment
   func (arg Payment) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type PrivateKey
   func InputPrivateKey(prompt string) (PrivateKey, error)
   func LoadPrivateKey(file string) (PrivateKey, error)
   func NewPrivateKey(pkt stx.PublicKeyType) PrivateKey
   func (sk PrivateKey) Save(file string, passphrase []byte) error
   func (sec *PrivateKey) Scan(ss fmt.ScanState, _ rune) error
   func (sec PrivateKey) Valid() bool
type PublicKey
type RevokeSponsorship
   func (arg RevokeSponsorship) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type SetOptions
   func (arg SetOptions) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type SetTrustLineFlags
   func (arg SetTrustLineFlags) To_Operation_Body() (ret stx.XdrAnon_Operation_Body)
type Signature
type SignerCache
   func (c SignerCache) Add(strkey, comment string) error
   func (c SignerCache) Del(strkey string) error
   func (c SignerCache) Lookup(networkID string, e *stx.TransactionEnvelope, ds *stx.DecoratedSignature) *SignerKeyInfo
   func (c SignerCache) LookupComment(key *stx.SignerKey) string
   func (c SignerCache) String() string
type SignerKey
type SignerKeyInfo
   func (ski *SignerKeyInfo) Scan(ss fmt.ScanState, c rune) error
   func (ski SignerKeyInfo) String() string
type StellarMetas
type StellarNet
   func DefaultStellarNet(name string) *StellarNet
   func LoadStellarNet(name string, paths ...string) (*StellarNet, error)
   func (net *StellarNet) AccountDelta(m *StellarMetas, acct *AccountID, prefix string) string
   func (net *StellarNet) AccountIDNote(acct string) string
   func (net *StellarNet) AddHint(acct string, hint string)
   func (net *StellarNet) AddSigner(signer, comment string)
   func (net *StellarNet) Get(query string) ([]byte, error)
   func (net *StellarNet) GetAccountEntry(acct string) (*HorizonAccountEntry, error)
   func (net *StellarNet) GetFeeCache() (*FeeStats, error)
   func (net *StellarNet) GetFeeStats() (*FeeStats, error)
   func (net *StellarNet) GetJSON(query string, out interface{}) error
   func (net *StellarNet) GetLedgerHeader() (*LedgerHeader, error)
   func (net *StellarNet) GetNativeAsset() string
   func (net *StellarNet) GetNetworkId() string
   func (net *StellarNet) GetTxResult(txid string) (*HorizonTxResult, error)
   func (net *StellarNet) HashTx(tx stx.Signable) *stx.Hash
   func (net *StellarNet) IniSink() ini.IniSink
   func (net *StellarNet) IterateJSON(ctx context.Context, query string, cb interface{}) error
   func (net *StellarNet) NewSignerPreauth(tx stx.Signable, weight uint32) *stx.Signer
   func (net *StellarNet) Post(e *TransactionEnvelope) (*TransactionResult, error)
   func (net *StellarNet) Save() error
   func (net *StellarNet) SavePerm(perm os.FileMode) error
   func (net *StellarNet) SigNote(txe *stx.TransactionEnvelope, sig *stx.DecoratedSignature) string
   func (net *StellarNet) SignTx(sk stcdetail.PrivateKeyInterface, e *TransactionEnvelope) error
   func (net *StellarNet) SignerNote(key *stx.SignerKey) string
   func (net *StellarNet) StreamJSON(ctx context.Context, query string, cb interface{}) error
   func (net *StellarNet) ToRep(txe xdr.XdrType) string
   func (net *StellarNet) TxToRep(txe *TransactionEnvelope) string
   func (net *StellarNet) Validate() error
   func (net *StellarNet) VerifySig(pk *SignerKey, tx stx.Signable, sig Signature) bool
   func (net *StellarNet) WriteRep(out io.Writer, name string, txe xdr.XdrType)
type TransactionEnvelope
   func NewTransactionEnvelope() *TransactionEnvelope
   func TxFromBase64(input string) (*TransactionEnvelope, error)
   func TxFromRep(rep string) (*TransactionEnvelope, error)
   func (txe *TransactionEnvelope) Append(sourceAccount *stx.MuxedAccount, body OperationBody)
   func (txe *TransactionEnvelope) GetHelp(name string) bool
   func (txe *TransactionEnvelope) SetFee(baseFee uint32)
   func (txe *TransactionEnvelope) SetHelp(name string)
   func (txe *TransactionEnvelope) SetSourceAccount(m0 stx.IsAccount)
   func (txe *TransactionEnvelope) SourceAccount() *stx.MuxedAccount
type TransactionResult
type TxFailure
   func (e TxFailure) Error() string

Examples

(Expand All)
Package (PostTransaction)
Package (Txrep)

Package files

config.gohorizon.goprivkey.gostellarnet.gouhelper.goxdr.go

Constants

Largest 64-bit signed integer (9223372036854775807).

constMaxInt64 = 0x7fffffffffffffff

Variables

When a user does not have an stc.conf configuration file, thelibrary searches for one in $STCDIR/stc.conf, then /etc/stc.conf,then ../share/stc.conf (relative to the executable path). If noneof those paths exists, then it uses the built-in contents specifiedby this variable.

varDefaultGlobalConfigContents = []byte(    `# Default Stellar network configurations for stc.[net "main"]network-id = "Public Global Stellar Network ; September 2015"horizon = https://horizon.stellar.org/native-asset = XLM[net "test"]horizon = https://horizon-testnet.stellar.org/native-asset = TestXLM[net "standalone"]network-id = "Standalone Network ; February 2017"horizon = http://localhost:8000/native-asset = StandaloneXLM`)
varErrInvalidNetName =errors.New("Invalid or missing Stellar network name")
varErrNoNetworkId =errors.New("Cannot obtain Stellar network-id")
varInvalidKeyFile =errors.New("Invalid private key file")
varInvalidPassphrase =errors.New("Invalid passphrase")

funcConfigPath

func ConfigPath(components ...string)string

Return the path to a file under the user's configuration directory.The configuration directory is found based on environmentvariables. From highest to lowest precedence tries $STCDIR,UserConfigDir() (i.e., on Unix $XDG_CONFIG_HOME/.stc or$HOME/.config/stc), or ./.stc, using the first one with for whichthe environment variable exists. If the configuration directorydoesn't exist, it gets created, but the underlying path requestedwill not be created.

funcIsTemporary

func IsTemporary(errerror)bool

Try to determine whether a request to Horizon indicates theoperation is worth retrying. Specifically, this functionrepeatedly unwraps errors and returns true if either A) one of theerrors has a Temporary() method that returns true, or B) one of theerrors is a net.OpError for Op "dial" and that is not wrapping aDNS error. The logic here is that if the DNS name of a horizonserver does not exist (permanent DNS error), there is likely somemisconfiguration. However, if the horizon server is refusing TCPconnections, it may be undergoing maintenance.

funcMemoHash

func MemoHash(arg [32]uint8) (retstx.Memo)

Helper function for initializing a Memo withType == MEMO_HASH

funcMemoId

func MemoId(arguint64) (retstx.Memo)

Helper function for initializing a Memo withType == MEMO_ID

funcMemoNone

func MemoNone()stx.Memo

Helper function for initializing a Memo withType == MEMO_NONE

funcMemoReturn

func MemoReturn(arg [32]uint8) (retstx.Memo)

Helper function for initializing a Memo withType == MEMO_RETURN

funcMemoText

func MemoText(argstring) (retstx.Memo)

Helper function for initializing a Memo withType == MEMO_TEXT

funcMkAsset

func MkAsset(accAccountID, codestring)stx.Asset

funcMkAssetCode

func MkAssetCode(codestring)stx.AssetCode

funcNativeAsset

func NativeAsset()stx.Asset

funcNewHyper

func NewHyper(vint64) *int64

Allocate an int64 when initializing types that take an XDR hyper*.

funcNewSignerHashX

func NewSignerHashX(xstx.Hash, weightuint32) *stx.Signer

Create a signer that requires the hash pre-image of some hash value x

funcNewSignerKey

func NewSignerKey(pkPublicKey, weightuint32) *stx.Signer

Create a signer for a particular public key and weight

funcNewString

func NewString(vstring) *string

Allocate a string when initializing types that take an XDR *string<>.

funcNewUhyper

func NewUhyper(vuint64) *uint64

Allocate a uint64 when initializing types that take an XDR unsigned hyper*.

funcNewUint

func NewUint(vuint32) *uint32

Allocate a uint32 when initializing types that take an XDR int*.

funcParseConfigFiles

func ParseConfigFiles(sinkini.IniSink, paths ...string)error

Parse a series of INI configuration files specified by paths,followed by the global or built-in stc.conf file.

funcSet

func Set(txdr.XdrType, fieldValues ...interface{})

Assign a set of values to successive fields of an XDR structure in atype-safe way, flattening out nested structures. For example, giventhe following XDR:

union Asset switch (AssetType type) {case ASSET_TYPE_NATIVE: // Not creditvoid;case ASSET_TYPE_CREDIT_ALPHANUM4:struct {opaque assetCode[4]; // 1 to 4 charactersAccountID issuer;} alphaNum4;case ASSET_TYPE_CREDIT_ALPHANUM12:struct {opaque assetCode[12]; // 5 to 12 charactersAccountID issuer;} alphaNum12;};

You can initalize it with the following:

var asset AssetSet(&asset, ASSET_TYPE_CREDIT_ALPHANUM12, "Asset Code", AccountID{})

Fixed-length arrays of size n must be assigned from n successivearguments passed to Set and cannot be passed as an array. Slices, bycontrast, must be assigned from slices. The one exception isfixed-size array of bytes opaque[n], which can be initialized from astring, a slice []byte, or an array [n]byte. The string or slice maybe shorter than n (in which case the remainig bytes are filled with0), but a byte array must be exactly the same length. (If you reallymust assign from a shorter fixed-length byte array, just slice thearray.)

Note that aggregates can be passed as arguments to assign, in whichcase Set will take fewer arguments. The recursive traversal ofstructures stops when it is possible to assign the next value to thecurrent aggregate. For example, it is valid to say:

var asset AssetSet(&asset, ASSET_TYPE_CREDIT_ALPHANUM12, otherAsset.AlphaNum12)

funcTxToBase64

func TxToBase64(tx *TransactionEnvelope)string

Convert a TransactionEnvelope to base64-encoded binary XDR format.

funcValidNetName

func ValidNetName(namestring)bool

typeAccountHints

Set of annotations to show as comments when showing StellarAccountID values.

type AccountHints map[string]string

func (AccountHints)String

func (hAccountHints) String()string

Renders an account hint as the AccountID in StrKey format, a space,and the comment (if any).

typeAccountID

type AccountID =stx.AccountID

funcDemuxAcct

func DemuxAcct(macct *MuxedAccount) (*AccountID, *uint64)

Break a MuxedAccount into its consituent parts. Note that thesecond return value of type *uint64 may be nil for MuxedAccountsthat don't include an embedded identifier.

funcNewAccountID

func NewAccountID(idAccountID) *AccountID

Return a pointer to an account ID

typeAccountMerge

AccountMerge is a type with the same fields as stx.MuxedAccount thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == ACCOUNT_MERGE and *Body.Destination()initialized from the fields of the AccountMerge.

type AccountMergestx.MuxedAccount

func (AccountMerge)To_Operation_Body

func (argAccountMerge) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeAllowTrust

AllowTrust is a type with the same fields as stx.AllowTrustOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == ALLOW_TRUST and *Body.AllowTrustOp()initialized from the fields of the AllowTrust.

type AllowTruststx.AllowTrustOp

func (AllowTrust)To_Operation_Body

func (argAllowTrust) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeBeginSponsoringFutureReserves

BeginSponsoringFutureReserves is a type with the same fields as stx.BeginSponsoringFutureReservesOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == BEGIN_SPONSORING_FUTURE_RESERVES and *Body.BeginSponsoringFutureReservesOp()initialized from the fields of the BeginSponsoringFutureReserves.

type BeginSponsoringFutureReservesstx.BeginSponsoringFutureReservesOp

func (BeginSponsoringFutureReserves)To_Operation_Body

func (argBeginSponsoringFutureReserves) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeBumpSequence

BumpSequence is a type with the same fields as stx.BumpSequenceOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == BUMP_SEQUENCE and *Body.BumpSequenceOp()initialized from the fields of the BumpSequence.

type BumpSequencestx.BumpSequenceOp

func (BumpSequence)To_Operation_Body

func (argBumpSequence) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeChangeTrust

ChangeTrust is a type with the same fields as stx.ChangeTrustOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == CHANGE_TRUST and *Body.ChangeTrustOp()initialized from the fields of the ChangeTrust.

type ChangeTruststx.ChangeTrustOp

func (ChangeTrust)To_Operation_Body

func (argChangeTrust) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeClaimClaimableBalance

ClaimClaimableBalance is a type with the same fields as stx.ClaimClaimableBalanceOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == CLAIM_CLAIMABLE_BALANCE and *Body.ClaimClaimableBalanceOp()initialized from the fields of the ClaimClaimableBalance.

type ClaimClaimableBalancestx.ClaimClaimableBalanceOp

func (ClaimClaimableBalance)To_Operation_Body

func (argClaimClaimableBalance) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeClawback

Clawback is a type with the same fields as stx.ClawbackOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == CLAWBACK and *Body.ClawbackOp()initialized from the fields of the Clawback.

type Clawbackstx.ClawbackOp

func (Clawback)To_Operation_Body

func (argClawback) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeClawbackClaimableBalance

ClawbackClaimableBalance is a type with the same fields as stx.ClawbackClaimableBalanceOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == CLAWBACK_CLAIMABLE_BALANCE and *Body.ClawbackClaimableBalanceOp()initialized from the fields of the ClawbackClaimableBalance.

type ClawbackClaimableBalancestx.ClawbackClaimableBalanceOp

func (ClawbackClaimableBalance)To_Operation_Body

func (argClawbackClaimableBalance) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeCreateAccount

CreateAccount is a type with the same fields as stx.CreateAccountOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == CREATE_ACCOUNT and *Body.CreateAccountOp()initialized from the fields of the CreateAccount.

type CreateAccountstx.CreateAccountOp

func (CreateAccount)To_Operation_Body

func (argCreateAccount) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeCreateClaimableBalance

CreateClaimableBalance is a type with the same fields as stx.CreateClaimableBalanceOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == CREATE_CLAIMABLE_BALANCE and *Body.CreateClaimableBalanceOp()initialized from the fields of the CreateClaimableBalance.

type CreateClaimableBalancestx.CreateClaimableBalanceOp

func (CreateClaimableBalance)To_Operation_Body

func (argCreateClaimableBalance) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeCreatePassiveSellOffer

CreatePassiveSellOffer is a type with the same fields as stx.CreatePassiveSellOfferOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == CREATE_PASSIVE_SELL_OFFER and *Body.CreatePassiveSellOfferOp()initialized from the fields of the CreatePassiveSellOffer.

type CreatePassiveSellOfferstx.CreatePassiveSellOfferOp

func (CreatePassiveSellOffer)To_Operation_Body

func (argCreatePassiveSellOffer) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeEndSponsoringFutureReserves

EndSponsoringFutureReserves is an empty type that can be passed toTransactionEnvelope.Append() to append a new Operationwith Body.Type == END_SPONSORING_FUTURE_RESERVES.

type EndSponsoringFutureReserves struct{}

func (EndSponsoringFutureReserves)To_Operation_Body

func (EndSponsoringFutureReserves) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeErrEventStream

type ErrEventStreamstring

func (ErrEventStream)Error

func (eErrEventStream) Error()string

typeFeeDist

Distribution of offered or charged fees.

type FeeDist struct {    MaxFeeVal    MinFeeVal    ModeFeeVal    Percentiles []FeePercentile}

func (*FeeDist)Percentile

func (fd *FeeDist) Percentile(targetint)FeeVal

Conservatively returns a fee that is a known fee for the target orthe closest higher known percentile. Does not interpolate--e.g.,if you ask for the 51st percentile but only the 50th and 60th areknown, returns the 60th percentile. Never returns a value lessthan the base fee.

func (*FeeDist)UnmarshalJSON

func (fd *FeeDist) UnmarshalJSON(data []byte)error

typeFeePercentile

type FeePercentile = struct {    Percentileint    FeeFeeVal}

typeFeeStats

Go representation of the Horizon Fee Stats structure response. Thefees are per operation in a transaction, and the individual fieldsare documented here:https://www.stellar.org/developers/horizon/reference/endpoints/fee-stats.html

type FeeStats struct {    Last_ledgeruint64    Last_ledger_base_feeuint32    Ledger_capacity_usagefloat64    ChargedFeeDist    OfferedFeeDist}

func (*FeeStats)Percentile

func (fs *FeeStats) Percentile(targetint)FeeVal

Conservatively a known offered fee for the target or a higherpercentile. Never returns a value less than the base fee.

func (FeeStats)String

func (fsFeeStats) String()string

func (*FeeStats)UnmarshalJSON

func (fs *FeeStats) UnmarshalJSON(data []byte)error

typeFeeVal

A Fee Value is currently 32 bits, but could become 64 bits ifCAP-0015 is adopted.

type FeeVal =uint32

typeHorizonAccountEntry

Structure into which you can unmarshal JSON returned by a query tohorizon for an account endpoint

type HorizonAccountEntry struct {    Net                   *StellarNet `json:"-"`    Sequencestcdetail.JsonInt64    Balancestcdetail.JsonInt64e7    Subentry_countuint32    Inflation_destination *AccountID    Home_domainstring    Last_modified_ledgeruint32    FlagsHorizonFlags    ThresholdsHorizonThresholds    Balances              []HorizonBalance    Signers               []HorizonSigner    Data                  map[string]string}

func (*HorizonAccountEntry)NextSeq

func (ae *HorizonAccountEntry) NextSeq()stx.SequenceNumber

Return the next sequence number (1 + Sequence) as an int64 (or 0 ifan invalid sequence number was returned by horizon).

func (*HorizonAccountEntry)String

func (hs *HorizonAccountEntry) String()string

func (*HorizonAccountEntry)UnmarshalJSON

func (ae *HorizonAccountEntry) UnmarshalJSON(data []byte)error

typeHorizonBalance

type HorizonBalance struct {    Balancestcdetail.JsonInt64e7    Buying_liabilitiesstcdetail.JsonInt64e7    Selling_liabilitiesstcdetail.JsonInt64e7    Limitstcdetail.JsonInt64e7    Assetstx.Asset `json:"-"`}

func (*HorizonBalance)UnmarshalJSON

func (hb *HorizonBalance) UnmarshalJSON(data []byte)error

typeHorizonFlags

type HorizonFlags struct {    Auth_requiredbool    Auth_revocablebool    Auth_immutablebool}

typeHorizonSigner

type HorizonSigner struct {    KeySignerKey    Weightuint32}

typeHorizonThresholds

type HorizonThresholds struct {    Low_thresholduint8    Med_thresholduint8    High_thresholduint8}

typeHorizonTxResult

type HorizonTxResult struct {    Net    *StellarNet    Txhashstx.Hash    Ledgeruint32    Timetime.Time    Envstx.TransactionEnvelope    Resultstx.TransactionResultStellarMetas    PagingTokenstring}

func (HorizonTxResult)String

func (rHorizonTxResult) String()string

func (*HorizonTxResult)Success

func (r *HorizonTxResult) Success()bool

func (*HorizonTxResult)UnmarshalJSON

func (r *HorizonTxResult) UnmarshalJSON(data []byte)error

typeInflation

Inflation is an empty type that can be passed toTransactionEnvelope.Append() to append a new Operationwith Body.Type == INFLATION.

type Inflation struct{}

func (Inflation)To_Operation_Body

func (Inflation) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeLedgerHeader

type LedgerHeader =stx.LedgerHeader

typeLiquidityPoolDeposit

LiquidityPoolDeposit is a type with the same fields as stx.LiquidityPoolDepositOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == LIQUIDITY_POOL_DEPOSIT and *Body.LiquidityPoolDepositOp()initialized from the fields of the LiquidityPoolDeposit.

type LiquidityPoolDepositstx.LiquidityPoolDepositOp

func (LiquidityPoolDeposit)To_Operation_Body

func (argLiquidityPoolDeposit) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeLiquidityPoolWithdraw

LiquidityPoolWithdraw is a type with the same fields as stx.LiquidityPoolWithdrawOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == LIQUIDITY_POOL_WITHDRAW and *Body.LiquidityPoolWithdrawOp()initialized from the fields of the LiquidityPoolWithdraw.

type LiquidityPoolWithdrawstx.LiquidityPoolWithdrawOp

func (LiquidityPoolWithdraw)To_Operation_Body

func (argLiquidityPoolWithdraw) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeManageBuyOffer

ManageBuyOffer is a type with the same fields as stx.ManageBuyOfferOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == MANAGE_BUY_OFFER and *Body.ManageBuyOfferOp()initialized from the fields of the ManageBuyOffer.

type ManageBuyOfferstx.ManageBuyOfferOp

func (ManageBuyOffer)To_Operation_Body

func (argManageBuyOffer) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeManageData

ManageData is a type with the same fields as stx.ManageDataOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == MANAGE_DATA and *Body.ManageDataOp()initialized from the fields of the ManageData.

type ManageDatastx.ManageDataOp

func (ManageData)To_Operation_Body

func (argManageData) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeManageSellOffer

ManageSellOffer is a type with the same fields as stx.ManageSellOfferOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == MANAGE_SELL_OFFER and *Body.ManageSellOfferOp()initialized from the fields of the ManageSellOffer.

type ManageSellOfferstx.ManageSellOfferOp

func (ManageSellOffer)To_Operation_Body

func (argManageSellOffer) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeMuxedAccount

type MuxedAccount =stx.MuxedAccount

funcMuxAcct

func MuxAcct(acct *AccountID, id *uint64) *MuxedAccount

Created a MuxedAccount from its consituent parts. id may be nil toindicate there is no embedded identifier.

typeOperationBody

Interface for placeholder types that are named by camel-casedversions of the OperationType enum and can be transformed into thebody of an Operation

type OperationBody interface {    To_Operation_Body()stx.XdrAnon_Operation_Body}

typePathPaymentStrictReceive

PathPaymentStrictReceive is a type with the same fields as stx.PathPaymentStrictReceiveOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == PATH_PAYMENT_STRICT_RECEIVE and *Body.PathPaymentStrictReceiveOp()initialized from the fields of the PathPaymentStrictReceive.

type PathPaymentStrictReceivestx.PathPaymentStrictReceiveOp

func (PathPaymentStrictReceive)To_Operation_Body

func (argPathPaymentStrictReceive) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typePathPaymentStrictSend

PathPaymentStrictSend is a type with the same fields as stx.PathPaymentStrictSendOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == PATH_PAYMENT_STRICT_SEND and *Body.PathPaymentStrictSendOp()initialized from the fields of the PathPaymentStrictSend.

type PathPaymentStrictSendstx.PathPaymentStrictSendOp

func (PathPaymentStrictSend)To_Operation_Body

func (argPathPaymentStrictSend) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typePayment

Payment is a type with the same fields as stx.PaymentOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == PAYMENT and *Body.PaymentOp()initialized from the fields of the Payment.

type Paymentstx.PaymentOp

func (Payment)To_Operation_Body

func (argPayment) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typePrivateKey

Abstract type representing a Stellar private key. Prints and scansin StrKey format.

type PrivateKey struct {stcdetail.PrivateKeyInterface}

funcInputPrivateKey

func InputPrivateKey(promptstring) (PrivateKey,error)

Reads a private key from standard input. If standard input is aterminal, disables echo and prints prompt to standard error.

funcLoadPrivateKey

func LoadPrivateKey(filestring) (PrivateKey,error)

Reads a private key from a file, prompting for a passphrase if thekey is in ASCII-armored symmetrically-encrypted GPG format.

funcNewPrivateKey

func NewPrivateKey(pktstx.PublicKeyType)PrivateKey

Generates a new Stellar keypair and returns the PrivateKey.Currently the only valid value for pkt isstx.PUBLIC_KEY_TYPE_ED25519.

func (PrivateKey)Save

func (skPrivateKey) Save(filestring, passphrase []byte)error

Writes the a private key to a file in strkey format. If passphrasehas non-zero length, then the key is symmetrically encrypted inASCII-armored GPG format.

func (*PrivateKey)Scan

func (sec *PrivateKey) Scan(ssfmt.ScanState, _rune)error

func (PrivateKey)Valid

func (secPrivateKey) Valid()bool

typePublicKey

type PublicKey =stx.PublicKey

typeRevokeSponsorship

RevokeSponsorship is a type with the same fields as stx.RevokeSponsorshipOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == REVOKE_SPONSORSHIP and *Body.RevokeSponsorshipOp()initialized from the fields of the RevokeSponsorship.

type RevokeSponsorshipstx.RevokeSponsorshipOp

func (RevokeSponsorship)To_Operation_Body

func (argRevokeSponsorship) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeSetOptions

SetOptions is a type with the same fields as stx.SetOptionsOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == SET_OPTIONS and *Body.SetOptionsOp()initialized from the fields of the SetOptions.

type SetOptionsstx.SetOptionsOp

func (SetOptions)To_Operation_Body

func (argSetOptions) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeSetTrustLineFlags

SetTrustLineFlags is a type with the same fields as stx.SetTrustLineFlagsOp thatcan be passed to TransactionEnvelope.Append() to append a newoperation with Body.Type == SET_TRUST_LINE_FLAGS and *Body.SetTrustLineFlagsOp()initialized from the fields of the SetTrustLineFlags.

type SetTrustLineFlagsstx.SetTrustLineFlagsOp

func (SetTrustLineFlags)To_Operation_Body

func (argSetTrustLineFlags) To_Operation_Body() (retstx.XdrAnon_Operation_Body)

typeSignature

type Signature =stx.Signature

typeSignerCache

A SignerCache contains a set of possible Stellar signers. Becausea TransactionEnvelope contains an array of signatures withoutpublic keys, it is not possible to verify the signatures withouthaving the Signers. The signatures in a TransactionEnvelopeenvelope are, however, accompanied by a 4-byte SignatureHint,making it efficient to look up signers if they are in a SignerCache.

type SignerCache map[stx.SignatureHint][]SignerKeyInfo

func (SignerCache)Add

func (cSignerCache) Add(strkey, commentstring)error

Adds a signer to a SignerCache if the signer is not already in thecache. If the signer is already in the cache, the comment is leftunchanged.

func (SignerCache)Del

func (cSignerCache) Del(strkeystring)error

Deletes a signer from the cache.

func (SignerCache)Lookup

func (cSignerCache) Lookup(networkIDstring, e *stx.TransactionEnvelope,    ds *stx.DecoratedSignature) *SignerKeyInfo

Finds the signer in a SignerCache that corresponds to a particularsignature on a transaction.

func (SignerCache)LookupComment

func (cSignerCache) LookupComment(key *stx.SignerKey)string

func (SignerCache)String

func (cSignerCache) String()string

Renders SignerCache as a a set of SignerKeyInfo structures, one perline, suitable for saving to a file.

typeSignerKey

type SignerKey =stx.SignerKey

typeSignerKeyInfo

An annotated SignerKey that can be used to authenticatetransactions. Prints and Scans as a StrKey-format SignerKey, aspace, and then the comment.

type SignerKeyInfo struct {    Keystx.SignerKey    Commentstring}

func (*SignerKeyInfo)Scan

func (ski *SignerKeyInfo) Scan(ssfmt.ScanState, crune)error

func (SignerKeyInfo)String

func (skiSignerKeyInfo) String()string

typeStellarMetas

Ledger entries changed by a transaction.

type StellarMetas struct {    FeeMetastx.LedgerEntryChanges    ResultMetastx.TransactionMeta}

typeStellarNet

type StellarNet struct {// Short name for network (used only in error messages).    Namestring// Network password used for hashing and signing transactions.    NetworkIdstring// Name to use for native asset    NativeAssetstring// Base URL of horizon (including trailing slash).    Horizonstring// Set of signers to recognize when checking signatures on// transactions and annotations to show when printing signers.    SignersSignerCache// Annotations to show on particular accounts when rendering them// in human-readable txrep format.    AccountsAccountHints// Changes will be saved to this file.    SavePathstring// Changes to be applied by Save().    Editsini.IniEdits// Cache of fee stats    FeeCache     *FeeStats    FeeCacheTimetime.Time}

funcDefaultStellarNet

func DefaultStellarNet(namestring) *StellarNet

Load a network from under the ConfigPath() ($STCDIR) directory. Ifname is "", then it will look at the $STCNET environment variableand if that is unset load a default network. Returns nil if thenetwork name does not exist. After loading the netname.net file,also parses $STCDIR/global.conf.

Two pre-defined names are "main" and "test", with "main" being thedefault. Other networks can be created under ConfigPath(), or canbe pre-specified (and created on demand) in stc.conf.

funcLoadStellarNet

func LoadStellarNet(namestring, paths ...string) (*StellarNet,error)

Load a Stellar network from an INI files. If path[0] does notexist but name is valid, the path will be created and net.name willbe set to name. Otherwise the name argument is ignored. After allfiles in paths are parsed, the global stc.conf file will be parsed.After that, there must be a valid NetworkId or the function willreturn nil.

func (*StellarNet)AccountDelta

func (net *StellarNet) AccountDelta(    m *StellarMetas, acct *AccountID, prefixstring)string

func (*StellarNet)AccountIDNote

func (net *StellarNet) AccountIDNote(acctstring)string

func (*StellarNet)AddHint

func (net *StellarNet) AddHint(acctstring, hintstring)

func (*StellarNet)AddSigner

func (net *StellarNet) AddSigner(signer, commentstring)

func (*StellarNet)Get

func (net *StellarNet) Get(querystring) ([]byte,error)

Send an HTTP request to horizon

func (*StellarNet)GetAccountEntry

func (net *StellarNet) GetAccountEntry(acctstring) (    *HorizonAccountEntry,error)

Fetch the sequence number and signers of an account over thenetwork.

func (*StellarNet)GetFeeCache

func (net *StellarNet) GetFeeCache() (*FeeStats,error)

Like GetFeeStats but a version cached for 1 minute

func (*StellarNet)GetFeeStats

func (net *StellarNet) GetFeeStats() (*FeeStats,error)

Queries the network for the latest fee statistics.

func (*StellarNet)GetJSON

func (net *StellarNet) GetJSON(querystring, out interface{})error

Send an HTTP request to horizon and perse the result as JSON

func (*StellarNet)GetLedgerHeader

func (net *StellarNet) GetLedgerHeader() (*LedgerHeader,error)

Fetch the latest ledger header over the network.

func (*StellarNet)GetNativeAsset

func (net *StellarNet) GetNativeAsset()string

func (*StellarNet)GetNetworkId

func (net *StellarNet) GetNetworkId()string

Returns the network ID, a string that is hashed into transactionIDs to ensure that signature are not valid across networks (e.g., atestnet signature cannot work on the public network). If thenetwork ID is not cached in the StellarNet structure itself, thenthis function fetches it from the network.

Note StellarMainNet already contains the network ID, whileStellarTestNet requires fetching the network ID since the Stellartest network is periodically reset.

func (*StellarNet)GetTxResult

func (net *StellarNet) GetTxResult(txidstring) (*HorizonTxResult,error)

func (*StellarNet)HashTx

func (net *StellarNet) HashTx(txstx.Signable) *stx.Hash

Return a transaction hash (which in Stellar is defined as the hashof the constant ENVELOPE_TYPE_TX, the NetworkID, and the marshaledXDR of the Transaction).

func (*StellarNet)IniSink

func (net *StellarNet) IniSink()ini.IniSink

func (*StellarNet)IterateJSON

func (net *StellarNet) IterateJSON(    ctxcontext.Context, querystring, cb interface{})error

Send a request to horizon and iterate through a series of embeddedrecords in the response, continuing to fetch more records untilzero records are returned. cb is a callback function which musthave type func(obj *T)error or func(obj *T), where *T is a typeinto which JSON can be unmarshalled. Returns if there is an erroror the ctx argument is Done.

func (*StellarNet)NewSignerPreauth

func (net *StellarNet) NewSignerPreauth(txstx.Signable,    weightuint32) *stx.Signer

Create a pre-signed transaction from a transaction and weight.

func (*StellarNet)Post

func (net *StellarNet) Post(e *TransactionEnvelope) (    *TransactionResult,error)

Post a new transaction to the network. In the event that thetransaction is successfully submitted to horizon but rejected bythe Stellar network, the error will be of type TxFailure, whichcontains the transaction result.

func (*StellarNet)Save

func (net *StellarNet) Save()error

Save any changes to to SavePath. Equivalent to SavePerm(0666).

func (*StellarNet)SavePerm

func (net *StellarNet) SavePerm(permos.FileMode)error

Save any changes to SavePath. If SavePath does not exist, thencreate it with permissions Perm (subject to umask, of course).

func (*StellarNet)SigNote

func (net *StellarNet) SigNote(txe *stx.TransactionEnvelope,    sig *stx.DecoratedSignature)string

func (*StellarNet)SignTx

func (net *StellarNet) SignTx(skstcdetail.PrivateKeyInterface,    e *TransactionEnvelope)error

Sign a transaction and append the signature to theTransactionEnvelope.

func (*StellarNet)SignerNote

func (net *StellarNet) SignerNote(key *stx.SignerKey)string

func (*StellarNet)StreamJSON

func (net *StellarNet) StreamJSON(    ctxcontext.Context, querystring, cb interface{})error

Stream a series of events. cb is a callback function which musthave type func(obj *T)error or func(obj *T), where *T is a typeinto which JSON can be unmarshalled. Returns if there is an erroror the ctx argument is Done. You likely want to call this in agoroutine, and might want to call it in a loop to try again aftererrors.

func (*StellarNet)ToRep

func (net *StellarNet) ToRep(txexdr.XdrType)string

Convert an arbitrary XDR data structure to human-readable Txrepformat.

func (*StellarNet)TxToRep

func (net *StellarNet) TxToRep(txe *TransactionEnvelope)string

Convert a TransactionEnvelope to human-readable Txrep format.

func (*StellarNet)Validate

func (net *StellarNet) Validate()error

func (*StellarNet)VerifySig

func (net *StellarNet) VerifySig(    pk *SignerKey, txstx.Signable, sigSignature)bool

Returns true only if sig is a valid signature on e for public keypk.

func (*StellarNet)WriteRep

func (net *StellarNet) WriteRep(outio.Writer, namestring, txexdr.XdrType)

Write the human-readable Txrep of an XDR structure to a Writer.

typeTransactionEnvelope

This is a wrapper around the XDR TransactionEnvelope structure.The wrapper allows transactions to be built up more easily via theAppend() method and various helper types. When parsing andgenerating Txrep format, it also keeps track of which enums werefollowed by '?' indicating a request for help.

type TransactionEnvelope struct {    *stx.TransactionEnvelope    Help map[string]struct{}}

funcNewTransactionEnvelope

func NewTransactionEnvelope() *TransactionEnvelope

funcTxFromBase64

func TxFromBase64(inputstring) (*TransactionEnvelope,error)

Parse a TransactionEnvelope from base64-encoded binary XDR format.

funcTxFromRep

func TxFromRep(repstring) (*TransactionEnvelope,error)

Parse a transaction in human-readable Txrep format into aTransactionEnvelope.

func (*TransactionEnvelope)Append

func (txe *TransactionEnvelope) Append(    sourceAccount *stx.MuxedAccount,    bodyOperationBody)

Append an operation to a transaction envelope. To facilitateinitialization of the transaction body (which is a union and sodoesn't support direct initialization), a suite of helper typeshave the same fields as each of the operation types. The helpertypes are named after camel-cased versions of the OperationTypeconstants. E.g., to append an operation of type CREATE_ACCOUNT,use type type CreateAccount:

txe.Append(nil, CreateAccount{Destination: myNewAccountID,StartingBalance: 15000000,})

The helper types are:

type CreateAccount stx.CreateAccountOptype Payment stx.PaymentOptype PathPaymentStrictReceive stx.PathPaymentStrictReceiveOptype ManageSellOffer stx.ManageSellOfferOptype CreatePassiveSellOffer stx.CreatePassiveSellOfferOptype SetOptions stx.SetOptionsOptype ChangeTrust stx.ChangeTrustOptype AllowTrust stx.AllowTrustOptype AccountMerge stx.PublicKeytype Inflation struct{}type ManageData stx.ManageDataOptype BumpSequence stx.BumpSequenceOptype ManageBuyOffer stx.ManageBuyOfferOptype PathPaymentStrictSend stx.PathPaymentStrictSendOp

func (*TransactionEnvelope)GetHelp

func (txe *TransactionEnvelope) GetHelp(namestring)bool

func (*TransactionEnvelope)SetFee

func (txe *TransactionEnvelope) SetFee(baseFeeuint32)

Set the fee of a transaction to baseFee times the number ofoperations. If the result would exceed the maximum fee of0xffffffff (~430 XLM), then just set the fee to 0xffffffff.(Obviously only call this once you have finished adding operationsto the transaction with Append.)

func (*TransactionEnvelope)SetHelp

func (txe *TransactionEnvelope) SetHelp(namestring)

func (*TransactionEnvelope)SetSourceAccount

func (txe *TransactionEnvelope) SetSourceAccount(m0stx.IsAccount)

func (*TransactionEnvelope)SourceAccount

func (txe *TransactionEnvelope) SourceAccount() *stx.MuxedAccount

typeTransactionResult

type TransactionResult =stx.TransactionResult

typeTxFailure

An error representing the failure of a transaction submitted to theStellar network, and from which you can extract the fullTransactionResult.

type TxFailure struct {    *TransactionResult}

func (TxFailure)Error

func (eTxFailure) Error()string

Subdirectories

NameSynopsis
..
cmd
iniThis program is just for testing the ini parser/editor in the stc library.
stcPlease see the stc.1 man page for complete documentation of this command.
iniIni file parser library.
stcdetailInternal functions for the stc library.
stxThe stx package provides a compiled go representation of Stellar's XDR data structures.
uniontoolIgnore this program.
Build version go1.17.8.
Except asnoted,the content of this page is licensed under theCreative Commons Attribution 3.0 License,and code is licensed under aBSD license.
Terms of Service |Privacy Policy

[8]ページ先頭

©2009-2025 Movatter.jp