This repository was archived by the owner on Mar 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ This sameple code will let you generate a private key, create a transaction and
44
55---
66
7- code for the episode:
8-
97Creating a private key and sending a bitcoin transaction in 30 lines of code
108
11- ` bitcore-lib.js ` (purely didatical version - [ this version] )
9+ - run ` node create-key.js ` to create a new private key (saved by the script in ` private-key.txt ` )
10+ - fund the account with 1 millibit or less
11+ - run ` node index.js ` (by default it will create and submit a transaction paying 0.1 btc to the same address)
1212
13- ` bitcoinjs-lib.js ` (TODO: create a more practical version using bitcoinjs-lib or a wrapper)
13+ The code is the following:
1414
1515``` js
1616const { readFileSync } = require (' fs' )
@@ -62,6 +62,15 @@ const pushTx = require('./blockchain-api/push-tx')
6262
6363Creating a private key and sending a bitcoin transaction in 30 lines of code - #coding #bitcoin #tx #utxo #bitcoin-tx #bitcoin-utxo
6464
65+ ---
66+
67+ notes about js JS bitcoin libraries:
68+
69+
70+ ` bitcore-lib.js ` (purely didatical version - [ this version] )
71+
72+ ` bitcoinjs-lib.js ` (TODO: create a more practical version using bitcoinjs-lib or a wrapper)
73+
6574
6675---
6776
You can’t perform that action at this time.
0 commit comments