Documentation ¶
Overview ¶
Package transaction represents an internal implementation of an xdr transaction envelope
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Network build.Network
Functions ¶
This section is empty.
Types ¶
type Transaction ¶
type Transaction struct { Tx *xdr.TransactionEnvelope // contains filtered or unexported fields }
Transaction creates a transaction envelope. Once a Transaction has been created from an enveloper, it is immutable. Signers must be added before submitting to the network or forwarding on to additional signers.
func New ¶
func New(envelope interface{}) (*Transaction, error)
New creates a new Transaction from envelope envelope can be either an xdr string or of type xdr.TransactionEnvelope
func (*Transaction) Hash ¶
func (t *Transaction) Hash() [32]byte
Hash returns a hash for the current transcation, suitable for signing.
func (*Transaction) Memo ¶
func (t *Transaction) Memo() xdr.Memo
Memo returns the memo attached to the transaction
func (*Transaction) Sign ¶
func (t *Transaction) Sign(kps ...*keypair.Full)
Sign signs the transaction with the given keypair ( *keypair.Full )
func (*Transaction) SignHashX ¶
func (t *Transaction) SignHashX(preimage interface{})
SignHashX adds hashX signer preimage as signature
func (*Transaction) SignKP ¶
func (t *Transaction) SignKP(kps ...keypair.KP)
SignKP signs the transaction with the given keypair ( *keypair.FromAddress )
func (*Transaction) SignatureBase ¶
func (t *Transaction) SignatureBase() []byte
SignatureBase returns the "signature base" of ths current transcation, which is the value that, when hashed, should be signed to create a signature that validators on the Stellar Network will accept.