File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11const bitcoin = require ( 'bitcoin' ) ;
2- const { PublicKey, PrivateKey, TXId } = require ( 'bitcoin-js ' ) ;
2+ const { PublicKey, PrivateKey, TXId } = require ( 'bitcoinjs-lib ' ) ;
33
44const NETWORK = bitcoin . networks . bitcoin ;
55
Original file line number Diff line number Diff line change 11// Install BDK and LDK using npm or yarn
2- const { ElectrumNetwork, Wallet, Psbt } = require ( 'bitcoin-js ' ) ;
2+ const { ElectrumNetwork, Wallet, Psbt } = require ( 'bitcoinjs-lib ' ) ;
33const { ChannelManager, PaymentStatus, Invoice } = require ( 'ldk-node-js' ) ;
44
55
66// Mainnet or Testnet
77const NETWORK = bitcoin . networks . bitcoin ;
88
9- // Set up BDK wallet
9+ // Set up Bitcoin wallet
1010const wallet = new Wallet ( 'testnet' , 'path/to/wallet.dat' ) ;
1111
1212// Connect to Electrum server
Original file line number Diff line number Diff line change 1- const { ElectrumNetwork, Wallet, Psbt } = require ( 'bitcoin-js ' ) ;
1+ const { ElectrumNetwork, Wallet, Psbt } = require ( 'bitcoinjs-lib ' ) ;
22const { ChannelManager, PaymentStatus, Invoice } = require ( 'ldk-node-js' ) ;
33
44
55// Mainnet or Testnet
66const NETWORK = bitcoin . networks . bitcoin ;
77
8- // Set up BDK wallet
8+ // Set up Bitcoin wallet
99const wallet = new Wallet ( 'testnet' , 'path/to/wallet.dat' ) ;
1010
1111// Connect to Electrum server
Original file line number Diff line number Diff line change 1- const { ElectrumNetwork, Wallet, Psbt } = require ( 'bitcoin-js ' ) ;
1+ const { ElectrumNetwork, Wallet, Psbt } = require ( 'bitcoinjs-lib ' ) ;
22const { ChannelManager, PaymentStatus, Invoice } = require ( 'ldk-node-js' ) ;
33const bitcoin = require ( 'bitcoin-networks' ) ;
44
55// Mainnet or Testnet
66const NETWORK = bitcoin . networks . bitcoin ;
77
8- // Set up BDK wallet
8+ // Set up Bitcoin wallet
99const wallet = new Wallet ( 'testnet' , 'path/to/wallet.dat' ) ;
1010
1111// Connect to Electrum server
Original file line number Diff line number Diff line change 11// Install BDK and LDK using npm or yarn
2- const { ElectrumNetwork, Wallet, Psbt } = require ( 'bitcoin-jsk );
2+ const { ElectrumNetwork, Wallet, Psbt } = require ( 'bitcoinjs-lib' ) ;
33const { ChannelManager, PaymentStatus, Invoice } = require ( 'ldk-node-js' ) ;
44
55
66// Mainnet or Testnet
77const NETWORK = bitcoin . networks . bitcoin ;
88
9- // Set up BDK wallet
9+ // Set up Biitcoin wallet
1010const wallet = new Wallet ( 'testnet' , 'path/to/wallet.dat' ) ;
1111
1212// Connect to Electrum server
Original file line number Diff line number Diff line change 1- const bitcoin = require ( 'bitcoin-js ' ) ;
1+ const bitcoin = require ( 'bitcoinjs-lib ' ) ;
22const ldk = require ( 'ldk-garbagecollected' ) ;
33
44
Original file line number Diff line number Diff line change 1- const BDK = require ( 'bdk-ffi' ) ;
2- const LDK = require ( 'ldk-garbagecollected' ) ;
1+
2+ // Install Bitcoin and LDK using npm or yarn
3+ const { ElectrumNetwork, Wallet, Psbt } = require ( 'bitcoin-js' ) ;
4+ const { ChannelManager, PaymentStatus, Invoice } = require ( 'ldk-garbagecollected' ) ;
35
46// Mainnet or Testnet
57const NETWORK = bitcoin . networks . bitcoin ; // You can switch to testnet, regtest or signet
68
7- // Install BDK and LDK using npm or yarn
8- const { ElectrumNetwork, Wallet, Psbt } = require ( 'bitcoin-js' ) ;
9- const { ChannelManager, PaymentStatus, Invoice } = require ( 'ldk-node-js' ) ;
109
1110// Set up BDK wallet
1211const wallet = new Wallet ( 'testnet' , 'path/to/wallet.dat' ) ;
Original file line number Diff line number Diff line change 11const { ElectrumNetwork, Wallet, Psbt } = require ( 'bitcoin-js' ) ;
2- const { ChannelManager, PaymentStatus, Invoice } = require ( 'ldk-node-js ' ) ;
2+ const { ChannelManager, PaymentStatus, Invoice } = require ( 'ldk-garbagecollected ' ) ;
33
44
55// Mainnet or Testnet
66const NETWORK = bitcoin . networks . bitcoin ; // Switch to bitcoin.networks.testnet for testnet
77
8- // Set up BDK wallet
8+ // Set up Bitcoin wallet
99const wallet = new Wallet ( 'testnet' , 'path/to/wallet.dat' ) ;
1010
1111// Connect to Electrum server
You can’t perform that action at this time.
0 commit comments