Add a context prop in the TxBuildError to report more info; The TxBuilderError.context.tx (a TxBuilder object) should exist when the BTC Builder APIs fail. For example, you should be able to visit the context when calling the sendBtc API and it fails:
try {
await sendBtc(...);
} catch (e) {
if (e instanceof TxBuildError) {
console.log(e.context.tx); // TxBuilder
}
}
Update the message of the MISSING_PUBKEY error
Missing a pubkey that pairs with the address, it is required for the P2TR UTXO included in the transaction: {address}
Changes
context
prop in the TxBuildError to report more info; TheTxBuilderError.context.tx
(a TxBuilder object) should exist when the BTC Builder APIs fail. For example, you should be able to visit the context when calling thesendBtc
API and it fails:Related issues