We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 450841b commit 4a3aff7Copy full SHA for 4a3aff7
1 file changed
src/dlc/covenants.js
@@ -90,4 +90,9 @@ async function runDLC() {
90
runDLC().catch(console.error);
91
92
// Bitcoin script
93
-const script = Script.fromOpCode(settlementTXOpCode); const opCode = await. script.opcode(OP_CTV); await script.broadcast(opCode.setScript().toScript());
+const script = Script.fromOps([OP_CTV]); // Assuming fromOps takes an array of opcodes.
94
+const tx = new TransactionBuilder();
95
+tx.addInput('prev-tx-hash', 0); // Example previous transaction input.
96
+tx.addOutput(script, amount); // Set your custom script as the output.
97
+const txHex = tx.build().toHex();
98
+await broadcastTransaction(txHex); // Assuming broadcastTransaction is your method to send the tx.
0 commit comments