diff --git a/broadcast/transaction_options.go b/broadcast/transaction_options.go index 49bfeaa..156b775 100644 --- a/broadcast/transaction_options.go +++ b/broadcast/transaction_options.go @@ -31,15 +31,15 @@ type TransactionOpts struct { // and receive the transaction details and status. func WithCallback(callbackURL string, callbackToken ...string) TransactionOptFunc { return func(o *TransactionOpts) { - o.CallbackToken = callbackURL + o.CallbackURL = callbackURL if len(callbackToken) > 0 { o.CallbackToken = callbackToken[0] } } } -// WithMerkleProof will return merkle proof from Arc. -func WithMerkleProof() TransactionOptFunc { +// WithMerkleProofFromCallback it's an option that indicates if the merkle proof should be returned in callback. +func WithMerkleProofFromCallback() TransactionOptFunc { return func(o *TransactionOpts) { o.MerkleProof = true } diff --git a/broadcast/tx_status.go b/broadcast/tx_status.go index 3e98e72..43cee84 100644 --- a/broadcast/tx_status.go +++ b/broadcast/tx_status.go @@ -25,6 +25,8 @@ const ( SeenOnNetwork TxStatus = "SEEN_ON_NETWORK" // 8 // Mined status means that transaction has been mined into a block by a mining node. Mined TxStatus = "MINED" // 9 + // SeenInOrphanMempool means that transaction has been sent to at least 1 Bitcoin node but parent transaction was not found. + SeenInOrphanMempool TxStatus = "SEEN_IN_ORPHAN_MEMPOOL" // 10 // Confirmed status means that transaction is marked as confirmed when it is in a block with 100 blocks built on top of that block. Confirmed TxStatus = "CONFIRMED" // 108 // Rejected status means that transaction has been rejected by the Bitcoin network. @@ -62,6 +64,8 @@ func MapTxStatusToInt(status TxStatus) (int, bool) { value = 8 case Mined: value = 9 + case SeenInOrphanMempool: + value = 10 case Confirmed: value = 108 case Rejected: