Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtomicSwapContractPushes ¶
type AtomicSwapContractPushes struct { ContractAddress btcutil.Address `json:"contract_address"` RecipientAddress btcutil.Address `json:"recipient_address"` RefundAddress btcutil.Address `json:"refund_address"` Locktime int64 `json:"locktime"` SecretHash [32]byte `json:"secret_hash"` FormattedLocktime string `json:"formatted_locktime"` }
AtomicSwapContractPushes models the data pushes of an atomic swap contract.
func ParseAtomicSwapContract ¶
func ParseAtomicSwapContract(script []byte, params *chaincfg.Params) (*AtomicSwapContractPushes, error)
ParseAtomicSwapContract checks if the provided script is an atomic swap contact and returns the data pushes of the contract.
type AtomicSwapData ¶
type OutputSpender ¶
type OutputSpender struct { Tx *btcjson.TxRawResult InputIndex uint32 }
OutputSpender describes a transaction input that spends an output by specifying the spending transaction and the index of the spending input.
type OutputSpenderTxOut ¶
type TxSwapResults ¶
type TxSwapResults struct { TxID chainhash.Hash Found string Contracts map[uint32]*AtomicSwapData Redemptions map[uint32]*AtomicSwapData Refunds map[uint32]*AtomicSwapData }
func MsgTxAtomicSwapsInfo ¶
func MsgTxAtomicSwapsInfo(msgTx *wire.MsgTx, outputSpenders map[uint32]*OutputSpenderTxOut, params *chaincfg.Params) (*TxSwapResults, error)
Click to show internal directories.
Click to hide internal directories.