Skip to content

Commit aa6c7c9

Browse files
author
22388o⚡️
authored
Fix issues, wallet and add Opcode
1 parent ec0b14a commit aa6c7c9

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/dlc/covenants.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ const { ChannelManager, PaymentStatus, Invoice } = require('ldk-node-js');
33

44

55
// Mainnet or Testnet
6-
const NETWORK = bitcoin.networks.bitcoin;
6+
const NETWORK = testnet.networks.bitcoin;
77

8-
// Set up BDK wallet
8+
// Set up Bitcoin wallsr
99
const wallet = new Wallet('testnet', 'path/to/wallet.dat');
1010

1111
// Connect to Electrum server
@@ -89,4 +89,5 @@ async function runDLC() {
8989
// Start the DLC
9090
runDLC().catch(console.error);
9191

92-
92+
// Bitcoin script
93+
const script = Script.fromOpCode(settlementTXOpCode); const opCode = await. script.opcode(OP_CTV); await script.broadcast(opCode.setScript().toScript());

0 commit comments

Comments
 (0)