Documentation ¶
Index ¶
- func DecodeEcdsaSignature(signature xc.TxSignature) (btcec.ModNScalar, btcec.ModNScalar, error)
- func DetectFrom(inputs []Input) (string, xc.AmountBlockchain)
- type Input
- type Recipient
- type Tx
- func (tx *Tx) AddSignatures(signatures ...xc.TxSignature) error
- func (tx *Tx) DetectToAndAmount(from string, expectedTo string) (string, xc.AmountBlockchain, xc.AmountBlockchain)
- func (tx *Tx) GetSignatures() []xc.TxSignature
- func (tx *Tx) Hash() xc.TxHash
- func (tx *Tx) Outputs() ([]tx_input.Output, error)
- func (tx *Tx) Serialize() ([]byte, error)
- func (tx *Tx) Sighashes() ([]xc.TxDataToSign, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeEcdsaSignature ¶
func DecodeEcdsaSignature(signature xc.TxSignature) (btcec.ModNScalar, btcec.ModNScalar, error)
returns (r, s, err)
func DetectFrom ¶
func DetectFrom(inputs []Input) (string, xc.AmountBlockchain)
Heuristic to determine the sender of a transaction by using the largest utxo input and taking it's spender.
Types ¶
type Recipient ¶
type Recipient struct { To xc.Address `json:"to"` Value xc.AmountBlockchain `json:"value"` }
type Tx ¶
type Tx struct { MsgTx *wire.MsgTx Signed bool Recipients []Recipient Signatures []xc.TxSignature Amount xc.AmountBlockchain Input *tx_input.TxInput From xc.Address To xc.Address }
Tx for Bitcoin
func (*Tx) AddSignatures ¶
func (tx *Tx) AddSignatures(signatures ...xc.TxSignature) error
AddSignatures adds a signature to Tx
func (*Tx) DetectToAndAmount ¶
func (tx *Tx) DetectToAndAmount(from string, expectedTo string) (string, xc.AmountBlockchain, xc.AmountBlockchain)
func (*Tx) GetSignatures ¶
func (tx *Tx) GetSignatures() []xc.TxSignature
Click to show internal directories.
Click to hide internal directories.