Compare commits

...

1296 Commits
v2.0 ... master

Author SHA1 Message Date
Shannon Appelcline
bba348c944
Merge pull request #624 from victorabarros/patch-1
fix typo
2025-04-01 09:01:06 -10:00
Victor Barros
a4122976ef
fix typo 2025-02-05 02:33:21 -03:00
Shannon Appelcline
9b97c50471
Update 02_1_Setting_Up_a_Bitcoin-Core_VPS_with_StackScript.md
Changed Debian 11 to Debian 12 per newest Standup
2023-10-17 12:04:10 -10:00
Shannon Appelcline
2c7301f91b
Merge pull request #586 from joegesualdo/patch-4
Update 09_0_Introducing_Bitcoin_Scripts.md
2022-12-13 14:46:35 -10:00
Shannon Appelcline
0cadc9b8dc
Merge pull request #587 from joegesualdo/patch-5
Update 10_4_Scripting_a_Multisig.md
2022-12-13 14:46:07 -10:00
Shannon Appelcline
598791eff3
Merge pull request #591 from SebiCreator/patch-1
Update 11_2_Using_CLTV_in_Scripts.md
2022-12-13 14:45:27 -10:00
Shannon Appelcline
9d1282bdea
Merge pull request #593 from histamineblkr/patch-1
Uncomplicate btcblock alias and fix 301 error
2022-12-13 14:40:32 -10:00
Brandon Authier
f95809a912
Uncomplicate btcblock alias and fix 301 error
The btcblock alias was overly complicated requiring multiple cut commands and multiple line reversals due to using wget (which wasn't even installed on debian by default, whereas curl is). Using curl with the silent flag reduces complexity. Also removing the cat command double redirection using HERE doc notation and complicated escaping is accomplished with a single echo command and simply append redirect.

Update the mainnet get block call with curl and fix the 301 error received by calling url in plain text.
2022-11-29 17:35:00 -08:00
Sebastian Kaeser
8a2a6955ff
Update 11_2_Using_CLTV_in_Scripts.md
OP_CHECKLOCKTIMEVERIFY not OP_CHECKLOCKTIMEVALUE
2022-11-17 10:52:39 +01:00
Shannon Appelcline
bea17662dd
Update README.md 2022-10-05 14:09:57 -10:00
Shannon Appelcline
bdf45fbc7b
Merge pull request #589 from shikharvashistha/fix/libbitcoinrpc
fix: updated libbitcoinrpc repository links
2022-08-03 07:58:34 -10:00
Shikhar Vashistha
89330cadc5 fix: updated libbitcoinrpc repository links 2022-08-03 16:32:28 +00:00
Shannon Appelcline
e53f72a06f
changed repo for libbitcoinrpc.git 2022-08-02 09:16:35 -10:00
Joe Gesualdo
aaa618699c
Update 10_4_Scripting_a_Multisig.md 2022-07-11 16:42:23 -04:00
Joe Gesualdo
f07ae7b521
Update 09_0_Introducing_Bitcoin_Scripts.md 2022-07-11 12:39:53 -04:00
Shannon Appelcline
5683c85f7d
added coinjoin explanation 2022-07-06 09:15:55 -10:00
Shannon Appelcline
ad57c78450
Merge pull request #585 from cwarny/cwarny/dev
added descriptors=false flag
2022-07-05 11:45:53 -10:00
Shannon Appelcline
cb02a570f9
Merge pull request #584 from joegesualdo/patch-3
Update format for consistency: 08.1
2022-07-05 11:45:18 -10:00
Cedric Warny
42c164e556 added descriptors=false flag 2022-06-30 16:46:05 -04:00
Joe Gesualdo
bfe10b20d7
Update 08_1_Sending_a_Transaction_with_a_Locktime.md 2022-06-30 11:23:33 -04:00
Shannon Appelcline
70f731609c
Merge pull request #582 from joegesualdo/patch-2
Update 06_2_Spending_a_Transaction_to_a_Multisig.md
2022-06-29 15:30:22 -10:00
Joe Gesualdo
9a683856e6
Update 06_2_Spending_a_Transaction_to_a_Multisig.md 2022-06-29 14:57:35 -04:00
Shannon Appelcline
7aac2a9b6d
Merge pull request #581 from joegesualdo/patch-1
Update 04_6_Creating_a_Segwit_Transaction.md
2022-06-28 15:10:37 -10:00
Joe Gesualdo
3b6a307024
Update 04_6_Creating_a_Segwit_Transaction.md
Typo
2022-06-28 21:08:05 -04:00
Shannon Appelcline
c0dca5cfc3
JQ Now available as package
Per #578. Thanks to @tuckertranslator
2022-06-28 09:10:48 -10:00
Shannon Appelcline
3034ebdf6d
Merge pull request #580 from joegesualdo/typo_03_4
Fix typo in 03_4
2022-06-28 08:48:05 -10:00
Shannon Appelcline
484eb6af95
Merge pull request #579 from joegesualdo/typo_02_01
Fix typo in section 02_1
2022-06-28 08:47:33 -10:00
Joe Gesualdo
5645833b30 Fix typo in 03_4 2022-06-28 11:26:31 -04:00
Joe Gesualdo
6c500d0762 Fix typo in section 02_1 2022-06-27 09:38:51 -04:00
Shannon Appelcline
0b97a267ef
Update TODO-23.md 2022-06-15 08:19:42 -10:00
Shannon Appelcline
0dd7e727f7
Update TODO-23.md 2022-06-15 08:07:08 -10:00
Shannon Appelcline
284549f53b
Update TODO-23.md 2022-06-14 15:30:55 -10:00
Shannon Appelcline
5ac684c08c
Create TODO-23.md 2022-06-14 15:21:28 -10:00
Shannon Appelcline
0db4652c6d
Rename TODO.md to TODO-20.md 2022-06-14 14:52:27 -10:00
Shannon Appelcline
d991df57fd
Update 03_3_Setting_Up_Your_Wallet.md 2022-06-14 14:51:02 -10:00
Shannon Appelcline
a7d9a3f4e8
Update 16_1_Accessing_Bitcoind_with_C.md 2022-06-14 13:23:21 -10:00
Shannon Appelcline
63618ce278
changed address example
Fixed per #573
2022-06-14 12:57:59 -10:00
Shannon Appelcline
2261e14e0e
Update 14_2_Changing_Your_Bitcoin_Hidden_Services.md
Added explanation of Bitcoin seednodes per #558.
2022-06-14 12:24:28 -10:00
Shannon Appelcline
3e2892ec88
Update 09_3_Testing_a_Bitcoin_Script.md 2022-06-14 12:21:38 -10:00
Shannon Appelcline
263660920d
added signature warning
Per #554.
2022-06-14 12:21:04 -10:00
Shannon Appelcline
85f5923a2d
Update 06_1_Sending_a_Transaction_to_a_Multisig.md 2022-06-14 09:38:49 -10:00
Shannon Appelcline
7fe45f88a9
Update 02_2_Setting_Up_Bitcoin_Core_Other.md 2022-06-14 09:34:02 -10:00
Shannon Appelcline
8b6ebc0966
Update 04_4__Interlude_Using_Curl.md 2022-06-14 09:08:03 -10:00
Shannon Appelcline
b31f033328
Fixing getrawchangeaddressexample
Per @zerotobtc and #537, the arguments were wrong. Replaced with `getnewaddress` to maintain the example about argument order.
2022-06-14 09:05:43 -10:00
Shannon Appelcline
4009e4a729
updated Gordian Server name. 2022-06-08 11:45:28 -10:00
Shannon Appelcline
42f5e96d3f
Merge pull request #577 from shobitb/master
Fix typo s/btblock/btcblock
2022-06-08 11:41:05 -10:00
Shannon Appelcline
6856f8c88a
Merge pull request #568 from joa-rodrigues/Contributor_License_Agreement_Signed
Added Contributor License Agreement Signed for french translation
2022-06-08 11:40:18 -10:00
Shannon Appelcline
153369fae9
Merge pull request #567 from joa-rodrigues/specify_testnet_on_bitcoin_cli_command
Added -testnet to bitcoin-cli command because we are supposed to use …
2022-06-08 11:39:18 -10:00
Shannon Appelcline
f5b314b436
Merge pull request #566 from gked/patch-2
updating banlist file extension in /.bitcoin/testnet3
2022-06-08 11:38:19 -10:00
Shannon Appelcline
cf2db7fb42
Merge pull request #565 from zerotobtc/patch-11
Fixed internal link
2022-06-08 11:36:23 -10:00
Shobit Beltangdy
7780bd37e5 Fix typo s/btblock/btcblock 2022-05-14 15:21:02 -07:00
Shannon Appelcline
1dec061839
Merge pull request #574 from And1x/patch-1
Fixed issues link in README.md
2022-04-26 09:10:10 -10:00
And1x
920fcbcdee
Update README.md
404 on issues link
2022-04-22 11:13:00 +02:00
joachim
b3da46f4bf Added Contributor License Agreement Signed for french translation 2022-02-03 22:40:34 +01:00
joachim
14c3c1a828 Added -testnet to bitcoin-cli command because we are supposed to use testnet on the course 2022-01-18 08:51:59 +01:00
Grisha Lyukshin
5744135fb1
updating banlist file extension in /.bitcoin/testnet3
The instructions state that updating banlist in /.bitcoin/testnet3 is the dat file.
I think the file type should be json.
2022-01-17 16:59:45 -08:00
zerotobtc
c903a1ff5b
Fixed internal link
The internal link to the top of the page didn't work, went straight to a 404. There were two typos in the internal link (naming and chapter). Also adjusted the description of the link so it matches the original header: "Create a BitcoinRPC Project" instead of "Creating a BitcoinRPC Project"
2022-01-14 07:28:03 +01:00
Shannon Appelcline
ff4d5167f8
Merge pull request #552 from zerotobtc/patch-3
Typo "Inegrating" instead of "Integrating"
2022-01-12 21:31:13 -10:00
Shannon Appelcline
795667e68a
Merge pull request #556 from zerotobtc/patch-4
Typo
2022-01-12 21:30:55 -10:00
Shannon Appelcline
0e0b239786
Merge pull request #563 from zerotobtc/patch-9
Fixed typo
2022-01-12 21:30:32 -10:00
Shannon Appelcline
2b3a885511
Merge pull request #564 from zerotobtc/patch-10
Fixed typo
2022-01-12 21:30:13 -10:00
zerotobtc
2f13b37bca
Fixed typo 2022-01-13 07:17:39 +01:00
zerotobtc
1a8340459c
Fixed typo 2022-01-12 07:29:18 +01:00
zerotobtc
1678ecc53c
Typo
Deleted "in", in line 9.
2021-12-05 07:42:22 +01:00
Dimianovic
1b75a6ec0d
Typo "Inegrating" instead of "Integrating"
Fixed small typo "inegreating" should be "integrating"
2021-11-21 09:36:17 +01:00
Shannon Appelcline
d571451049
Update TODO-30.md 2021-11-17 13:51:30 -10:00
Shannon Appelcline
2f8e873de7
Update TODO-30.md 2021-11-17 13:47:06 -10:00
Shannon Appelcline
7cf298d9df
Update TODO-30.md 2021-11-17 13:46:37 -10:00
Shannon Appelcline
98e3660476
first cut of full 3.0 outline 2021-11-17 13:37:15 -10:00
Shannon Appelcline
e95fb3bb00
everything but schnorr and taproot 2021-11-17 12:19:58 -10:00
Shannon Appelcline
1b322dda97
updating TODO 2021-11-17 11:39:37 -10:00
Shannon Appelcline
1aee47763b
Update README.md 2021-11-17 08:53:20 -10:00
Shannon Appelcline
180ef03e39
Update README.md 2021-11-17 08:53:05 -10:00
Shannon Appelcline
d543ef59fa
added translator credits 2021-11-16 15:32:49 -10:00
Shannon Appelcline
48cf28fc2e
added Spanish translators 2021-11-16 15:29:35 -10:00
Shannon Appelcline
c8dcbe88f1
Update README.md 2021-11-16 09:06:07 -10:00
Shannon Appelcline
e29cb22fac
Update README.md 2021-11-16 08:58:54 -10:00
Shannon Appelcline
63604d2e35
Merge pull request #551 from BlockchainCommons/spanish-translation
Spanish translation
2021-11-16 08:54:49 -10:00
Shannon Appelcline
11fbf899d2
Update TODO-30.md 2021-11-16 08:07:08 -10:00
Shannon Appelcline
8d51e38a36
Add files via upload 2021-11-11 11:11:51 -10:00
Shannon Appelcline
e2d28f4409
Add files via upload 2021-11-10 11:18:41 -10:00
Shannon Appelcline
2a4e99ffa1
updated credits for i2p 2021-11-09 09:42:27 -10:00
Shannon Appelcline
ddf3ba3097
updated credits for i2p 2021-11-09 09:40:45 -10:00
Shannon Appelcline
e6cd795039
Update README.md 2021-11-09 09:39:36 -10:00
Shannon Appelcline
d3be23c178
Merge pull request #548 from javiervargas/patch-116
Update 17_7_Integrando_Libwally_y_Bitcoin-CLI.md
2021-11-09 08:59:27 -10:00
Shannon Appelcline
ab42c7fa27
Merge pull request #547 from javiervargas/patch-115
Update 17_5_Usando_Scripts_en_Libwally.md
2021-11-09 08:59:15 -10:00
Shannon Appelcline
bcccd686b4
Merge pull request #546 from javiervargas/patch-114
Update 17_4_Usando_PSBTs_en_Libwally.md
2021-11-09 08:59:04 -10:00
Shannon Appelcline
80e3125c4a
Merge pull request #545 from javiervargas/patch-113
Update 17_3_Usando_BIP32_en_Libwally.md
2021-11-09 08:58:53 -10:00
Shannon Appelcline
56b62df8ba
Merge pull request #544 from javiervargas/patch-112
Update 17_2_Usando_BIP39_en_Libwally.md
2021-11-09 08:58:37 -10:00
Shannon Appelcline
19f3959513
Merge pull request #543 from javiervargas/patch-111
Update 17_1_Configurando_Libwally.md
2021-11-09 08:58:28 -10:00
Shannon Appelcline
7dc2ac27f3
Merge pull request #542 from javiervargas/patch-110
Update 15_1_Servicio_i2p.md
2021-11-09 08:58:12 -10:00
Shannon Appelcline
9c29fb297f
Merge pull request #540 from javiervargas/patch-108
Update 14_3_Agregando_Servicios_SSH_Ocultos.md
2021-11-09 08:57:57 -10:00
Shannon Appelcline
9ad9d9a154
Merge pull request #539 from javiervargas/patch-106
Update 14_1_Verificando_Su_Configuracion_Tor.md
2021-11-09 08:57:19 -10:00
Shannon Appelcline
91c6d1b42f
Merge pull request #538 from javiervargas/patch-105
Update 13_3_Potenciando_Bitcoin_con_Scripts.md
2021-11-09 08:57:03 -10:00
Shannon Appelcline
46b811b982
Merge pull request #541 from hgrams/CLA.hgrams
Create CLA.HGRAMS.AED496548E2F3810CCAB.asc
2021-11-09 08:49:42 -10:00
Shannon Appelcline
ec887633eb
Merge pull request #550 from BlockchainCommons/portuguese-translation
Merge Portuguese translation v2.0.1
2021-11-09 08:31:17 -10:00
Javier Vargas
4ea88427ed
Update 17_7_Integrando_Libwally_y_Bitcoin-CLI.md 2021-11-06 22:31:10 +01:00
Javier Vargas
87cfbf38ac
Update 17_5_Usando_Scripts_en_Libwally.md 2021-11-06 22:20:37 +01:00
Javier Vargas
1ab9692904
Update 17_4_Usando_PSBTs_en_Libwally.md 2021-11-06 22:17:48 +01:00
Javier Vargas
96a743f247
Update 17_3_Usando_BIP32_en_Libwally.md 2021-11-06 22:13:41 +01:00
Javier Vargas
d5dc23c38d
Update 17_2_Usando_BIP39_en_Libwally.md 2021-11-06 22:03:09 +01:00
Javier Vargas
93e9ac5b82
Update 17_1_Configurando_Libwally.md 2021-11-06 21:51:34 +01:00
Javier Vargas
f2ebf377e7
Update 15_1_Servicio_i2p.md 2021-11-05 19:42:14 +01:00
hgrams
6c8a92416d Create CLA.HGRAMS.AED496548E2F3810CCAB.asc 2021-11-04 17:47:52 -03:00
Javier Vargas
e38146adbb
Update 14_3_Agregando_Servicios_SSH_Ocultos.md 2021-11-04 11:02:43 +01:00
Javier Vargas
614dc77cc8
Update 14_1_Verificando_Su_Configuracion_Tor.md 2021-11-04 10:57:20 +01:00
Javier Vargas
d2c83e337b
Update 13_3_Potenciando_Bitcoin_con_Scripts.md 2021-11-04 10:45:09 +01:00
Shannon Appelcline
09911855b0
added translation credited 2021-11-03 08:19:27 -10:00
Shannon Appelcline
6b9c0cb48c
Update README.md 2021-11-03 08:16:52 -10:00
Shannon Appelcline
acc0d1f55e
fixing an old typo 2021-11-02 07:57:48 -10:00
Shannon Appelcline
519a8b23c2
fixing an old typo 2021-11-02 07:57:21 -10:00
Shannon Appelcline
daf8fd0abb
Merge pull request #535 from Dimianovic/patch-1
Update 04_2__Interlude_Using_JQ.md
2021-11-02 07:56:40 -10:00
Shannon Appelcline
10a7c31bc4
Merge pull request #534 from javiervargas/patch-104
Update 12_2_Usando_Otros_Comandos_de_Scripting.md
2021-11-02 07:55:54 -10:00
Shannon Appelcline
7a874df5e0
Merge pull request #533 from javiervargas/patch-103
Update 11_2_Usando_CLTV_en_Scripts.md
2021-11-02 07:55:42 -10:00
Shannon Appelcline
fe36e9677e
Merge pull request #532 from javiervargas/patch-102
Update 10_6_Gastando_una_Transaccion_P2SH.md
2021-11-02 07:55:25 -10:00
Shannon Appelcline
a7e4cbf1f8
Merge pull request #531 from Luflosi/fix-typo
Fix typo
2021-11-02 07:55:08 -10:00
Shannon Appelcline
16da5bf3e3
Merge pull request #530 from javiervargas/patch-101
Update 10_5_Codificando_un_Script_Segwit.md
2021-11-02 07:54:35 -10:00
Shannon Appelcline
d4d08e5b1f
Merge pull request #528 from javiervargas/patch-100
Update 10_4_Codificando_una_Multifirma.md
2021-11-02 07:54:11 -10:00
Shannon Appelcline
ac09a55d0b
Merge pull request #527 from javiervargas/patch-99
Update 10_2_Construyendo_la_Estructura_de_P2SH.md
2021-11-02 07:53:49 -10:00
Shannon Appelcline
912f480fd2
Merge pull request #526 from javiervargas/patch-98
Update 10_1_Entendiendo_la_Base_de_P2SH.md
2021-11-02 07:53:22 -10:00
Shannon Appelcline
aba966c5af
Merge pull request #525 from javiervargas/patch-97
Update 09_1_Entendiendo_la_Base_de_las_Transacciones.md
2021-11-02 07:53:05 -10:00
Shannon Appelcline
906673a3c0
Merge pull request #524 from javiervargas/patch-96
Update 09_0_Introduciendo_Bitcoin_Scripts.md
2021-11-02 07:52:50 -10:00
Shannon Appelcline
6c50ba3359
Merge pull request #523 from javiervargas/patch-95
Update 07_3_Integrando_con_Hardware_Wallets.md
2021-11-02 07:52:32 -10:00
Shannon Appelcline
5ae603b46c
Merge pull request #522 from javiervargas/patch-94
Update 06_3_Enviando_una_Multifirma_Automatizada.md
2021-11-02 07:52:12 -10:00
Shannon Appelcline
c78ca0be4d
Merge pull request #521 from javiervargas/patch-93
Update 06_1_Enviando_una_Transaccion_a_una_Direccion_Multifirma.md
2021-11-02 07:51:54 -10:00
Shannon Appelcline
2132750203
Merge pull request #520 from javiervargas/patch-92
Update 04_6_Creando_una_Transaccion_Segwit.md
2021-11-02 07:51:36 -10:00
Shannon Appelcline
2f4b3ce070
Merge pull request #519 from javiervargas/patch-91
Update 04_4_Interludio_Usando_Curl.md
2021-11-02 07:51:15 -10:00
Shannon Appelcline
235d8964e7
Merge pull request #518 from javiervargas/patch-90
Update 04_4_Enviando_Monedas_con_una_Transaccion_Cruda.md
2021-11-02 07:50:39 -10:00
Shannon Appelcline
df1ae00ae0
Merge pull request #517 from javiervargas/patch-89
Update 04_2_Interludio_Usando_JQ.md
2021-11-02 07:50:25 -10:00
Shannon Appelcline
a6a72b158c
Merge pull request #516 from javiervargas/patch-88
Update 04_2_Creando_una_Transaccion_Cruda.md
2021-11-02 07:50:03 -10:00
Shannon Appelcline
a2fce3da8c
Merge pull request #515 from javiervargas/patch-87
Update 03_4_Recibiendo_una_Transaccion.md
2021-11-02 07:49:46 -10:00
Shannon Appelcline
753d2bc9c9
Merge pull request #514 from javiervargas/patch-86
Update 03_3_Configurando_Su_Billetera.md
2021-11-02 07:49:22 -10:00
Shannon Appelcline
28725209fc
Merge pull request #513 from javiervargas/patch-85
Update 02_2_Configurando_Bitcoin_Core_Otros.md
2021-11-02 07:49:00 -10:00
Dimianovic
f91556b3fc
Update 04_2__Interlude_Using_JQ.md
Added "s" in bc install command
2021-11-02 07:08:30 +01:00
Javier Vargas
82cbf16d06
Update 12_2_Usando_Otros_Comandos_de_Scripting.md 2021-11-01 18:54:53 +01:00
Javier Vargas
5898e4afb2
Update 11_2_Usando_CLTV_en_Scripts.md 2021-11-01 18:50:08 +01:00
Javier Vargas
438bf61cca
Update 10_6_Gastando_una_Transaccion_P2SH.md 2021-11-01 18:46:57 +01:00
Javier Vargas
c86a51bb15
Update 10_6_Gastando_una_Transaccion_P2SH.md 2021-11-01 18:45:31 +01:00
Luflosi
d3b157d87d
Fix typo 2021-10-31 18:02:31 +01:00
Javier Vargas
a65f477e8d
Update 10_5_Codificando_un_Script_Segwit.md 2021-10-31 14:24:42 +01:00
Javier Vargas
c2d751d747
Update 10_4_Codificando_una_Multifirma.md 2021-10-21 12:58:40 +02:00
Javier Vargas
be8922735f
Update 10_2_Construyendo_la_Estructura_de_P2SH.md 2021-10-21 12:26:58 +02:00
Javier Vargas
84e8995d6c
Update 10_1_Entendiendo_la_Base_de_P2SH.md 2021-10-21 12:14:31 +02:00
Javier Vargas
3d98ca01c4
Update 09_1_Entendiendo_la_Base_de_las_Transacciones.md 2021-10-21 11:49:45 +02:00
Javier Vargas
b158aee798
Update 09_0_Introduciendo_Bitcoin_Scripts.md 2021-10-21 11:32:15 +02:00
Javier Vargas
62a677dda9
Update 07_3_Integrando_con_Hardware_Wallets.md 2021-10-21 11:22:57 +02:00
Javier Vargas
aa598a2f35
Update 06_3_Enviando_una_Multifirma_Automatizada.md 2021-10-20 13:10:41 +02:00
Javier Vargas
b63690f7e2
Update 06_1_Enviando_una_Transaccion_a_una_Direccion_Multifirma.md 2021-10-20 13:04:16 +02:00
Javier Vargas
66f588b257
Update 04_6_Creando_una_Transaccion_Segwit.md 2021-10-20 12:51:54 +02:00
Javier Vargas
5f867061fc
Update 04_4_Interludio_Usando_Curl.md 2021-10-20 12:48:58 +02:00
Javier Vargas
47a6e4767d
Update 04_4_Enviando_Monedas_con_una_Transaccion_Cruda.md 2021-10-20 12:39:23 +02:00
Javier Vargas
d292a53ffa
Update 04_2_Interludio_Usando_JQ.md 2021-10-20 12:35:41 +02:00
Javier Vargas
51e1633d5a
Update 04_2_Creando_una_Transaccion_Cruda.md 2021-10-20 12:31:10 +02:00
Javier Vargas
3d4d0abd05
Update 03_4_Recibiendo_una_Transaccion.md 2021-10-20 12:25:07 +02:00
Javier Vargas
a6174a7927
Update 03_3_Configurando_Su_Billetera.md 2021-10-20 12:22:52 +02:00
Javier Vargas
5a6d3f1bfe
Update 02_2_Configurando_Bitcoin_Core_Otros.md 2021-10-20 12:01:29 +02:00
Shannon Appelcline
55ed2b0346
Update README.md 2021-10-19 11:01:29 -10:00
Shannon Appelcline
85ead1b659
emphasizing CLA. 2021-10-12 08:17:36 -10:00
Shannon Appelcline
6045bc5d29
Merge pull request #509 from icculp/update_links_2
Fixing chapter links and minor corrections from 15 through end
2021-10-06 12:53:04 -10:00
Shannon Appelcline
7e0abd0ad6
Merge pull request #508 from icculp/spanish-translation
Updating src files to match chapter numbers
2021-10-06 12:52:14 -10:00
Shannon Appelcline
0f69cdb92e
Merge pull request #507 from icculp/patch-22
closing `
2021-10-06 12:51:52 -10:00
Shannon Appelcline
488a590926
Merge pull request #506 from javiervargas/patch-84
Update 04_2_Interludio_Usando_JQ.md
2021-10-06 12:51:31 -10:00
Shannon Appelcline
85c1295a3d
Merge pull request #505 from javiervargas/patch-83
Update 04_2_Creando_una_Transaccion_Cruda.md
2021-10-06 12:51:08 -10:00
Shannon Appelcline
469fd38a33
Merge pull request #504 from javiervargas/patch-82
Update 04_1_Enviando_Monedas_de_la_Forma_Facil.md
2021-10-06 12:50:35 -10:00
Ian Culp
91841e655c
fixing a few more links 2021-10-06 17:32:57 -05:00
Ian Culp
e0d2c93b9d
updating link 2021-10-06 17:24:25 -05:00
Ian Culp
a0cfea22bd
fixing links 2021-10-06 17:22:33 -05:00
Ian Culp
0e51860eb5
fixing links and markdown, txid 2021-10-06 17:20:08 -05:00
Ian Culp
b8ddf3d092
fixing link 2021-10-06 17:14:13 -05:00
Ian Culp
24e93f6b50
fixing link 2021-10-06 17:12:18 -05:00
Ian Culp
f5cb57d481
fixing interlude link 2021-10-06 17:11:01 -05:00
Ian Culp
8d209636d1
minor corrections 2021-10-06 17:10:28 -05:00
Ian Culp
db9cb47ee3
fixing link 2021-10-06 17:07:01 -05:00
Ian Culp
f1693a01a2
minor correction 2021-10-06 17:05:11 -05:00
Ian Culp
2a2d6a1b1b
src links, minor corrections 2021-10-06 17:02:30 -05:00
Ian Culp
d2f65ffcdc
updating src links 2021-10-06 16:58:45 -05:00
Ian Culp
2c1643dfc3
src links 2021-10-06 16:53:48 -05:00
Ian Culp
6cc2ec4629
src link 2021-10-06 16:51:21 -05:00
Ian Culp
ada831304c
updating src links 2021-10-06 16:50:11 -05:00
Ian Culp
e2e234ca34
src link 2021-10-06 16:48:44 -05:00
Ian Culp
f79d8cac58
updating src link 2021-10-06 16:47:40 -05:00
Ian Culp
6f6bc25361
update src link 2021-10-06 16:46:41 -05:00
Ian Culp
90512e527e
update src link 2021-10-06 16:45:52 -05:00
Ian Culp
41f0f7854f
updating src links 2021-10-06 16:44:26 -05:00
Ian Culp
fcf0efc6af
Rename 17_6_sendtx.playground to 18_6_sendtx.playground 2021-10-06 16:40:36 -05:00
Ian Culp
e56eac346a
Rename 17_6_getinfo.playground to 18_6_getinfo.playground 2021-10-06 16:40:27 -05:00
Ian Culp
935226b003
Rename 17_5_main-sendtx.rs to 18_5_main-sendtx.rs 2021-10-06 16:40:15 -05:00
Ian Culp
0266655474
Rename 17_5_main-getinfo.rs to 18_5_main-getinfo.rs 2021-10-06 16:40:05 -05:00
Ian Culp
21f7affe44
Rename 17_4_walletinfo.py to 18_4_walletinfo.py 2021-10-06 16:39:56 -05:00
Ian Culp
07c11b2a9c
Rename 17_4_sendtx.py to 18_4_sendtx.py 2021-10-06 16:39:44 -05:00
Ian Culp
13b1437370
Rename 17_4_getinfo.py to 18_4_getinfo.py 2021-10-06 16:39:36 -05:00
Ian Culp
f012a81f82
Rename 17_3_walletinfo.js to 18_3_walletinfo.js 2021-10-06 16:39:27 -05:00
Ian Culp
e6ad79a8e5
Rename 17_3_sendtx.js to 18_3_sendtx.js 2021-10-06 16:39:16 -05:00
Ian Culp
8133f1f6a4
Rename 17_3_getinfo.js to 18_3_getinfo.js 2021-10-06 16:39:07 -05:00
Ian Culp
739198f62d
Rename 17_2_App-sendtx.java to 18_2_App-sendtx.java 2021-10-06 16:38:56 -05:00
Ian Culp
343ea7364a
Rename 17_2_App-listen.java to 18_2_App-listen.java 2021-10-06 16:38:46 -05:00
Ian Culp
489fd1019b
Rename 17_2_App-getinfo.java to 18_2_App-getinfo.java 2021-10-06 16:38:38 -05:00
Ian Culp
6cd28d921e
Rename 17_1_sendtransaction.go to 18_1_sendtransaction.go 2021-10-06 16:38:30 -05:00
Ian Culp
ddc89b36f5
Rename 17_1_lookuptransaction.go to 18_1_lookuptransaction.go 2021-10-06 16:38:22 -05:00
Ian Culp
a05782593a
Rename 17_1_getbalance.go to 18_1_getbalance.go 2021-10-06 16:38:15 -05:00
Ian Culp
abd36c28ac
Rename 17_1_getamountreceived.go to 18_1_getamountreceived.go 2021-10-06 16:38:04 -05:00
Ian Culp
023909e0cc
Rename 17_1_getaddress.go to 18_1_getaddress.go 2021-10-06 16:37:55 -05:00
Ian Culp
33e38c15e0
Rename 17_1_blockinfo.go to 18_1_blockinfo.go 2021-10-06 16:37:45 -05:00
Ian Culp
59e1ff85b6
Rename 16_7_genhd_for_import.c to 17_7_genhd_for_import.c 2021-10-06 16:37:37 -05:00
Ian Culp
0713a672d0
Rename 16_5_replacewithscript.c to 17_5_replacewithscript.c 2021-10-06 16:37:27 -05:00
Ian Culp
f04ffe5965
Rename 16_4_examinepsbt.c to 17_4_examinepsbt.c 2021-10-06 16:37:19 -05:00
Ian Culp
94e0b243c7
Rename 16_4_createemptypsbt.c to 17_4_createemptypsbt.c 2021-10-06 16:37:11 -05:00
Ian Culp
1a434ece5a
Rename 16_3_genhd.c to 17_3_genhd.c 2021-10-06 16:36:59 -05:00
Ian Culp
f18a9dbba4
Rename 16_2_genmnemonic.c to 17_2_genmnemonic.c 2021-10-06 16:36:51 -05:00
Ian Culp
d40aa0ab66
Rename 16_1_testwally.c to 17_1_testwally.c 2021-10-06 16:36:35 -05:00
Ian Culp
920ab1213c
Rename 15_3_chainlistener.c to 16_3_chainlistener.c 2021-10-06 16:36:22 -05:00
Ian Culp
b2daf49b80
Rename 15_2_sendtoaddress.c to 16_2_sendtoaddress.c 2021-10-06 16:00:10 -05:00
Ian Culp
b23a93148c
Rename 15_1_testbitcoin.c to 16_1_testbitcoin.c 2021-10-06 16:00:02 -05:00
Ian Culp
ec7420936a
Rename 15_1_getmininginfo.c to 16_1_getmininginfo.c 2021-10-06 15:59:54 -05:00
Ian Culp
f42274a6b3
Rename 17_6_sendtx.playground to 18_6_sendtx.playground 2021-10-06 15:54:19 -05:00
Ian Culp
78554ade58
Rename 17_6_getinfo.playground to 18_6_getinfo.playground 2021-10-06 15:54:11 -05:00
Ian Culp
d04dacd847
Rename 17_5_main-sendtx.rs to 18_5_main-sendtx.rs 2021-10-06 15:54:03 -05:00
Ian Culp
a0f14d72f1
Rename 17_5_main-getinfo.rs to 18_5_main-getinfo.rs 2021-10-06 15:53:52 -05:00
Ian Culp
1c890c7177
Rename 17_4_walletinfo.py to 18_4_walletinfo.py 2021-10-06 15:53:45 -05:00
Ian Culp
a89f4c3b66
Rename 17_4_sendtx.py to 18_4_sendtx.py 2021-10-06 15:53:38 -05:00
Ian Culp
ad512f6999
Rename 17_4_getinfo.py to 18_4_getinfo.py 2021-10-06 15:53:31 -05:00
Ian Culp
c77ead3926
Rename 17_3_walletinfo.js to 18_3_walletinfo.js 2021-10-06 15:53:24 -05:00
Ian Culp
41657338d5
Rename 17_3_sendtx.js to 18_3_sendtx.js 2021-10-06 15:53:17 -05:00
Ian Culp
f2e551e9ad
Rename 17_3_getinfo.js to 18_3_getinfo.js 2021-10-06 15:53:10 -05:00
Ian Culp
66e8da64a9
Rename 17_2_App-sendtx.java to 18_2_App-sendtx.java 2021-10-06 15:53:02 -05:00
Ian Culp
d2642d6531
Rename 17_2_App-listen.java to 18_2_App-listen.java 2021-10-06 15:52:53 -05:00
Ian Culp
255bb7822f
Rename 17_2_App-getinfo.java to 18_2_App-getinfo.java 2021-10-06 15:52:45 -05:00
Ian Culp
c98d25180f
Rename 17_1_sendtransaction.go to 18_1_sendtransaction.go 2021-10-06 15:52:36 -05:00
Ian Culp
e5b650732b
Rename 17_1_lookuptransaction.go to 18_1_lookuptransaction.go 2021-10-06 15:52:30 -05:00
Ian Culp
d4b73e5f95
Rename 17_1_getbalance.go to 18_1_getbalance.go 2021-10-06 15:52:21 -05:00
Ian Culp
d4277dae06
Rename 17_1_getamountreceived.go to 18_1_getamountreceived.go 2021-10-06 15:52:13 -05:00
Ian Culp
72f0eea840
Rename 17_1_getaddress.go to 18_1_getaddress.go 2021-10-06 15:52:05 -05:00
Ian Culp
71f0da240c
Rename 17_1_blockinfo.go to 18_1_blockinfo.go 2021-10-06 15:51:58 -05:00
Ian Culp
6e380c073a
Rename 16_7_genhd_for_import.c to 17_7_genhd_for_import.c 2021-10-06 15:51:50 -05:00
Ian Culp
3471e3f246
Rename 16_5_replacewithscript.c to 17_5_replacewithscript.c 2021-10-06 15:51:40 -05:00
Ian Culp
5490feff67
Rename 16_4_examinepsbt.c to 17_4_examinepsbt.c 2021-10-06 15:51:31 -05:00
Ian Culp
0bcfbf8071
Rename 16_4_createemptypsbt.c to 17_4_createemptypsbt.c 2021-10-06 15:51:23 -05:00
Ian Culp
e3b10f7e7c
Rename 16_3_genhd.c to 17_3_genhd.c 2021-10-06 15:51:14 -05:00
Ian Culp
69af86c053
Rename 16_2_genmnemonic.c to 17_2_genmnemonic.c 2021-10-06 15:51:06 -05:00
Ian Culp
076645b729
Rename 16_1_testwally.c to 17_1_testwally.c 2021-10-06 15:50:57 -05:00
Ian Culp
44ed34d6ab
Rename 15_3_chainlistener.c to 16_3_chainlistener.c 2021-10-06 15:50:48 -05:00
Ian Culp
97f790a53a
Rename 15_2_sendtoaddress.c to 16_2_sendtoaddress.c 2021-10-06 15:50:39 -05:00
Ian Culp
58ee5d7904
Rename 15_1_testbitcoin.c to 16_1_testbitcoin.c 2021-10-06 15:50:32 -05:00
Ian Culp
69afc41db8
Rename 15_1_getmininginfo.c to 16_1_getmininginfo.c 2021-10-06 15:50:23 -05:00
Ian Culp
34d0dcac74
Rename 16_1_getmininginfo.c to 15_1_getmininginfo.c 2021-10-06 15:48:53 -05:00
Ian Culp
a240e42873
Rename 15_1_getmininginfo.c to 16_1_getmininginfo.c 2021-10-06 15:48:26 -05:00
Ian Culp
cbe336a9fd
updating links, minor corrections
17_1_blockinfo.go src file in master is 18, in spanish-translation it's still 17. Since this will get merged soon updating to 18
2021-10-06 15:40:56 -05:00
Ian Culp
c99c99d39c
fix link 2021-10-06 15:29:24 -05:00
Ian Culp
4f87582498
closing ` 2021-10-06 15:25:34 -05:00
Ian Culp
9eabc7e907
closing ` 2021-10-06 15:24:28 -05:00
Ian Culp
b21063952c
update link 2021-10-06 15:21:39 -05:00
Ian Culp
621cb9453e
markdown fix 2021-10-06 15:17:15 -05:00
Ian Culp
d42fd81006
update link 2021-10-06 15:15:04 -05:00
Ian Culp
9d5057d1a2
fix icon 2021-10-06 15:13:00 -05:00
Ian Culp
80e50fec33
update link, fix typos 2021-10-06 15:11:06 -05:00
Ian Culp
4f99d61337
update link 2021-10-06 15:07:38 -05:00
Ian Culp
50b7e3ce9b
typo 2021-10-06 15:05:39 -05:00
Ian Culp
f700664ec8
Update 15_0_Usando_i2p.md 2021-10-06 15:01:47 -05:00
Javier Vargas
8c02ba00ca
Update 04_2_Interludio_Usando_JQ.md 2021-10-06 14:37:32 +02:00
Javier Vargas
d9a06468d4
Update 04_2_Creando_una_Transaccion_Cruda.md 2021-10-06 13:08:03 +02:00
Javier Vargas
746e9d135a
Update 04_1_Enviando_Monedas_de_la_Forma_Facil.md 2021-10-06 12:21:48 +02:00
Shannon Appelcline
0b122e43cf
Merge pull request #503 from namcios/portuguese-translation
PT: Translate CONTRIBUTING.md
2021-10-05 10:51:03 -10:00
Shannon Appelcline
755dfeecee
Merge pull request #502 from javiervargas/patch-81
Update 19_2_Interludio_Accediendo_a_un_Segundo_Nodo_Lightning.md
2021-10-05 09:49:38 -10:00
Shannon Appelcline
36e30e0380
Merge pull request #501 from javiervargas/patch-80
Update 19_2_Conociendo_Su_Configuracion_Lightning.md
2021-10-05 09:49:15 -10:00
Shannon Appelcline
9dab153d90
Merge pull request #500 from javiervargas/patch-79
Update 19_1_Verificando_Su_Configuracion_Lightning.md
2021-10-05 09:49:04 -10:00
Shannon Appelcline
5f0e49e818
Merge pull request #499 from EahwW8VfYy/patch-1
typo fix
2021-10-05 09:48:47 -10:00
Shannon Appelcline
500a00e81b
Merge pull request #498 from javiervargas/patch-78
Update 18_6_Accediendo_a_Bitcoind_con_Swift.md
2021-10-05 09:48:16 -10:00
Shannon Appelcline
b16c7ad9f4
Merge pull request #497 from javiervargas/patch-77
Update 18_5_Accediendo_a_Bitcoind_con_Rust.md
2021-10-05 09:47:46 -10:00
Shannon Appelcline
b4fa2d6024
Merge pull request #496 from javiervargas/patch-76
Update 18_4_Accediendo_a_Bitcoind_con_Python.md
2021-10-05 09:47:29 -10:00
Shannon Appelcline
e6b9c900cf
Merge pull request #495 from javiervargas/patch-75
Update 18_3_Accediendo_a_Bitcoind_con_NodeJS.md
2021-10-05 09:47:12 -10:00
Shannon Appelcline
ef79bf5caf
Merge pull request #494 from javiervargas/patch-74
Update 18_2_Accediendo_a_Bitcoind_con_Java.md
2021-10-05 09:46:55 -10:00
namcios
65fd8b5059
Fix link 2021-10-04 19:11:09 -03:00
namcios
574545ce27
Merge branch 'portuguese-translation' of https://github.com/namcios/Learning-Bitcoin-from-the-Command-Line into portuguese-translation 2021-10-04 19:06:11 -03:00
namcios
e7b38b6fd1
Update README.md 2021-10-04 19:05:31 -03:00
namcios
86b7e7b45a
Translate CONTRIBUTING.md 2021-10-04 19:05:13 -03:00
Javier Vargas
e950816c6a
Update 19_2_Interludio_Accediendo_a_un_Segundo_Nodo_Lightning.md 2021-10-01 15:33:54 +02:00
Javier Vargas
40dc2f1ead
Update 19_2_Conociendo_Su_Configuracion_Lightning.md 2021-10-01 15:28:28 +02:00
Javier Vargas
ed567da44f
Update 19_2_Conociendo_Su_Configuracion_Lightning.md 2021-10-01 15:25:54 +02:00
Javier Vargas
0ece71c6af
Update 19_1_Verificando_Su_Configuracion_Lightning.md 2021-10-01 15:21:37 +02:00
EahwW8VfYy
f4d554353d
typo fix
encapsulatea -> encapsulates
2021-09-30 16:55:32 -05:00
Javier Vargas
77f19acb1a
Update 18_6_Accediendo_a_Bitcoind_con_Swift.md 2021-09-30 22:22:01 +02:00
Javier Vargas
d0756f637c
Update 18_5_Accediendo_a_Bitcoind_con_Rust.md 2021-09-30 22:15:50 +02:00
Javier Vargas
33bc0e8da3
Update 18_4_Accediendo_a_Bitcoind_con_Python.md 2021-09-30 22:12:41 +02:00
Javier Vargas
270576a2d9
Update 18_3_Accediendo_a_Bitcoind_con_NodeJS.md 2021-09-30 22:08:39 +02:00
Javier Vargas
0f2c0e370c
Update 18_2_Accediendo_a_Bitcoind_con_Java.md 2021-09-30 20:16:57 +02:00
Shannon Appelcline
c3be3b7825
Merge pull request #493 from namcios/portuguese-translation
PT: Fix links to `src` files
2021-09-29 08:10:44 -10:00
Shannon Appelcline
05ba5ae4c0
Merge pull request #492 from javiervargas/patch-73
Fix src links
2021-09-29 08:10:21 -10:00
Shannon Appelcline
3d8b3d4533
Merge pull request #491 from javiervargas/patch-72
Fix links and src code
2021-09-29 08:09:53 -10:00
namcios
c4384baea5
Fix links to 2021-09-29 08:42:17 -03:00
Javier Vargas
ef2ec75a7b
Update 18_1_Accediendo_a_Bitcoind_con_Go.md 2021-09-29 12:12:35 +02:00
Shannon Appelcline
21bf3ad094
Merge pull request #490 from javiervargas/patch-71
Update 10_4_Codificando_una_Multifirma.md
2021-09-28 09:58:17 -10:00
Javier Vargas
83889c5a69
Update 16_1_Accediendo_a_Bitcoind_en_C_con_las_Bibliotecas_RPC.md 2021-09-28 21:29:51 +02:00
Javier Vargas
bf4e9ffcab
Merge branch 'spanish-translation' into patch-71 2021-09-28 21:06:37 +02:00
Javier Vargas
a568c98579
Update 10_4_Codificando_una_Multifirma.md 2021-09-28 20:57:23 +02:00
Shannon Appelcline
c45aed55d7
Merge pull request #486 from csralvall/patch-CONTRIBUTING
Fix links in CONTRIBUTING.md
2021-09-28 08:33:44 -10:00
Shannon Appelcline
70ad923237
Merge pull request #484 from csralvall/patch-es/10_4
Fix translation and remove typos in chapter 10.4
2021-09-28 08:32:24 -10:00
Shannon Appelcline
d55a32bc63
Merge pull request #483 from csralvall/patch-es/README
Fix self-reference link and file name in README
2021-09-28 08:30:01 -10:00
Shannon Appelcline
9aeb033ebb
Merge pull request #482 from csralvall/patch-es/09_1
Rename file `es/09_1` to fix link in README
2021-09-28 08:29:39 -10:00
Shannon Appelcline
14aa736a62
Merge pull request #469 from icculp/spanish-03_0
Chapter 3.0 translated, pending review
2021-09-28 08:29:23 -10:00
Shannon Appelcline
55fb576c95
Merge pull request #481 from namcios/chapter3
PT: 03_4 & 03_5 Translated, Needs Review
2021-09-28 08:28:37 -10:00
Shannon Appelcline
aba46e6efb
Merge pull request #412 from srahalh/patch-5
04_2_Interludio_Usando_JQ.md
2021-09-28 08:27:49 -10:00
Javier Vargas
240ff78b96
Update 10_4_Codificando_una_Multifirma.md 2021-09-28 15:50:32 +02:00
Ian Culp
47cd0998d5
implementing corrections 2021-09-26 14:07:54 -05:00
Said Rahal
276d5da9f1
Update 04_2_Interludio_Usando_JQ.md 2021-09-26 20:54:44 +02:00
Said Rahal
b057f22f3f
Update 04_2_Interludio_Usando_JQ.md 2021-09-26 18:33:35 +02:00
Cesar Alvarez Vallero
d0dd93099e
Fix links 2021-09-25 22:38:51 -03:00
Cesar Alvarez Vallero
d990c4bf41
Remove duplicated line and reword sentence 2021-09-24 08:41:36 -03:00
Cesar Alvarez Vallero
630c384193
Fix typo 2021-09-24 08:38:35 -03:00
Cesar Alvarez Vallero
05efe2c757
Fix accentuation 2021-09-24 08:37:48 -03:00
Cesar Alvarez Vallero
3761810009
Correct title translation 2021-09-24 08:30:56 -03:00
KoreaComK
788d952a99 reviewed 2021-09-23 16:59:10 -03:00
Cesar Alvarez Vallero
ce14af20b4
Fix links
The Contributor License Agreement and the Creative Commons License won't
be translated to spanish, so it's safe to link them to their english
originals.
2021-09-22 22:41:23 -03:00
Cesar Alvarez Vallero
801a45f0e1
Fix link and correct name of file 2021-09-22 22:26:21 -03:00
Cesar Alvarez Vallero
2ccb199fa1
Rename file
The old file name was breaking the README file link.
2021-09-22 22:17:47 -03:00
Shannon Appelcline
1a629fc2ce
Merge pull request #473 from csralvall/patch-17_3
Fix typo and add syntax highlighting in chapter 17.3
2021-09-22 12:50:37 -10:00
Shannon Appelcline
bb9be873c1
added versioning 2021-09-22 12:37:59 -10:00
namcios
f1c4403e19
Translate 03_5 2021-09-22 17:56:17 -03:00
namcios
76728baf0c
Translate 03_4 2021-09-22 17:12:54 -03:00
Shannon Appelcline
19a4e352d8
Merge pull request #480 from namcios/portuguese-translation
Fix link
2021-09-22 09:34:54 -10:00
namcios
d5d1fc36b1
Fix link 2021-09-22 16:18:08 -03:00
Shannon Appelcline
cf94bb2bdc
updated remaining references to Debian 11 2021-09-22 08:18:07 -10:00
Shannon Appelcline
cd1ebf4174
Merge pull request #479 from namcios/master
Fix issues #202, #204, and #478
2021-09-22 08:03:26 -10:00
namcios
e0223a5743
Fix issue #204 2021-09-22 10:57:33 -03:00
namcios
76926597a6
Fix issue #202 2021-09-22 10:52:38 -03:00
namcios
534b39b2e5
Update Tor chapter 2021-09-22 09:33:09 -03:00
namcios
5fee49b6c8
Update for new Linode directives, fixes issue #478 2021-09-22 09:25:39 -03:00
Shannon Appelcline
0362bf6198
Updates for 22 & Linode
22 changed the way signatures were verified, which required changes to Standup that are now shown here. Linode has also added new Dedicated CPU machines, whose existence is now noted.
2021-09-21 15:27:58 -10:00
Shannon Appelcline
cf77bec66f
Merge pull request #477 from namcios/portuguese-translation
Portuguese-Translation: Standardize chapters and files, update README
2021-09-21 11:47:20 -10:00
Shannon Appelcline
7e2ee9bfb6
Merge pull request #476 from csralvall/patch-TRANSLATING
Add suggestions and workflow example to TRANSLATION.md
2021-09-21 11:46:45 -10:00
Shannon Appelcline
571fa86972
Merge pull request #472 from namcios/patch-1
I2P: Fix typos, file name
2021-09-21 11:43:35 -10:00
Shannon Appelcline
a24eda599f
Merge pull request #471 from namcios/chapter-15
Chapter 15 Translated and Reviewed
2021-09-21 11:42:38 -10:00
namcios
a9a9056681
Revise appendix titles, fix typos 2021-09-21 11:03:42 -03:00
namcios
65617c873d
Revise chapter 20 titles, fix typos 2021-09-21 11:03:20 -03:00
namcios
7ed3215cf0
Revise chapter 19 titles, fix typos 2021-09-21 11:03:04 -03:00
namcios
642a642e56
Revise chapter 18 titles, fix typos 2021-09-21 11:02:48 -03:00
namcios
acb6c1f8f0
Revise chapter 17 titles, fix typos 2021-09-21 11:02:32 -03:00
namcios
41eefa15ff
Revise chapter 16 titles, fix typos 2021-09-21 11:02:18 -03:00
namcios
c12abd1938
Revise chapter 14 titles, fix typos 2021-09-21 11:01:58 -03:00
namcios
df6329a101
Revise chapter 13 titles, fix typos 2021-09-21 11:01:43 -03:00
namcios
405c9fc7f9
Revise chapter 11 titles, fix typos 2021-09-21 11:01:19 -03:00
namcios
a69d882a6a
Revise chapter 10 titles, fix typos 2021-09-21 11:01:01 -03:00
namcios
586d16c79a
Revise chapter 9 titles, fix typos 2021-09-21 11:00:40 -03:00
namcios
d0ccb881a2
Revise chapter 8 titles, fix typos 2021-09-21 11:00:23 -03:00
namcios
1b7776a040
Revise chapter 7 titles, fix typos 2021-09-21 11:00:04 -03:00
namcios
bf1400eb6c
Revise chapter 6 titles, fix typos 2021-09-21 10:59:50 -03:00
namcios
7ce59c0584
Revise chapter 5 titles, fix typos 2021-09-21 10:59:33 -03:00
namcios
c4cf1ef060
Revise chapter 4 titles, fix typos 2021-09-21 10:59:13 -03:00
namcios
ed9557875f
Revise chapter 3 titles, fix typos 2021-09-21 10:58:55 -03:00
namcios
66228ec5b9
Revise chapter 2 titles, fix typos 2021-09-21 10:58:33 -03:00
namcios
5573718e84
Revise chapter 1 titles, fix typos 2021-09-21 10:58:08 -03:00
namcios
3898913533
Update README: chapter, file names 2021-09-21 10:57:02 -03:00
KoreaComK
8f308d4e1c reviewed 2021-09-19 14:44:27 -03:00
Cesar Alvarez Vallero
82949bfa1b
Correct format 2021-09-18 21:36:45 -03:00
Cesar Alvarez Vallero
542417258d
Add suggestions and workflow example
In the process of translating _LBFtCL_ to spanish we realized about some
differences in our understanding of translation process. Those
differences generated some more work to some of us. I think that some
exemplification through the `WORKFLOW EXAMPLE` added, can clarify some
ideas behind the translation process and avoid further extra work.

Also, in the process of translating and reviewing I found some simple
ideas that made the process easier, or that could have made the process
easier. Those were added under the `FINAL SUGGESTIONS` section.
2021-09-18 21:07:46 -03:00
Cesar Alvarez Vallero
2a4485f311
Fix typo 2021-09-17 21:25:39 -03:00
Cesar Alvarez Vallero
789fc155ec
Disable highlighting for bash commands 2021-09-17 21:22:14 -03:00
Cesar Alvarez Vallero
1b2a0ae565
Add markdown annotations to highlight code 2021-09-17 21:17:08 -03:00
namcios
0657079b28
Fix typos, file name 2021-09-17 17:23:22 -03:00
namcios
214dd882ec
Translate 15_1 2021-09-17 17:14:05 -03:00
namcios
702a1dd403
Translate 15_0 2021-09-17 17:13:48 -03:00
Shannon Appelcline
4a44502eca
consistent usage of I2P 2021-09-15 13:02:53 -10:00
Shannon Appelcline
faac3f6cc6
consistent usage of I2P 2021-09-15 13:00:41 -10:00
Shannon Appelcline
2963347005
i2p as alternative 2021-09-15 12:56:42 -10:00
Shannon Appelcline
08f0d0d744
Update 14_3_Adding_SSH_Hidden_Services.md 2021-09-15 12:54:56 -10:00
Shannon Appelcline
1015338f7d
Update 15_1_i2p_service.md 2021-09-15 12:54:06 -10:00
Shannon Appelcline
8a87dd5762
full edit
Moved some material to 15.1, improved upfront definition of i2p.
2021-09-15 09:23:17 -10:00
Shannon Appelcline
0692c6847a
Merge pull request #470 from icculp/update_links
Update links and fix typos up to chapter 14.3
2021-09-14 14:13:41 -10:00
Ian Culp
7fc3bf539c
Update 14_3_Agregando_Servicios_SSH_Ocultos.md 2021-09-14 16:24:37 -05:00
Ian Culp
ef7022d62f
Update 14_3_Agregando_Servicios_SSH_Ocultos.md 2021-09-14 16:23:51 -05:00
Ian Culp
dce0a34516
Update 13_3_Potenciando_Bitcoin_con_Scripts.md 2021-09-14 16:17:55 -05:00
Ian Culp
b8dba71922
Update 13_1_Escribiendo_Puzzle_Scripts.md 2021-09-14 16:16:38 -05:00
Ian Culp
91cd6d4f06
Update 11_3_Usando_CSV_en_Scripts.md 2021-09-14 16:14:40 -05:00
Ian Culp
eb288f3ae0
Update 11_2_Usando_CLTV_en_Scripts.md 2021-09-14 16:13:08 -05:00
Ian Culp
5d6288116c
Update 10_3_Ejecutando_un_Script_Bitcoin_con_P2SH.md 2021-09-14 16:10:32 -05:00
Ian Culp
d9f7e45e58
Update 10_2_Construyendo_la_Estructura_de_P2SH.md 2021-09-14 16:09:31 -05:00
Ian Culp
3220db1945
Update 10_1_Entendiendo_la_Base_de_P2SH.md 2021-09-14 16:07:53 -05:00
Ian Culp
958279461c
Update 09_1_Entendiendo_la_base_de_las_Transacciones.md 2021-09-14 16:04:20 -05:00
Ian Culp
92353a8eef
Update 08_1_Enviando_una_Transaccion_con_Bloqueo_de_Tiempo.md 2021-09-14 16:02:38 -05:00
Ian Culp
1803841bbd
Update 08_0_Expandiendo_Bitcoin_Transacciones_Otros.md 2021-09-14 16:01:17 -05:00
Ian Culp
f382b1cca3
typo 2021-09-14 15:58:41 -05:00
Ian Culp
90506a3c88
Update 05_3_Financiando_una_Transaccion_con_CPFP.md 2021-09-14 15:57:26 -05:00
Ian Culp
75359ad3f1
Update 05_2_Reenviando_a_Transaccion_con_RBF.md 2021-09-14 15:56:14 -05:00
Ian Culp
35784585d2
fixing links 2021-09-14 15:54:39 -05:00
Ian Culp
c1a863bef9
fixing links 2021-09-14 15:53:35 -05:00
Ian Culp
1be5100213
typo 2021-09-14 15:52:12 -05:00
Ian Culp
53f9b35b2b
Update 04_4_Enviando_Monedas_con_una_Transaccion_Cruda.md 2021-09-14 15:50:48 -05:00
Ian Culp
5ec64054ad
Update 04_0_Enviando_Transacciones_Bitcoin.md 2021-09-14 15:49:04 -05:00
Ian Culp
e776376189
Update 04_0_Enviando_Transacciones_Bitcoin.md 2021-09-14 15:45:03 -05:00
Ian Culp
e6c5a33049
Rename 04_4_Interludio_Usando_Curl.md.md to 04_4_Interludio_Usando_Curl.md 2021-09-14 15:44:40 -05:00
Ian Culp
7b9023b038
updating interlude links 2021-09-14 15:42:17 -05:00
Ian Culp
11c784be7c
update link to 3.3 2021-09-14 15:40:29 -05:00
Ian Culp
24bde9990f
Chapter 3.0 translated, pending review 2021-09-14 15:34:16 -05:00
Shannon Appelcline
7908a360dc
Merge pull request #468 from icculp/update_file_name_spanish
Update file names to Spanish
2021-09-14 10:29:05 -10:00
Ian Culp
df9f83c510
Delete 09_2_Running_a_Bitcoin_Script.md 2021-09-14 15:22:47 -05:00
Ian Culp
8478ef2a7b
Delete 09_1_Understanding_the_Foundation_of_Transactions.md 2021-09-14 15:21:40 -05:00
Ian Culp
6c2bef3dcc
typo in formatting 2021-09-14 15:21:20 -05:00
Ian Culp
b82cba592b
Update 02_2_Configurando_Bitcoin_Core_Otros.md 2021-09-14 15:14:20 -05:00
Ian Culp
bf80c0ebed
Update 02_1_Configurando_un_Bitcoin-Core_VPS_con_StackScript.md 2021-09-14 15:12:41 -05:00
Ian Culp
6ece2fd383
Update 02_1_Configurando_un_Bitcoin-Core_VPS_con_StackScript.md 2021-09-14 15:09:13 -05:00
Ian Culp
aed111d876
Update 02_0_Configurando_un_Bitcoin-Core_VPS.md 2021-09-14 15:02:59 -05:00
Ian Culp
e6eff07dfa
Update 01_1_Introduciendo_Bitcoin.md 2021-09-14 15:02:25 -05:00
Ian Culp
1c51b6caaf
Update 01_0_Introduccion.md 2021-09-14 15:01:12 -05:00
Ian Culp
74545968d2
Update A0_Apendices.md 2021-09-14 14:50:10 -05:00
Ian Culp
f4f602cee6
Rename A1_0_Entendiendo_la_Configuracion_Inicial_de_Bitcoin.md to A1_0_Entendiendo_Bitcoin_Standup.md 2021-09-14 14:49:21 -05:00
Ian Culp
ed81abcce2
Rename 19_2__Interludio_Accediendo_a_un_Segundo_Nodo_Lightning.md to 19_2_Interludio_Accediendo_a_un_Segundo_Nodo_Lightning.md 2021-09-14 14:48:19 -05:00
Ian Culp
d10f15f93d
Update README.md 2021-09-14 14:44:44 -05:00
Ian Culp
16894ed92a
Update 12_0_Expandiendo_Scripts_Bitcoin.md 2021-09-14 14:43:45 -05:00
Ian Culp
46e98eef97
Update and rename 10_6_Spending_a_P2SH_Transaction.md to 10_6_Gastando_una_Transaccion_P2SH.md 2021-09-14 14:41:54 -05:00
Ian Culp
0c2c422092
Update and rename 10_5_Scripting_a_Segwit_Script.md to 10_5_Codificando_un_Script_Segwit.md 2021-09-14 14:40:41 -05:00
Ian Culp
0ff72ebcc0
Update and rename 10_4_Scripting_a_Multisig.md to 10_4_Codificando_una_Multifirma.md 2021-09-14 14:39:07 -05:00
Ian Culp
63f0ef8fb3
Update and rename 10_3_Running_a_Bitcoin_Script_with_P2SH.md to 10_3_Ejecutando_un_Script_Bitcoin_con_P2SH.md 2021-09-14 14:34:29 -05:00
Ian Culp
908e77217e
Update 10_1_Entendiendo_la_Base_de_P2SH.md 2021-09-14 14:33:43 -05:00
Ian Culp
10f09de8c9
Update and rename 10_2_Building_the_Structure_of_P2SH.md to 10_2_Construyendo_la_Estructura_de_P2SH.md 2021-09-14 14:31:10 -05:00
Ian Culp
08c20ada2e
Rename 10_1_Understanding_the_Foundation_of_P2SH.md to 10_1_Entendiendo_la_Base_de_P2SH.md 2021-09-14 14:29:45 -05:00
Ian Culp
bb2593bc94
updating chapter links 2021-09-14 14:28:47 -05:00
Ian Culp
c2bc52035d
Rename 10_0_Embedding_Bitcoin_Scripts_in_P2SH_Transactions.md to 10_0_Embebiendo_Bitcoin_Scripts_en_Transacciones_P2SH.md 2021-09-14 14:27:27 -05:00
Ian Culp
2447f663a0
Rename 05_3_Funding_a_Transaction_with_CPFP.md to 05_3_Financiando_una_Transaccion_con_CPFP.md 2021-09-14 14:24:30 -05:00
Ian Culp
ffc2a46f0b
Rename 05_2_Resending_a_Transaction_with_RBF.md to 05_2_Reenviando_a_Transaccion_con_RBF.md 2021-09-14 14:24:18 -05:00
Ian Culp
43cedbd8a1
Rename 05_1_Watching_for_Stuck_Transactions.md to 05_1_Vigilando_por_Transacciones_Estancadas.md 2021-09-14 14:24:02 -05:00
Ian Culp
79217d814f
Rename 05_0_Controlling_Bitcoin_Transactions.md to 05_0_Controlando_Transacciones_Bitcoin.md 2021-09-14 14:23:47 -05:00
Ian Culp
ec703953fa
Rename 04_4__Interludio_Usando_Curl.md to 04_4_Interludio_Usando_Curl.md.md 2021-09-14 14:23:17 -05:00
Ian Culp
a068005b2a
Rename 02_1_Configurando_un_VPS_Bitcoin-Core_StackScript.md to 02_1_Configurando_un_Bitcoin-Core_VPS_con_StackScript.md 2021-09-14 14:21:41 -05:00
Ian Culp
1f04c23573
Rename 02_0_Configurando_un_VPS_Bitcoin-Core.md to 02_0_Configurando_un_Bitcoin-Core_VPS.md 2021-09-14 14:21:17 -05:00
Shannon Appelcline
75e18fa9bf
Merge pull request #447 from icculp/spanish-07_02
chapter 7.2 translated, pending review
2021-09-14 08:48:52 -10:00
Shannon Appelcline
a1836b335d
Merge pull request #450 from javiervargas/patch-66
Update 19_2__Interludio_Accediendo_a_un_Segundo_Nodo_Lightning.md
2021-09-14 08:48:30 -10:00
Ian Culp
2dcf9780a0
corrections 2021-09-14 13:43:04 -05:00
Shannon Appelcline
8a38f669cb
Merge pull request #454 from javiervargas/patch-70
Update 20_3_Cerrando_un_Canal_Lightning.md
2021-09-14 08:40:23 -10:00
Shannon Appelcline
3ec8af8a04
Merge pull request #453 from javiervargas/patch-69
Update 20_1_Generando_una_Solicitud_de_Pago.md
2021-09-14 08:39:57 -10:00
Shannon Appelcline
53fe8ba4da
Merge pull request #452 from javiervargas/patch-68
Update 19_3_Creando_un_Canal_en_Lightning.md
2021-09-14 08:39:34 -10:00
Shannon Appelcline
d1071085d1
Merge pull request #451 from javiervargas/patch-67
Update 19_1_Verificando_Su_Configuracion_Lightning.md
2021-09-14 08:38:57 -10:00
Shannon Appelcline
b4082955b8
Merge pull request #465 from maxcrowar/6.3
6.3
2021-09-14 08:34:50 -10:00
Shannon Appelcline
16d0ae1681
Merge pull request #464 from maxcrowar/6.2
6.2
2021-09-14 08:34:26 -10:00
Shannon Appelcline
7650ae20ab
Merge pull request #463 from maxcrowar/6.1
Create 06_1_Enviando_una_Transaccion_a_una_Direccion_Multifirma.md
2021-09-14 08:34:12 -10:00
Shannon Appelcline
ce2b2cf59f
Merge pull request #462 from maxcrowar/spanish6-0
6.0
2021-09-14 08:33:58 -10:00
Shannon Appelcline
8beb904f5a
Merge pull request #383 from KoreaComK/chapter11
Chapter 11 Translated by @koreacomk need review
2021-09-14 08:31:52 -10:00
KoreaComK
e8e4236f8b Commiting review made by @hgrams 2021-09-10 09:23:49 -03:00
Ian Culp
0c34b2b35f
removing . 2021-09-09 20:07:48 -05:00
Ian Culp
7c1d09933e
implementing corrections 2021-09-09 20:06:43 -05:00
Max
1978315b54
Update 06_3_Enviando_una_Multifirma_Automatizada.md 2021-09-09 19:24:21 -03:00
Max
551d23ca9b
Update 06_2_Gastando_una_Transaccion_con_una_Direccion_Multifirma.md 2021-09-09 19:15:14 -03:00
Max
1b279a7205
Update 06_3_Enviando_una_Multifirma_Automatizada.md 2021-09-09 19:06:40 -03:00
Max
e50dbb88a5
Update 06_2_Gastando_una_Transaccion_con_una_Direccion_Multifirma.md 2021-09-09 18:51:56 -03:00
Max
edf7da8bb7
Update 06_2_Gastando_una_Transaccion_con_una_Direccion_Multifirma.md 2021-09-09 18:19:18 -03:00
Max
edccd79166
Update 06_1_Enviando_una_Transaccion_a_una_Direccion_Multifirma.md 2021-09-09 18:10:02 -03:00
Max
fbc1f8015d
Update 06_0_Expandiendo_las_Transacciones_Bitcoin_con_Multifirmas.md 2021-09-09 18:05:29 -03:00
Max
7e8ee7a9da
Update 06_2_Gastando_una_Transaccion_con_una_Direccion_Multifirma.md 2021-09-09 11:08:58 -03:00
Max
d0d97269ea
Update 06_1_Enviando_una_Transaccion_a_una_Direccion_Multifirma.md 2021-09-09 10:35:28 -03:00
Max
61ad4d9b21
Update 06_1_Enviando_una_Transaccion_a_una_Direccion_Multifirma.md 2021-09-08 16:56:01 -03:00
Max
df901c9f43
Create 06_3_Enviando_una_Multifirma_Automatizada.md 2021-09-08 16:43:05 -03:00
Max
6d10979d9e
Create 06_2_Gastando_una_Transaccion_con_una_Direccion_Multifirma.md 2021-09-08 16:36:43 -03:00
Max
5cd1eceaab
Create 06_1_Enviando_una_Transaccion_a_una_Direccion_Multifirma.md 2021-09-08 16:30:03 -03:00
Max
54c98023f2
Create 06_0_Expandiendo_las_Transacciones_Bitcoin_con_Multifirmas.md 2021-09-08 16:18:38 -03:00
Shannon Appelcline
2c98dc3971
Merge pull request #455 from namcios/patch-1
A3: Fix halving info and one link
2021-09-08 08:31:45 -10:00
Shannon Appelcline
5c178488a8
Merge pull request #402 from KoreaComK/appendix
Appendix Translated by @koreacomk need review
2021-09-08 08:16:55 -10:00
Shannon Appelcline
44c84f129d
Merge pull request #384 from csralvall/spanish-appendices
Create spanish translation of appendices
2021-09-08 08:02:13 -10:00
Shannon Appelcline
24099cdc08
Merge pull request #335 from javiervargas/patch-21
Chapter 09-3 09_3_Probando_un_Script_Bitcoin.md
2021-09-08 08:00:28 -10:00
Shannon Appelcline
44f3a511f2
Merge pull request #328 from javiervargas/patch-14
Chapter 03 - 5 03_5_Entendiendo_El_Descriptor.md
2021-09-08 07:58:14 -10:00
Shannon Appelcline
af14b0303e
Merge pull request #325 from javiervargas/patch-10
Chapter 03 - 3 03_3_Configurando_Su_Billetera.md
2021-09-08 07:57:53 -10:00
namcios
15d860a289
Review A3 2021-09-08 11:21:04 -03:00
namcios
c1727d2b81
Fix halving info and one link 2021-09-08 11:19:41 -03:00
namcios
fdd3234dac
Review A2 2021-09-08 11:08:58 -03:00
namcios
787affa4d6
Review A1 2021-09-08 10:56:31 -03:00
namcios
786c307a09
Review A0 2021-09-08 10:51:13 -03:00
namcios
00298f9e0d
Delete out of date files 2021-09-08 10:45:46 -03:00
Javier Vargas
461c7e25ec
Update 20_3_Cerrando_un_Canal_Lightning.md 2021-09-08 12:18:52 +02:00
Javier Vargas
27a59ee528
Update 20_1_Generando_una_Solicitud_de_Pago.md 2021-09-08 12:12:35 +02:00
Javier Vargas
a240718617
Update 19_3_Creando_un_Canal_en_Lightning.md 2021-09-08 12:07:35 +02:00
Javier Vargas
71571de701
Update 19_1_Verificando_Su_Configuracion_Lightning.md 2021-09-08 12:02:35 +02:00
Javier Vargas
d071e516a6
Update 19_2__Interludio_Accediendo_a_un_Segundo_Nodo_Lightning.md 2021-09-08 11:59:27 +02:00
Javier Vargas
8739750289
Update 03_5_Entendiendo_El_Descriptor.md 2021-09-08 11:02:53 +02:00
Javier Vargas
602d8f4fde
Update 03_5_Entendiendo_El_Descriptor.md 2021-09-08 11:02:34 +02:00
Javier Vargas
502716908d
Update 03_5_Entendiendo_El_Descriptor.md 2021-09-08 11:00:34 +02:00
Javier Vargas
e308cb4b04
Update 03_3_Configurando_Su_Billetera.md 2021-09-07 23:02:34 +02:00
Shannon Appelcline
3675f6e5d7
Removed Ethereum req on Ledger
Update per @namcios in #306
2021-09-07 08:45:10 -10:00
Shannon Appelcline
89461e478b
Merge pull request #441 from icculp/issue_439
Issue #439, deleting duplicates
2021-09-07 08:31:15 -10:00
Shannon Appelcline
08ecb935f9
Delete LEEME.md
Deleting per #439
2021-09-07 08:30:46 -10:00
Shannon Appelcline
ced7f10769
Merge pull request #448 from icculp/spanish-07_3
chapter 7.3 translated, pending review
2021-09-07 08:02:24 -10:00
Shannon Appelcline
1d84d824bf
Merge pull request #446 from icculp/spanish-07_01
chapter 7.1 translated, pending review
2021-09-07 08:02:04 -10:00
Shannon Appelcline
1fc0a69ca6
Merge pull request #444 from icculp/spanish-07_0
chapter 7.0
2021-09-07 08:01:41 -10:00
Shannon Appelcline
7e0eebda42
Merge pull request #336 from javiervargas/patch-22
Chapter 09-4 09_4_Codificando_una_P2PKH.md
2021-09-07 07:41:39 -10:00
Shannon Appelcline
0d7a40481d
Merge pull request #334 from javiervargas/patch-20
Chapter 09-2 09_2_Ejecutando_un_Script_Bitcoin.md
2021-09-07 07:41:11 -10:00
Shannon Appelcline
ea97380ab7
Merge pull request #333 from javiervargas/patch-19
Chapter 09-1 09_1_Entendiendo_la_base_de_las_Transacciones.md
2021-09-07 07:40:44 -10:00
Shannon Appelcline
a902cf9bec
Merge pull request #329 from javiervargas/patch-15
Chapter 08 - 0 08_0_Expandiendo_Bitcoin_Transacciones_Otros.md
2021-09-07 07:40:24 -10:00
Shannon Appelcline
b525df970c
Merge pull request #327 from javiervargas/patch-12
Chapter 03 - 4 03_4_Recibiendo_una_Transaccion.md
2021-09-07 07:35:13 -10:00
Shannon Appelcline
64707aa383
Merge pull request #324 from javiervargas/patch-9
Chapter 03 - 2 03_2_Conociendo_Su_Configuracion_Bitcoin.md
2021-09-07 07:34:34 -10:00
Shannon Appelcline
52c8cf85ef
Merge pull request #322 from javiervargas/patch-7
Chapter 03 - 1 03_1_Verificando_Su_Configuracion_Bitcoin.md
2021-09-07 07:34:05 -10:00
Ian Culp
f91205fb25
one more link 2021-09-06 17:28:36 -05:00
Ian Culp
3fb9f13281
fixing links 2021-09-06 17:11:28 -05:00
Javier Vargas
4ec425122f
Update 03_5_Entendiendo_El_Descriptor.md 2021-09-05 11:40:48 +02:00
Ian Culp
e3ad77e313
implementing corrections 2021-09-04 19:09:01 -05:00
Ian Culp
ae8ddea69b
implementing corrections 2021-09-04 18:21:29 -05:00
Ian Culp
55eed41ce7
implementing corrections 2021-09-04 18:15:16 -05:00
Ian Culp
60180e84f5
chapter 7.3 translated, pending review 2021-09-04 13:36:40 -05:00
Javier Vargas
45faf2e4ff
Update 03_1_Verificando_Su_Configuracion_Bitcoin.md 2021-09-04 20:35:11 +02:00
Javier Vargas
5006f1a191
Update 03_2_Conociendo_Su_Configuracion_Bitcoin.md 2021-09-04 20:32:32 +02:00
Javier Vargas
7a05d7e33b
Update 03_3_Configurando_Su_Billetera.md 2021-09-04 20:28:50 +02:00
Javier Vargas
15ea6ca148
Update 03_4_Recibiendo_una_Transaccion.md 2021-09-04 20:25:04 +02:00
Javier Vargas
2f1c6a317c
Update 03_5_Entendiendo_El_Descriptor.md 2021-09-04 20:13:11 +02:00
Ian Culp
34afbb3ea7
chapter 7.2 translated, pending review 2021-09-04 12:44:59 -05:00
Ian Culp
b270d1dac9
chapter 7.1 translated, pending review 2021-09-04 12:42:32 -05:00
Javier Vargas
334d9f5b24
Update 09_1_Entendiendo_la_base_de_las_Transacciones.md 2021-09-02 15:49:59 +02:00
Javier Vargas
ebbdccdc16
Update 09_2_Ejecutando_un_Script_Bitcoin.md 2021-09-02 15:43:43 +02:00
Javier Vargas
1f184def89
Update 09_4_Codificando_una_P2PKH.md 2021-09-02 15:40:58 +02:00
Shannon Appelcline
fdfdac055d
Merge pull request #401 from KoreaComK/chapter19
Chapter 19 Translated by @koreacomk need review
2021-09-01 11:27:37 -10:00
namcios
5633bb4cd2
Review 20_4 2021-09-01 18:15:22 -03:00
namcios
4122c56e16
Review 20_3 2021-09-01 18:07:04 -03:00
namcios
e18d52dd9a
Review 20_2 2021-09-01 17:53:13 -03:00
namcios
53f83e1d41
Review 20_1 2021-09-01 17:47:48 -03:00
Shannon Appelcline
13dac40716
Merge pull request #318 from javiervargas/patch-3
Chapter 02 0 02_0_Configurando_un_VPS_Bitcoin-Core.md
2021-09-01 08:56:41 -10:00
Shannon Appelcline
0e9b2bf3f4
Merge pull request #337 from javiervargas/patch-23
Chapter 09-5 09_5_Codificando_una_P2WPKH.md
2021-09-01 08:54:28 -10:00
Shannon Appelcline
8026045ed4
Merge pull request #343 from javiervargas/patch-29
Chapter 13-2 13_2_Escribiendo_Scripts_Multifirma_Complejos.md
2021-09-01 08:54:17 -10:00
Shannon Appelcline
0751a20fae
Merge pull request #443 from namcios/chapter2
Translate Rest of Chapter 2 - Reviewed
2021-09-01 08:52:51 -10:00
namcios
271f867edc
Review 20_0 2021-09-01 11:14:11 -03:00
namcios
9b3388b2c8
Rename files chapter 19 to 20 2021-09-01 11:12:20 -03:00
namcios
8a3ebcb6bf
Delete old chapter 15 files 2021-09-01 11:09:59 -03:00
Javier Vargas
ea302fe9ca
Update 02_0_Configurando_un_VPS_Bitcoin-Core.md 2021-09-01 14:57:06 +02:00
Javier Vargas
ff0186b08f
Update 13_2_Escribiendo_Scripts_Multifirma_Complejos.md 2021-09-01 12:29:02 +02:00
Ian Culp
09c91d8885
chapter 7.0 2021-08-31 22:19:31 -05:00
Shannon Appelcline
9253e04338
Merge pull request #366 from javiervargas/patch-52
Chapter 18-5 18_5_Accediendo_a_Bitcoind_con_Rust.md
2021-08-31 14:19:17 -10:00
Shannon Appelcline
dd86c8986f
Merge pull request #360 from javiervargas/patch-46
Chapter 17-7 17_7_Integrando_Libwally_y_Bitcoin-CLI.md
2021-08-31 14:18:24 -10:00
Shannon Appelcline
ad277c0805
Merge pull request #356 from javiervargas/patch-42
Chapter 17-3 17_3_Usando_BIP32_en_Libwally.md
2021-08-31 14:18:09 -10:00
KoreaComK
e1a8caf8ec Review finished
Review of the files made.
2021-08-31 19:43:30 -03:00
Shannon Appelcline
651a33aef6
Merge pull request #426 from javiervargas/patch-64
Chapter 08-2 Create 08_2_Enviando_una_Transaccion_con_Datos.md
2021-08-31 12:33:46 -10:00
Javier Vargas
a1631407c9
Update 09_5_Codificando_una_P2WPKH.md 2021-08-31 22:46:49 +02:00
Javier Vargas
3a6175202d
Update 13_2_Escribiendo_Scripts_Multifirma_Complejos.md 2021-08-31 22:39:15 +02:00
Javier Vargas
e8a990796e
Update 17_3_Usando_BIP32_en_Libwally.md 2021-08-31 22:29:02 +02:00
Javier Vargas
9a725c161c
Update 17_7_Integrando_Libwally_y_Bitcoin-CLI.md 2021-08-31 22:24:26 +02:00
Javier Vargas
b9b86e0716
Update 18_5_Accediendo_a_Bitcoind_con_Rust.md 2021-08-31 22:19:58 +02:00
Javier Vargas
fc43363f4b
Update 08_2_Enviando_una_Transaccion_con_Datos.md 2021-08-31 22:15:28 +02:00
Shannon Appelcline
0353a2f884
Merge pull request #442 from tcharding/fixes
Fixes
2021-08-31 09:43:12 -10:00
Shannon Appelcline
e03d698a2b
Merge branch 'master' into fixes 2021-08-31 09:42:51 -10:00
Shannon Appelcline
98d90b6343
Merge pull request #437 from csralvall/patch-14_3
Update links in chapter 14.3
2021-08-31 09:34:32 -10:00
Shannon Appelcline
d34cb20842
Merge pull request #436 from csralvall/patch-13_1
Fix typo in chapter 13.1
2021-08-31 09:34:09 -10:00
Shannon Appelcline
6e35f0967b
Merge pull request #435 from namcios/patch-1
Update src/ files and their references
2021-08-31 09:33:21 -10:00
namcios
ea54a60021
Translate 02_2 2021-08-31 16:32:43 -03:00
Shannon Appelcline
8471f4d9ae
Merge pull request #434 from icculp/spanish-ch19_update_20
Updating chapter names and links
2021-08-31 09:32:28 -10:00
Shannon Appelcline
bb370fab88
Merge pull request #433 from icculp/patch-20
typo
2021-08-31 09:31:48 -10:00
Shannon Appelcline
3bfd746428
Merge pull request #432 from csralvall/patch-13_3
Fix typo in chapter 13.3
2021-08-31 09:31:26 -10:00
Shannon Appelcline
1e00b40942
Merge pull request #431 from csralvall/patch-13_2
Fix typo in chapter 13.2
2021-08-31 09:31:08 -10:00
Shannon Appelcline
6083908549
Merge pull request #430 from icculp/patch-19
update chapter 2 name
2021-08-31 09:26:21 -10:00
Shannon Appelcline
d13691fc4e
Merge pull request #429 from icculp/patch-18
typo fix
2021-08-31 09:25:49 -10:00
Shannon Appelcline
96b63ddceb
Merge pull request #428 from icculp/patch-17
minor typo
2021-08-31 09:25:26 -10:00
Shannon Appelcline
f698a6c7b2
Merge pull request #427 from icculp/patch-16
Adding curl interlude
2021-08-31 09:11:16 -10:00
Shannon Appelcline
a6e61c7087
Merge pull request #418 from srahalh/patch-10
04_6_Creando_una_Transacción_Segwit
2021-08-31 09:10:28 -10:00
Shannon Appelcline
866267a290
Merge pull request #417 from srahalh/patch-9
04_5_Enviando_Monedas_con_Transacciones_Crudas_Automatizadas
2021-08-31 09:09:58 -10:00
Shannon Appelcline
7d0f7ccc3d
Merge pull request #415 from srahalh/patch-8
04_4_Interludio_Usando_Curl
2021-08-31 09:09:40 -10:00
Shannon Appelcline
8fe118d453
Merge pull request #414 from srahalh/patch-7
04_4_Enviando_Monedas_con_una_Transacción_Cruda
2021-08-31 09:05:12 -10:00
Shannon Appelcline
dc9f00a3fe
Merge pull request #413 from srahalh/patch-6
04_3_Creando_una_Transacción_Cruda_con_Argumentos_Ingresados_c…
2021-08-31 09:04:47 -10:00
Shannon Appelcline
8adccaff4e
Merge pull request #411 from srahalh/patch-4
04_2_Creando_una_Transacción_Cruda
2021-08-31 09:04:13 -10:00
Shannon Appelcline
c623f645c3
Merge pull request #410 from srahalh/patch-3
04_1_Enviando_Monedas_de_la_Forma_Facil
2021-08-31 09:02:07 -10:00
Shannon Appelcline
28979322af
Merge pull request #409 from srahalh/patch-2
04_0_Enviando_Transacciones_Bitcoin.md
2021-08-31 09:01:44 -10:00
Shannon Appelcline
c389e18264
Merge pull request #405 from javiervargas/patch-61
Chapter 14-3 Create 14_3_Agregando_Servicios_SSH_Ocultos.
2021-08-31 09:01:20 -10:00
Shannon Appelcline
e9bda63a98
Merge pull request #396 from KoreaComK/chapter16
Chapter 16 Translated by @koreacomk need review
2021-08-31 08:59:07 -10:00
Shannon Appelcline
122dae075c
Merge pull request #393 from KoreaComK/chapter14
Chapter 14 Translated by @koreacomk need review
2021-08-31 08:58:43 -10:00
Shannon Appelcline
cfd260fff8
Merge pull request #400 from KoreaComK/chapter18
Chapter 18 Translated by @koreacomk need review
2021-08-31 08:58:24 -10:00
Shannon Appelcline
37c8cf47ee
Merge pull request #399 from KoreaComK/chapter17
Chapter 17 Translated by @koreacomk need review
2021-08-31 08:58:11 -10:00
Shannon Appelcline
f3fd33c9be
Merge pull request #345 from javiervargas/patch-31
Chapter 13-3 13_3_Potenciando_Bitcoin_con_Scripts.md
2021-08-31 08:43:14 -10:00
Shannon Appelcline
f83b3d293a
Merge pull request #342 from javiervargas/patch-28
Chapter 13-1 13_1_Escribiendo_Puzzle_Scripts.md
2021-08-31 08:42:53 -10:00
Shannon Appelcline
2293aa2150
Merge pull request #341 from javiervargas/patch-27
Create 13-0 13_0_Disenando_Bitcoin_Scripts_Reales.md
2021-08-31 08:42:41 -10:00
Shannon Appelcline
57cb31c9e3
Merge pull request #340 from javiervargas/patch-26
Chapter 12-2 12_2_Usando_Otros_Comandos_de_Scripting.md
2021-08-31 08:42:30 -10:00
Shannon Appelcline
68331abcfa
Merge pull request #339 from javiervargas/patch-25
Chaper 12-1 12_1_Usando_Script_Condicionales.md
2021-08-31 08:36:45 -10:00
Shannon Appelcline
2cba69b67f
Merge pull request #338 from javiervargas/patch-24
Chapter 12-0 12_0_Expandiendo_Scripts_Bitcoin.md
2021-08-31 08:36:30 -10:00
namcios
cca0ae2705
Translate 02_1 2021-08-30 12:23:12 -03:00
Tobin Harding
dc457b790b
Replace well-understand with well-understood 2021-08-30 11:24:10 +10:00
Tobin Harding
72d97eaed0
Use 'these' with plural documents
The choice was 'with these documents' or 'with this document', elect to
keep 'documents' plural.
2021-08-30 11:24:10 +10:00
Tobin Harding
84759982df
Use 'an Rpc' instead of 'a RPC 2021-08-30 11:24:09 +10:00
Tobin Harding
cc3939470f
Re-order words
Re-order words 'least three Tor nodes relays' -> 'least three Tor relay
nodes'.
2021-08-30 11:24:09 +10:00
Tobin Harding
723ef35429
Insert words to fix sentence
This sentence is broken - fix it.

Change 'Tor allows improve ...' -> 'Tor allows you to improve ...'
2021-08-30 11:24:09 +10:00
Tobin Harding
1f635a92c8
Replace period with comma 2021-08-30 11:24:09 +10:00
Tobin Harding
a359b90e25
Add missing period 2021-08-30 11:24:09 +10:00
Tobin Harding
ee938c600d
Use singular 'number'
Should be 'two copies of each number' instead of 'two copies of each
numbers'.
2021-08-30 11:24:09 +10:00
Tobin Harding
3a31191cf4
Add missing pluralisation
As for the subsequent usage 'number' should be pluralised.
2021-08-30 11:24:08 +10:00
Tobin Harding
af86e95491
Fix spelling typo and spacing
On a single line fix

- Spacing between 'the' and 'src'
- Spelling of 'ineteger2lehex.sh'
2021-08-30 11:24:08 +10:00
Ian Culp
4b09279886
Delete LEEME.md 2021-08-29 19:24:18 -05:00
Ian Culp
3f6234aaae
Delete 09_0_Introducing_Bitcoin_Scripts.md 2021-08-29 19:24:05 -05:00
Said Rahal
19b96412d1
Update and rename 04_6_Creando_una_Transacción_Segwit to 04_6_Creando_una_Transaccion_Segwit.md 2021-08-28 02:21:19 +02:00
Said Rahal
59ebebce40
Update and rename 04_5_Enviando_Monedas_con_Transacciones_Crudas_Automatizadas to 04_5_Enviando_Monedas_con_Transacciones_Crudas_Automatizadas.md 2021-08-28 02:16:17 +02:00
Said Rahal
3d2cbd2a53
Update and rename 04_4_Interludio_Usando_Curl to 04_4__Interludio_Usando_Curl.md 2021-08-28 02:09:21 +02:00
Said Rahal
eaab92a582
Update and rename 04_4_Enviando_Monedas_con_una_Transacción_Cruda to 04_4_Enviando_Monedas_con_una_Transaccion_Cruda.md 2021-08-28 02:02:42 +02:00
Said Rahal
0f01295f4a
Update and rename 04_3_Creando_una_Transacción_Cruda_con_Argumentos_Ingresados_con_Nombre to 04_3_Creando_una_Transaccion_Cruda_con_Argumentos_Ingresados_con_Nombre.md 2021-08-28 01:51:48 +02:00
Said Rahal
77bcee3472
Update and rename 04_2_Interludio_Usando_JQ to 04_2_Interludio_Usando_JQ.md 2021-08-28 01:34:33 +02:00
Cesar Alvarez Vallero
91e31784bf
Apply requested changes 2021-08-27 20:21:42 -03:00
Cesar Alvarez Vallero
2f6dafe082
Update section "What's Next?"
The link to chapter 15 was obviated after the last update.
This commit tries to include that link following the same format used
in the section "What's Next?" from chapter 13.3.
2021-08-26 21:21:45 -03:00
namcios
b804f5147b
Review 19_3 2021-08-25 17:43:27 -03:00
namcios
e54c2dafa3
Review 19_2__Interlude 2021-08-25 17:13:57 -03:00
namcios
1b36e74550
Review 19_2 2021-08-25 16:55:38 -03:00
namcios
851d2a74d4
Review 19_1 2021-08-25 16:49:07 -03:00
namcios
485176ee59
Review 19_0 2021-08-25 16:24:10 -03:00
namcios
cfa1479e00
Rename chapter 18 to 19 files 2021-08-25 16:16:57 -03:00
namcios
c311318701
Delete old files 2021-08-25 16:14:11 -03:00
Javier Vargas
26b2dd7977
Update 13_3_Potenciando_Bitcoin_con_Scripts.md 2021-08-24 17:58:03 +02:00
Javier Vargas
a1a457f072
Update 13_1_Escribiendo_Puzzle_Scripts.md 2021-08-24 17:50:29 +02:00
namcios
0ae3949065
Review 18_6 2021-08-24 11:34:46 -03:00
namcios
cb8b8deadb
Review 18_5 2021-08-24 11:17:55 -03:00
namcios
73e1a65e35
Review 18_4 2021-08-24 11:05:59 -03:00
namcios
9cbc5e18e6
Review 18_3 2021-08-24 10:48:09 -03:00
namcios
1a5e5694bf
Minor typo fix 2021-08-24 10:34:42 -03:00
namcios
7ab1c58a0a
Review 18_2 2021-08-24 10:29:17 -03:00
namcios
1be8fd8453
Review 18_1 2021-08-24 10:14:29 -03:00
namcios
4df18c9aa1
Review 18_0 2021-08-24 09:59:45 -03:00
namcios
46d385810e
Rename files chapter 17 to 18 2021-08-24 09:55:33 -03:00
namcios
dd5dd5d823
Delete old 15 files 2021-08-24 09:52:51 -03:00
namcios
fadb5a5bbd
Fix links in chapter 16 2021-08-24 09:43:32 -03:00
namcios
ae2f32a191
Fix links on chapter 18 2021-08-24 09:40:06 -03:00
namcios
dfdcdb4e05
Rename src/ files to new ch numbers 2021-08-24 09:33:39 -03:00
namcios
f59849d8a9
Update chapter numbers 2021-08-24 09:29:00 -03:00
namcios
44c594dbdd
Review 17_7 2021-08-24 09:20:05 -03:00
namcios
f54d67c5a7
Review 17_6 2021-08-24 08:54:47 -03:00
namcios
7876104d0d
Review 17_5 2021-08-24 08:45:08 -03:00
namcios
30e32c9449
Review 17_4 2021-08-24 08:30:52 -03:00
namcios
b139a7611e
Review 17_3 2021-08-24 08:11:44 -03:00
Cesar Alvarez Vallero
22adecbe00
Fix typo
This change doesn't change the output of the command in the command
line.
2021-08-23 20:22:48 -03:00
Javier Vargas
ba2e128dfe
Update 13_0_Disenando_Bitcoin_Scripts_Reales.md 2021-08-23 23:09:20 +02:00
Javier Vargas
0f53828866
Update 12_1_Usando_Script_Condicionales.md 2021-08-23 23:07:10 +02:00
Javier Vargas
2fb00fac92
Update 13_1_Escribiendo_Puzzle_Scripts.md 2021-08-23 22:59:59 +02:00
Javier Vargas
4f34de4ff7
Update 13_3_Potenciando_Bitcoin_con_Scripts.md 2021-08-23 22:55:40 +02:00
Said Rahal
6f00cc77dc
Update 04_1_Enviando_Monedas_de_la_Forma_Facil.md 2021-08-23 19:15:06 +02:00
Said Rahal
b267b840c0
Update and rename 0_4_2_Creando_una_Transacción_Cruda to 04_2_Creando_una_Transaccion_Cruda.md 2021-08-23 18:38:20 +02:00
Ian Culp
9b3917a4e8
remove extra ( 2021-08-23 11:20:51 -05:00
Said Rahal
75b2dc7dab
Update and rename 04_1_Enviando_Monedas_de_la_Forma_Facil to 04_1_Enviando_Monedas_de_la_Forma_Facil.md 2021-08-23 18:09:11 +02:00
Said Rahal
a4c2cdad3a
Update and rename 04_0_Enviando_Transacciones_Bitcoin to 04_0_Enviando_Transacciones_Bitcoin.md 2021-08-23 17:14:10 +02:00
namcios
8dbcbd76e2
Review 17_2 2021-08-23 12:09:13 -03:00
namcios
a87ec94f70
Fix links new chapters
TODO: update `src/` files to reflect new chapter numbers.
2021-08-23 12:06:06 -03:00
namcios
acc04c5ec3
Review 17_1 2021-08-23 11:48:03 -03:00
namcios
dcb45e5ec7
Minor fixes on 17_0 2021-08-23 11:41:06 -03:00
namcios
cfee6bc119
Review 17_0 2021-08-23 11:39:22 -03:00
namcios
c3578c8c1f
Update README 2021-08-23 11:26:45 -03:00
namcios
2502bd0751
Update README 2021-08-23 11:24:22 -03:00
namcios
8512f44de4
Rename files chapter 16 to 17 2021-08-23 11:11:25 -03:00
namcios
317ca7e195
Delete old chapter 15 2021-08-23 11:05:33 -03:00
namcios
c75011293f
Delete old files chapter 15 2021-08-23 11:00:49 -03:00
namcios
df8686f3ed
Update chapter 15 to 16 number 2021-08-23 10:58:59 -03:00
namcios
c8258c1e69
Review 14_3 2021-08-23 10:54:31 -03:00
namcios
46683fbfd9
Review 14_2 2021-08-23 10:48:13 -03:00
namcios
f3a6cc7e55
Review 14_1 2021-08-23 10:43:13 -03:00
namcios
802d0e9f10
Review 14_0 2021-08-23 10:21:55 -03:00
Ian Culp
0cb604f4ab
removing extra ( 2021-08-22 20:49:02 -05:00
Ian Culp
48c3ef65ef
Update and rename 19_4_Lightning_Network_Review.md to 20_4_Expandiendo_la_Red_Lightning.md 2021-08-22 20:47:17 -05:00
Ian Culp
f0f2a2533d
Rename 19_3_Closing_a_Channel.md to 20_3_Cerrando_un_Canal_Lightning.md 2021-08-22 20:46:20 -05:00
Ian Culp
d19f1d7f13
Rename 19_2_Paying_a_Invoice.md to 20_2_Pagando_una_Factura.md 2021-08-22 20:46:03 -05:00
Ian Culp
80ba7bad67
updating chapter number, name, and links 2021-08-22 20:45:19 -05:00
Ian Culp
7abc26bc22
updating chapter number and links 2021-08-22 20:43:31 -05:00
Ian Culp
3a75ecc3b7
chapter number 2021-08-22 20:42:07 -05:00
Ian Culp
d4dee8c51e
chapter number 2021-08-22 20:40:40 -05:00
Ian Culp
04167948c9
Update and rename 19_1_Generate_a_Payment_Request.md to 20_1_Generando_una_Solicitud_de_Pago.md 2021-08-22 20:40:17 -05:00
Ian Culp
02d7d2e3d2
update links and rename file 2021-08-22 20:23:58 -05:00
Ian Culp
d7d86f98c5
typo 2021-08-22 20:03:38 -05:00
Cesar Alvarez Vallero
7639044de8
Fix typo 2021-08-22 21:38:21 -03:00
Cesar Alvarez Vallero
e5044393ff
Fix typo 2021-08-22 21:35:58 -03:00
Ian Culp
f1f8950ae6
update chapter 2 name 2021-08-22 18:45:29 -05:00
Ian Culp
75da52f482
typo fix 2021-08-21 17:34:30 -05:00
Ian Culp
d1fe13d8c1
minor typo 2021-08-20 11:06:57 -05:00
Ian Culp
ab8d6a1094
Adding curl interlude 2021-08-20 10:46:19 -05:00
Javier Vargas
a61e330dee
Update 12_0_Expandiendo_Scripts_Bitcoin.md 2021-08-20 17:27:59 +02:00
Javier Vargas
f9d1023d53
Update 13_1_Escribiendo_Puzzle_Scripts.md 2021-08-20 16:28:34 +02:00
Javier Vargas
97e2f7c856
Update 13_1_Escribiendo_Puzzle_Scripts.md 2021-08-20 16:27:03 +02:00
Javier Vargas
3b77bf4732
Update 12_2_Usando_Otros_Comandos_de_Scripting.md 2021-08-20 16:11:51 +02:00
Javier Vargas
9f391ffc34
Update 12_1_Usando_Script_Condicionales.md 2021-08-20 15:45:53 +02:00
Javier Vargas
227468d02a
Update 13_0_Disenando_Bitcoin_Scripts_Reales.md 2021-08-20 15:29:20 +02:00
Javier Vargas
a0ef924e0d
Create 08_2_Enviando_una_Transaccion_con_Datos.md 2021-08-19 23:25:52 +02:00
Shannon Appelcline
bb219da47d
Delete 08_2_Enviando_una_Transaccion_con_Datos.md 2021-08-19 08:32:57 -10:00
Shannon Appelcline
810af6c917
Merge pull request #425 from csralvall/patch-01_0
Fix typo in chapter 1.0
2021-08-17 14:50:13 -10:00
Cesar Alvarez Vallero
47164907e2
Fix typo 2021-08-17 21:12:05 -03:00
Shannon Appelcline
de34b357bf
Merge pull request #408 from prayank23/i2p-update
Add ports and fix note
2021-08-17 09:51:05 -10:00
Shannon Appelcline
d962e7d1f8
Merge pull request #332 from javiervargas/patch-18
Chapter 09-0 09_0_Introduciendo_Bitcoin_Scripts.md
2021-08-17 09:48:12 -10:00
Shannon Appelcline
c04cc0a0e3
Merge pull request #331 from javiervargas/patch-17
Chapter 08-2 08_2_Enviando_una_Transaccion_con_Datos.md
2021-08-17 09:48:00 -10:00
Shannon Appelcline
9823a2b8db
Merge pull request #330 from javiervargas/patch-16
Chapter 08-1 08_1_Enviando_una_Transaccion_con_Bloqueo_de_Tiempo.md
2021-08-17 09:47:38 -10:00
Shannon Appelcline
f804a036a8
Merge pull request #424 from csralvall/fix-13_2
Fix typo in chapter 13.2
2021-08-17 09:39:12 -10:00
Shannon Appelcline
07308cb02c
Merge pull request #423 from csralvall/fix-13_1
Fix typos in chapter 13.1
2021-08-17 09:38:51 -10:00
Shannon Appelcline
3d2b675b5d
Merge pull request #422 from csralvall/fix-09_5
Fix possible syntax error in chapter 9.5
2021-08-17 09:38:12 -10:00
Shannon Appelcline
e2cd52d77e
Merge pull request #420 from csralvall/fix-11_2
Fix possible typos in chapter 11.2
2021-08-17 09:34:07 -10:00
Cesar Alvarez Vallero
51cc8fc35a
Fix typo 2021-08-16 12:31:01 -03:00
Javier Vargas
ebc0e66a4e
Update 09_3_Probando_un_Script_Bitcoin.md 2021-08-16 15:57:52 +02:00
Javier Vargas
a1e148fa5c
Update 08_1_Enviando_una_Transaccion_con_Bloqueo_de_Tiempo.md 2021-08-16 15:50:01 +02:00
Javier Vargas
1574a0d414
Update 09_1_Entendiendo_la_base_de_las_Transacciones.md 2021-08-16 15:48:17 +02:00
Javier Vargas
0f3daf77dd
Update 09_2_Ejecutando_un_Script_Bitcoin.md 2021-08-16 15:36:44 +02:00
Cesar Alvarez Vallero
0d560827e4
Remove word before bash command example 2021-08-15 22:24:32 -03:00
Cesar Alvarez Vallero
2ba762da22
Fix typo 2021-08-15 22:20:31 -03:00
Cesar Alvarez Vallero
92f86fa393
Correct syntax error
The question feels odd using the `What` question word and the
following paragraph fits better with the `Why` question word.
2021-08-13 23:14:09 -03:00
Cesar Alvarez Vallero
a1facbe4ce
Insert underscore correctly in CLTV opcode
As CLTV opcode would not be recognized if some letter is wrong, the
underscore should be correctly placed inside the opcode.
2021-08-12 20:20:09 -03:00
Said Rahal
ddb2c2e601
Create 04_6_Creando_una_Transacción_Segwit 2021-08-12 18:20:40 +02:00
Javier Vargas
0a24d3c6d5
Update 08_0_Expandiendo_Bitcoin_Transacciones_Otros.md 2021-08-12 15:53:44 +02:00
Javier Vargas
6f88c95c30
Update 08_1_Enviando_una_Transaccion_con_Bloqueo_de_Tiempo.md 2021-08-12 15:49:38 +02:00
Javier Vargas
cd08fb26a7
Update 08_1_Enviando_una_Transaccion_con_Bloqueo_de_Tiempo.md 2021-08-12 15:48:47 +02:00
Javier Vargas
a7287ded3d
Update 08_2_Enviando_una_Transaccion_con_Datos.md 2021-08-12 15:45:49 +02:00
Said Rahal
eec2d21b8e
Create 04_5_Enviando_Monedas_con_Transacciones_Crudas_Automatizadas 2021-08-12 12:27:44 +02:00
Prayank
30e945b6a3 Add ports link and fix note
+ Information about ports required for i2p (inbound and outbound)
+ i2prouter (java) works with Bitcoin Core, so previous note is incorrect. Changed it with relevant information.
2021-08-12 15:49:32 +05:30
Javier Vargas
36803fb6e0
Update 09_0_Introduciendo_Bitcoin_Scripts.md 2021-08-11 17:16:29 +02:00
Javier Vargas
7ed52a53db
Update 08_2_Enviando_una_Transaccion_con_Datos.md 2021-08-11 17:13:03 +02:00
Javier Vargas
a306efdc6e
Rename 08_2_Enviando_una_Transaccion_con_Datos.md.txt to 08_2_Enviando_una_Transaccion_con_Datos.md 2021-08-11 17:05:42 +02:00
Javier Vargas
411d238b02
Update 08_1_Enviando_una_Transaccion_con_Bloqueo_de_Tiempo.md 2021-08-11 17:03:33 +02:00
Shannon Appelcline
57cf4e7600
Example Cleanup
Fixed example and explanation thanks to @csralvall finding a bug.
2021-08-10 14:23:44 -10:00
Shannon Appelcline
8484b7e546
Merge pull request #391 from KoreaComK/chapter13
Chapter 13 Translated by @koreacomk need review
2021-08-10 10:03:35 -10:00
Shannon Appelcline
d55adbf72a
Merge pull request #350 from javiervargas/patch-36
Chapter 16-01 16_1_Accediendo_a_Bitcoind_en_C_con_las_Bibliotecas_RPC.md
2021-08-10 10:02:58 -10:00
Shannon Appelcline
99986ff0a4
Merge pull request #347 from javiervargas/patch-33
Chapter 14-1 14_1_Verificando_Su_Configuracion_Tor.md
2021-08-10 10:02:16 -10:00
Shannon Appelcline
d70392955b
Merge pull request #348 from javiervargas/patch-34
Chapter 14-2 14_2_Cambiando_Sus_Servicios_Bitcoin_Ocultos.md
2021-08-10 10:01:48 -10:00
Shannon Appelcline
30bc9e8230
Merge pull request #416 from javiervargas/patch-62
fix orthography
2021-08-10 10:01:17 -10:00
namcios
256d54e831
Fix 13_2 2021-08-10 16:49:44 -03:00
namcios
ecfa758cc5
Review 13_3 2021-08-10 16:47:58 -03:00
Javier Vargas
abaeec981e
fix orthography 2021-08-10 21:34:13 +02:00
Shannon Appelcline
6732f2f778
Merge pull request #407 from csralvall/fix-10_6
Fix links in chapter 10.6
2021-08-10 09:05:50 -10:00
Shannon Appelcline
bf9eb432d8
Merge branch 'master' into fix-10_6 2021-08-10 09:05:39 -10:00
Shannon Appelcline
7bedbed4f0
Merge pull request #406 from csralvall/fix-10_5
Fix error in chapter 10.5
2021-08-10 08:45:27 -10:00
Shannon Appelcline
63658e1b40
Merge pull request #404 from javiervargas/patch-60
Fix links
2021-08-10 08:43:40 -10:00
Shannon Appelcline
8c4f6bb931
Merge pull request #403 from csralvall/fix-10_4
Fix typos and links in chapter 10.4
2021-08-10 08:43:08 -10:00
Shannon Appelcline
51362eebdd
Merge branch 'master' into fix-10_4 2021-08-10 08:42:56 -10:00
Shannon Appelcline
3082375f69
Merge pull request #398 from csralvall/fix-10_1
Fix links and typo in chapter 10.1
2021-08-10 08:40:09 -10:00
Shannon Appelcline
6854713ddd
Merge pull request #397 from csralvall/fix-09_5
Fix chapter 09.5
2021-08-10 08:39:31 -10:00
Shannon Appelcline
86288d619b
Merge pull request #395 from wodry/patch-1
Fix typo in i2p service doc
2021-08-10 08:38:34 -10:00
Shannon Appelcline
911b1ff467
Merge pull request #392 from namcios/patch-1
Fix some typos and links on Chapter 10
2021-08-10 08:34:19 -10:00
Shannon Appelcline
e84a30cb58
Merge pull request #386 from KoreaComK/chapter12
Chapter 12 Translated by @koreacomk need review
2021-08-10 08:32:23 -10:00
Shannon Appelcline
ed99ab1b99
Merge pull request #375 from KoreaComK/chapter10
Chapter 10 Translated by @koreacomk need review
2021-08-10 08:23:52 -10:00
Shannon Appelcline
4e26ab0313
Merge pull request #367 from javiervargas/patch-53
Chapter 18-6 18_6_Accediendo_a_Bitcoind_con_Swift.md
2021-08-10 08:23:06 -10:00
Shannon Appelcline
20df31110e
Merge pull request #359 from javiervargas/patch-45
Chapter 17-6 17_6_Usando_Otras_Funciones_en_Libwally.md
2021-08-10 08:22:34 -10:00
Shannon Appelcline
60f2d201d1
Merge pull request #358 from javiervargas/patch-44
Chapter 17-5 17_5_Usando_Scripts_en_Libwally.md
2021-08-10 08:22:20 -10:00
Shannon Appelcline
54f5842e22
Merge pull request #357 from javiervargas/patch-43
Chapter 17-4 17_4_Usando_PSBTs_en_Libwally.md
2021-08-10 08:21:56 -10:00
Shannon Appelcline
af83a5b00b
Merge pull request #355 from javiervargas/patch-41
Chapter 17-217_2_Usando_BIP39_en_Libwally.md
2021-08-10 08:21:26 -10:00
Shannon Appelcline
ff9d7c398d
Merge pull request #354 from javiervargas/patch-40
Chapter 17-1 17_1_Configurando_Libwally.md
2021-08-10 08:21:16 -10:00
Shannon Appelcline
a965b6ce5a
Merge pull request #353 from javiervargas/patch-39
Chapter 17-0 17_0_Programando_Bitcoin_con_Libwally.md
2021-08-10 08:14:37 -10:00
Shannon Appelcline
632e4fc830
Merge pull request #352 from javiervargas/patch-38
Chapter 16-3 16_3_Recibiendo_Notificaciones_de_Bitcoind_en_C_con_las_Bibliotecas_Z…
2021-08-10 08:14:09 -10:00
Shannon Appelcline
d2d9fbf31b
Merge pull request #351 from javiervargas/patch-37
Chapter 16-2 16_2_Programando_Bitcoind_en_C_con_las_Bibliotecas_RPC.md
2021-08-10 08:13:46 -10:00
Shannon Appelcline
a4c1beedfd
Merge pull request #346 from javiervargas/patch-32
Chapter 14-0 14_0_Usando_Tor.md.txt
2021-08-10 08:12:27 -10:00
Shannon Appelcline
9779f8f06b
Merge pull request #326 from javiervargas/patch-11
Chapter 03 - 3 03_3_Interludio_Usando_Variables_Linea_Comando.md
2021-08-10 08:09:40 -10:00
Shannon Appelcline
d0ab082bd1
Merge pull request #309 from icculp/spanish-19_4
Chapter 19.4 translated, pending review
2021-08-10 08:08:33 -10:00
Shannon Appelcline
db1b77dae9
Merge pull request #304 from icculp/spanish-19_2
Chapter 19.2 translated, pending review
2021-08-10 08:07:51 -10:00
Javier Vargas
1635d2bdc1
Update 16_1_Accediendo_a_Bitcoind_en_C_con_las_Bibliotecas_RPC.md 2021-08-10 19:45:01 +02:00
Javier Vargas
6a0645ab66
Update 14_1_Verificando_Su_Configuracion_Tor.md 2021-08-10 19:41:09 +02:00
Said Rahal
9aecfd6b87
Create 04_4_Interludio_Usando_Curl 2021-08-10 19:39:38 +02:00
Javier Vargas
5188613af7
Update 14_1_Verificando_Su_Configuracion_Tor.md 2021-08-10 19:39:34 +02:00
Javier Vargas
4299a5018a
Update 14_1_Verificando_Su_Configuracion_Tor.md 2021-08-10 19:38:55 +02:00
Said Rahal
e1edd19a40
Create 04_4_Enviando_Monedas_con_una_Transacción_Cruda 2021-08-10 19:38:31 +02:00
Said Rahal
2a56eec18b
Create 04_3_Creando_una_Transacción_Cruda_con_Argumentos_Ingresados_con_Nombre 2021-08-10 19:36:54 +02:00
Said Rahal
48f3e5ae87
Create 04_2_Interludio_Usando_JQ 2021-08-10 19:35:06 +02:00
Javier Vargas
9a7ae7183d
Update 14_2_Cambiando_Sus_Servicios_Bitcoin_Ocultos.md 2021-08-10 19:34:29 +02:00
Said Rahal
80b8ebf8a2
Create 0_4_2_Creando_una_Transacción_Cruda 2021-08-10 19:33:23 +02:00
Said Rahal
342687aa16
Create 04_1_Enviando_Monedas_de_la_Forma_Facil 2021-08-10 19:31:28 +02:00
Said Rahal
c7710a55c5
Create 04_0_Enviando_Transacciones_Bitcoin 2021-08-10 19:29:46 +02:00
namcios
67a386ae85
Review 13_2 2021-08-10 12:08:52 -03:00
namcios
3347fc570b
Review 13_1 2021-08-10 11:38:01 -03:00
namcios
54e37d4f5b
Review 13_0 2021-08-10 11:04:42 -03:00
namcios
4f380e5180
Review 12_2 2021-08-10 10:53:32 -03:00
Cesar Alvarez Vallero
b89ca218a6
Fix link 2021-08-10 10:51:38 -03:00
namcios
a0e422b75e
Review 12_1 2021-08-10 10:40:21 -03:00
namcios
e612796ff8
Review 12_0 2021-08-10 10:19:16 -03:00
Cesar Alvarez Vallero
d0dfc62770
Fix grammar 2021-08-10 10:08:58 -03:00
Javier Vargas
4db091eb85
Create 14_3_Agregando_Servicios_SSH_Ocultos.md 2021-08-10 13:48:23 +02:00
Javier Vargas
28d9eb75b1
Update 14_3_Adding_SSH_Hidden_Services.md 2021-08-10 13:45:34 +02:00
Cesar Alvarez Vallero
31594298c0
Fix links 2021-08-09 22:39:27 -03:00
Cesar Alvarez Vallero
e294214ada
Fix typos 2021-08-09 22:16:36 -03:00
KoreaComK
6f18e057cd Appendix translation concluded. 2021-08-09 12:47:20 -03:00
KoreaComK
f726c60359 Fixing changes 2021-08-09 11:32:40 -03:00
KoreaComK
e537667287 Chapter19 translation concluded 2021-08-09 11:30:39 -03:00
KoreaComK
fdaaac3856 Chapter 18 translation concluded 2021-08-08 15:14:40 -03:00
KoreaComK
7491a68ed7 Chapter 17 translation concluded 2021-08-08 10:19:25 -03:00
Cesar Alvarez Vallero
3d9fdbb288
Fix typo 2021-08-06 21:47:03 -03:00
Cesar Alvarez Vallero
4a6ce39532
Fix link to chapter 10.4 2021-08-06 21:45:22 -03:00
Cesar Alvarez Vallero
89aa4ce0c4
Correct type of transaction in table 2021-08-06 12:49:47 -03:00
KoreaComK
4fb508a054 Chapter 16 translation finished 2021-08-06 11:18:29 -03:00
wodry
e5d6eec796
Fix typo in i2p service doc 2021-08-06 08:31:18 +02:00
KoreaComK
dce2f7eefe Chapter 14 transaltion completed 2021-08-05 14:04:26 -03:00
namcios
11fb617d74
Review 10_6 2021-08-05 12:11:21 -03:00
namcios
ca406ce081
Fix summary title 2021-08-05 12:08:31 -03:00
namcios
58a40b8559
Update 6_3 title 2021-08-05 12:06:08 -03:00
namcios
392b66c0de
Update 6_2 title
The 6_2 title is different from the file name, the former says "with" and the latter says "to"
2021-08-05 12:03:12 -03:00
namcios
4f4b624b35
Review 10_5 2021-08-05 11:56:55 -03:00
namcios
604163a8b2
Update summary title for file's title 2021-08-05 11:55:00 -03:00
namcios
66cd73989b
Review 10_4 2021-08-05 11:38:52 -03:00
namcios
523d3e6a12
Update chapter number and link 2021-08-05 11:29:33 -03:00
namcios
5746b96ddb
Fix link and file name
Link redirected to 404, and since 10_1 isn't about building, I'm assuming the correct one to link to is 10_2: Building the Structure of P2SH.
2021-08-05 11:24:07 -03:00
namcios
b042cd480d
Review 10_3 2021-08-05 11:11:42 -03:00
namcios
528a272d18
Review 10_2 2021-08-05 11:06:15 -03:00
namcios
e515da4a7c
Fix summary indication
Summary was mentioning the previous file instead of this one.
2021-08-05 11:02:12 -03:00
namcios
161ad35fb5
Review 10_1 2021-08-05 10:47:20 -03:00
namcios
fd345a450f
Review 10_0 2021-08-05 10:33:44 -03:00
Javier Vargas
ae46342eb2
Update 03_3_Interludio_Usando_Variables_Linea_Comando.md 2021-08-05 13:58:15 +02:00
Javier Vargas
33f49586a0
Update 16_1_Accediendo_a_Bitcoind_en_C_con_las_Bibliotecas_RPC.md 2021-08-05 13:55:00 +02:00
Javier Vargas
ebc0c56fd4
Update 16_2_Programando_Bitcoind_en_C_con_las_Bibliotecas_RPC.md 2021-08-05 13:53:30 +02:00
Javier Vargas
9fd43b3ddf
Update 16_3_Recibiendo_Notificaciones_de_Bitcoind_en_C_con_las_Bibliotecas_ZMQ.md 2021-08-05 13:49:12 +02:00
Javier Vargas
ccadbfd70a
Update 17_0_Programando_Bitcoin_con_Libwally.md 2021-08-05 13:45:50 +02:00
Javier Vargas
b2c72e1d8d
Update 17_1_Configurando_Libwally.md 2021-08-05 13:44:16 +02:00
Javier Vargas
be853e25f8
Update 17_2_Usando_BIP39_en_Libwally.md 2021-08-05 13:40:21 +02:00
Javier Vargas
99cb8f3a94
Update 17_4_Usando_PSBTs_en_Libwally.md 2021-08-05 13:37:20 +02:00
Javier Vargas
fbb0e14a9d
Update 17_5_Usando_Scripts_en_Libwally.md 2021-08-05 13:33:59 +02:00
Javier Vargas
7f876516a8
Update 17_6_Usando_Otras_Funciones_en_Libwally.md 2021-08-05 13:32:03 +02:00
Javier Vargas
1f7713a0a3
Update 18_6_Accediendo_a_Bitcoind_con_Swift.md 2021-08-05 13:29:26 +02:00
KoreaComK
ddc5dae330 Chapter 13 translation finished 2021-08-05 00:31:10 -03:00
Shannon Appelcline
9ca5d0eb70
Merge pull request #390 from icculp/patch-15
minor typo
2021-08-04 16:05:38 -10:00
Ian Culp
c3ce8432b5
minor typo 2021-08-04 20:27:26 -05:00
Shannon Appelcline
5dc4f00740
Merge pull request #389 from icculp/patch-14
fixing link
2021-08-04 15:26:44 -10:00
Shannon Appelcline
33bbc5d9ee
Merge pull request #388 from csralvall/fix-09_2
Fix typo in chapter 9.2
2021-08-04 15:24:06 -10:00
Shannon Appelcline
17d4959c31
Merge pull request #382 from csralvall/fix-09_1
Fix typos and links
2021-08-04 15:19:21 -10:00
Ian Culp
8e53068b94
fixing link 2021-08-04 20:18:57 -05:00
Cesar Alvarez Vallero
e679000b60
Fix typo 2021-08-04 22:18:33 -03:00
Shannon Appelcline
a187905899
Merge pull request #385 from csralvall/fix-A3_0
Fix typos in chapter A3
2021-08-04 15:17:29 -10:00
Shannon Appelcline
1f00c0a009
Merge pull request #387 from csralvall/fix-03_4
Fix typo in chapter 3.4
2021-08-04 15:15:58 -10:00
Shannon Appelcline
7e0fbc1697
Merge pull request #349 from javiervargas/patch-35
Chapter 16-0 16_0_Hablando_a_Bitcoind_con_C.md
2021-08-04 15:14:13 -10:00
Cesar Alvarez Vallero
68cbfef186
Fix typo
All the other commands where formatted with backticks instead of
straight quotation marks. Because they are very similar I assume that
the intention was to write backticks.
2021-08-04 20:46:59 -03:00
KoreaComK
267f1aa16f Chapter 12 translated. 2021-08-04 19:09:40 -03:00
Cesar Alvarez Vallero
5cd941e4ab
Fix typos 2021-08-04 13:56:55 -03:00
Cesar Alvarez Vallero
abf66f3125
Fix image links 2021-08-04 13:45:46 -03:00
Cesar Alvarez Vallero
3d9e1b1518
Translate 'output' to 'salida' 2021-08-04 13:40:56 -03:00
Cesar Alvarez Vallero
3d71a09ebf
Restrict lines to no more than 80 characters
It is cumbersome to comment one line for multiple corrections, so the
idea behind this is to ease the task of the reviewer by breaking lines,
so he/she can make the comment in the place where the comment target is.
2021-08-04 12:05:00 -03:00
Cesar Alvarez Vallero
80c6bd55f5
Create chapter A3's spanish translation 2021-08-04 11:45:23 -03:00
KoreaComK
05374400c0 Translation Concluded in Chapter11 2021-08-04 11:05:39 -03:00
Cesar Alvarez Vallero
7790a39da7
Fix typo in A2 2021-08-04 09:29:40 -03:00
Cesar Alvarez Vallero
fe5e4f9be2
Fix links 2021-08-03 22:01:03 -03:00
Cesar Alvarez Vallero
07f9ffb537
Fix typo 2021-08-03 21:54:37 -03:00
Shannon Appelcline
1baf06366d
Merge pull request #302 from KoreaComK/chapter-09
Chapter 09 Translated by @koreacomk reviewed by @namcios
2021-08-03 09:47:33 -10:00
Shannon Appelcline
ce2dfef0c2
Merge pull request #372 from javiervargas/patch-58
Chapter 19-3 19_3_Creando_un_Canal_en_Lightning.md
2021-08-03 09:44:29 -10:00
Shannon Appelcline
e495a85d72
Merge pull request #371 from javiervargas/patch-57
Chapter 19-2 19_2__Interludio_Accediendo_a_un_Segundo_Nodo_Lightning.md
2021-08-03 09:44:13 -10:00
Shannon Appelcline
57c34e4764
Merge pull request #370 from javiervargas/patch-56
Chapter 19-2 19_2_Conociendo_Su_Configuracion_Lightning.md
2021-08-03 09:43:59 -10:00
Shannon Appelcline
5aa947d008
Merge pull request #369 from javiervargas/patch-55
Chapter 19-1 19_1_Verificando_Su_Configuracion_Lightning.md
2021-08-03 09:43:48 -10:00
Shannon Appelcline
8afe14c464
Merge pull request #368 from javiervargas/patch-54
Chapter 19-0 19_0_Entendiendo_Su_Configuracion_Lightning.md
2021-08-03 09:43:31 -10:00
Shannon Appelcline
14440544b1
Merge pull request #365 from javiervargas/patch-51
Chapter 18-4 18_4_Accediendo_a_Bitcoind_con_Python.md
2021-08-03 09:42:56 -10:00
Shannon Appelcline
2cb9d66eea
Merge pull request #364 from javiervargas/patch-50
Chapter 18-3 18_3_Accediendo_a_Bitcoind_con_NodeJS.md
2021-08-03 09:42:41 -10:00
Shannon Appelcline
5c17cf67a6
Merge pull request #363 from javiervargas/patch-49
Chapter 18-2 18_2_Accediendo_a_Bitcoind_con_Java.md
2021-08-03 09:42:17 -10:00
Shannon Appelcline
0906139603
Merge pull request #362 from javiervargas/patch-48
Chapter 18-1 18_1_Accediendo_a_Bitcoind_con_Go.md
2021-08-03 09:42:01 -10:00
Shannon Appelcline
876dcddb1a
Merge pull request #361 from javiervargas/patch-47
Chapter 18-0 18_0_Hablando_a_Bitcoind_con_Otros_Lenguajes.md
2021-08-03 09:41:46 -10:00
Shannon Appelcline
e85ff14c92
Merge pull request #344 from javiervargas/patch-30
fix links
2021-08-03 09:41:12 -10:00
Shannon Appelcline
7e4aa84b84
Merge pull request #320 from javiervargas/patch-5
Chapter 02 -2 02_2_Configurando_Bitcoin_Core_Otros.md
2021-08-03 09:38:36 -10:00
Shannon Appelcline
6e1910d9ca
Merge pull request #319 from javiervargas/patch-4
Chapter 02 - 102_1_Configurando_un_VPS_Bitcoin-Core_StackScript.md
2021-08-03 09:38:23 -10:00
Shannon Appelcline
5b52d7099c
Merge pull request #317 from javiervargas/patch-2
Chapter 01-1 01_1_Introduciendo_Bitcoin.md
2021-08-03 09:37:37 -10:00
Shannon Appelcline
e374ec7ff8
Merge pull request #316 from javiervargas/patch-1
Chapter 01 - 01_0_Introduccion.md
2021-08-03 09:17:54 -10:00
Shannon Appelcline
45f707551b
Merge pull request #305 from icculp/spanish-19_3
Chapter 19.3 translated, pending review
2021-08-03 09:17:17 -10:00
Shannon Appelcline
34a2fbc5f8
Merge pull request #300 from icculp/spanish-19_1
Chapter 19.1 translated, pending review
2021-08-03 09:16:26 -10:00
Shannon Appelcline
ccab59c8db
Merge pull request #315 from csralvall/fix-17_1
Fix typo
2021-08-03 09:11:20 -10:00
Shannon Appelcline
7427136127
Merge pull request #373 from icculp/patch-12
fixing a few links
2021-08-03 09:10:39 -10:00
Shannon Appelcline
8ff7f36eb3
completed fixing of link 2021-08-03 09:09:48 -10:00
Shannon Appelcline
6df5f6fee2
Merge pull request #374 from javiervargas/patch-59
Fix link and add Chapter 15 link
2021-08-03 09:08:50 -10:00
Shannon Appelcline
cf46cc4760
Merge pull request #376 from csralvall/fix-02_2
Fix typo in BitcoinStandup name
2021-08-03 09:07:35 -10:00
Shannon Appelcline
8598756ae1
Merge pull request #378 from csralvall/fix-A0
Fix typo
2021-08-03 09:07:06 -10:00
Shannon Appelcline
306e7c89d4
Typo fix
Typo fix courtesy of @csralvall
2021-08-03 09:06:37 -10:00
Shannon Appelcline
fa5b1ab46c
Merge pull request #380 from csralvall/fix-03_3
Fix typo
2021-08-03 09:01:08 -10:00
Shannon Appelcline
6dc135c54b
Merge pull request #381 from icculp/patch-13
fixing typo
2021-08-03 09:00:11 -10:00
Ian Culp
f332c8250e
fixing typo 2021-08-02 22:47:48 -05:00
Javier Vargas
9c454701e4
Update 03_3_Configurando_Su_Billetera.md 2021-08-02 21:58:59 +02:00
Cesar Alvarez Vallero
0ad361b74c
Fix typo 2021-08-02 15:15:57 -03:00
Cesar Alvarez Vallero
f8efd8081e
Create chapter A2 spanish translation 2021-08-02 12:41:09 -03:00
Cesar Alvarez Vallero
852e96aae2
Create chapter A1 spanish translation 2021-08-01 22:27:39 -03:00
Cesar Alvarez Vallero
58f41aa3a9
Create chapter A0 spanish translation 2021-08-01 22:26:53 -03:00
Cesar Alvarez Vallero
35dfd68e62
Fix typo 2021-08-01 20:53:22 -03:00
Javier Vargas
544171bd4d
Update 03_1_Verificando_Su_Configuracion_Bitcoin.md 2021-08-01 16:59:30 +02:00
Javier Vargas
d262a8c422
Update 03_1_Verificando_Su_Configuracion_Bitcoin.md 2021-08-01 16:58:19 +02:00
Javier Vargas
4f31ab28ba
Update 02_2_Configurando_Bitcoin_Core_Otros.md 2021-08-01 16:49:30 +02:00
Javier Vargas
cd9a715a3e
Update 18_0_Hablando_a_Bitcoind_con_Otros_Lenguajes.md 2021-08-01 16:42:52 +02:00
Javier Vargas
25e48d6ac5
Update 18_1_Accediendo_a_Bitcoind_con_Go.md 2021-08-01 16:41:47 +02:00
Javier Vargas
3321457d21
Update 18_3_Accediendo_a_Bitcoind_con_NodeJS.md 2021-08-01 16:39:57 +02:00
Javier Vargas
eb23f1ea50
Update 18_4_Accediendo_a_Bitcoind_con_Python.md 2021-08-01 16:31:42 +02:00
Cesar Alvarez Vallero
44379d9b6f
Fix typo in BitcoinStandup name 2021-07-31 12:33:49 -03:00
Javier Vargas
69b99a9fd6
Update 02_1_Configurando_un_VPS_Bitcoin-Core_StackScript.md 2021-07-30 22:22:50 +02:00
Javier Vargas
0fc6fef526
Update 02_1_Configurando_un_VPS_Bitcoin-Core_StackScript.md 2021-07-30 22:21:37 +02:00
Javier Vargas
8b997692b2
Update 01_1_Introduciendo_Bitcoin.md 2021-07-30 22:17:50 +02:00
Ian Culp
0c92c4d572
recorrecting line 16 2021-07-30 12:42:40 -05:00
Ian Culp
3985cb0144
recorrecting line 69 2021-07-30 12:40:10 -05:00
KoreaComK
b630588e1d Chapter 10 full translated 2021-07-30 14:14:06 -03:00
Javier Vargas
2e94b36c43
Fix link and add Chapter 15 link 2021-07-30 18:13:25 +02:00
Javier Vargas
1cbb9b85ce
Update 02_1_Configurando_un_VPS_Bitcoin-Core_StackScript.md 2021-07-30 18:08:16 +02:00
Javier Vargas
68ffe9426b
Update 01_1_Introduciendo_Bitcoin.md 2021-07-30 18:00:20 +02:00
Javier Vargas
26c5fb9e1c
Update 01_0_Introduccion.md 2021-07-30 17:57:04 +02:00
Javier Vargas
13bf01df11
Update 19_1_Verificando_Su_Configuracion_Lightning.md 2021-07-30 12:22:53 +02:00
Javier Vargas
d383dc9a0e
Update 19_2_Conociendo_Su_Configuracion_Lightning.md 2021-07-30 12:09:01 +02:00
Javier Vargas
cdea601972
Update 19_3_Creando_un_Canal_en_Lightning.md 2021-07-30 12:06:21 +02:00
Javier Vargas
04259d81a2
Update 19_2__Interludio_Accediendo_a_un_Segundo_Nodo_Lightning.md 2021-07-30 12:00:42 +02:00
Ian Culp
62595e603b
fixing a few links 2021-07-29 15:56:34 -05:00
Javier Vargas
59356bb93f
19_3_Creando_un_Canal_en_Lightning.md 2021-07-29 19:55:58 +02:00
Javier Vargas
21438d9312
19_2__Interludio_Accediendo_a_un_Segundo_Nodo_Lightning.md 2021-07-29 19:54:29 +02:00
Javier Vargas
a13bfdbde4
19_2_Conociendo_Su_Configuracion_Lightning.md 2021-07-29 19:53:35 +02:00
Javier Vargas
8e1b1b5081
19_1_Verificando_Su_Configuracion_Lightning.md 2021-07-29 19:52:37 +02:00
Javier Vargas
ee97c03e97
19_0_Entendiendo_Su_Configuracion_Lightning.md 2021-07-29 19:50:25 +02:00
Javier Vargas
9f4d6e7f83
18_6_Accediendo_a_Bitcoind_con_Swift.md 2021-07-29 19:48:33 +02:00
Javier Vargas
40ee335e0f
18_5_Accediendo_a_Bitcoind_con_Rust.md 2021-07-29 19:47:05 +02:00
Javier Vargas
a8a5e5400e
18_4_Accediendo_a_Bitcoind_con_Python.md 2021-07-29 19:46:14 +02:00
Javier Vargas
746a1268c7
18_3_Accediendo_a_Bitcoind_con_NodeJS.md 2021-07-29 19:45:26 +02:00
Javier Vargas
cb764d8a6f
18_2_Accediendo_a_Bitcoind_con_Java.md 2021-07-29 19:44:18 +02:00
Javier Vargas
1965926e9d
18_1_Accediendo_a_Bitcoind_con_Go.md 2021-07-29 19:43:26 +02:00
Javier Vargas
75f541b728
18_0_Hablando_a_Bitcoind_con_Otros_Lenguajes.md 2021-07-29 19:42:19 +02:00
Javier Vargas
bea00c7cbf
17_7_Integrando_Libwally_y_Bitcoin-CLI.md 2021-07-29 19:41:24 +02:00
Javier Vargas
4966fb9bd7
17_6_Usando_Otras_Funciones_en_Libwally.md 2021-07-29 19:40:13 +02:00
Javier Vargas
531a8b5332
17_5_Usando_Scripts_en_Libwally.md 2021-07-29 19:38:53 +02:00
Javier Vargas
494b1f9d5f
17_4_Usando_PSBTs_en_Libwally.md 2021-07-29 19:38:07 +02:00
Javier Vargas
491b75c0cb
17_3_Usando_BIP32_en_Libwally.md 2021-07-29 19:37:20 +02:00
Javier Vargas
335b5c0c85
17_2_Usando_BIP39_en_Libwally.md 2021-07-29 19:36:14 +02:00
Javier Vargas
e77e60344c
17_1_Configurando_Libwally.md 2021-07-29 19:35:13 +02:00
Javier Vargas
9f426b46b9
17_0_Programando_Bitcoin_con_Libwally.md 2021-07-29 19:33:40 +02:00
Javier Vargas
8117b511f7
16_3_Recibiendo_Notificaciones_de_Bitcoind_en_C_con_las_Bibliotecas_ZMQ.md 2021-07-29 19:32:12 +02:00
Javier Vargas
6d6e096360
16_2_Programando_Bitcoind_en_C_con_las_Bibliotecas_RPC.md 2021-07-29 19:29:31 +02:00
Javier Vargas
11fa794c9f
16_1_Accediendo_a_Bitcoind_en_C_con_las_Bibliotecas_RPC.md 2021-07-29 19:19:20 +02:00
Javier Vargas
610d0041dc
16_0_Hablando_a_Bitcoind_con_C.md 2021-07-29 19:15:43 +02:00
Javier Vargas
b64f371c98
14_2_Cambiando_Sus_Servicios_Bitcoin_Ocultos.md 2021-07-29 18:41:11 +02:00
Javier Vargas
0855904994
14_1_Verificando_Su_Configuracion_Tor.md 2021-07-29 18:39:54 +02:00
Javier Vargas
8195533f4d
14_0_Usando_Tor.md.txt 2021-07-29 18:37:02 +02:00
Javier Vargas
9d1c663037
13_3_Potenciando_Bitcoin_con_Scripts.md 2021-07-29 18:33:25 +02:00
Javier Vargas
6da28bbe1f
fix links 2021-07-29 18:29:32 +02:00
Javier Vargas
816dedf129
13_2_Escribiendo_Scripts_Multifirma_Complejos.md 2021-07-29 18:25:22 +02:00
Javier Vargas
a8ee206ab9
13_1_Escribiendo_Puzzle_Scripts.md 2021-07-29 18:20:04 +02:00
Javier Vargas
7541259c9b
13_0_Disenando_Bitcoin_Scripts_Reales.md 2021-07-29 18:15:22 +02:00
Javier Vargas
4b4af9db4b
12_2_Usando_Otros_Comandos_de_Scripting.md 2021-07-29 18:12:36 +02:00
Javier Vargas
1d6825a39e
12_1_Usando_Script_Condicionales.md 2021-07-29 18:11:11 +02:00
Javier Vargas
0041878ee6
12_0_Expandiendo_Scripts_Bitcoin.md 2021-07-29 18:07:54 +02:00
Javier Vargas
2d1903aca0
09_5_Codificando_una_P2WPKH.md 2021-07-29 18:05:46 +02:00
Javier Vargas
0db9545945
09_4_Codificando_una_P2PKH.md 2021-07-29 18:03:25 +02:00
Javier Vargas
d6be459d3e
09_3_Probando_un_Script_Bitcoin.md 2021-07-29 18:00:02 +02:00
Javier Vargas
79414943d1
09_2_Ejecutando_un_Script_Bitcoin.md 2021-07-29 17:55:58 +02:00
Javier Vargas
81d2e776e8
09_1_Entendiendo_la_base_de_las_Transacciones.md 2021-07-29 17:53:14 +02:00
Javier Vargas
81bf6567ca
09_0_Introduciendo_Bitcoin_Scripts.md 2021-07-29 17:49:38 +02:00
Javier Vargas
61aef75904
08_2_Enviando_una_Transaccion_con_Datos.md 2021-07-29 17:43:56 +02:00
Javier Vargas
9bc1d302d9
Create 08_1_Enviando_una_Transaccion_con_Bloqueo_de_Tiempo.md 2021-07-29 17:41:35 +02:00
Javier Vargas
6406fb5c1e
08_0_Expandiendo_Bitcoin_Transacciones_Otros.md 2021-07-29 17:39:18 +02:00
Javier Vargas
44df1aab1b
03_5_Entendiendo_El_Descriptor.md 2021-07-29 13:32:18 +02:00
Javier Vargas
4cfeca92e1
03_4_Recibiendo_una_Transaccion.md 2021-07-29 13:29:25 +02:00
Javier Vargas
01397ac7c0
03_3_Interludio_Usando_Variables_Linea_Comando.md 2021-07-29 13:27:12 +02:00
Javier Vargas
8d39339830
03_3_Configurando_Su_Billetera.md 2021-07-29 13:12:53 +02:00
Javier Vargas
7b94b72920
03_2_Conociendo_Su_Configuracion_Bitcoin.md 2021-07-29 13:08:06 +02:00
Javier Vargas
68ad4dfb5f
03_1_Verificando_Su_Configuracion_Bitcoin.md 2021-07-29 13:02:21 +02:00
Javier Vargas
2d11e276ff
02_2_Configurando_Bitcoin_Core_Otros.md 2021-07-29 12:58:28 +02:00
Javier Vargas
0d53a656e5
02_1_Configurando_un_VPS_Bitcoin-Core_StackScript.md 2021-07-29 12:49:59 +02:00
Javier Vargas
f674e44519
02_0_Configurando_un_VPS_Bitcoin-Core.md 2021-07-29 12:48:28 +02:00
Javier Vargas
fa1b48bcd1
01_1_Introduciendo_Bitcoin.md 2021-07-29 12:47:10 +02:00
Javier Vargas
1d9c64b8fd
01_0_Introduccion.md
01_0_Introduccion.md
2021-07-29 12:45:42 +02:00
Cesar Alvarez Vallero
3419e6852a
Fix typo
There was no chapter about a library called ZMG. I suppose that it
refers to ZMQ (chapter 16_3).
2021-07-28 22:33:44 -03:00
Shannon Appelcline
2411b05715
Merge pull request #314 from csralvall/fix-17_0
Fix typo
2021-07-27 14:55:02 -10:00
Cesar Alvarez Vallero
f6d97c2f2b
Fix typo 2021-07-27 20:21:08 -03:00
namcios
26a6fb1a7f
Review 09_5 2021-07-27 18:10:24 -03:00
namcios
53818e6337
Review 09_4 2021-07-27 17:55:23 -03:00
namcios
5c5642dd6e
Review 09_3 2021-07-27 17:35:28 -03:00
namcios
4330d0f779
Review 09_2 2021-07-27 16:57:35 -03:00
namcios
e35c5ae4fd
Review 09_1 2021-07-27 16:25:40 -03:00
Christopher Allen
fe1da712e3
Clarified the commit for the CLA should be signed 2021-07-27 12:05:50 -07:00
Shannon Appelcline
14ed5f9f62
Merge pull request #313 from namcios/update-translating
Propose changes to translating process
2021-07-27 08:57:36 -10:00
Shannon Appelcline
d7889093d9
Merge pull request #303 from javiervargas/patch-6
Update README.md
2021-07-27 08:52:07 -10:00
Shannon Appelcline
d39e890173
Merge pull request #299 from icculp/spanish-19_0
chapter 19.0 translated, pending review
2021-07-27 08:51:20 -10:00
Shannon Appelcline
45ccb82661
Merge pull request #312 from javiervargas/patch-10
fix link
2021-07-27 08:50:50 -10:00
Shannon Appelcline
aafcaee91b
Merge pull request #311 from javiervargas/patch-9
fix link
2021-07-27 08:50:22 -10:00
Shannon Appelcline
79193edf02
Merge pull request #310 from javiervargas/patch-8
Fix typo and link
2021-07-27 08:47:28 -10:00
Shannon Appelcline
f2cb55ffe2
Merge pull request #308 from javiervargas/patch-7
Fix typo
2021-07-27 08:46:58 -10:00
Shannon Appelcline
ee82235f99
Merge pull request #298 from KoreaComK/chapter-08
Chapter 08 - Translated by @koreacomk reviewed by @hgrams
2021-07-27 08:46:28 -10:00
Shannon Appelcline
f7ac3170e9
Merge pull request #282 from csralvall/spanish-15
Create chapter 15 spanish translation
2021-07-27 08:44:10 -10:00
Shannon Appelcline
816fb4055a
Merge pull request #280 from csralvall/spanish-11
Create chapter 11 spanish translation
2021-07-27 08:43:56 -10:00
Shannon Appelcline
92c1994ba7
Merge pull request #264 from KoreaComK/chapter07
Chapter 07 Translated by @koreacomk reviewed by @namcios
2021-07-27 08:42:31 -10:00
Shannon Appelcline
6ea2bbec92
Merge pull request #307 from icculp/patch-10
prepending revocation cert
2021-07-27 08:37:03 -10:00
namcios
a16039f068
Review 09_0 2021-07-27 11:02:59 -03:00
KoreaComK
a3cb190eb1
Merge pull request #5 from hgrams/Chapter-8-Translated-Review
Chapter 8 Translation Reviewed By hgrams
2021-07-27 09:15:12 -03:00
namcios
86f890669a
Propose changes to translating process 2021-07-26 19:33:01 -03:00
Ian Culp
286ff4841b
corrections for lines 16, 44, and 60 2021-07-26 09:25:17 -05:00
Ian Culp
49fca598a3
corrections for line 5 and 235 2021-07-26 09:18:32 -05:00
Ian Culp
52baa5e6a0
corrections for lines 69 and 122 2021-07-26 09:15:40 -05:00
Ian Culp
4d84776f0d
corrections for lines 101 and 181 2021-07-26 08:55:40 -05:00
Javier Vargas
829177a37f
fix link 2021-07-25 21:50:26 +02:00
Javier Vargas
f358fbe223
fix link 2021-07-25 21:08:11 +02:00
Javier Vargas
6bfc182a3a
Fix typo and link 2021-07-25 20:13:59 +02:00
Ian Culp
e4c923cb72
Chapter 19.4 translated, pending review 2021-07-25 13:11:35 -05:00
Javier Vargas
65f4cc8cf7
Fix typo 2021-07-25 13:05:28 +02:00
Ian Culp
d4edf6985c
prepending revocation cert
Private key compromised. Adding revocation cert to signed CLA. I'm assuming I don't need to resign a new CLA since I figure the CLA signature still verifiable via old key, but adding revocation cert so no one tries to use that old key to send me encrypted messages.
2021-07-23 12:18:02 -05:00
namcios
ad06362641
Review 07_3 2021-07-23 12:33:07 -03:00
Ian Culp
1b9baabf5d
Chapter 19.3 translated, pending review 2021-07-23 10:17:26 -05:00
namcios
e00f732d53
Review 07_2 2021-07-23 12:00:53 -03:00
namcios
d3e8ca6247
Review 07_1 2021-07-23 11:36:22 -03:00
namcios
d555f72e35
Review 07_0 2021-07-23 11:04:05 -03:00
hgrams
2452670750 Chapter 8 Revised Translation 2021-07-22 13:49:58 -03:00
Ian Culp
8e673c4f5f
Chapter 19.2 translated, pending review 2021-07-22 10:20:29 -05:00
Javier Vargas
33c9f8d726
Update README.md 2021-07-22 09:07:11 +02:00
KoreaComK
27c8bfc7de Finished translation of chapter 09 2021-07-21 18:25:29 -03:00
Ian Culp
227a137da0
line 22 translated 2021-07-21 09:21:17 -05:00
Ian Culp
91e0a12789
Chapter 19.1 translated, pending review 2021-07-21 09:17:22 -05:00
KoreaComK
48011d3c60 Chapter 8 translation finished 2021-07-20 22:19:37 -03:00
Shannon Appelcline
7d9d905e62
Merge pull request #283 from icculp/spanish-10_5
Chapter 10.5 translated, pending review
2021-07-20 12:44:40 -10:00
Shannon Appelcline
1fcdaaf245
Merge pull request #281 from csralvall/spanish-readme
Create README.md spanish translation
2021-07-20 12:44:23 -10:00
Shannon Appelcline
e56dfe08f7
Merge pull request #270 from icculp/spanish-10_4
Chapter 10.4 translated, pending review
2021-07-20 12:44:03 -10:00
Shannon Appelcline
d777b644a4
Merge pull request #269 from icculp/spanish-10_3
chapter 10.3 translated, pending review
2021-07-20 12:43:48 -10:00
Shannon Appelcline
57d46c8572
Merge pull request #262 from icculp/spanish-10_2
chapter 10.2 translated, pending review
2021-07-20 12:43:25 -10:00
Shannon Appelcline
d41ef23eb7
Merge pull request #257 from icculp/spanish-10_1
Spanish 10.1 translated, pending review
2021-07-20 12:43:04 -10:00
Shannon Appelcline
870c5d3301
Merge pull request #244 from icculp/spanish-09_0
chapter 09_0 translated, pending review
2021-07-20 12:42:29 -10:00
Shannon Appelcline
a09801cebe
Merge pull request #227 from icculp/spanish-05_0
chapter 05_0 translated and ready for review
2021-07-20 12:42:12 -10:00
KoreaComK
bb6dd6cfde
Merge branch 'portuguese-translation' into portuguese-translation 2021-07-20 16:20:36 -03:00
KoreaComK
46708b34e0
Merge pull request #3 from hgrams/Chapter-06-Translated-Review
Chapter 06 translated reviewed By hgrams
2021-07-20 16:13:48 -03:00
Shannon Appelcline
47a4019900
Merge pull request #287 from icculp/spanish-10_6
Chapter 10.6 translated, pending review
2021-07-20 08:52:34 -10:00
Shannon Appelcline
53c999893d
Merge pull request #256 from icculp/spanish-10_0
chapter 10.0 translated, pending review
2021-07-20 08:50:01 -10:00
Shannon Appelcline
806d1db577
Merge pull request #251 from icculp/spanish-09_2
chapter 09_2 translated, pending review
2021-07-20 08:49:40 -10:00
Shannon Appelcline
aee2872f95
Merge pull request #247 from icculp/spanish-09_1
chapter 09_1 translated, pending review
2021-07-20 08:48:44 -10:00
Shannon Appelcline
3a5e10dd85
Merge pull request #234 from icculp/spanish-05_3
chapter 05_3 translated, pending review
2021-07-20 08:48:01 -10:00
Shannon Appelcline
731181873e
Merge pull request #231 from icculp/spanish-05_2
chapter 05_2 translated, ready for review
2021-07-20 08:47:23 -10:00
Shannon Appelcline
ea5b78185a
Merge pull request #228 from icculp/spanish-05_1
translation of chapter 05_1 complete, pending review
2021-07-20 08:46:58 -10:00
Shannon Appelcline
a3f6c45ccf
Merge pull request #296 from javiervargas/patch-5
fix links
2021-07-20 08:35:02 -10:00
Shannon Appelcline
ca69456c68
Merge pull request #295 from javiervargas/patch-4
fix link
2021-07-20 08:34:48 -10:00
Shannon Appelcline
af565f0b37
Merge pull request #294 from javiervargas/patch-3
fix links
2021-07-20 08:34:34 -10:00
Shannon Appelcline
9a0c86326c
Merge pull request #293 from javiervargas/patch-2
Fix link
2021-07-20 08:34:20 -10:00
Shannon Appelcline
803081cd64
Merge pull request #286 from csralvall/fix-07_3
Fix typos and links on 07_3 file
2021-07-20 08:33:53 -10:00
Shannon Appelcline
28710981d2
Merge pull request #288 from javiervargas/patch-1
Fix Link
2021-07-20 08:33:15 -10:00
Shannon Appelcline
0578346b32
Merge pull request #285 from csralvall/fix-07_1
Fix typo
2021-07-20 08:32:39 -10:00
Shannon Appelcline
d6cfd9984a
Merge pull request #279 from csralvall/signed-cla
Sign Contributor License Agreement
2021-07-20 08:32:06 -10:00
Shannon Appelcline
3c0e39e706
Merge pull request #278 from KoreaComK/patch-3
Putting files in correct branch
2021-07-20 08:30:15 -10:00
Shannon Appelcline
9fb3522ba2
Merge pull request #291 from namcios/patch-readme
Fix typos on pt branch
2021-07-20 08:27:18 -10:00
Shannon Appelcline
112613e029
Merge pull request #290 from namcios/patch-2
Fix typos
2021-07-20 08:27:00 -10:00
Shannon Appelcline
67523d4b0c
Merge pull request #292 from namcios/Chapter06
Chapter 6 - translated by @KoreaComK and reviewed by @namcios
2021-07-20 08:26:00 -10:00
Shannon Appelcline
9a4f0ac19d
Merge pull request #289 from namcios/patch-1
Fix broken link
2021-07-20 08:24:43 -10:00
Javier Vargas
1e85f88a90
fix links 2021-07-20 11:02:09 +02:00
Javier Vargas
969fc8219e
fix link 2021-07-20 10:59:21 +02:00
Javier Vargas
39d28bd8f4
fix links 2021-07-20 10:11:40 +02:00
Javier Vargas
f4f7e4199f
Update 19_3_Setting_Up_a_Channel.md 2021-07-20 10:09:28 +02:00
Ian Culp
a9325e552d
restart 2021-07-19 17:51:06 -05:00
namcios
a75034324c
Review 06_3 2021-07-19 16:32:10 -03:00
namcios
9ec21b57cd
Review 06_2 2021-07-19 16:20:58 -03:00
namcios
d5fb91ac00
Fix typos 2021-07-19 15:58:44 -03:00
namcios
bc4705795f
Review 06_1 2021-07-19 15:57:20 -03:00
namcios
6e6f2de6ca
Fix typos 2021-07-19 15:39:36 -03:00
namcios
8b9ba852b7
Fix broken link
The linked chapter (8.1) was neither about `redeemScript` nor was the link working (it lead to a 404). I checked and saw that chapter 10 is the one actually mentioning P2SH, and I assumed the best file was 10_3 because it is the one which more closely resembles "Building a Bitcoin Script with P2SH" (which is the linked yet broken file name) and also it mentions and deals with `redeemScript`.
2021-07-19 15:30:11 -03:00
namcios
43d0a40d91
Review 06_0 2021-07-19 13:26:29 -03:00
Ian Culp
ed4ca1aac4
Chapter 19.0 translated 2021-07-19 09:52:39 -05:00
Javier Vargas
0e25987213
Fix Link 2021-07-19 10:30:32 +02:00
Ian Culp
9aadfc2e6f
corrections for lines 11 and 116 2021-07-18 13:12:16 -05:00
Ian Culp
6acee857fb
correction on line 7 2021-07-18 13:09:09 -05:00
Ian Culp
6fcc30e40b
Chapter 10.6 translated, pending review 2021-07-18 12:18:02 -05:00
Cesar Alvarez Vallero
eb708033a5
Correct link to Bitcoin-Standup Linux Scripts 2021-07-17 21:45:38 -03:00
Cesar Alvarez Vallero
65458a0047
Fix typo 2021-07-17 21:41:52 -03:00
Cesar Alvarez Vallero
77d013c8c9
Fix typo 2021-07-17 20:41:53 -03:00
Christopher Allen
4843dcb510
Merge pull request #284 from icculp/merge_cla
Merging signed CLAs to CLA-signed, similarly updating CLA template
2021-07-17 12:59:35 -07:00
Ian Culp
0a2700100d
Merging signed CLAs to CLA-signed, similarly updating CLA template 2021-07-17 19:39:02 +00:00
Ian Culp
1d8a1c7b7b
Fixing typos, adjusting headings 2021-07-17 14:19:14 -05:00
Ian Culp
7e9d2d1bf3
correcting lines 9-15, 21, 27, 33, 42, 69, 79, 96, 130, 139 2021-07-17 10:34:27 -05:00
Cesar Alvarez Vallero
0741ea0cf7
Create chapter 15_1 spanish translation 2021-07-16 21:50:52 -03:00
Cesar Alvarez Vallero
577e4b4d44
Create chapter 15_0 spanish translation 2021-07-16 21:49:52 -03:00
Cesar Alvarez Vallero
0092827376
Correct chapter 15_1 link name and file name 2021-07-16 21:48:17 -03:00
Cesar Alvarez Vallero
cbeda81f66
Create chapter 11_3 spanish translation 2021-07-15 22:34:14 -03:00
Cesar Alvarez Vallero
244e9ca411
Create chapter 11_2 spanish translation 2021-07-15 22:33:36 -03:00
Cesar Alvarez Vallero
242d52a863
Create chapter 11_1 spanish translation 2021-07-15 22:32:19 -03:00
Cesar Alvarez Vallero
abae7fbc6e
Create chapter 11_0 spanish translation 2021-07-15 22:31:26 -03:00
Cesar Alvarez Vallero
4e964fd934
Create README.md spanish translation 2021-07-15 22:21:43 -03:00
Cesar Alvarez Vallero
a9efcf736a
Sign Contributor License Agreement 2021-07-15 22:03:56 -03:00
hgrams
38cba921fc Chapter 06 Translated Reviewed 2021-07-15 14:47:35 -03:00
Ian Culp
b59fccacc4
corrections on lines 10 and 13 2021-07-15 09:55:25 -05:00
Ian Culp
7764e1601d
chapter 10.5 translated 2021-07-15 09:40:56 -05:00
Shannon Appelcline
5b1bde60fc
Merge pull request #277 from csralvall/fix-06_3
Remove unnecessary piping inside jq command
2021-07-14 15:33:26 -10:00
Shannon Appelcline
fe1795eab1
Merge pull request #276 from KoreaComK/chapter-05-translated-reviewed
Placing the chapter 05 translated in portuguese-translation branch
2021-07-14 15:33:03 -10:00
KoreaComK
72fae9437b
Putting files in correct branch
Putting the files to the correct branch as said in the PR #276 .
2021-07-14 22:32:37 -03:00
Cesar Alvarez Vallero
2c25daed50
Remove unnecessary piping inside jq command
Same as: #273
2021-07-14 22:28:38 -03:00
Shannon Appelcline
013b27c9d2
Merge pull request #274 from KoreaComK/chapter-05-translated-reviewed
Chapter 05 translated reviewed - Portuguese
2021-07-14 13:42:55 -10:00
Shannon Appelcline
7fac0c0594
Merge pull request #275 from icculp/scripts_issue_23
updating logs for consistency with scripts
2021-07-14 13:36:54 -10:00
Shannon Appelcline
a85ec0afe6
Merge pull request #273 from csralvall/fix-06_2
Remove unnecessary piping inside jq command
2021-07-14 13:35:47 -10:00
Shannon Appelcline
f6e6dcfefa
Merge pull request #271 from csralvall/fix-04_6
Add missing flag to bitcoin-cli command
2021-07-14 13:35:06 -10:00
Shannon Appelcline
cf626c2125
Merge pull request #268 from csralvall/fix-readme
Replace command substitution by project name
2021-07-14 13:34:07 -10:00
Shannon Appelcline
59e7dcbe6c
Merge pull request #267 from officer47p/parsa/update/curl-params-for-createnewaddress-command
parsa/update/curl-params-for-createnewaddress-command
2021-07-14 13:33:33 -10:00
Shannon Appelcline
a5c061104c
Merge pull request #263 from javiervargas/patch-2
Fix Links
2021-07-14 13:32:17 -10:00
Ian Culp
37275e39b8
updating logs for consistency with scripts
https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts/issues/23
2021-07-14 11:38:21 -05:00
Shannon Appelcline
4b3dc0d2cd
updated referral link 2021-07-13 09:31:56 -10:00
Shannon Appelcline
613047b5d7
Update 02_1_Setting_Up_a_Bitcoin-Core_VPS_with_StackScript.md 2021-07-13 09:31:30 -10:00
Shannon Appelcline
13393d2809
referral update
added info on increased values from referral link
2021-07-13 08:52:49 -10:00
KoreaComK
74a37d065a
Merge pull request #2 from hgrams/chapter-05-translate-review
Chapter 05 translate review - By Hgrams
2021-07-13 15:17:54 -03:00
hgrams
89288a1b58 finish review 2021-07-13 17:10:13 -01:00
Cesar Alvarez Vallero
d1b35cd4ab
Remove unnecessary piping inside jq command 2021-07-12 22:46:22 -03:00
Ian Culp
f772dd069f
restarting pc, committing progress 2021-07-12 09:57:19 -05:00
Cesar Alvarez Vallero
65f8cf6ceb
Add missing flag to bitcoin-cli command 2021-07-12 10:29:09 -03:00
Ian Culp
c9127e47ef
fixing typos 2021-07-10 00:13:56 -05:00
Ian Culp
b3d06253cc
chapter 10.4 translated 2021-07-09 23:50:54 -05:00
Cesar Alvarez Vallero
6dc97de117
Replace command substitution by project name 2021-07-09 16:02:23 -03:00
Parsa Hosseini
17a3735e73 Fix a code block in get information section. 2021-07-09 23:20:24 +04:30
Parsa Hosseini
e1ef3c8467 Fix typo 2021-07-09 22:36:24 +04:30
Parsa Hosseini
c242393c5e Fix typo 2021-07-09 22:34:46 +04:30
Parsa Hosseini
51c232f841 Change parameters in create address section. 2021-07-09 22:29:11 +04:30
Ian Culp
e29aef1cf6
corrections for lines 72, 74, 82 2021-07-08 23:48:47 -05:00
Ian Culp
901f531695
corrections for lines 1, 10, 20, 40, 44, 83, 85, 89, 95, 99 2021-07-08 23:40:07 -05:00
Ian Culp
7e7fee1634
corrections for lines 13, 45, 58x2, 154, 158, 170x2, 176 2021-07-08 21:17:40 -05:00
KoreaComK
004fb7a88e Finished traslation chapter 7 2021-07-08 09:03:02 -03:00
Javier Vargas
5031312d78
Fix Links 2021-07-07 15:39:24 +02:00
Ian Culp
e1cf5d398b
chapter 10.3 translated, pending review 2021-07-06 23:11:47 -05:00
Shannon Appelcline
1e5aef6014
Merge pull request #260 from icculp/patch-9
fixing typo
2021-07-06 08:55:20 -10:00
Shannon Appelcline
f04e857436
Merge pull request #261 from icculp/cla
signed CLA and updating project link in CLA.md template
2021-07-06 08:54:56 -10:00
Shannon Appelcline
f113a2c81a
Merge pull request #255 from ndalliard/fix-links
fix chapter links
2021-07-06 08:54:25 -10:00
Shannon Appelcline
2c61577e55
Merge pull request #246 from KoreaComK/chapter04
Chapter 04 Translated by @koreacomk review made by @namcios
2021-07-06 08:52:51 -10:00
nathanael
57add3eed8 found more 2021-07-04 11:23:28 +02:00
Ian Culp
7c8062c700
chapter 10.2 translated, pending review 2021-07-03 15:36:22 -05:00
Ian Culp
f8086fee46
space in the 2021-07-03 13:29:10 -05:00
Ian Culp
f3f6b808c6
signed CLA with updated info 2021-07-03 17:42:58 +00:00
Ian Culp
de6631877e
resigning with SHA256 digest (cuz bitcoin) 2021-07-03 17:40:32 +00:00
Ian Culp
77ee6d0e6d
updating project link in CLA template 2021-07-03 17:33:58 +00:00
Ian Culp
de33c0fb30
resigning fixed 2021-07-03 17:31:45 +00:00
Ian Culp
a746f261fd
Adding signed CLA 2021-07-03 17:28:26 +00:00
Ian Culp
ece0a7f774
fixing typo 2021-07-03 11:42:38 -05:00
Ian Culp
01faf540ca
fixing typos 2021-07-02 23:27:04 -05:00
Ian Culp
587f25eb3b
capitalization, multifirma 2021-07-02 23:13:05 -05:00
Ian Culp
4033e5adbf
chapter 10.1 translated, pending review 2021-07-02 23:09:54 -05:00
nathanael
933ed49f94 fix chapter links 2021-07-02 22:18:44 +02:00
KoreaComK
463e1570ea Finished translation of chapter 06 2021-07-02 09:42:44 -03:00
KoreaComK
5c4265cb90
Merge pull request #1 from namcios/koreacomk-chapter04
Review Chapter 04
2021-07-01 17:46:15 -03:00
namcios
30112af2ea
Review 04_6 2021-07-01 17:20:22 -03:00
namcios
676f753b68
Review 04_5 2021-07-01 17:00:12 -03:00
namcios
2dcf2b9d60
Review 04_4_Interlude 2021-07-01 16:50:03 -03:00
KoreaComK
53230f69c9 Finished translation of Chapter 5 2021-07-01 16:06:30 -03:00
namcios
eb78a37ffc
Review 04_4 2021-07-01 11:35:29 -03:00
Shannon Appelcline
e2543d64b3
Merge pull request #250 from csralvall/master
Fix indexing typos
2021-06-30 14:30:21 -10:00
Shannon Appelcline
072a9f7ade
Merge pull request #249 from namcios/portuguese-translation
Add translated README in Portuguese
2021-06-30 14:28:51 -10:00
Shannon Appelcline
c97b2d8b7c
Merge pull request #245 from lukedevj/portuguese-translation-chapter-03
Chapter 3 Translated
2021-06-30 14:23:35 -10:00
Shannon Appelcline
2d1aab54e8
Merge branch 'prayank23-i2p' 2021-06-30 14:20:06 -10:00
Shannon Appelcline
a40a2005ea
Merge branch 'i2p' of https://github.com/prayank23/Learning-Bitcoin-from-the-Command-Line into prayank23-i2p 2021-06-30 14:19:22 -10:00
namcios
cac5dbc243
Review 04_3 2021-06-30 17:45:31 -03:00
namcios
b0e25e7a8e
Review 04_2__Interlude 2021-06-30 17:39:32 -03:00
namcios
36613e3451
Review 04_2 2021-06-30 16:44:42 -03:00
Ian Culp
6d2eca2940
chapter 10_0 translated, pending review 2021-06-30 14:21:19 -05:00
namcios
7f643a4478
Review 04_1 2021-06-30 16:20:11 -03:00
namcios
3fe95b214a
Review 04_0 2021-06-30 15:56:21 -03:00
namcios
a8de9d37fa Merge branch 'chapter04' of https://github.com/KoreaComK/Learning-Bitcoin-from-the-Command-Line into koreacomk-chapter04 2021-06-30 15:50:19 -03:00
namcios
5c4993d945 Merge branch 'portuguese-translation' of https://github.com/namcios/Learning-Bitcoin-from-the-Command-Line into portuguese-translation 2021-06-30 15:34:48 -03:00
namcios
5c0e764251
Merge branch 'BlockchainCommons:portuguese-translation' into portuguese-translation 2021-06-30 15:34:29 -03:00
namcios
aac7d4ed35 Merge branch 'portuguese-translation' of https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line into portuguese-translation 2021-06-30 15:33:06 -03:00
namcios
bab511d71e
Merge pull request #3 from namcios/portuguese-readme
Merge @lukedevj review
2021-06-30 15:10:08 -03:00
namcios
570ebb8cdf
Merge pull request #2 from namcios/lukedevj-portuguese-readme-reviewed
Merging Lukedevj changes
2021-06-30 15:06:52 -03:00
namcios
88c6a4e12b
Resolved merge conflicts, maintained spelled out numbers 2021-06-30 14:52:29 -03:00
Ian Culp
7231f589f8
implementing corrections for lines 15, 19, 121 2021-06-30 08:19:19 -05:00
Ian Culp
0aaaafb045
correction for line 7 2021-06-30 08:16:24 -05:00
Prayank
1bb7c04818 Add i2p
+ Rename Tor section to Privacy
+ Add i2p chapter in Privacy section
+ Change chapter numbers accordingly
+ Create `i2p_service.md`
+ Table for basic differences between Tor and i2p
+ Follow the same format for `15_0_Using_i2p.md` as used in Tor chapter
+ Add details in the steps used to create Bitcoin Core i2p service
2021-06-30 10:35:30 +05:30
Ian Culp
93e029caf3
chapter 09_2 translated, pending review 2021-06-29 18:03:31 -05:00
Ian Culp
4944a4f26e
implementing corrections for lines 32 and 80 2021-06-29 16:31:09 -05:00
Ian Culp
850132d000
Implementing corrections 2021-06-29 16:20:09 -05:00
Cesar Alvarez Vallero
7547e3dc99
Fix indexing typos
There were some inconsistencies about the indexing of the examples. In
some places the txid starting with "91261eaf..." was indexed with a 1,
but it was reported as the first element of the array returned by the
command `bitcoin-cli listunspent` (an array with index starting from 0)
and later, in the same chapter, the same txid was reported as the
element with index 0 of the array returned by the same command.

Searching in text the txid I deduced that the correct indexing for that
txid was 1. So I made changes accordingly.
2021-06-29 17:22:52 -03:00
Shannon Appelcline
0ca4a04ce6
Merge pull request #243 from KoreaComK/chapter15
Chapter 15 Translated by @koreacomk and revised by @lukedevj
2021-06-29 09:47:53 -10:00
Shannon Appelcline
3854c66540
Merge pull request #242 from KoreaComK/Chapter02
Chapter 02 Translated by @koreacomk and revised by @lukedevj
2021-06-29 09:47:18 -10:00
Shannon Appelcline
d90a85d012
Merge pull request #241 from KoreaComK/Chapter01
Chapter 01 Translated by @koreacomk and revised by @lukedevj
2021-06-29 09:46:05 -10:00
Shannon Appelcline
36b946f222
Merge pull request #248 from javiervargas/patch-2
Fix order and links
2021-06-29 08:43:25 -10:00
Shannon Appelcline
22dfbdb570
Merge pull request #240 from KoreaComK/CLA-Signed-KoreaComK
CLA signed by KoreaComK
2021-06-29 08:41:26 -10:00
Luke Pavksy
7a791e5e62
README.md reviewed 2021-06-29 15:27:10 -03:00
namcios
1f722ca941 Merge branch 'portuguese-readme' into portuguese-translation 2021-06-29 12:33:03 -03:00
namcios
797229d522
Add translated README 2021-06-29 12:27:15 -03:00
Javier Vargas
dc0446fb73
Fix order and links 2021-06-29 15:35:17 +02:00
Luke Pavksy
0301a292e1
Merge pull request #2 from KoreaComK/revisao-capitulo03
Revision of Chapter 03 Completed
2021-06-28 19:09:52 -03:00
Ian Culp
bc3431ea09
chapter 09_1 translated, pending review 2021-06-27 13:24:50 -05:00
KoreaComK
a0fcae116c Session 3.3 reviewed 2021-06-26 13:54:13 -03:00
KoreaComK
835aa32238 Session 3.3 reviewed 2021-06-26 12:53:51 -03:00
KoreaComK
db47d723b9 Session 3.2 reviewed 2021-06-26 12:45:21 -03:00
KoreaComK
2a062b6a93 Session 03.1 reviewed 2021-06-26 12:30:28 -03:00
KoreaComK
b1529ebb70 Chapter 3.0 Reviewed 2021-06-26 12:00:32 -03:00
KoreaComK
240f7ad010 Revert "Revisão da introdução"
This reverts commit 6ba639af994b6e4425cff8a7a0ecfeb2e5520f0d.
2021-06-26 11:57:57 -03:00
KoreaComK
6ba639af99 Revisão da introdução
Teste de revisão.
2021-06-26 11:56:27 -03:00
KoreaComK
cde0e237c3 Chapter 15 Translated
Translation : Finished
Revision : Needed
2021-06-26 11:30:51 -03:00
KoreaComK
9712478a77 Revert "Chapter 04 translated"
This reverts commit 8b3b5688505007c360cdc84ea6585c64f873da40.
2021-06-26 11:19:43 -03:00
KoreaComK
8b3b568850 Chapter 04 translated
Translation: Finished
Revision: Needed
2021-06-26 11:19:30 -03:00
Luke Pavksy
f82b60e419
Chapter 15 Translated wait for review 2021-06-25 19:48:15 -03:00
Ian Culp
286976dc4d
chapter 09_0 translated, pending review 2021-06-25 17:41:20 -05:00
KoreaComK
3d9d4eec19 Chapter 15 Translated
The four files were revised by @lukedevj in the closed PR (#224)
2021-06-24 21:44:30 -03:00
KoreaComK
2c321c21e9 Chapter 02 translated
The file was revised by @lukedevj in the closed PR (#224)
2021-06-24 21:42:10 -03:00
KoreaComK
8be593a08f Chapter 01 translated
The both files were revised by @lukedevj in the closed PR (https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/pull/224)
2021-06-24 21:34:18 -03:00
KoreaComK
f0bedd25c1 Contributor License Agreement Signed 2021-06-24 21:30:52 -03:00
Shannon Appelcline
ca46d48674
Merge pull request #237 from javiervargas/patch-1
Fix Link
2021-06-23 11:35:54 -10:00
Shannon Appelcline
2afd0d2679
Merge pull request #238 from namcios/namcios-agreement
Namcios agreement
2021-06-23 09:15:32 -10:00
namcios
5b467c817f
Fix email in Contributors Agreement 2021-06-23 16:01:22 -03:00
namcios
f26f691a2d
Sign Contributors Agreement 2021-06-23 15:57:00 -03:00
Javier Vargas
9c675f05b6
Fix Link
8.2 to 10.2 
08_2_Building_the_Structure_of_P2SH.md 404 error
2021-06-23 17:38:09 +02:00
Shannon Appelcline
d93085157b
added translation links 2021-06-22 09:32:50 -10:00
Shannon Appelcline
b0a37e21ee
Merge pull request #233 from lukedevj/portuguese-translation
Contributor License Agreement Assigned
2021-06-22 08:59:09 -10:00
Shannon Appelcline
c9f31b3b17
Merge pull request #230 from icculp/patch-8
removing ellipses
2021-06-22 08:57:55 -10:00
Shannon Appelcline
6ecdf65b29
Merge pull request #229 from icculp/patch-7
missing space
2021-06-22 08:57:22 -10:00
Shannon Appelcline
07a1e4bab6
added suggestion for a fork for each chapter. 2021-06-22 08:23:12 -10:00
Shannon Appelcline
703ba198e5
Merge pull request #225 from icculp/master
Translatable words counter and markdown-friendly table of counts
2021-06-22 08:19:57 -10:00
Ian Culp
baf06ca282
corrections on lines 9, 20, 82, 114, 122, 126 2021-06-22 10:47:14 -05:00
Ian Culp
5672610986
corrections on lines 21, 43, 45, 49, 72, 155, 203, 211 2021-06-22 10:40:06 -05:00
Ian Culp
15f106201f
cerdadero > verdadero 2021-06-22 10:29:40 -05:00
Ian Culp
e9c4af5bf0
chapter 05_3 translated, pending review 2021-06-21 09:24:45 -05:00
lukedevj
fbe0862054
Contributor License Agreement Assigned 2021-06-20 17:23:50 -03:00
Ian Culp
8e92ee0cc2
chapter 05_2 translated, ready for review 2021-06-19 19:53:04 -05:00
Ian Culp
cb074778f8
removing ellipses 2021-06-19 18:23:03 -05:00
Ian Culp
0fad79c78b
missing space 2021-06-19 18:21:23 -05:00
Ian Culp
6202e526b1
more formal audience addressing and typos 2021-06-19 15:41:50 -05:00
Ian Culp
b462f66564
translation of chapter 05_1 complete, pending review 2021-06-18 15:01:35 -05:00
Ian Culp
ae887c4193
chapter 05_0 translated and ready for review 2021-06-18 12:41:54 -05:00
Ian Culp
cbf889f4cb
typo in translatable 2021-06-16 23:05:17 -05:00
Ian Culp
9916b65adc Adding total to dataframe 2021-06-16 23:02:24 -05:00
Ian Culp
77aa33b5f9
Delete Chapter_word_count.ipynb 2021-06-16 22:48:42 -05:00
Ian Culp
d33808e68c
Delete word_count_old.ipynb 2021-06-16 22:47:31 -05:00
Ian Culp
56ff02ee75
Update Chapter_word_counts.md 2021-06-16 22:41:11 -05:00
Ian Culp
c5306f6885
Adding total to last row 2021-06-16 22:39:48 -05:00
Ian Culp
238d5b396d
Add files via upload 2021-06-16 22:17:13 -05:00
Ian Culp
0568399ecc Created using Colaboratory 2021-06-16 22:14:09 -05:00
Ian Culp
db2d05f870 Updated for markdown + edge cases 2021-06-16 21:34:56 -05:00
Ian Culp
ae7c0f6c21
Rename word_count.ipynb to word_count_old.ipynb 2021-06-16 21:33:52 -05:00
Ian Culp
2be84491cf
Merge branch 'BlockchainCommons:master' into master 2021-06-16 21:33:16 -05:00
Shannon Appelcline
a47fd6ef39
Update TRANSLATING.md 2021-06-16 15:21:29 -10:00
Shannon Appelcline
4fdae44c5c
updated to explain translation branch 2021-06-15 10:43:08 -10:00
Shannon Appelcline
c8aeb00d64
Create README.md 2021-06-15 10:37:02 -10:00
Shannon Appelcline
a84f1f7574
Create README.md 2021-06-15 10:35:31 -10:00
Shannon Appelcline
44b84b5998
Delete es directory 2021-06-15 10:34:12 -10:00
Shannon Appelcline
b5677ca649
Update TRANSLATING.md 2021-06-15 10:08:57 -10:00
Shannon Appelcline
c736c1ce77
Update TRANSLATING.md 2021-06-15 10:01:55 -10:00
Shannon Appelcline
1c0ca8ad32
Create README.md 2021-06-15 09:57:45 -10:00
Shannon Appelcline
f33d5539d8
Update TRANSLATING.md 2021-06-15 09:57:00 -10:00
Shannon Appelcline
e000664dd2
draft text 2021-06-15 09:47:22 -10:00
Shannon Appelcline
26ddb69bc8
Create TRANSLATING.md 2021-06-15 09:19:57 -10:00
Shannon Appelcline
5011902760
Update README.md 2021-06-15 09:13:38 -10:00
Shannon Appelcline
e8a45e5f05
Update README.md 2021-06-15 09:09:29 -10:00
Shannon Appelcline
0f9a7859e9
Update README.md 2021-06-15 09:07:34 -10:00
Shannon Appelcline
1a01a6d4bd
Merge pull request #220 from icculp/patch-6
amount consistency; faucet return; tx fees
2021-06-15 09:06:05 -10:00
Shannon Appelcline
ce86b71551
Merge pull request #219 from icculp/patch-3
minor grammatical fix
2021-06-15 09:04:57 -10:00
Shannon Appelcline
1841b699c9
Merge pull request #218 from icculp/patch-2
Fixing links to issues
2021-06-15 09:04:30 -10:00
Shannon Appelcline
a920060ed2
Merge pull request #217 from icculp/patch-1
Initial Setup, Step 4, increased clarity on version
2021-06-15 09:04:01 -10:00
Shannon Appelcline
daeb8bbe8b
Merge pull request #215 from ipa-tys/fix-url
fixed broken link to HWI usage docs
2021-06-15 09:00:28 -10:00
Shannon Appelcline
62ae49fd0b
Update TODO-30.md 2021-06-15 07:48:18 -10:00
Ian Culp
2674bdec2c
amount consistency; faucet return; tx fees
Since the amount below the #Examine Your Transaction amounts to 0.001, the command to send should be the same amount for consistency

Adding a note about faucet return to remind user to try to use the faucet return address of the faucet they used to receive transactions in the earlier portion of the tutorial, to help keep alive the faucet services.

Adding a note about adjusting amounts based on current balance and to account for the transaction fee.
2021-06-15 11:48:57 -05:00
Ian Culp
82c232c491
Update 02_1_Setting_Up_a_Bitcoin-Core_VPS_with_StackScript.md
minor grammatical fix
2021-06-14 16:21:12 -05:00
Ian Culp
aa1174727e
Fixing links to issues
First link takes to issues of a different repo; second link takes to github 404. Replacing links with working versions.
2021-06-13 12:11:35 -05:00
Ian Culp
a8516ee36e
Initial Setup, Step 4, increased clarity on version
It is not clear until chapter 3 that the remainder of the tutorial will assume we chose a pruned testnet. When I first did the setup I used a pruned mainnet, and thus by chapter 3 I had to rebuild the node so that I could better follow along. In retrospect it might seem apparent from the warning about using real funds in earlier paragraphs, but to reduce any confusion it should be elucidated here.
2021-06-13 11:54:35 -05:00
Tobias Sing
c4c2b0fb26 fixed broken link to HWI usage docs 2021-06-12 16:20:25 +02:00
Ian Culp
85df221a79 removing np import, re-running output 2021-06-11 21:27:53 -05:00
Ian Culp
098666fc68 Counts the words in each chapter, ignoring code blocks and digits 2021-06-11 21:25:11 -05:00
Shannon Appelcline
33ffbb490b
Merge pull request #212 from bubelov/patch-1
Simplify bitcoind restart example
2021-06-09 08:34:36 -10:00
Shannon Appelcline
48667a7bb6
Merge pull request #213 from prayank23/tor-v3
Replace Tor v2 address with v3
2021-06-09 08:33:55 -10:00
Prayank
7d1e793f0b Replace Tor v2 address with v3
+ add `rpcuser` in command used for RPC hidden service
+replace Tor v2 address with v3 for bitcoind
+ Mention Tor v2 support removal from Bitcoin Core
2021-06-09 19:59:14 +05:30
Igor Bubelov
a612ffb4c2
Simplify bitcoind restart example 2021-06-09 21:15:20 +07:00
Shannon Appelcline
82ca897286
Merge pull request #211 from tcharding/fixes-upto-end-of-ch9
Fixes chapters 7, 8, and 9
2021-06-08 08:42:11 -10:00
Tobin Harding
9df9904129
Remove ':note:', it does not render in markdown 2021-06-08 21:02:37 +10:00
Tobin Harding
80467579f9
Capitialise 'SegWit' instead of 'Segwit' 2021-06-08 21:02:37 +10:00
Tobin Harding
0d1070fd8f
Use 'through' instead of 'those' 2021-06-08 21:02:36 +10:00
Tobin Harding
dceb9b68cf
Use caps 'ALL' as in the scipt 2021-06-08 21:02:36 +10:00
Tobin Harding
5a9ba9c59b
Use past tense 'disapeared' 2021-06-08 21:02:36 +10:00
Tobin Harding
3b70f86c79
Use 'a 03' instead of 'an 03' 2021-06-08 21:01:07 +10:00
Tobin Harding
11ccda91f0
Use 'section' instead of 'Part' 2021-06-08 21:01:07 +10:00
Tobin Harding
f1bb218f43
Fix spelling of 'demonstrating' 2021-06-08 21:01:07 +10:00
Tobin Harding
7c8a226ea5
Use 'transaction' instead of 'transition' 2021-06-08 21:01:07 +10:00
Tobin Harding
ced4a14057
Fix two whitespace issues, add and remove 2021-06-08 21:01:06 +10:00
Tobin Harding
e733798af8
Fix typo 'addresse' -> 'addresses' 2021-06-08 21:01:06 +10:00
Tobin Harding
a5f978cb78
Use 'Linux' instead of 'UNIX'
OsX is UNIX, I think this is meant to read 'Linux' not 'UNIX'.
2021-06-08 21:01:06 +10:00
Tobin Harding
5575f96c00
Fix spelling of 'unintuitive' 2021-06-08 21:01:06 +10:00
Tobin Harding
facc43f1e0
Use 'progress' instead of 'process'
I believe the sentence should read '... while it is in progress ...' not
'... while it is in process ...'
2021-06-08 21:01:06 +10:00
Tobin Harding
224c0a7e42
Fix multiple typos in sentence
- Add a missing 'a'
- Fix spelling of 'maintaining'
2021-06-08 21:01:06 +10:00
Tobin Harding
488a3e915c
Use 'doesn't build' instead of 'doesn't built' 2021-06-08 21:01:05 +10:00
Tobin Harding
ddbd6e8909
Add missing 'a' 2021-06-08 21:01:05 +10:00
Tobin Harding
3137bc2ffe
Use 'optionally' instead of 'optional' 2021-06-08 21:01:05 +10:00
Tobin Harding
422d59807a
Pluralise 'turn' 2021-06-08 21:01:05 +10:00
Tobin Harding
3e5703907e
Use 'whom' instead of 'who' 2021-06-08 21:01:05 +10:00
Shannon Appelcline
060e1419b2
Merge pull request #210 from prayank23/get-info
Add `-getinfo`
2021-06-02 09:17:18 -10:00
Prayank
d73d4cc822 Add -getinfo 2021-06-02 18:20:42 +05:30
Shannon Appelcline
a398b0c72c
Merge pull request #208 from grunch/fixes-typos
Fixes typos
2021-06-01 12:22:39 -10:00
Shannon Appelcline
a344a65520
Merge pull request #209 from tcharding/fixes-upto-end-of-ch6
Fixes upto end of ch6
2021-06-01 12:22:03 -10:00
Tobin Harding
5ae223897f
Use SegWit instead of Bitcoin
Fix typo, this is meant to read 'so how do you send a SegWit
transaction' ... I think.
2021-06-01 18:08:14 +10:00
Tobin Harding
10d22f6e96
Add full stop to end of sentence 2021-06-01 18:08:14 +10:00
Tobin Harding
cbd715a293
Add 'of' to sentence 2021-06-01 18:08:14 +10:00
Francisco Calderón
d4f8a19bc5 Fixes typos
s/hexidecimal/hexadecimal/g
also replace bit for byte in a particular sentence
2021-05-29 17:13:39 -03:00
Shannon Appelcline
f739de85d5
Merge pull request #207 from hienphan1472/patch-1
Correct Typo
2021-05-26 13:12:26 -10:00
Hien Phan
873c5f946f
Correct Typo 2021-05-25 15:27:34 +07:00
Shannon Appelcline
798e3911f0
Merge pull request #206 from technoprobic/18_1_Verifying_Your_Lightning_Setup_verify_node_revisions
Revise instructions in Verify your Node section to include testnet parameter
2021-05-19 14:59:26 -10:00
Shannon Appelcline
6b451ae7f6
Merge pull request #205 from felipegontijo/felipegontijo-patch-2
Fix typos, links and icons on Chapters 6 and 7
2021-05-19 14:58:56 -10:00
Shannon Appelcline
c43f9fa982
Update TODO-30.md 2021-05-18 08:11:46 -10:00
Techno Probic
4bd351fdbb Revise instructions in Verify your Node section to include testnet parameter 2021-05-05 20:59:49 -05:00
Shannon Appelcline
d89669325a
Update TODO-30.md 2021-05-04 09:36:39 -10:00
Felipe
1b8ef8c39f
chore: Fix icons and typo
Fix two icons and remove a word. No substantial changes made
2021-04-27 12:01:43 -03:00
Felipe
391b10382b
chore: Fix link
Fix missing ref in link
2021-04-23 09:45:48 -03:00
Felipe
1c29b87fda
chore: Fix typo 2021-04-22 10:53:30 -03:00
Shannon Appelcline
fc24e48c84
Merge pull request #201 from keblek/patch-15
Added `as`
2021-04-21 12:10:06 -10:00
Shannon Appelcline
f70e474a9c
Merge pull request #200 from keblek/patch-14
Lowercase c in BitCoin
2021-04-21 12:09:31 -10:00
Shannon Appelcline
c5d0ef1f99
Merge pull request #203 from felipegontijo/felipegontijo-patch-1
chore: Fix a couple of typos
2021-04-21 12:08:05 -10:00
Felipe
d9fdeab142
chore: Fix a couple of typos
Minor fix of a couple of typos, no substantial change
2021-04-21 09:52:11 -03:00
keblek
47dacdd84b
Added as
makes the sentence flow
2021-03-23 08:38:26 +01:00
keblek
d34c187e2a
Lowercase c in BitCoin 2021-03-19 17:58:17 +01:00
Shannon Appelcline
266d7e13a3
Update TODO-30.md 2021-02-24 09:07:40 -10:00
Shannon Appelcline
16980cbd04
Merge pull request #198 from kiano0sh/patch-2
Update 03_1_Verifying_Your_Bitcoin_Setup.md
2021-02-24 07:54:09 -10:00
Kianoosh Hooshmand
f424bd5370
Update 03_1_Verifying_Your_Bitcoin_Setup.md
Extra `> ` at defining `btcblock` alias, causing it to fail when executing the alias.
2021-02-24 18:21:25 +01:00
Shannon Appelcline
25d8852244
Merge pull request #196 from jerzybrzoska/patch-2
03_1_Verifying_Your_Bitcoin_Setup.md: Added .bashrc and .profile as o…
2021-02-23 14:12:51 -10:00
Shannon Appelcline
c27f2b638c
Merge pull request #195 from dimitris-t/patch-1
Fixed typos in A3_0_Using_Bitcoin_Regtest.md
2021-02-23 14:12:21 -10:00
Shannon Appelcline
9ff63a4a66
Merge pull request #197 from leonardojobim/patch-6
Update A3_0_Using_Bitcoin_Regtest for Bitcoin Core version 0.21
2021-02-23 14:11:41 -10:00
leonardojobim
ad0a09329d
Update A3_0_Using_Bitcoin_Regtest for version 0.21
. It adds a " Generate Regtest Wallet" since Bitcoin Core v.021 does not automatically create new wallets on startup.
If the reader try to mine without a wallet, it will receive the erro: "No wallet is loaded. Load a wallet using loadwallet or create a new one with createwallet. (Note: A default wallet is no longer automatically created)" 

. The command "bitcoin-cli -regtest generate" throws the error: " generate has been replaced by the -generate cli option.". So it fixes the command.

. "bitcoin-cli -regtest sendtoaddress" throws the error: "Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or enable -fallbackfee.", so the "fallbackfee." is added to the bitcoind startup.
2021-02-23 00:40:23 -03:00
jerzybrzoska
a9d592233c
03_1_Verifying_Your_Bitcoin_Setup.md: Added .bashrc and .profile as options along with .bash_profile
There is no `.bash_profile` on Debian. Irrespectively of the Linux distro `.bashrc` is likely to be the file where most Linux users place there aliases.
2021-02-15 10:04:10 +01:00
Dimitris Tsapakidis
04efed7974
Fixed typos in A3_0_Using_Bitcoin_Regtest.md
Fixed typos.
2021-02-13 02:23:23 +02:00
Shannon Appelcline
5ac748e82f
removed transparency 2021-02-03 14:39:32 -10:00
Shannon Appelcline
d59a049c7c
Merge pull request #193 from yojoots/typo-fixes
Fix multiple typos
2021-01-26 20:04:25 -10:00
Justin Hanneman
0ac9fb0ca2 Fix multiple typos 2021-01-26 20:19:37 -06:00
Shannon Appelcline
63954f440e
Merge pull request #191 from xxi000000/patch-2
Minor fixes in 3.4
2021-01-13 07:39:49 -10:00
Shannon Appelcline
fcb294b17e
Merge pull request #192 from xxi000000/patch-3
Minor fixes in 4.2
2021-01-13 07:39:16 -10:00
XXI
d8babd752c
Minor fixes in 4.2 2021-01-13 07:48:12 -05:00
Shannon Appelcline
cd0678c249
Update README.md 2021-01-06 09:16:10 -10:00
Shannon Appelcline
2254cb8c7b
simple psbt example 2021-01-06 08:52:00 -10:00
Shannon Appelcline
866e9cdb71
Update TODO-30.md 2021-01-06 08:49:27 -10:00
XXI
30fe0c1cab
Minor fixes in 3.4 2021-01-06 06:43:59 -05:00
Shannon Appelcline
6097d8e11a
Now grab the USER and PASS just before using them 2021-01-05 09:17:30 -10:00
Shannon Appelcline
d28c5a6db0
added missing $ for command-line command 2021-01-05 08:59:09 -10:00
Shannon Appelcline
d7ed97274a
more clarifications and fixes for config 2021-01-05 08:54:04 -10:00
Shannon Appelcline
5f989f0833
clarification on restarting 2021-01-05 08:49:14 -10:00
Shannon Appelcline
de28f0c6cd
clarification on adding to bitcoin.conf file 2021-01-05 08:46:04 -10:00
Shannon Appelcline
9aafcb04d6
added missing sudo 2021-01-05 08:39:38 -10:00
Shannon Appelcline
9c901c3054
Delete bitcoin-cli-commands-help.md 2021-01-05 08:16:50 -10:00
Shannon Appelcline
b8c7da9529
removed referenced to prior version. 2021-01-05 07:56:55 -10:00
Shannon Appelcline
e015cd475e
Merge pull request #189 from ndalliard/fix-typo
fix typo
2021-01-05 07:54:53 -10:00
Shannon Appelcline
5e114757a5
Merge pull request #190 from xxi000000/patch-1
Add missing space in 3.3
2021-01-05 07:54:15 -10:00
XXI
a8a344f583
Add missing space in 3.3 2021-01-05 09:25:32 -05:00
Nathanael Dalliard
7b2705e9a3 fix typo 2021-01-05 08:57:46 +01:00
Christopher Allen
cf83300fba
Added 3.0 todo item for animated GIFs of CLI 2020-12-26 13:23:33 -08:00
Shannon Appelcline
b9713a8e2e
Merge pull request #182 from dimitris-t/dimitris-t-patch-1
Fixed typos
2020-12-22 15:28:52 -10:00
Shannon Appelcline
60ee4bb655
Merge pull request #184 from timgates42/bugfix_typo_transaction
docs: fix simple typo, tranaction -> transaction
2020-12-22 15:28:13 -10:00
Shannon Appelcline
3ce394a327
Merge pull request #187 from kiano0sh/patch-1
Update 02_1_Setting_Up_a_Bitcoin-Core_VPS_with_StackScript.md
2020-12-22 15:27:48 -10:00
Shannon Appelcline
b9ffcd22d1
Merge pull request #188 from javiervargas/patch-18
Fix typo
2020-12-22 15:27:16 -10:00
Shannon Appelcline
99a3fc2a72
Update TODO-30.md 2020-12-16 10:05:23 -10:00
Shannon Appelcline
b5eeee69ab
updated status 2020-12-16 10:04:30 -10:00
Javier Vargas
ad56f04a27
Fix typo 2020-12-14 18:57:10 +01:00
Kianoosh Hooshmand
e95dede691
Update 02_1_Setting_Up_a_Bitcoin-Core_VPS_with_StackScript.md
Removed extra `find`
2020-12-10 23:18:54 +03:30
Shannon Appelcline
f9ec4c958f
added authors per new template 2020-12-08 14:09:21 -10:00
Tim Gates
43ca374e4b
docs: fix simple typo, tranaction -> transaction
There is a small typo in 04_6_Creating_a_Segwit_Transaction.md, 11_3_Using_CSV_in_Scripts.md.

Should read `transaction` rather than `tranaction`.
2020-11-29 10:05:29 +11:00
Shannon Appelcline
0a27bda86f
more variants 2020-11-10 07:48:07 -10:00
Dimitris Tsapakidis
cd341da0a6
Update 02_2_Setting_Up_Bitcoin_Core_Other.md 2020-11-07 01:50:41 +02:00
Dimitris Tsapakidis
0093975bb8
Update 02_1_Setting_Up_a_Bitcoin-Core_VPS_with_StackScript.md 2020-11-07 01:49:40 +02:00
Dimitris Tsapakidis
cda172c521
Update 01_1_Introducing_Bitcoin.md 2020-11-07 01:44:58 +02:00
Dimitris Tsapakidis
87c141c2f3
Update 01_0_Introduction.md 2020-11-07 01:39:44 +02:00
342 changed files with 37991 additions and 1198 deletions

View File

@ -8,9 +8,9 @@ These centralization risks were some of the prime catalysts behind the creation
If you're one of those entrepreneurs or developers, then this course is for you, because it's all about learning to program Bitcoin. It's an introductory course that explains all the nuances and features of Bitcoin as it goes. It also takes a very specific tack, by offering lessons in how to work _directly_ with Bitcoin Core and with the c-lightning server using their RPC interfaces. If you're one of those entrepreneurs or developers, then this course is for you, because it's all about learning to program Bitcoin. It's an introductory course that explains all the nuances and features of Bitcoin as it goes. It also takes a very specific tack, by offering lessons in how to work _directly_ with Bitcoin Core and with the c-lightning server using their RPC interfaces.
Why not use some of the more fully featured libraries found in various programming languages? Why not create your own from scratch? It's because working with cryptocurrency is dangerous. There are no safety nets. If you accidentally overpay your fees or lose a signing key or create an invalid transaction or make any number of potential mistakes, then your cryptocurrency will been gone forever. Much of that responsibility will, of course, lie with you as a cryptocurrency programmer, but it can be minimized by working with the most robust, secure, and safe cryptocurrency interfaces around, the ones created by the cryptocurrency programming teams themselves: ``bitcoind`` and ``lightningd``. Why not use some of the more fully featured libraries found in various programming languages? Why not create your own from scratch? It's because working with cryptocurrency is dangerous. There are no safety nets. If you accidentally overpay your fees or lose a signing key or create an invalid transaction or make any number of potential mistakes, then your cryptocurrency will be gone forever. Much of that responsibility will, of course, lie with you as a cryptocurrency programmer, but it can be minimized by working with the most robust, secure, and safe cryptocurrency interfaces around, the ones created by the cryptocurrency programming teams themselves: ``bitcoind`` and ``lightningd``.
Much of this book thus discusses how to script Bitcoin (and Lightning) directly from the command line. Some later chapters deals with more sophisticated programming languages, but again they continue to interact directly with the ``bitcoind`` and ``lightningd`` daemons by using RPC or by interacting with the files they create. This allows you to stand on the shoulders of giants and use their trusted technology to learn how to create your own trusted systems. Much of this book thus discusses how to script Bitcoin (and Lightning) directly from the command line. Some later chapters deal with more sophisticated programming languages, but again they continue to interact directly with the ``bitcoind`` and ``lightningd`` daemons by using RPC or by interacting with the files they create. This allows you to stand on the shoulders of giants and use their trusted technology to learn how to create your own trusted systems.
## Required Skill Level ## Required Skill Level
@ -40,10 +40,10 @@ If you have different levels of skill or want to learn different things, you mig
* If you've already got a Bitcoin environment ready to be used, jump to [Chapter Three: Understanding Your Bitcoin Setup](03_0_Understanding_Your_Bitcoin_Setup.md). * If you've already got a Bitcoin environment ready to be used, jump to [Chapter Three: Understanding Your Bitcoin Setup](03_0_Understanding_Your_Bitcoin_Setup.md).
* If you only care about Bitcoin scripting, jump to [Chapter Nine: Introducing Bitcoin Scripts](09_0_Introducing_Bitcoin_Scripts.md). * If you only care about Bitcoin scripting, jump to [Chapter Nine: Introducing Bitcoin Scripts](09_0_Introducing_Bitcoin_Scripts.md).
* If you just want to read about using programming languages, jump to [Chapter Fifteen: Talking to Bitcoin](15_0_Talking_to_Bitcoind.md). * If you just want to read about using programming languages, jump to [Chapter Sixteen: Talking to Bitcoin](16_0_Talking_to_Bitcoind.md).
* If you conversely don't want to do any programming, definitely skip chapters 15-17 while you're reading, and perhaps skip chapters 9-13. The rest of the course should still make sense without them. * If you conversely don't want to do any programming, definitely skip chapters 15-17 while you're reading, and perhaps skip chapters 9-13. The rest of the course should still make sense without them.
* If you are only interested in Lightning, zap over to [Chapter Eighteen: Understanding Your Lightning Setup](18_0_Understanding_Your_Lightning_Setup.md). * If you are only interested in Lightning, zap over to [Chapter Nineteen: Understanding Your Lightning Setup](19_0_Understanding_Your_Lightning_Setup.md).
* If you want to read the major new content added for v2 of the course (2020), following on v1 (2017), read [§3.5: Understanding the Descriptor](03_5_Understanding_the_Descriptor.md), [§4.6: Creating a SegWit Transaction](04_6_Creating_a_Segwit_Transaction.md), [Chapter 7: Expanding Bitcoin with PSBTs](07_0_Expanding_Bitcoin_Transactions_PSBTs.md), [§9.5: Scripting a P2WPKH](09_5_Scripting_a_P2WPKH.md), [§10.5: Scripting a SegWit Script](10_5_Scripting_a_Segwit_Script.md), [Chapter 14: Using Tor](14_0_Using_Tor.md), [Chapter 15: Talking to Bitcoind with C](15_0_Talking_to_Bitcoind.md), [Chapter 16: Programming with Libwally](16_0_Programming_with_Libwally.md), [Chapter Seventeen: Talking to Bitcoind with Other Languages](17_0_Talking_to_Bitcoind_Other.md), [Chapter Eighteen: Understanding ](18_0_Understanding_Your_Lightning_Setup.md), and [Chapter Nineteen: Using Lightning](19_0_Using_Lightning.md). * If you want to read the major new content added for v2 of the course (2020), following on v1 (2017), read [§3.5: Understanding the Descriptor](03_5_Understanding_the_Descriptor.md), [§4.6: Creating a SegWit Transaction](04_6_Creating_a_Segwit_Transaction.md), [Chapter 7: Expanding Bitcoin with PSBTs](07_0_Expanding_Bitcoin_Transactions_PSBTs.md), [§9.5: Scripting a P2WPKH](09_5_Scripting_a_P2WPKH.md), [§10.5: Scripting a SegWit Script](10_5_Scripting_a_Segwit_Script.md), [Chapter 14: Using Tor](14_0_Using_Tor.md), [Chapter 15: Using i2p](15_0_Using_i2p.md), [Chapter 16: Talking to Bitcoind with C](16_0_Talking_to_Bitcoind.md), [Chapter 17: Programming with Libwally](17_0_Programming_with_Libwally.md), [Chapter 18: Talking to Bitcoind with Other Languages](18_0_Talking_to_Bitcoind_Other.md), [Chapter 19: Understanding Your Lighting Setup](19_0_Understanding_Your_Lightning_Setup.md), and [Chapter 20: Using Lightning](20_0_Using_Lightning.md).
## Why to Use this Course ## Why to Use this Course

View File

@ -6,7 +6,7 @@ Before you can get started programming Bitcoin (and Lightning), you should have
Bitcoin is a programmatic system that allows for the transfer of the bitcoin currency. It is enabled by a decentralized, peer-to-peer system of nodes, which include full nodes, wallets, and miners. Working together, they ensure that bitcoin transactions are fast and non-repudiable. Thanks to the decentralized nature of the system, these transactions are also censor-resistant and can provide other advantages such as pseudonymity and non-correlation if used well. Bitcoin is a programmatic system that allows for the transfer of the bitcoin currency. It is enabled by a decentralized, peer-to-peer system of nodes, which include full nodes, wallets, and miners. Working together, they ensure that bitcoin transactions are fast and non-repudiable. Thanks to the decentralized nature of the system, these transactions are also censor-resistant and can provide other advantages such as pseudonymity and non-correlation if used well.
Obviously, Bitcoin is the heart of this book, but it's also the originator of many other systems, including blockchains and Lightning, which are both detailed in this tutorial, and many other cryptocurrencies such as Ethereum and Litecoins, which are not. Obviously, Bitcoin is the heart of this book, but it's also the originator of many other systems, including blockchains and Lightning, which are both detailed in this tutorial, and many other cryptocurrencies such as Ethereum and Litecoin, which are not.
**_How Are Coins Transferred?_** Bitcoin currency isn't physical coins. Instead it's an endless series of ownership reassignments. When one person sends coins to another, that transfer is stored as a transaction. It's the transaction that actually records the ownership of the money, not any token local to the owner's wallet or their machine. **_How Are Coins Transferred?_** Bitcoin currency isn't physical coins. Instead it's an endless series of ownership reassignments. When one person sends coins to another, that transfer is stored as a transaction. It's the transaction that actually records the ownership of the money, not any token local to the owner's wallet or their machine.
@ -56,11 +56,11 @@ ECC does not receive much attention in this tutorial. That's because this tutori
**_What is an Elliptic Curve?_** An elliptic curve is a geometric curve that takes the form `y`<sup>`2`</sup> = `x`<sup>`3`</sup>` + ax + b`. A specific elliptic curve is chosen by selecting specific values of `a` and `b`. The curve must then be carefully examined to determine if it works well for cryptography. For example, the secp256k1 curve used by Bitcoin is defined as `a=0` and `b=7`. **_What is an Elliptic Curve?_** An elliptic curve is a geometric curve that takes the form `y`<sup>`2`</sup> = `x`<sup>`3`</sup>` + ax + b`. A specific elliptic curve is chosen by selecting specific values of `a` and `b`. The curve must then be carefully examined to determine if it works well for cryptography. For example, the secp256k1 curve used by Bitcoin is defined as `a=0` and `b=7`.
Any line that intersects an elliptic curve will do so at either 1 or 3 points ... and that's the basis of elliptic-curve cryptopgrahy. Any line that intersects an elliptic curve will do so at either 1 or 3 points ... and that's the basis of elliptic-curve cryptography.
**_What are Finite Fields?_** A finite field is a finite set of numbers, where all addition, subtraction, multiplication, and division is defined so that it results in other numbers also in the same finite field. One simple way to create a finite field is through the use of a modulo function. **_What are Finite Fields?_** A finite field is a finite set of numbers, where all addition, subtraction, multiplication, and division is defined so that it results in other numbers also in the same finite field. One simple way to create a finite field is through the use of a modulo function.
**_How is an Elliptic Curve Defined Over a Finite Field?_** An ellipitic curve defined over a finite field has all of the points on its curve drawn from a specific finite field. This takes the form: `y`<sup>`2`</sup> `% field-size = (x`<sup>`3`</sup>` + ax + b) % field-size` The finite field used for secp256k1 is `2`<sup>`256`</sup>` - 2`<sup>`32`</sup>` - 2`<sup>`9`</sup>` - 2`<sup>`8`</sup>` - 2`<sup>`7`</sup>` - 2`<sup>`6`</sup>` - 2`<sup>`4`</sup>` - 1`. **_How is an Elliptic Curve Defined Over a Finite Field?_** An elliptic curve defined over a finite field has all of the points on its curve drawn from a specific finite field. This takes the form: `y`<sup>`2`</sup> `% field-size = (x`<sup>`3`</sup>` + ax + b) % field-size` The finite field used for secp256k1 is `2`<sup>`256`</sup>` - 2`<sup>`32`</sup>` - 2`<sup>`9`</sup>` - 2`<sup>`8`</sup>` - 2`<sup>`7`</sup>` - 2`<sup>`6`</sup>` - 2`<sup>`4`</sup>` - 1`.
**_How Are Elliptic Curves Used in Cryptography?_** In elliptic-curve cryptography, a user selects a very large (256-bit) number as his private key. He then adds a set base point on the curve to itself that many times. (In secp256k1, the base point is `G = 04 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798 483ADA77 26A3C465 5DA4FBFC 0E1108A8 FD17B448 A6855419 9C47D08F FB10D4B8`, which prefixes the two parts of the tuple with an `04` to say that the data point is in uncompressed form. If you prefer a straight geometric definition, it's the point "0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798,0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8") The resultant number is the public key. Various mathematical formula can then be used to prove ownership of the public key, given the private key. As with any cryptographic function, this one is a trap door: it's easy to go from private key to public key and largely impossible to go from public key to private key. **_How Are Elliptic Curves Used in Cryptography?_** In elliptic-curve cryptography, a user selects a very large (256-bit) number as his private key. He then adds a set base point on the curve to itself that many times. (In secp256k1, the base point is `G = 04 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798 483ADA77 26A3C465 5DA4FBFC 0E1108A8 FD17B448 A6855419 9C47D08F FB10D4B8`, which prefixes the two parts of the tuple with an `04` to say that the data point is in uncompressed form. If you prefer a straight geometric definition, it's the point "0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798,0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8") The resultant number is the public key. Various mathematical formula can then be used to prove ownership of the public key, given the private key. As with any cryptographic function, this one is a trap door: it's easy to go from private key to public key and largely impossible to go from public key to private key.

View File

@ -1,6 +1,6 @@
# 2.1: Setting Up a Bitcoin-Core VPS with Bitcoin Standup # 2.1: Setting Up a Bitcoin-Core VPS with Bitcoin Standup
This document explains how to set up a VPS (Virtual Private Sever) to run a Bitcoin node on Linode.com, installed using an automated StackScript from the [Bitcoin Standup project](https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts). You just need to enter a few commands and boot your VPS. Almost immediately after you boot, you'll find find your new Bitcoin node happily downloading blocks. This document explains how to set up a VPS (Virtual Private Sever) to run a Bitcoin node on Linode.com, installed using an automated StackScript from the [Bitcoin Standup project](https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts). You just need to enter a few commands and boot your VPS. Almost immediately after you boot, you'll find your new Bitcoin node happily downloading blocks.
> :warning: **WARNING:** Dont use a VPS for a bitcoin wallet with significant real funds; see http://blog.thestateofme.com/2012/03/03/lessons-to-be-learned-from-the-linode-bitcoin-incident/ . It is very nice to be able experiment with real bitcoin transactions on a live node without tying up a self-hosted server on a local network. It's also useful to be able to use an iPhone or iPad to communicate via SSH to your VPS to do some simple bitcoin tasks. But a higher level of safety is required for significant funds. > :warning: **WARNING:** Dont use a VPS for a bitcoin wallet with significant real funds; see http://blog.thestateofme.com/2012/03/03/lessons-to-be-learned-from-the-linode-bitcoin-incident/ . It is very nice to be able experiment with real bitcoin transactions on a live node without tying up a self-hosted server on a local network. It's also useful to be able to use an iPhone or iPad to communicate via SSH to your VPS to do some simple bitcoin tasks. But a higher level of safety is required for significant funds.
@ -20,11 +20,9 @@ You can create a Linode account by going here:
https://www.linode.com https://www.linode.com
``` ```
If you prefer, the following referral code will give you about a months worth of free usage, great for learning Bitcoin: If you prefer, the following referral code will give you two months worth of free usage (up to $100), great for learning Bitcoin:
``` [https://www.linode.com/?r=3c7fa15a78407c9a3d4aefb027539db2557b3765](https://www.linode.com/?r=3c7fa15a78407c9a3d4aefb027539db2557b3765)
https://www.linode.com/?r=23211828bc517e2cb36e0ca81b91cc8c0e1b2d96
```
You'll need to provide an email address and later preload money from a credit card or PayPal for future costs. You'll need to provide an email address and later preload money from a credit card or PayPal for future costs.
@ -38,7 +36,7 @@ Your server security won't be complete if people can break into your Linode acco
### Load the StackScript ### Load the StackScript
Download the [Linode Standup Script](https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts/blob/master/Scripts/LinodeStandUp.sh) from the [Bitcoin Standup Scripts repo](https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts). This script basically automates the Bitcoin VPS setup instructions from [§2.1](02_1_Setting_Up_a_Bitcoin-Core_VPS_by_Hand.md). If you want to be particulary prudent, read it over carefully. If you are satisfied, you can copy that StackScript into your own account by going to the [Stackscripts page](https://cloud.linode.com/stackscripts?type=account) on your Linode account and selecting to [Create New Stackscript](https://cloud.linode.com/stackscripts/create). Give it a good name (we use `Bitcoin Standup`), then copy and paste the script. Choose Debian 10 for your target image and "Save" it. Download the [Linode Standup Script](https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts/blob/master/Scripts/LinodeStandUp.sh) from the [Bitcoin Standup Scripts repo](https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts). This script basically automates all Bitcoin VPS setup instructions. If you want to be particulary prudent, read it over carefully. If you are satisfied, you can copy that StackScript into your own account by going to the [Stackscripts page](https://cloud.linode.com/stackscripts?type=account) on your Linode account and selecting to [Create New Stackscript](https://cloud.linode.com/stackscripts/create). Give it a good name (we use `Bitcoin Standup`), then copy and paste the script. Choose Debian 12 for your target image and "Save" it.
### Do the Initial Setup ### Do the Initial Setup
@ -49,35 +47,32 @@ You're now ready to create a node based on the Stackscript.
* **Short Hostname.** Pick a name for your VPS. For example, "mybtctest". * **Short Hostname.** Pick a name for your VPS. For example, "mybtctest".
* **Fully Qualified Hostname.** If you're going to include this VPS as part of a network with full DNS records, type in the hostname with its domain. For example, "mybtctest.mydomain.com". Otherwise, just repeat the short hostname and add ".local", for example "mybtctest.local". * **Fully Qualified Hostname.** If you're going to include this VPS as part of a network with full DNS records, type in the hostname with its domain. For example, "mybtctest.mydomain.com". Otherwise, just repeat the short hostname and add ".local", for example "mybtctest.local".
3. Enter the password for the "standup" user. 3. Enter the password for the "standup" user.
4. Choose an Installation Type in the advanced options. 4. Fill in the appropriate advanced options.
* **Installation Type.** This is likely "Mainnet" or "Pruned Mainnet" if you are setting up a node for usage and "Testnet" or "Pruned Testnet" if you're just playing around. See the [Synopsis](#synopsis-bitcoin-installation-types) for more information on these options. (Note that if you plan to try out the Lightning chapters, you'll probably want to use an Unpruned node, as working with Pruned nodes on Lightning is iffy. See [§18.1](18_1_Verifying_Your_Lightning_Setup.md#compiling-the-source-code) for the specifics.)
5. Fill in any other appropriate advanced options.
* **X25519 Public Key.** This is a public key to add to Tor's list of authorized clients. If you don't use it, anyone who gets the QR code for your node can access it. You'll get this public key from whichever client you're using to connect to your node. For example, if you use [FullyNoded 2](https://github.com/BlockchainCommons/FullyNoded-2), you can go to its settings and "Export Tor V3 Authentication Public Key" for use here. * **X25519 Public Key.** This is a public key to add to Tor's list of authorized clients. If you don't use it, anyone who gets the QR code for your node can access it. You'll get this public key from whichever client you're using to connect to your node. For example, if you use [FullyNoded 2](https://github.com/BlockchainCommons/FullyNoded-2), you can go to its settings and "Export Tor V3 Authentication Public Key" for use here.
* **Installation Type.** This is likely "Mainnet" or "Pruned Mainnet" if you are setting up a node for usage and "Testnet" or "Pruned Testnet" if you're just playing around. The bulk of this tutorial will assume you chose "Pruned Testnet", but you should still be able to follow along with other types. See the [Synopsis](#synopsis-bitcoin-installation-types) for more information on these options. (Note that if you plan to try out the Lightning chapters, you'll probably want to use an Unpruned node, as working with Pruned nodes on Lightning is iffy. See [§18.1](18_1_Verifying_Your_Lightning_Setup.md#compiling-the-source-code) for the specifics.)
* **SSH Key.** Copy your local computer's SSH key here; this allows you be able to automatically login in via SSH to the standup account. If you haven't setup an SSH key on your local computer yet, there are good instructions for it on [Github](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/). You may also want to add your SSH key into your Linode LISH (Linode Interactive Shell) by going to your "Linode Home Page / My Preferences / LISH Settings / LISH Keys". Using an SSH key will give you a simpler and safer way to log in to your server. * **SSH Key.** Copy your local computer's SSH key here; this allows you be able to automatically login in via SSH to the standup account. If you haven't setup an SSH key on your local computer yet, there are good instructions for it on [Github](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/). You may also want to add your SSH key into your Linode LISH (Linode Interactive Shell) by going to your "Linode Home Page / My Preferences / LISH Settings / LISH Keys". Using an SSH key will give you a simpler and safer way to log in to your server.
* **SSH-Allowed IPs.** This is a comma-separated list of IPs that will be allowed to SSH into the VPS. For example "192.168.1.15,192.168.1.16". If you do not enter any IPs, _your VPS will not be very secure_. It will constantly be bombarded by attackers trying to find their way in, and they may very well succeed. * **SSH-Allowed IPs.** This is a comma-separated list of IPs that will be allowed to SSH into the VPS. For example "192.168.1.15,192.168.1.16". If you do not enter any IPs, _your VPS will not be very secure_. It will constantly be bombarded by attackers trying to find their way in, and they may very well succeed.
4. Select an Image 5. Select an Image
* **Target Image.** If you followed the instructions, this will only allow you to select "Debian 10" (though "Debian 9" did also work with previous versions of this Stackscript and might still). * **Target Image.** If you followed the instructions, this will only allow you to select "Debian 12" (though previous versions of this Stackscript worked with Debian 9 or 10 or 12 and might still).
5. Choose a region for where the Linode will be located. 6. Choose a region for where the Linode will be located.
*The remaining questions all have to do with the mechanics of the VPS deployment and should be left as they are with one exception: bump the Swap Disk from 256MB to 512MB, to ensure that you have enough memory to download the blockchain._ *The remaining questions all have to do with the mechanics of the VPS deployment and should be left as they are with one exception: bump the Swap Disk from 256MB to 512MB, to ensure that you have enough memory to download the blockchain.*
Finally, you'll need to fill in a root password, which will be the password used for the root account.
### Choose Other Standup Options ### Choose Other Standup Options
Blockchain Commons is currently in the process of expandings its Bitcoin Standup Scripts with options to install Lightning and other Bitcoin apps of note. Take a look at any extra options, and see if they're things that you'd like to play with. In particular, if Lightning is an option, we suggest installing it, because it will make [Chapter 18](18_0_Understanding_Your_Lightning_Setup.md) and [Chapter 19](19_0_Using_Lightning.md) much easier. Blockchain Commons is currently in the process of expanding its Bitcoin Standup Scripts with options to install Lightning and other Bitcoin apps of note. Take a look at any extra options, and see if they're things that you'd like to play with. In particular, if Lightning is an option, we suggest installing it, because it will make [Chapter 18](18_0_Understanding_Your_Lightning_Setup.md) and [Chapter 19](19_0_Using_Lightning.md) much easier.
### Choose a Linode Plan ### Choose a Linode Plan
You'll next to choose a Linode plan. You'll next to choose a Linode plan.
A Linode 4GB will suffice for most setups, including: Pruned Mainnet, Pruned Testnet, and even non-Pruned Testnet. They all use less than 50G of storage and 4GB is a comfortable amount of memory. This is the setup we suggest. It runs $20 per month. Linode will default to Dedicated-CPU plans, but you can select the more cost-efficient Shared-CPU instead. A Shared-CPU Linode 4GB will suffice for most setups, including: Pruned Mainnet, Pruned Testnet, and even non-Pruned Testnet. They all use less than 50G of storage and 4GB is a comfortable amount of memory. This is the setup we suggest. It runs $20 per month.
If you want to instead have a non-Pruned Mainnet in a VPS, you'll need to install a Linode with a disk in excess of 280G(!), which is currently the Linode 16GB, which has 320G of storage and 16G of memory and costs approximately $80 per month. We do _not_ suggest this. If you want to instead have a non-Pruned Mainnet in a VPS, you'll need to install a Linode with a disk in excess of 280G(!), which is currently the Linode 16GB, which has 320G of storage and 16G of memory and costs approximately $80 per month. We do _not_ suggest this.
The following chart shows minimum requirements The following chart shows minimum requirements
| Setup | Memory | Storage | Linnode | | Setup | Memory | Storage | Linode |
|-------|--------|---------|---------| |-------|--------|---------|---------|
| Mainnet | 2G | 280G | Linode 16GB | | Mainnet | 2G | 280G | Linode 16GB |
| Pruned Mainnet | 2G | ~5G | Linode 4GB | | Pruned Mainnet | 2G | ~5G | Linode 4GB |
@ -90,6 +85,8 @@ Note, there may be ways to reduce both costs.
* For the machines we suggest as **Linode 4GB**, you may be able to reduce that to a Linode 2GB. Some versions of Bitcoin Core have worked well at that size, some have occasionally run out of memory and then recovered, and some have continuously run out of memory. Remember to up that swap space to maximize the odds of this working. Use at your own risk. * For the machines we suggest as **Linode 4GB**, you may be able to reduce that to a Linode 2GB. Some versions of Bitcoin Core have worked well at that size, some have occasionally run out of memory and then recovered, and some have continuously run out of memory. Remember to up that swap space to maximize the odds of this working. Use at your own risk.
* For the Unpruned Mainnet, which we suggest as a **Linode 16GB**, you can probably get by with a Linode 4GB, but add [Block Storage](https://cloud.linode.com/volumes) sufficient to store the blockchain. This is certainly a better long-term solution since the Bitcoin blockchain's storage requirements continuously increase if you don't prune, while the CPU requirements don't (or don't to the same degree). A 320 GibiByte storage would be $32 a month, which combined with a Linode 4GB is $52 a month, instead of $80, and more importantly you can keep growing it. We don't fully document this setup for two reasons (1) we don't suggest the unpruned mainnet setup, and so we suspect it's a much less common setup; and (2) we haven't tested how Linodes volumes compare to their intrinic SSDs for performance and usage. But there's full documentation on the Block Storage page. You'd need to set up the Linode, run its stackscript, but then interrupt it to move the blockchain storage overly to a newly commissioned volume before continuing. * For the Unpruned Mainnet, which we suggest as a **Linode 16GB**, you can probably get by with a Linode 4GB, but add [Block Storage](https://cloud.linode.com/volumes) sufficient to store the blockchain. This is certainly a better long-term solution since the Bitcoin blockchain's storage requirements continuously increase if you don't prune, while the CPU requirements don't (or don't to the same degree). A 320 GibiByte storage would be $32 a month, which combined with a Linode 4GB is $52 a month, instead of $80, and more importantly you can keep growing it. We don't fully document this setup for two reasons (1) we don't suggest the unpruned mainnet setup, and so we suspect it's a much less common setup; and (2) we haven't tested how Linodes volumes compare to their intrinic SSDs for performance and usage. But there's full documentation on the Block Storage page. You'd need to set up the Linode, run its stackscript, but then interrupt it to move the blockchain storage overly to a newly commissioned volume before continuing.
If you are running a deployment that will be transacting real Bitcoins, you may want to alternatively consider a Dedicated-CPU Linode, which tends to run 50% more expensive than the Shared-CPU Linode. We've generally found the Shared CPUs to be entirely sufficient, but for a wide deployment, you may wish to consider higher levels of reliability.
### Do the Final Setup ### Do the Final Setup
The last thing you need to do is enter a root password. (If you missed anything, you'll be told so now!) The last thing you need to do is enter a root password. (If you missed anything, you'll be told so now!)
@ -124,7 +121,7 @@ Here's a little catch: _your StackScript is running right now_. The BASH script
The total run time is about 10 minutes. So, go take a break, get an espresso, or otherwise relax for a few minutes. There are two parts of the script that take a while: the updating of all the Debian packages; and the downloading of the Bitcoin code. They shouldn't take more than 5 minutes each, which means if you come back in 10 minutes, you'll probably be ready to go. The total run time is about 10 minutes. So, go take a break, get an espresso, or otherwise relax for a few minutes. There are two parts of the script that take a while: the updating of all the Debian packages; and the downloading of the Bitcoin code. They shouldn't take more than 5 minutes each, which means if you come back in 10 minutes, you'll probably be ready to go.
If you're impatient you can jump ahead and `sudo tail -f ~root/standup.log` which will display the current progress of installation, as described in the next section. If you're impatient you can jump ahead and `sudo tail -f /standup.log` which will display the current progress of installation, as described in the next section.
## Verify Your Installation ## Verify Your Installation
@ -138,7 +135,7 @@ At that point, your home directory should look like this:
``` ```
$ ls $ ls
bitcoin-0.20.0-x86_64-linux-gnu.tar.gz laanwj-releases.asc SHA256SUMS.asc bitcoin-22.0-x86_64-linux-gnu.tar.gz keys.txt SHA256SUMS SHA256SUMS.asc
``` ```
These are the various files that were used to install Bitcoin on your VPS. _None_ of them are necessary. We've just left them in case you want to do any additional verification. Otherwise, you can delete them: These are the various files that were used to install Bitcoin on your VPS. _None_ of them are necessary. We've just left them in case you want to do any additional verification. Otherwise, you can delete them:
@ -152,16 +149,32 @@ $ rm *
In order to ensure that the downloaded Bitcoin release is valid, the StackScript checks both the signature and the SHA checksum. You should verify that both of those tests came back right: In order to ensure that the downloaded Bitcoin release is valid, the StackScript checks both the signature and the SHA checksum. You should verify that both of those tests came back right:
``` ```
$ sudo grep VERIFICATION ~root/standup.log $ sudo grep VERIFICATION /standup.log
``` ```
If you see something like the following, all should be well: If you see something like the following, all should be well:
``` ```
/root/StackScript - VERIFICATION SUCCESS / SIG: gpg: Good signature from "Wladimir J. van der Laan (Bitcoin Core binary release signing key) <laanwj@gmail.com>" [unknown] ./standup.sh - SIG VERIFICATION SUCCESS: 9 GOOD SIGNATURES FOUND.
/root/StackScript - VERIFICATION SUCCESS / SHA: 35ec10f87b6bc1e44fd9cd1157e5dfa4``` ./standup.sh - SHA VERIFICATION SUCCESS / SHA: bitcoin-22.0-x86_64-linux-gnu.tar.gz: OK
``` ```
However, if either of those two checks instead reads "VERIFICATION ERROR", then there's a problem. Since this is all scripted, it's possible that there's just been a minor change that has caused the script's checks not to work right. (This has happened a few times over the existence of the script that became Standup.) But, it's also possible that someone is trying to encourage you to run a fake copy of the Bitcoin daemon. So, _be very sure you know what happened before you make use of Bitcoin!_ If either of those two checks instead reads "VERIFICATION ERROR", then there's a problem.
The log also contains more information on the Signatures, if you want to make sure you know _who_ signed the Bitcoin release:
```
$ sudo grep -i good /standup.log
./standup.sh - SIG VERIFICATION SUCCESS: 9 GOOD SIGNATURES FOUND.
gpg: Good signature from "Andrew Chow (Official New Key) <achow101@gmail.com>" [unknown]
gpg: Good signature from "Ben Carman <benthecarman@live.com>" [unknown]
gpg: Good signature from "Antoine Poinsot <darosior@protonmail.com>" [unknown]
gpg: Good signature from "Stephan Oeste (it) <it@oeste.de>" [unknown]
gpg: Good signature from "Michael Ford (bitcoin-otc) <fanquake@gmail.com>" [unknown]
gpg: Good signature from "Oliver Gugger <gugger@gmail.com>" [unknown]
gpg: Good signature from "Hennadii Stepanov (hebasto) <hebasto@gmail.com>" [unknown]
gpg: Good signature from "Jon Atack <jon@atack.com>" [unknown]
gpg: Good signature from "Wladimir J. van der Laan <laanwj@visucore.com>" [unknown]
```
Since this is all scripted, it's possible that there's just been a minor change that has caused the script's checks not to work right. (This has happened a few times over the existence of the script that became Standup.) But, it's also possible that someone is trying to encourage you to run a fake copy of the Bitcoin daemon. So, _be very sure you know what happened before you make use of Bitcoin!_
### Read the Logs ### Read the Logs
@ -169,13 +182,13 @@ You may also want to read through all of the setup log files, to make sure that
It's best to look through the standard StackScript log file, which has all of the output, including errors: It's best to look through the standard StackScript log file, which has all of the output, including errors:
`$ sudo more ~root/standup.log` `$ sudo more /standup.log`
Note that it is totally normal to see _some_ errors, particularly when running the very noisy gpg software and when various things try to access the non-existant `/dev/tty` device. Note that it is totally normal to see _some_ errors, particularly when running the very noisy gpg software and when various things try to access the non-existant `/dev/tty` device.
If you want instead to look at a smaller set of info, all of the errors should be in: If you want instead to look at a smaller set of info, all of the errors should be in:
`$ sudo more ~root/standup.err` `$ sudo more /standup.err`
It still has a fair amount of information that isn't errors, but it's a quicker read. It still has a fair amount of information that isn't errors, but it's a quicker read.
@ -183,15 +196,15 @@ If all look good, congratulations, you have a functioning Bitcoin node using Lin
## What We Have Wrought ## What We Have Wrought
Although the default Debian 10 image that we are using for your VPS has been modified by Linode to be relatively secure, your Bitcoin node as installed through the Linode StackScript is set up with an even high level of security. You may find this limiting, or be unable to do things that you expect. Here are a few notes on that: Although the default Debian 12 image that we are using for your VPS has been modified by Linode to be relatively secure, your Bitcoin node as installed through the Linode StackScript is set up with an even higher level of security. You may find this limiting, or be unable to do things that you expect. Here are a few notes on that:
### Protected Services ### Protected Services
Your Bitcoin VPS installation is minimal and allows almost no communication. This is done through the uncomplicated firewall (`ufw`), which blocks everything except SSH connections. There's also some additional security possible for your RFC ports, thanks to the hidden services installed by Tor. Your Bitcoin VPS installation is minimal and allows almost no communication. This is done through the uncomplicated firewall (`ufw`), which blocks everything except SSH connections. There's also some additional security possible for your RFC ports, thanks to the hidden services installed by Tor.
**Adjusting UFW.** You should probably leave UFW in its super-protected stage! You don't want to use a Bitcoin machine for other services, because everyone increases your vulnerability! If you decide otherwise, there are several [guides to UFW](https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands) that will allow you to add services. As advertised, it's ncomplicated. For example adding mail services would just require opening the mail port: `sudo ufw allow 25`. But don't do that. **Adjusting UFW.** You should probably leave UFW in its super-protected stage! You don't want to use a Bitcoin machine for other services, because everyone increases your vulnerability! If you decide otherwise, there are several [guides to UFW](https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands) that will allow you to add services. As advertised, it's uncomplicated. For example adding mail services would just require opening the mail port: `sudo ufw allow 25`. But don't do that.
**Adjusting Tor.** You might want to better protect services like SSH. See [Chapter 12: Using Tor](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/12_0_Using_Tor.md) for more on Tor. **Adjusting Tor.** You might want to better protect services like SSH. See [Chapter 14: Using Tor](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/14_0_Using_Tor.md) for more on Tor.
### Protected Shells ### Protected Shells
@ -245,7 +258,7 @@ You have a few options for what's next:
## Synopsis: Bitcoin Installation Types ## Synopsis: Bitcoin Installation Types
**Mainnet.** This will download the entirety of the Bitnet blockchain. That's 280G of data (and getting more every day). **Mainnet.** This will download the entirety of the Bitcoin blockchain. That's 280G of data (and getting more every day).
**Pruned Mainnet.** This will cut the blockchain you're storing down to just the last 550 blocks. If you're not mining or running some other Bitcoin service, this should be plenty for validation. **Pruned Mainnet.** This will cut the blockchain you're storing down to just the last 550 blocks. If you're not mining or running some other Bitcoin service, this should be plenty for validation.

View File

@ -5,11 +5,13 @@ The previous section, [§2.1: Setting Up a Bitcoin-Core VPS with Bitcoin Standup
Following are other setup methodologies that we are aware of: Following are other setup methodologies that we are aware of:
* *[Compiling from Source](A2_0_Compiling_Bitcoin_from_Source.md).* If you prefer to compile Bitcoin Core by hand, that's covered in Appendix 2. * *[Compiling from Source](A2_0_Compiling_Bitcoin_from_Source.md).* If you prefer to compile Bitcoin Core by hand, that's covered in Appendix 2.
* *[Using GordianNode-macOS](https://github.com/BlockchainCommons/GordianNode-macOS).* If you have a modern Mac, you can use Blockchain Commons' *GordianNode* app, powered by *BitocinStandup*, to install a full node on your Mac. * *[Using GordianServer-macOS](https://github.com/BlockchainCommons/GordianServer-macOS).* If you have a modern Mac, you can use Blockchain Commons' *GordianNode* app, powered by *BitcoinStandup*, to install a full node on your Mac.
* *[Using Other Bitcoin Standup Scripts](https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts).* Blockchain Commons also offers a version of the Linode script that you used that can be run from the command line on any Debian or Ubuntu machine. This tends to be the leading-edge script, which means that it's more likely to feature new functions, like Lightnign installation. * *[Using Other Bitcoin Standup Scripts](https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts).* Blockchain Commons also offers a version of the Linode script that you used that can be run from the command line on any Debian or Ubuntu machine. This tends to be the leading-edge script, which means that it's more likely to feature new functions, like Lightning installation.
* *[Setting Up a Bitcoin Node on AWS](https://wolfmcnally.com/115/developer-notes-setting-up-a-bitcoin-node-on-aws/).* @wolfmcnally has written a step-by-step tutorial for setting up Bitcoin-Core with Amazon Web Services (AWS). * *[Setting Up a Bitcoin Node on AWS](https://wolfmcnally.com/115/developer-notes-setting-up-a-bitcoin-node-on-aws/).* @wolfmcnally has written a step-by-step tutorial for setting up Bitcoin-Core with Amazon Web Services (AWS).
* *[Setting Up a Bitcoin Node on a Raspberry Pi 3](https://medium.com/@meeDamian/bitcoin-full-node-on-rbp3-revised-88bb7c8ef1d1).* Damian Mee explains how to set up a headless full node on a Raspberry Pi 3. * *[Setting Up a Bitcoin Node on a Raspberry Pi 3](https://medium.com/@meeDamian/bitcoin-full-node-on-rbp3-revised-88bb7c8ef1d1).* Damian Mee explains how to set up a headless full node on a Raspberry Pi 3.
Be sure that you are installing on a current version of your OS, to avoid problems down the line. As of this writing, this course is tested on Debian 11.
## What's Next? ## What's Next?
Unless you want to return to one of the other methodologies for creating a Bitcoin-Core node, you should: Unless you want to return to one of the other methodologies for creating a Bitcoin-Core node, you should:

View File

@ -6,7 +6,7 @@ Before you start playing with Bitcoin, you should ensure that everything is setu
We suggest creating some aliases to make it easier to use Bitcoin. We suggest creating some aliases to make it easier to use Bitcoin.
You can do so by putting them in your `.bash_profile`. You can do so by putting them in your `.bash_profile`, `.bashrc` or `.profile`.
``` ```
cat >> ~/.bash_profile <<EOF cat >> ~/.bash_profile <<EOF
alias btcdir="cd ~/.bitcoin/" #linux default bitcoind path alias btcdir="cd ~/.bitcoin/" #linux default bitcoind path
@ -19,7 +19,7 @@ After you enter these aliases you can either `source .bash_profile` to input the
Note that these aliases includes shortcuts for running `bitcoin-cli`, for running `bitcoind`, and for going to the Bitcoin directory. These aliases are mainly meant to make your life easier. We suggest you create other aliases to ease your use of frequent commands (and arguments) and to minimize errors. Aliases of this sort can be even more useful if you have a complex setup where you regularly run commands associated with Mainnet, with Testnet, _and_ with Regtest, as explained further below. Note that these aliases includes shortcuts for running `bitcoin-cli`, for running `bitcoind`, and for going to the Bitcoin directory. These aliases are mainly meant to make your life easier. We suggest you create other aliases to ease your use of frequent commands (and arguments) and to minimize errors. Aliases of this sort can be even more useful if you have a complex setup where you regularly run commands associated with Mainnet, with Testnet, _and_ with Regtest, as explained further below.
With that said, use of these aliases in _this_ document might accidentally obscure the core lessons being taught about Bitcoin, so the only alias directly used here is `btcinfo` because it encapsulatea much longer and more complex command. Otherwise, we show the full commands; adjust for your own use as appropriate. With that said, use of these aliases in _this_ document might accidentally obscure the core lessons being taught about Bitcoin, so the only alias directly used here is `btcinfo` because it encapsulates much longer and more complex command. Otherwise, we show the full commands; adjust for your own use as appropriate.
## Run Bitcoind ## Run Bitcoind
@ -45,15 +45,13 @@ You can do this by looking at a blocknet explorer, such as [the Blockcypher Test
If you'd like an alias to look at everything at once, the following currently works for Testnet, but may disappear at some time in the future: If you'd like an alias to look at everything at once, the following currently works for Testnet, but may disappear at some time in the future:
``` ```
$ cat >> ~/.bash_profile << EOF $ echo "alias btcblock='echo \$(bitcoin-cli -testnet getblockcount)/\$(curl -s https://blockstream.info/testnet/api/blocks/tip/height)'" >> .bash_profile
> alias btcblock="echo \\\`bitcoin-cli getblockcount 2>&1\\\`/\\\`wget -O - https://blockstream.info/testnet/api/blocks/tip/height 2> /dev/null | cut -d : -f2 | rev | cut -c 1- | rev\\\`"
EOF
$ source .bash_profile $ source .bash_profile
$ btcblock $ btcblock
1804372/1804372 1804372/1804372
``` ```
> :link: **TESTNET vs MAINNET:** Remember that this tutorial generally assumes that you are using testnet. If you're using the mainnet instead, you can retrieve the current block height with: `wget -O - http://blockchain.info/q/getblockcount 2>/dev/null`. You can replace the latter half of the `btblock` alias (after `/`) with that. > :link: **TESTNET vs MAINNET:** Remember that this tutorial generally assumes that you are using testnet. If you're using the mainnet instead, you can retrieve the current block height with: `curl -s https://blockchain.info/q/getblockcount`. You can replace the latter half of the `btcblock` alias (after `/\$(`) with that.
If you're not up-to-date, but your `getblockcount` is increasing, no problem. Total download time can take from an hour to several hours, depending on your setup. If you're not up-to-date, but your `getblockcount` is increasing, no problem. Total download time can take from an hour to several hours, depending on your setup.

View File

@ -16,7 +16,7 @@ The setup guides in [Chapter Two: Creating a Bitcoin-Core VPS](02_0_Setting_Up_a
Moving back to your ~/.bitcoin directory, you'll find that the testnet3 directory contains all of the guts: Moving back to your ~/.bitcoin directory, you'll find that the testnet3 directory contains all of the guts:
``` ```
$ ls ~/.bitcoin/testnet3 $ ls ~/.bitcoin/testnet3
banlist.dat blocks debug.log mempool.dat peers.dat banlist.json blocks debug.log mempool.dat peers.dat
bitcoind.pid chainstate fee_estimates.dat onion_private_key wallets bitcoind.pid chainstate fee_estimates.dat onion_private_key wallets
``` ```
You shouldn't mess with most of these files and directories — particularly not the `blocks` and `chainstate` directories, which contain all of the blockchain data, and the information in your `wallets` directory, which contains your personal wallet. However, do take careful note of the `debug.log` file, which you should refer to if you ever have problems with your setup. You shouldn't mess with most of these files and directories — particularly not the `blocks` and `chainstate` directories, which contain all of the blockchain data, and the information in your `wallets` directory, which contains your personal wallet. However, do take careful note of the `debug.log` file, which you should refer to if you ever have problems with your setup.
@ -204,6 +204,37 @@ Examples:
## Optional: Know Your Bitcoin Info ## Optional: Know Your Bitcoin Info
A variety of bitcoin-cli commands can give you additional information on your bitcoin data. The most general ones are: A variety of bitcoin-cli commands can give you additional information on your bitcoin data. The most general ones are:
`bitcoin-cli -getinfo` returns information from different RPCs (user-friendly)
```diff
$ bitcoin-cli -getinfo
! Chain: test
Blocks: 1977694
Headers: 1977694
Verification progress: 0.9999993275374796
Difficulty: 1
+ Network: in 0, out 8, total 8
Version: 219900
Time offset (s): 0
Proxy: N/A
Min tx relay fee rate (BTC/kvB): 0.00001000
@@ Wallet: ""@@
Keypool size: 1000
Unlocked until: 0
Transaction fee rate (-paytxfee) (BTC/kvB): 0.00000000
# Balance: 0.02853102
- Warnings: unknown new rules activated (versionbit 28)
```
Other commands to get information about blockchain, mining, network, wallet etc.
``` ```
$ bitcoin-cli getblockchaininfo $ bitcoin-cli getblockchaininfo
$ bitcoin-cli getmininginfo $ bitcoin-cli getmininginfo

View File

@ -1,28 +1,67 @@
# 3.3: Setting Up Your Wallet # 3.3: Setting Up Your Wallet
You're now ready to start working with Bitcoin. To begin with, you'll need to create an address for receiving funds. You're now ready to start working with Bitcoin. To begin with, you'll need to create a wallet for sending and receiving funds.
## Create a Wallet
> :warning: **VERSION WARNING:** Newer versions of Bitcoin Core, starting with v0.21.0, will no longer automatically create a default wallet on startup. So, you will need to manually create one. But if you're running an older version of Bitcoin Core, a new wallet has already been created for you, in which case you can skip ahead to [Create an Address](#create-an-address).
The first thing you need to do is create a new wallet, which can be done with the `bitcoin-cli createwallet` command. By creating a new wallet, you'll be creating your public-private key pair. Your public key is the source from which your addresses will be created, and your private key is what will allow you to spend any funds you receive into your addresses. Bitcoin Core will automatically save that information into a `wallet.dat` file in your `~/.bitcoin/testnet3/wallets` directory.
If you check your `wallets` directory, you'll see that it's currently empty.
```
$ ls ~/.bitcoin/testnet3/wallets
$
```
Although Bitcoin Core won't create a new wallet for you, it will still load a top-level unnamed ("") wallet on startup by default. You can take advantage of this by creating a new unnamed wallet.
```
$ bitcoin-cli -named createwallet wallet_name="" descriptors=false
{
"name": "",
"warning": ""
}
```
Now, your `wallets` directory should be populated.
```
$ ls ~/.bitcoin/testnet3/wallets
database db.log wallet.dat
```
> :book: ***What is a Bitcoin wallet?*** A Bitcoin wallet is the digital equivalent of a physical wallet on the Bitcoin network. It stores information on the amount of bitcoins you have and where it's located (addresses), as well as the ways you can use to spend it. Spending physical money is intuitive, but to spend bitcoins users need to provide the correct _private key_. We will explain this in more detail throughout the course, but what you should know for now is that this public-private key dynamic is part of what makes Bitcoin secure and trustless. Your key pair information is saved in the `wallet.dat` file, in addition to data about preferences and transactions. For the most part, you won't have to worry about that private key: `bitcoind` will use it when it's needed. However, this makes the `wallet.dat` file extremely important: if you lose it, you lose your private keys, and if you lose your private keys, you lose your funds!
Sweet, now you have a Bitcoin wallet. But a wallet will be of little use for receiving bitcoins if you don't create an address first.
> :warning: **VERSION WARNING:** Starting in Bitcoin Core v 23.0, descriptor wallets became the default. That's great, because descriptor wallets are very powerful, except they don't currently work with multisigs! So, we turn them off with the "descriptors=false" argument. See [§3.5](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/03_5_Understanding_the_Descriptor.md) for more on descriptors.
## Create an Address ## Create an Address
The first thing you need to do is create an address for receiving payments. This is done with the `bitcoin-cli getnewaddress` command. Remember that if you want more information on this command, you should type `bitcoin-cli help getnewaddress`. Currently, there are three types of addresses: `legacy` and the two types of SegWit address, `p2sh-segwit` and `bech32`. If you do not otherwise specify, you'll get the default, which is currently `bech32`. The next thing you need to do is create an address for receiving payments. This is done with the `bitcoin-cli getnewaddress` command. Remember that if you want more information on this command, you should type `bitcoin-cli help getnewaddress`. Currently, there are three types of addresses: `legacy` and the two types of SegWit address, `p2sh-segwit` and `bech32`. If you do not otherwise specify, you'll get the default, which is currently `bech32`.
However, for the next few sections we're instead going to be using `legacy` addresses, both because `bitcoin-cli` had some teething problems with its early versions of SegWit addresses, and because other people might not be able to send to `bech32` addresses. This is all unlikely to be a problem for you now, but for the moment we want to get your started with transaction examples that are (mostly) guaranteed to work. However, for the next few sections we're instead going to be using `legacy` addresses, both because `bitcoin-cli` had some teething problems with its early versions of SegWit addresses, and because other people might not be able to send to `bech32` addresses. This is all unlikely to be a problem for you now, but for the moment we want to get your started with transaction examples that are (mostly) guaranteed to work.
You can require `legacy` address either with the second argument to `getnewaddress` or with the named `addresstype` argument. First, restart `bitcoind` so your new unnamed wallet is set as default and automatically loaded.
```
$ bitcoin-cli stop
Bitcoin Core stopping # wait a minute so it stops completely
$ bitcoind -daemon
Bitcoin Core starting # wait a minute so it starts completely
```
You can now create an address. You can require `legacy` address either with the second argument to `getnewaddress` or with the named `addresstype` argument.
``` ```
$ bitcoin-cli getnewaddress -addresstype legacy $ bitcoin-cli getnewaddress -addresstype legacy
moKVV6XEhfrBCE3QCYq6ppT7AaMF8KsZ1B moKVV6XEhfrBCE3QCYq6ppT7AaMF8KsZ1B
``` ```
Note that this address begins with an "m" (or sometimes an "n") to signify a testnet Legacy address. It would be a "2" for a P2SH address or a "tb1" for a Bech32 address. Note that this address begins with an "m" (or sometimes an "n") to signify a testnet Legacy address. It would be a "2" for a P2SH address or a "tb1" for a Bech32 address.
> :link: **TESTNET vs MAINNET:** The equivalent mainnet address would start with a "1" (for Legacy), "3" (for P2SH), or "bc1" (for Bech320. > :link: **TESTNET vs MAINNET:** The equivalent mainnet address would start with a "1" (for Legacy), "3" (for P2SH), or "bc1" (for Bech32).
Take careful note of the address. You'll need to give it to whomever will be sending you funds. Take careful note of the address. You'll need to give it to whomever will be sending you funds.
> :book: ***What is a Bitcoin address?*** A Bitcoin address is literally where you receive money. It's like an email address, but for funds. Technically, it's a public key, though different address schemes adjust that in different ways. However unlike an email address, a Bitcoin address should be considered single use: use it to receive funds just _once_. When you want to receive funds from someone else or at some other time, generate a new address. This is suggested in large part to improve your privacy. The whole blockchain is immutable, which means that explorers can look at long chains of transactions over time, making it possible to statistically determine who you and your contacts are, no matter how careful you are. However, if you keep reusing the same address, then this becomes even easier. > :book: ***What is a Bitcoin address?*** A Bitcoin address is literally where you receive money. It's like an email address, but for funds. Technically, it's a public key, though different address schemes adjust that in different ways. However unlike an email address, a Bitcoin address should be considered single use: use it to receive funds just _once_. When you want to receive funds from someone else or at some other time, generate a new address. This is suggested in large part to improve your privacy. The whole blockchain is immutable, which means that explorers can look at long chains of transactions over time, making it possible to statistically determine who you and your contacts are, no matter how careful you are. However, if you keep reusing the same address, then this becomes even easier. By creating your first Bitcoin address, you've also begun to fill in your Bitcoin wallet. More precisely, you've begun to fill the `wallet.dat` file in your `~/.bitcoin/testnet3 /wallets` directory.
> :book: ***What is a Bitcoin wallet?*** By creating your first Bitcoin address, you've also begun to fill in your Bitcoin wallet. More precisely, you've begun to fill the `wallet.dat` file in your `~/.bitcoin/testnet3 /wallets`directory. The `wallet.dat` file contains data about preferences and transactions, but more importantly it contains all of the key pairs that you create: both the public key (which is the source of the address where you receive funds) and the private key (which is how you spend those funds). For the most part, you won't have to worry about that private key: `bitcoind` will use it when it's needed. However, this makes the `wallet.dat` file extremely important: if you lose it, you lose your private keys, and if you lose your private keys, you lose your funds!
With a single address in hand, you could jump straight to the next section and begin receiving funds. However, before we get there, we're going to briefly discuss the other sorts of addresses that you'll meet in the future and talk about a few other wallet commands that you might want to use in the future. With a single address in hand, you could jump straight to the next section and begin receiving funds. However, before we get there, we're going to briefly discuss the other sorts of addresses that you'll meet in the future and talk about a few other wallet commands that you might want to use in the future.
@ -36,9 +75,9 @@ Classic Bitcoin transactions created P2PKH addresses that added an additional cr
> :book: ***What is a Legacy (P2PKH) address?*** This is a Legacy address of the sort used by the early Bitcoin network. We'll be using it in examples for the next few sections. It's called a Pay to PubKey Hash (or P2PKH) address because the address is a 160-bit hash of a public key. Using a hash of your public key as your address creates a two-step process where to spend funds you need to reveal both the private key and the public key, and it increases future security accordingly. This sort of address remains important for receiving funds from people with out-of-date wallet software. > :book: ***What is a Legacy (P2PKH) address?*** This is a Legacy address of the sort used by the early Bitcoin network. We'll be using it in examples for the next few sections. It's called a Pay to PubKey Hash (or P2PKH) address because the address is a 160-bit hash of a public key. Using a hash of your public key as your address creates a two-step process where to spend funds you need to reveal both the private key and the public key, and it increases future security accordingly. This sort of address remains important for receiving funds from people with out-of-date wallet software.
As described more fully in [§4.6: Creating a Segwit Transaction](04_6_Creating_a_Segwit_Transaction.md), the Block Size Wars of the late '10s resulted in a new sort of address: SegWit. This is the preferred sort address currently, and should be fully integrated into Bitcoin-Core at this point, but nonetheless we're saving it for §4.6. As described more fully in [§4.6: Creating a Segwit Transaction](04_6_Creating_a_Segwit_Transaction.md), the Block Size Wars of the late '10s resulted in a new sort of address: SegWit. This is the preferred sort of address currently, and should be fully integrated into Bitcoin-Core at this point, but nonetheless we're saving it for §4.6.
SegWit simply means "segregated witness" and it's a way of separating the transaction signatures out from the rest of the transaction to reduce transaction size. Some SegWit addresses with sneak into some of our examples prior to §4.6 as change addresses, which you'll see as addresses that begin with "tb". This is fine because the `bitcoin-cli` entirely supports their usage. But we won't use them otherwise SegWit simply means "segregated witness" and it's a way of separating the transaction signatures out from the rest of the transaction to reduce transaction size. Some SegWit addresses will sneak into some of our examples prior to §4.6 as change addresses, which you'll see as addresses that begin with "tb". This is fine because the `bitcoin-cli` entirely supports their usage. But we won't use them otherwise.
There are two addresses of this sort: There are two addresses of this sort:

View File

@ -14,14 +14,14 @@ To use a faucet, you'll usually need to go to a URL and copy and paste in your a
## Verify Your Money ## Verify Your Money
After you've requested your money, you should be able to verify it with the 'bitcoin-cli getbalance' command: After you've requested your money, you should be able to verify it with the `bitcoin-cli getbalance` command:
``` ```
$ bitcoin-cli getbalance $ bitcoin-cli getbalance
0.00000000 0.00000000
``` ```
But wait, there's no balance yet!? But wait, there's no balance yet!?
Welcome to the world of Bitcoin latency.The problem is that your transaction hasn't yet been recorded in a block! Welcome to the world of Bitcoin latency. The problem is that your transaction hasn't yet been recorded in a block!
> :book: ***What is a block?*** Transactions are transmitted across the network and gathered into blocks by miners. These blocks are secured with a mathematical proof-of-work, which proves that computing power has been expended as part of the block creation. It's that proof-of-work (multiplied over many blocks, each built atop the last) that ultimately keeps Bitcoin secure. > :book: ***What is a block?*** Transactions are transmitted across the network and gathered into blocks by miners. These blocks are secured with a mathematical proof-of-work, which proves that computing power has been expended as part of the block creation. It's that proof-of-work (multiplied over many blocks, each built atop the last) that ultimately keeps Bitcoin secure.
@ -187,7 +187,7 @@ $ bitcoin-cli gettransaction "8e2ab10cabe9ec04ed438086a80b1ac72558cc05bb206e48fc
"hex": "0200000000010114d04977d1b0137adbf51dd5d79944b9465a2619f3fa7287eb69a779977bf5800100000017160014e85ba02862dbadabd6d204fcc8bb5d54658c7d4ffeffffff02df690f000000000017a9145c3bfb36b03f279967977ca9d1e35185e39917788740420f00000000001976a9141b72503639a13f190bf79acf6d76255d772360b788ac0247304402201e74bdfc330fc2e093a8eabe95b6c5633c8d6767249fa25baf62541a129359c202204d462bd932ee5c15c7f082ad7a6b5a41c68addc473786a0a9a232093fde8e1330121022897dfbf085ecc6ad7e22fc91593414a845659429a7bbb44e2e536258d2cbc0c270b1b00" "hex": "0200000000010114d04977d1b0137adbf51dd5d79944b9465a2619f3fa7287eb69a779977bf5800100000017160014e85ba02862dbadabd6d204fcc8bb5d54658c7d4ffeffffff02df690f000000000017a9145c3bfb36b03f279967977ca9d1e35185e39917788740420f00000000001976a9141b72503639a13f190bf79acf6d76255d772360b788ac0247304402201e74bdfc330fc2e093a8eabe95b6c5633c8d6767249fa25baf62541a129359c202204d462bd932ee5c15c7f082ad7a6b5a41c68addc473786a0a9a232093fde8e1330121022897dfbf085ecc6ad7e22fc91593414a845659429a7bbb44e2e536258d2cbc0c270b1b00"
} }
``` ```
The `gettransaction` command will detail transanctions that are in your wallet, such as this one, that was sent to us. The `gettransaction` command will detail transactions that are in your wallet, such as this one, that was sent to us.
Note that `gettransaction` has two optional arguments: Note that `gettransaction` has two optional arguments:
``` ```
@ -285,7 +285,7 @@ $ bitcoin-cli gettransaction "8e2ab10cabe9ec04ed438086a80b1ac72558cc05bb206e48fc
``` ```
Now you can see the full information on the transaction, including all of the inputs ("vin") and all the outputs ("vout). One of the interesting things to note is that although we received .01 BTC in the transaction, another .01010143 was sent to another address. That was probably a change address, a concept that is explored in the next section. It is quite typical for a transaction to have multiple inputs and/or multiple outputs. Now you can see the full information on the transaction, including all of the inputs ("vin") and all the outputs ("vout). One of the interesting things to note is that although we received .01 BTC in the transaction, another .01010143 was sent to another address. That was probably a change address, a concept that is explored in the next section. It is quite typical for a transaction to have multiple inputs and/or multiple outputs.
There is another command, `getrawtransaction`, which allows you to look at transactions that are not in your wallet. However, it requires you to have unpruned node and `txindex=1` in your `bitcoin.conf` file. Unless you have a serious need for information not in your wallet, it's probably just better to use a Bitcoin explorer for this sort of thing ... There is another command, `getrawtransaction`, which allows you to look at transactions that are not in your wallet. However, it requires you to have an unpruned node and `txindex=1` in your `bitcoin.conf` file. Unless you have a serious need for information not in your wallet, it's probably just better to use a Bitcoin explorer for this sort of thing ...
## Optional: Use a Block Explorer ## Optional: Use a Block Explorer

View File

@ -25,5 +25,6 @@ Supporting objectives include the ability to:
* [Interlude: Using JQ](04_2__Interlude_Using_JQ.md) * [Interlude: Using JQ](04_2__Interlude_Using_JQ.md)
* [Section Three: Creating a Raw Transaction with Named Arguments](04_3_Creating_a_Raw_Transaction_with_Named_Arguments.md) * [Section Three: Creating a Raw Transaction with Named Arguments](04_3_Creating_a_Raw_Transaction_with_Named_Arguments.md)
* [Section Four: Sending Coins with Raw Transactions](04_4_Sending_Coins_with_a_Raw_Transaction.md) * [Section Four: Sending Coins with Raw Transactions](04_4_Sending_Coins_with_a_Raw_Transaction.md)
* [Interlude: Using Curl](04_4__Interlude_Using_Curl.md)
* [Section Five: Sending Coins with Automated Raw Transactions](04_5_Sending_Coins_with_Automated_Raw_Transactions.md) * [Section Five: Sending Coins with Automated Raw Transactions](04_5_Sending_Coins_with_Automated_Raw_Transactions.md)
* [Section Six: Creating a SegWit Transaction](04_6_Creating_a_Segwit_Transaction.md) * [Section Six: Creating a SegWit Transaction](04_6_Creating_a_Segwit_Transaction.md)

View File

@ -22,15 +22,12 @@ txconfirmtarget=1
``` ```
You should enter these into `~/.bitcoin/bitcoin.conf`, in the main section, toward the top of the file or if you want to be sure you never use it elsewhere, under the `[test]` section. You should enter these into `~/.bitcoin/bitcoin.conf`, in the main section, toward the top of the file or if you want to be sure you never use it elsewhere, under the `[test]` section.
In order to get through this tutorial, we're willing to spend 100,00 satoshis per kB on every transaction (about $10!), and we want to get each transaction into the next block! (To put that in perspective, a typical transaction runs between .25 kB and 1 kB, so you'll actually be paying more like $2.50 than $10 ... if this were real money.) In order to get through this tutorial, we're willing to spend 100,000 satoshis per kB on every transaction (about $10!), and we want to get each transaction into the next block! (To put that in perspective, a typical transaction runs between .25 kB and 1 kB, so you'll actually be paying more like $2.50 than $10 ... if this were real money.)
After you've edited your bitcoin.conf file, you'll want to kill and restart bitcoind. After you've edited your bitcoin.conf file, you'll want to kill and restart bitcoind.
``` ```
$ ps auxww | grep -i bitcoind $ bitcoin-cli stop
standup 455 1.3 38.4 3387012 1555520 ? SLsl Jun16 60:01 /usr/local/bin/bitcoind -conf=/home/standup/.bitcoin/bitcoin.conf $ bitcoind -daemon
standup 21073 0.0 0.0 6076 876 pts/0 R+ 15:00 0:00 grep -i bitcoind
$ kill 455
$ /usr/local/bin/bitcoind -conf=/home/standup/.bitcoin/bitcoin.conf &
``` ```
## Get an Address ## Get an Address
@ -43,14 +40,19 @@ You need somewhere to send your coins to. Usually, someone would send you an add
You're now ready to send some coins. This is actually quite simple via the command line. You just use `bitcoin-cli sendtoaddress [address] [amount]`. So, to send a little coinage to the address `n2eMqTT929pb1RDNuqEnxdaLau1rxy3efi` just requires: You're now ready to send some coins. This is actually quite simple via the command line. You just use `bitcoin-cli sendtoaddress [address] [amount]`. So, to send a little coinage to the address `n2eMqTT929pb1RDNuqEnxdaLau1rxy3efi` just requires:
``` ```
$ txid=$(bitcoin-cli sendtoaddress n2eMqTT929pb1RDNuqEnxdaLau1rxy3efi 0.1) $ txid=$(bitcoin-cli sendtoaddress n2eMqTT929pb1RDNuqEnxdaLau1rxy3efi 0.001)
$ echo $txid $ echo $txid
93250d0cacb0361b8e21030ac65bc4c2159a53de1075425d800b2d7a8ab13ba8 93250d0cacb0361b8e21030ac65bc4c2159a53de1075425d800b2d7a8ab13ba8
``` ```
> 🙏 To help keep testnet faucets alive, try to use the return address of the same faucet you used in the previous chapter on receiving transactions.
Make sure the address you write in is where you want the money to go. Make _double_ sure. If you make mistakes in Bitcoin, there's no going back. Make sure the address you write in is where you want the money to go. Make _double_ sure. If you make mistakes in Bitcoin, there's no going back.
You'll receive a txid back when you issue this command. You'll receive a txid back when you issue this command.
> ❕ You may end up with an error code if you don't have enough funds in your wallet to send the transaction. Depending on your current balance `bitcoin-cli getbalance` you may need to adjust the amount to be sent to account for the amount being sent along with the transaction fee. If your current balance is 0.001, then you could try sending 0.0001. Alternatively, it would be better to instead subtract the expected fee given in the error message from your current balance. This is good practice as many wallets expect you to calculate your own amount + fees when withdrawing, even among popular exchanges.
> :warning: **WARNING:** The `bitcoin-cli` command actually generates JSON-RPC commands when it's talking to the bitcoind. They can be really picky. This is an example: if you list the bitcoin amount without the leading zero (i.e. ".1" instead of "0.1"), then bitcoin-cli will fail with a mysterious message. > :warning: **WARNING:** The `bitcoin-cli` command actually generates JSON-RPC commands when it's talking to the bitcoind. They can be really picky. This is an example: if you list the bitcoin amount without the leading zero (i.e. ".1" instead of "0.1"), then bitcoin-cli will fail with a mysterious message.
> :warning: **WARNING:** Even if you're careful with your inputs, you could see "Fee estimation failed. Fallbackfee is disabled." Fundamentally, this means that your local `bitcoind` doesn't have enough information to estimate fees. You should really never see it if you've waited for your blockchain to sync and set up your system with Bitcoin Standup. But if you're not entirely synced, you may see this. It also could be that you're not using a standard `bitcoin.conf`: the entry `blocksonly=1` will cause your `bitcoind` to be unable to estimate fees. > :warning: **WARNING:** Even if you're careful with your inputs, you could see "Fee estimation failed. Fallbackfee is disabled." Fundamentally, this means that your local `bitcoind` doesn't have enough information to estimate fees. You should really never see it if you've waited for your blockchain to sync and set up your system with Bitcoin Standup. But if you're not entirely synced, you may see this. It also could be that you're not using a standard `bitcoin.conf`: the entry `blocksonly=1` will cause your `bitcoind` to be unable to estimate fees.

View File

@ -70,7 +70,7 @@ So, txid+vout=UTXO. This will be the foundation of any raw transaction.
You're now ready to write a simple, example raw transaction that shows how to send the entirety of a UTXO to another party. As noted, this is not necessarily a very realistic real-world case. You're now ready to write a simple, example raw transaction that shows how to send the entirety of a UTXO to another party. As noted, this is not necessarily a very realistic real-world case.
> :warning: **WARNING:** It is very easy to lose money with a raw transaction. Consider all instructions on sending bitcoins via raw transactions to be _very_, _very_ dangerous. Whenever you're actually sending real money to other people, you should instead use one of the other methods explained in this chapter. Creating raw transactions is extremely useful if you're writing bitcoin programs, but _only_ when you're writing bitcoin programs. (For example: in writing this example for one version of this tutorial, we accidently spend the wrong transaction, even though it had about 10x as much value. Almost all of that was lost to the miners.) > :warning: **WARNING:** It is very easy to lose money with a raw transaction. Consider all instructions on sending bitcoins via raw transactions to be _very_, _very_ dangerous. Whenever you're actually sending real money to other people, you should instead use one of the other methods explained in this chapter. Creating raw transactions is extremely useful if you're writing bitcoin programs, but _only_ when you're writing bitcoin programs. (For example: in writing this example for one version of this tutorial, we accidentally spent the wrong transaction, even though it had about 10x as much value. Almost all of that was lost to the miners.)
### Prepare the Raw Transaction ### Prepare the Raw Transaction
@ -105,11 +105,11 @@ Each transaction has a fee associated with. It's _implicit_ when you send a raw
> :book: ***How much should you spend on transaction fees?*** [Bitcoin Fees](https://bitcoinfees.21.co/) has a nice live assessment. It says that the "fastest and cheapest transaction fee is currently 42 satoshis/byte" and that "For the median transaction size of 224 bytes, this results in a fee of 9,408 satoshis". > :book: ***How much should you spend on transaction fees?*** [Bitcoin Fees](https://bitcoinfees.21.co/) has a nice live assessment. It says that the "fastest and cheapest transaction fee is currently 42 satoshis/byte" and that "For the median transaction size of 224 bytes, this results in a fee of 9,408 satoshis".
Currently Bitcoin Fees suggests a transaction fee of about 10,000 satoshis, which is the same as .0001 BC. Yes, that's for the mainnet, not the testnet, but we want to test out things realistically, so that's what we're going to use. Currently Bitcoin Fees suggests a transaction fee of about 10,000 satoshis, which is the same as .0001 BTC. Yes, that's for the mainnet, not the testnet, but we want to test out things realistically, so that's what we're going to use.
In this case, that means taking the .0005 BTC in the UTXO we're selected, reducing it by .0001 BTC for the transaction fee, and sending the remaining .0004 BTC. (And this is an example of why micropayments don't work on the Bitcoin network, because a $1 or so transaction fee is pretty expensive when you're sending $4, let alone if you were trying to make a micropayment of $0.50. But that's always why we have Lightning.) In this case, that means taking the .0005 BTC in the UTXO we're selected, reducing it by .0001 BTC for the transaction fee, and sending the remaining .0004 BTC. (And this is an example of why micropayments don't work on the Bitcoin network, because a $1 or so transaction fee is pretty expensive when you're sending $4, let alone if you were trying to make a micropayment of $0.50. But that's always why we have Lightning.)
> :warning: **WARNING:** The lower that you set your transaction fee, the longer before your transaction is built into a block. The Bitcoin Fees sites lists expected times, from an expected 0 blocks, to 22. Since blocks are built on average every 10 minutes, that's the difference between a few minutes and a few hours! So, choose a transaction fee that's appropriate for what you're sending. Note that you should never drop below the minimum relay fee, which is .0001 BTC. > :warning: **WARNING:** The lower that you set your transaction fee, the longer before your transaction is built into a block. The Bitcoin Fees site lists expected times, from an expected 0 blocks, to 22. Since blocks are built on average every 10 minutes, that's the difference between a few minutes and a few hours! So, choose a transaction fee that's appropriate for what you're sending. Note that you should never drop below the minimum relay fee, which is .0001 BTC.
### Write the Raw Transaction ### Write the Raw Transaction
@ -260,7 +260,7 @@ Soon `listtransactions` should show a confirmed transaction of category 'send".
"abandoned": false "abandoned": false
} }
``` ```
You can see that it matches the `txid` and the `recipien` address. Not only does it show the `amount` sent, but it also shows the transaction `fee`. And, it's already received a confirmation, because we offered a fee that would get it swept up into a block quickly. You can see that it matches the `txid` and the `recipient` address. Not only does it show the `amount` sent, but it also shows the transaction `fee`. And, it's already received a confirmation, because we offered a fee that would get it swept up into a block quickly.
Congratulations! You're now a few satoshis poorer! Congratulations! You're now a few satoshis poorer!

View File

@ -4,15 +4,21 @@ Creating a raw transaction revealed how more complex bitcoin-cli results can't e
## Install JQ ## Install JQ
JQ is available from a [Github repository](https://stedolan.github.io/jq/). Just download for Linux, OS X, or Windows, as appropriate. For modern versions of Debian, you should be able to install JQ using `apt-get`:
```
# apt-get install jq
```
> :book: ***What is JQ?*** The repository explains it best, saying "jq is like sed for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text."
If that works, you're done!
Otherwise, you can download JQ from a [Github repository](https://stedolan.github.io/jq/). Just download a binary for Linux, OS X, or Windows, as appropriate.
Once you've downloaded the binary, you can install it on your system. If you're working on a Debian VPS as we suggest, your installation will look like this: Once you've downloaded the binary, you can install it on your system. If you're working on a Debian VPS as we suggest, your installation will look like this:
``` ```
$ mv jq-linux64 jq $ mv jq-linux64 jq
$ sudo /usr/bin/install -m 0755 -o root -g root -t /usr/local/bin jq $ sudo /usr/bin/install -m 0755 -o root -g root -t /usr/local/bin jq
``` ```
> :book: ***What is JQ?*** The repository explains it best, saying "jq is like sed for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text."
## Use JQ to Access a JSON Object Value by Key ## Use JQ to Access a JSON Object Value by Key
**Usage Example:** _Capture the hex from a signed raw transaction._ **Usage Example:** _Capture the hex from a signed raw transaction._
@ -51,7 +57,7 @@ $ bitcoin-cli sendrawtransaction $signedtx
Grabbing data out of a JSON object is easy, but what if that JSON object is in a JSON array? The `listunspent` command offers a great example, because it'll usually contain a number of different transactions. What if you want to capture specific information from _one_ of them? Grabbing data out of a JSON object is easy, but what if that JSON object is in a JSON array? The `listunspent` command offers a great example, because it'll usually contain a number of different transactions. What if you want to capture specific information from _one_ of them?
When working with a JSON array, the first thing you need to do is tell JQ which index to access. For example, you might have looked through your transactions in `listunspent` and decided that you wanted to work with the second of them. You use `'.[1]'` to access that first element. The `[]` says that we're referencing a JSON array and the `0` says we want the 0th index. When working with a JSON array, the first thing you need to do is tell JQ which index to access. For example, you might have looked through your transactions in `listunspent` and decided that you wanted to work with the second of them. You use `'.[1]'` to access that second element. The `[]` says that we're referencing a JSON array and the `1` says we want the 1st index.
``` ```
$ bitcoin-cli listunspent | jq -r '.[1]' $ bitcoin-cli listunspent | jq -r '.[1]'
{ {
@ -68,7 +74,7 @@ $ bitcoin-cli listunspent | jq -r '.[1]'
"safe": true "safe": true
} }
``` ```
You can then capture an individual value from that selected array by (1) using a pipe _within_ the JQ arguments; and then (2) requesting the specific value afterward, as in the previous example. The following would capture the `txid` from the 0th JSON object in the JSON array produced by `listunspent`: You can then capture an individual value from that selected array by (1) using a pipe _within_ the JQ arguments; and then (2) requesting the specific value afterward, as in the previous example. The following would capture the `txid` from the 1st JSON object in the JSON array produced by `listunspent`:
``` ```
$ bitcoin-cli listunspent | jq -r '.[1] | .txid' $ bitcoin-cli listunspent | jq -r '.[1] | .txid'
91261eafae15ea53dedbea7c1db748c52bbc04a85859ffd0d839bda1421fda4c 91261eafae15ea53dedbea7c1db748c52bbc04a85859ffd0d839bda1421fda4c
@ -357,7 +363,7 @@ To complete the transaction fee calculation, you subtract the .vout .amount (1.0
To do this, you'll need to install `bc`: To do this, you'll need to install `bc`:
``` ```
$ sudo apt-get intall bc $ sudo apt-get install bc
``` ```
Putting it all together creates a complete calculator in just five lines of script: Putting it all together creates a complete calculator in just five lines of script:

View File

@ -111,9 +111,11 @@ Here's what some parameter arrays will look like:
You can now send your first `curl` command by accessing the `getmininginfo` RPC: You can now send your first `curl` command by accessing the `getmininginfo` RPC:
``` ```
$ curl --user StandUp:8eaf562eaf45c33c3328bc66008f2dd1 --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmininginfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:18332/ $ curl --user StandUp:8eaf562eaf45c33c3328bc66008f2dd1 --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmininginfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:18332/
{"result":{"blocks":1772428,"difficulty":10178811.40698772,"networkhashps":91963587385939.06,"pooledtx":61,"chain":"test","warnings":"Warning: unknown new rules activated (versionbit 28)"},"error":null,"id":"curltest"}``` {"result":{"blocks":1772428,"difficulty":10178811.40698772,"networkhashps":91963587385939.06,"pooledtx":61,"chain":"test","warnings":"Warning: unknown new rules activated (versionbit 28)"},"error":null,"id":"curltest"}
Note that we provided the method, `getmininginfo`, and the parameter, `[]`, but that everything else was the standard `curl` command line.
``` ```
Note that we provided the method, `getmininginfo`, and the parameter, `[]`, but that everything else was the standard `curl` command line.
> **WARNING:** If you get a result like "Failed to connect to 127.0.0.1 port 8332: Connection refused", be sure that a line like `rpcallowip=127.0.0.1` is in your ~/.bitcoin/bitcoin.conf. If things still don't work, be sure that you're allowing access to port 18332 (or 8332) from localhost. Our standard setup from [Chapter Two: Creating a Bitcoin-Core VPS](02_0_Setting_Up_a_Bitcoin-Core_VPS.md) should do all of this. > **WARNING:** If you get a result like "Failed to connect to 127.0.0.1 port 8332: Connection refused", be sure that a line like `rpcallowip=127.0.0.1` is in your ~/.bitcoin/bitcoin.conf. If things still don't work, be sure that you're allowing access to port 18332 (or 8332) from localhost. Our standard setup from [Chapter Two: Creating a Bitcoin-Core VPS](02_0_Setting_Up_a_Bitcoin-Core_VPS.md) should do all of this.
The result is another JSON array, which is unfortunately ugly to read if you're using `curl` by hand. Fortunately, you can clean it up simply by piping it through `jq`: The result is another JSON array, which is unfortunately ugly to read if you're using `curl` by hand. Fortunately, you can clean it up simply by piping it through `jq`:
@ -224,12 +226,14 @@ $ curl --user StandUp:8eaf562eaf45c33c3328bc66008f2dd1 --data-binary '{"jsonrpc"
"error": null, "error": null,
"id": "curltest" "id": "curltest"
} }
``` ```
> **WARNING:** The parameters order is important when you are sending RPC commands using curl. There's only one argument for `getrawchangeaddress`, but consider its close cousin `getnewaddress`. That takes two arguments: first label, then type. If we sent that same `"params": ["legacy"]` instead of `"params": ["", "legacy"]`, we would get a `bech32` address with a label of `"legacy"` instead of a `legacy` address, so pay attention to the order!
At this point, we can even revert to our standard practice of saving results to variables with additional help from `jq`: At this point, we can even revert to our standard practice of saving results to variables with additional help from `jq`:
``` ```
$ changeaddress=$(curl --user StandUp:8eaf562eaf45c33c3328bc66008f2dd1 --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawchangeaddress", "params": ["legacy"] }' -H 'content-type: text/plain;' http://127.0.0.1:18332/ | jq -r '.result') $ newaddress=$(curl --user StandUp:8eaf562eaf45c33c3328bc66008f2dd1 --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawchangeaddress", "params": ["legacy"] }' -H 'content-type: text/plain;' http://127.0.0.1:18332/ | jq -r '.result')
$ echo $changeaddress $ echo $newaddress
mqdfnjgWr2r3sCCeuTDfe8fJ1CnycF2e6R mqdfnjgWr2r3sCCeuTDfe8fJ1CnycF2e6R
``` ```
No need to worry about the downloading info. It'll go to `STDERR` and be displayed on your screen, while the results go to `STDOUT` and are saved in your variable. No need to worry about the downloading info. It'll go to `STDERR` and be displayed on your screen, while the results go to `STDOUT` and are saved in your variable.

View File

@ -98,7 +98,7 @@ $ bitcoin-cli -named decoderawtransaction hexstring=$rawtxhex3
] ]
} }
``` ```
One thing of interest here is the change address, with is the second `vout`. Note that it's a `tb1` address, which means that it's Bech32; when we gave Bitcoin Core the total ability to manage our change, it did so using its default address type, Bech32, and it worked fine. That's why our change to SegWit addresses in [§4.6](04_6_Creating_a_Segwit_Transaction.md) really isn't that big of a deal, but there are some gotchas for wider usage, which we'll talk about there. One thing of interest here is the change address, which is the second `vout`. Note that it's a `tb1` address, which means that it's Bech32; when we gave Bitcoin Core the total ability to manage our change, it did so using its default address type, Bech32, and it worked fine. That's why our change to SegWit addresses in [§4.6](04_6_Creating_a_Segwit_Transaction.md) really isn't that big of a deal, but there are some gotchas for wider usage, which we'll talk about there.
Though we saw the fee in the `fundrawtransaction` output, it's not visible here. However, you can verify it with the `txfee-calc.sh` JQ script created in the [JQ Interlude](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/04_2__Interlude_Using_JQ.md): Though we saw the fee in the `fundrawtransaction` output, it's not visible here. However, you can verify it with the `txfee-calc.sh` JQ script created in the [JQ Interlude](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/04_2__Interlude_Using_JQ.md):
``` ```
@ -162,7 +162,7 @@ $ bitcoin-cli listunspent
If you must send funds with raw transactions then `fundrawtransaction` gives you a nice alternative where fees, inputs, and outputs are calculated for you, so you don't accidentally lose a bunch of money. If you must send funds with raw transactions then `fundrawtransaction` gives you a nice alternative where fees, inputs, and outputs are calculated for you, so you don't accidentally lose a bunch of money.
> :fire: ***What the power of sending coins with automated raw transactions?*** > :fire: ***What is the power of sending coins with automated raw transactions?***
> _The advantages._ It provides a nice balance. If you're sending funds by hand and `sendtoaddress` doesn't offer enough control for whatever reason, you can get some of the advantages of raw transactions without the dangers. This methodology should be used whenever possible if you're sending raw transactions by hand. > _The advantages._ It provides a nice balance. If you're sending funds by hand and `sendtoaddress` doesn't offer enough control for whatever reason, you can get some of the advantages of raw transactions without the dangers. This methodology should be used whenever possible if you're sending raw transactions by hand.

View File

@ -12,9 +12,9 @@ The catch? SegWit uses different addresses, some of which are compatible with ol
## Understand a SegWit Transaction ## Understand a SegWit Transaction
In classic transactions, signature (witness) information was stored toward the middle of the transaction, while in SegWit transactions, it's at the bottom. This goes hand-in-hand with the blocksize increases that were introduced in the SegWit upgrade. The blocksize was increased from 1M to a variable amount based on how many SegWit transactions are in a block, starting as low as 1M (no SegWit transactions) and going as high as 4M (all SegWit transactions). This variable sized was created to accomodate classic nodes, so that everything remains backward compatible. If a classic node sees a SegWit tranaction, it throws out the witness information (resulting in a smaller sized block, under the old 1M limit), while if a new node sees a SegWit transaction, it keeps the witness information (resulting in a larger sized block, up to the new 4M limit). In classic transactions, signature (witness) information was stored toward the middle of the transaction, while in SegWit transactions, it's at the bottom. This goes hand-in-hand with the blocksize increases that were introduced in the SegWit upgrade. The blocksize was increased from 1M to a variable amount based on how many SegWit transactions are in a block, starting as low as 1M (no SegWit transactions) and going as high as 4M (all SegWit transactions). This variable size was created to accomodate classic nodes, so that everything remains backward compatible. If a classic node sees a SegWit transaction, it throws out the witness information (resulting in a smaller sized block, under the old 1M limit), while if a new node sees a SegWit transaction, it keeps the witness information (resulting in a larger sized block, up to the new 4M limit).
So that's the what and how of SegWit transactions. Not that you need to know any of it to use them. Most transactions on the BitCoin network are now SegWit. They're what you're going to natively use for more transactions and receipts of money. The details are no more relevant at this point than the details of how most of Bitcoin works. So that's the what and how of SegWit transactions. Not that you need to know any of it to use them. Most transactions on the Bitcoin network are now SegWit. They're what you're going to natively use for more transactions and receipts of money. The details are no more relevant at this point than the details of how most of Bitcoin works.
## Create a SegWit Address ## Create a SegWit Address
@ -111,7 +111,7 @@ $ bitcoin-cli listaddressgroupings
## Send a SegWit Transaction The Easy Way ## Send a SegWit Transaction The Easy Way
So how do you send a Bitcoin transaction? Exactly like any other transaction. It doesn't matter if the UTXO is SegWit, the address is SegWit, or some combination thereof. You can expect `bitcoin-cli` to do the right thing. Though you can tell the differences via the addresses, they don't matter for interacting with things at the `bitcoin-cli` or RPC level. (And this is one of the advantages of using the command line and the RPC interface, as suggested in this tutorial: experts have already done the hard work for you, including things like how to send to both legacy and Bech32 addresses. You just get to use that functionality to your own advantage.) So how do you send a Segwit transaction? Exactly like any other transaction. It doesn't matter if the UTXO is SegWit, the address is SegWit, or some combination thereof. You can expect `bitcoin-cli` to do the right thing. Though you can tell the differences via the addresses, they don't matter for interacting with things at the `bitcoin-cli` or RPC level. (And this is one of the advantages of using the command line and the RPC interface, as suggested in this tutorial: experts have already done the hard work for you, including things like how to send to both legacy and Bech32 addresses. You just get to use that functionality to your own advantage.)
Here's an example of sending to a SegWit address, the easy way: Here's an example of sending to a SegWit address, the easy way:
``` ```
@ -120,7 +120,7 @@ $ bitcoin-cli sendtoaddress tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx 0.005
``` ```
If you look at your transaction, you can see the use of the Bech32 address: If you look at your transaction, you can see the use of the Bech32 address:
``` ```
$ bitcoin-cli gettransaction txid="854a833b667049ac811b4cf1cad40fa7f8dce8b0f4c1018a58b84559b6e05f42" verbose=true $ bitcoin-cli -named gettransaction txid="854a833b667049ac811b4cf1cad40fa7f8dce8b0f4c1018a58b84559b6e05f42" verbose=true
{ {
"amount": -0.00500000, "amount": -0.00500000,
"fee": -0.00036600, "fee": -0.00036600,
@ -279,7 +279,7 @@ The big thing to note is that function has changed. It was previously `pkh`, whi
There's really no complexity to creating SegWit transactions. Internally, they're structured differently from legacy transactions, but from the command line there's no difference: you just use an address with a different prefix. The only thing to watch for is that some people may not be able to send to a Bech32 address if they're using obsolete software. There's really no complexity to creating SegWit transactions. Internally, they're structured differently from legacy transactions, but from the command line there's no difference: you just use an address with a different prefix. The only thing to watch for is that some people may not be able to send to a Bech32 address if they're using obsolete software.
> :fire: ***What the power of sending coins with SegWit?*** > :fire: ***What's the power of sending coins with SegWit?***
> _The Advantages._ SegWit transactions are smaller, and so will be cheaper to send than legacy transactions due to lower fees. Bech32 doubles down on this advantage, and also creates addresses that are harder to foul up when transcribing — and that's pretty important, given that user error is one of the most likely ways to lose your bitcoins. > _The Advantages._ SegWit transactions are smaller, and so will be cheaper to send than legacy transactions due to lower fees. Bech32 doubles down on this advantage, and also creates addresses that are harder to foul up when transcribing — and that's pretty important, given that user error is one of the most likely ways to lose your bitcoins.

View File

@ -42,7 +42,7 @@ This list of all [unconfirmed transactions](https://blockchain.info/unconfirmed-
If your transaction is stuck longer than you want, you can typically do one of four things: If your transaction is stuck longer than you want, you can typically do one of four things:
**1. Wait Until it Clears.** If you sent your transaction with a low or medium fee, it should eventually go through. As shown at [Mempool Space](https://mempool.space), those with lower fees _will_ get delayed. (Take a look at the leftmost transation, and see how long it's been waiting and how much it paid for its fee.) **1. Wait Until it Clears.** If you sent your transaction with a low or medium fee, it should eventually go through. As shown at [Mempool Space](https://mempool.space), those with lower fees _will_ get delayed. (Take a look at the leftmost transaction, and see how long it's been waiting and how much it paid for its fee.)
**2. Wait Until it Expires.** If you accidentally sent with no transaction fee, or if any number or other conditions are met, then your transaction might never go through. However, your coins aren't lost. As long as you don't have a wallet that purposefully resends unconfirmed transactions, it should clear from the mempool in three days or so, and then you can try again. **2. Wait Until it Expires.** If you accidentally sent with no transaction fee, or if any number or other conditions are met, then your transaction might never go through. However, your coins aren't lost. As long as you don't have a wallet that purposefully resends unconfirmed transactions, it should clear from the mempool in three days or so, and then you can try again.
@ -50,7 +50,7 @@ If your transaction is stuck longer than you want, you can typically do one of f
**4. Use CPFP as the Receiver.** Alternatively, if you are the receiver of the transaction, you can use CPFP (Child-pays-for-parent) to use the unconfirmed transaction as an input to a new transaction. See [§5.3: Funding a Transaction with CPFP](05_3_Funding_a_Transaction_with_CPFP.md). **4. Use CPFP as the Receiver.** Alternatively, if you are the receiver of the transaction, you can use CPFP (Child-pays-for-parent) to use the unconfirmed transaction as an input to a new transaction. See [§5.3: Funding a Transaction with CPFP](05_3_Funding_a_Transaction_with_CPFP.md).
## Summary: Watching for Stuck Transactios ## Summary: Watching for Stuck Transactions
This is an introduction to the power of Bitcoin transactions. If you know that a transaction is stuck, then you can decide to free it up with features like RBF or CPFP. This is an introduction to the power of Bitcoin transactions. If you know that a transaction is stuck, then you can decide to free it up with features like RBF or CPFP.

View File

@ -1,8 +1,8 @@
# 5.2: Resending a Transaction with RBF # 5.2: Resending a Transaction with RBF
If your Bitcoin transaction is stuck, and you're sender, you can resend it using RBF (replace-by-fee). However, that's not all that RBF can do: it's generally a powerful and multipurpose feature that allows Bitcoin senders to recreate transactions for a variety of reasons. If your Bitcoin transaction is stuck, and you're the sender, you can resend it using RBF (replace-by-fee). However, that's not all that RBF can do: it's generally a powerful and multipurpose feature that allows Bitcoin senders to recreate transactions for a variety of reasons.
> :warning: **VERSION WARNING:** This is an innovation from Bitcoin Core v 0.12.0,that reached full maturity in the Bitcoin Core wallet with Bitcoin Core v 0.14.0. Obviously, most people should be using it by now. > :warning: **VERSION WARNING:** This is an innovation from Bitcoin Core v 0.12.0, that reached full maturity in the Bitcoin Core wallet with Bitcoin Core v 0.14.0. Obviously, most people should be using it by now.
## Opt-In for RBF ## Opt-In for RBF
@ -38,7 +38,7 @@ $ bitcoin-cli -named gettransaction txid=5b953a0bdfae0d11d20d195ea43ab7c31a5471d
"hex": "02000000000101fa364ad3cbdb08dd0b83aac009a42a9ed00594acd6883d2a466699996cd69d8b01000000000100000002ea1d000000000000160014d591091b8074a2375ed9985a9c4b18efecfd416501000000000000001600146c45d3afa8762086c4bd76d8a71ac7c976e1919602473044022077007dff4df9ce75430e3065c82321dca9f6bdcfd5812f8dc0daeb957d3dfd1602203a624d4e9720a06def613eeea67fbf13ce1fb6188d3b7e780ce6e40e859f275d0121038a2702938e548eaec28feb92c7e4722042cfd1ea16bec9fc274640dc5be05ec500000000" "hex": "02000000000101fa364ad3cbdb08dd0b83aac009a42a9ed00594acd6883d2a466699996cd69d8b01000000000100000002ea1d000000000000160014d591091b8074a2375ed9985a9c4b18efecfd416501000000000000001600146c45d3afa8762086c4bd76d8a71ac7c976e1919602473044022077007dff4df9ce75430e3065c82321dca9f6bdcfd5812f8dc0daeb957d3dfd1602203a624d4e9720a06def613eeea67fbf13ce1fb6188d3b7e780ce6e40e859f275d0121038a2702938e548eaec28feb92c7e4722042cfd1ea16bec9fc274640dc5be05ec500000000"
} }
``` ```
The `bip125-replaceable` flag will stay `yes` until the transaction receives confirmations. At that point, it is no longer replacable. The `bip125-replaceable` flag will stay `yes` until the transaction receives confirmations. At that point, it is no longer replaceable.
> :book: ***Should I trust transactions with no confirmations?*** No, never. This was true before RBF and it was true after RBF. Transactions must receive confirmations before they are trustworthy. This is especially true if a transaction is marked as `bip125-replaceable`, because then it can be ... replaced. > :book: ***Should I trust transactions with no confirmations?*** No, never. This was true before RBF and it was true after RBF. Transactions must receive confirmations before they are trustworthy. This is especially true if a transaction is marked as `bip125-replaceable`, because then it can be ... replaced.

View File

@ -87,7 +87,7 @@ $ utxo_vout=0
$ recipient2=$(bitcoin-cli getrawchangeaddress) $ recipient2=$(bitcoin-cli getrawchangeaddress)
``` ```
2. Create a raw transaction using your unconfirmed transaction an input. 2. Create a raw transaction using your unconfirmed transaction as an input.
3. Double the transaction fees (or more). 3. Double the transaction fees (or more).
When you take these steps, everything should look totally normal, despite the fact that you're working with an unconfirmed transaction. To verify that all was well, we even looked at the results of our signature before we saved off the information to a variable: When you take these steps, everything should look totally normal, despite the fact that you're working with an unconfirmed transaction. To verify that all was well, we even looked at the results of our signature before we saved off the information to a variable:

View File

@ -7,7 +7,7 @@ Basic bitcoin transactions: (1) send funds; (2) to a single P2PKH or SegWit reci
After working through this chapter, a developer will be able to: After working through this chapter, a developer will be able to:
* Create Multisignature Bitcoin Addresses Using Bitcoin Fundamentals * Create Multisignature Bitcoin Addresses Using Bitcoin Fundamentals
* Create Multisignature Bitcoin Addresses Using Easiser Mechanisms * Create Multisignature Bitcoin Addresses Using Easier Mechanisms
Supporting objectives include the ability to: Supporting objectives include the ability to:

View File

@ -4,11 +4,11 @@ The first way to vary how you send a basic transaction is to use a multisig. Thi
## Understand How Multisigs Work ## Understand How Multisigs Work
In a typical P2PKH or SegWit transaction, bitcoins are sent to an address based on your public key, which in turn means that the related private key is required to unlock the transaction, solving the cryptographic puzzle and allowing you to reuse the funds. But what if you could instead lock a transaction with _multiple_ private keys. This would effectively allow funds to be sent to a group of people, where those people all have to agree to reuse the funds. In a typical P2PKH or SegWit transaction, bitcoins are sent to an address based on your public key, which in turn means that the related private key is required to unlock the transaction, solving the cryptographic puzzle and allowing you to reuse the funds. But what if you could instead lock a transaction with _multiple_ private keys? This would effectively allow funds to be sent to a group of people, where those people all have to agree to reuse the funds.
> :book: ***What is a multisignature?*** A multisignature is a methodology that allows more than one person to jointly create a digital signature. It's a general technique for the cryptographic use of keys that goes far beyond Bitcoin. > :book: ***What is a multisignature?*** A multisignature is a methodology that allows more than one person to jointly create a digital signature. It's a general technique for the cryptographic use of keys that goes far beyond Bitcoin.
Technically, a multisignature cryptographic puzzle is created by Bitcoin using the OP_CHECKMULTISIG command, and typically that's encapsulated in a P2SH address. [§10.4: Scripting a Multisig](10_4_Scripting_a_Multisig.md) will detail how that works more precisely. For now, all you need to know is that you can use `bitcoin-cli` command to create multisignature addresses; funds can be mailed to these addresses just like any normal P2PKH or Segwit address, but multiple private keys will be required for the redemption of the funds. Technically, a multisignature cryptographic puzzle is created by Bitcoin using the OP_CHECKMULTISIG command, and typically that's encapsulated in a P2SH address. [§10.4: Scripting a Multisig](10_4_Scripting_a_Multisig.md) will detail how that works more precisely. For now, all you need to know is that you can use `bitcoin-cli` command to create multisignature addresses; funds can be sent to these addresses just like any normal P2PKH or Segwit address, but multiple private keys will be required for the redemption of the funds.
> :book: ***What is a multisignature transaction?*** A multisignature transaction is a Bitcoin transaction that has been sent to a multisignature address, thus requiring the signatures of certain people from the multisignature group to reuse the funds. > :book: ***What is a multisignature transaction?*** A multisignature transaction is a Bitcoin transaction that has been sent to a multisignature address, thus requiring the signatures of certain people from the multisignature group to reuse the funds.
@ -65,7 +65,7 @@ machine2$ bitcoin-cli -named getaddressinfo address=$address2
``` ```
The `pubkey` address (`02bfde48be4aa8f4bf76c570e98a8d287f9be5638412ab38dede8e78df82f33fa3`) is what's required. Copy it over to your local machine by whatever means you find most efficient and _least error prone_. The `pubkey` address (`02bfde48be4aa8f4bf76c570e98a8d287f9be5638412ab38dede8e78df82f33fa3`) is what's required. Copy it over to your local machine by whatever means you find most efficient and _least error prone_.
This process needs to be undertaken for _every_ address from a machine other than the one where the multisig is being built. Obviously, if some third-party is creating the address, then you'll to do this for every address. This process needs to be undertaken for _every_ address from a machine other than the one where the multisig is being built. Obviously, if some third-party is creating the address, then you'll need to do this for every address.
> :warning: **WARNING:** Bitcoin's use of public-key hashes as addresses, instead of public keys, actually represents an additional layer of security. Thus, sending a public key slightly increases the vulnerability of the associated address, for some far-future possibility of a compromise of the elliptic curve. You shouldn't worry about having to occasionally send out a public key for a usage such as this, but you should be aware that the public-key hashes represent security, and so the actual public keys should not be sent around willy nilly. > :warning: **WARNING:** Bitcoin's use of public-key hashes as addresses, instead of public keys, actually represents an additional layer of security. Thus, sending a public key slightly increases the vulnerability of the associated address, for some far-future possibility of a compromise of the elliptic curve. You shouldn't worry about having to occasionally send out a public key for a usage such as this, but you should be aware that the public-key hashes represent security, and so the actual public keys should not be sent around willy nilly.
@ -97,13 +97,13 @@ The _address_ is what you'll give out to people who want to send funds. You'll n
> :link: **TESTNET vs MAINNET:** On testnet, the prefix for P2SH addresses is `2`, while on mainnet, it's `3`. > :link: **TESTNET vs MAINNET:** On testnet, the prefix for P2SH addresses is `2`, while on mainnet, it's `3`.
The _redeemScript_ is what you need to redeem the funds (along with the private keys for "m" of the "n" addresses). This script is another special feature of P2SH addresses and will be fully explained in [§8.1: Building a Bitcoin Script with P2SH](08_1_Building_a_Bitcoin_Script_with_P2SH.md). For now, just be aware that it's a bit of data that's required to get your money. The _redeemScript_ is what you need to redeem the funds (along with the private keys for "m" of the "n" addresses). This script is another special feature of P2SH addresses and will be fully explained in [§10.3: Running a Bitcoin Script with P2SH](10_3_Running_a_Bitcoin_Script_with_P2SH.md). For now, just be aware that it's a bit of data that's required to get your money.
The _descriptor_ is the standardized description for an address that we met in [§3.5: Understanding the Descriptor](03_5_Understanding_the_Descriptor.md). It provides one way that you could import this address back to the other machine, using the `importmulti` RPC. The _descriptor_ is the standardized description for an address that we met in [§3.5: Understanding the Descriptor](03_5_Understanding_the_Descriptor.md). It provides one way that you could import this address back to the other machine, using the `importmulti` RPC.
> :book: ***What is a P2SH address?*** P2SH stands for Pay-to-script-hash. It's a different type of recipient than a standard P2PKH address or even a Bech32, used for funds whose redemption are based on more complex Bitcoin Scripts. `bitcoin-cli` uses P2SH encapsulation to help standardize and simplify its multisigs as "P2SH multisigs", just like P2SH-SegWit was using P2SH to standardize its SegWit addresses and make them fully backward compatible. > :book: ***What is a P2SH address?*** P2SH stands for Pay-to-script-hash. It's a different type of recipient than a standard P2PKH address or even a Bech32, used for funds whose redemption are based on more complex Bitcoin Scripts. `bitcoin-cli` uses P2SH encapsulation to help standardize and simplify its multisigs as "P2SH multisigs", just like P2SH-SegWit was using P2SH to standardize its SegWit addresses and make them fully backward compatible.
> :warning: **WARNING:** P2SH multisig addresses, like the ones created by `bitcoin-cli`, have a limit for "m" and "n" in multisigs based on the maximum size of the redeem script, which is currently 520 bytes. Pratically, you won't hit this unless you're doing something excessive. > :warning: **WARNING:** P2SH multisig addresses, like the ones created by `bitcoin-cli`, have a limit for "m" and "n" in multisigs based on the maximum size of the redeem script, which is currently 520 bytes. Practically, you won't hit this unless you're doing something excessive.
### Save Your Work ### Save Your Work
@ -199,7 +199,7 @@ As you can see, there was nothing unusual in the creation of the transaction, an
Multisig addresses lock funds to multiple private keys — possibly requiring all of those private keys for redemption, and possibly requiring just some from the set. They're easy enough to create with `bitcoin-cli` and they're entirely normal to send to. This ease is due in large part to the invisible use of P2SH (pay-to-script-hash) addresses, a large topic that we've touched upon twice now, with P2SH-SegWit and multisig addresses, and one that will get more coverage in the future. Multisig addresses lock funds to multiple private keys — possibly requiring all of those private keys for redemption, and possibly requiring just some from the set. They're easy enough to create with `bitcoin-cli` and they're entirely normal to send to. This ease is due in large part to the invisible use of P2SH (pay-to-script-hash) addresses, a large topic that we've touched upon twice now, with P2SH-SegWit and multisig addresses, and one that will get more coverage in the future.
> :fire: ***What is the power of multisignatures?*** Multisignatures allow the modeling of a variety of financial arrangements such as corporations, partnerships, committees, and other groups. A 1-of-2 multisig might be a married couple's joint bank account, while a 2-of-2 multisig might be used for large expenditures by a Limited Liability Partnership. Multisignatures also form one of the bases of Smart Contracts. For example, a real estate deal could be closed with a 2-of-3 multisig, where the signatures are submitted by the buyer, the seller, and an escrow agent. Once the escrow agent agrees that all of the conditions have been met, he frees up the funds for the seller; or alternatively, the buyer and seller can jointly free the funds. > :fire: ***What is the power of multisignatures?*** Multisignatures allow the modeling of a variety of financial arrangements such as corporations, partnerships, committees, and other groups. A 1-of-2 multisig might be a married couple's joint bank account, while a 2-of-2 multisig might be used for large expenditures by a Limited Liability Partnership. Multisignatures also form one of the bases of Smart Contracts. For example, a real estate deal could be closed with a 2-of-3 multisig, where the signatures are submitted by the buyer, the seller, and a licensed escrow agent. Once the escrow agent agrees that all of the conditions have been met, he frees up the funds for the seller; or alternatively, the buyer and seller can jointly free the funds.
## What's Next? ## What's Next?

View File

@ -8,7 +8,7 @@ To start with, you need to find your funds; your computer doesn't know to look f
``` ```
$ bitcoin-cli -named importaddress address=2NAGfA4nW6nrZkD5je8tSiAcYB9xL2xYMCz $ bitcoin-cli -named importaddress address=2NAGfA4nW6nrZkD5je8tSiAcYB9xL2xYMCz
``` ```
If you've got a pruned node (and you probably do), you'll instead need to tell it no to rescan: If you've got a pruned node (and you probably do), you'll instead need to tell it not to rescan:
``` ```
$ bitcoin-cli -named importaddress address=2NAGfA4nW6nrZkD5je8tSiAcYB9xL2xYMCz rescan="false" $ bitcoin-cli -named importaddress address=2NAGfA4nW6nrZkD5je8tSiAcYB9xL2xYMCz rescan="false"
``` ```
@ -177,7 +177,7 @@ That produces scary errors and says that it's `failing`. This is all fine. You c
### Repeat for Other Signers ### Repeat for Other Signers
You can now pass the transaction on, to be signed again by anyone else required for the mutisig. They do this by running the same signing command that you did but: (1) with the longer `hex` that you output from (`bitcoin-cli -named signrawtransactionwithkey hexstring=$rawtxhex prevtxs='''[ { "txid": "'$utxo_txid'", "vout": '$utxo_vout', "scriptPubKey": "'$utxo_spk'", "redeemScript": "'$redeem_script'" } ]''' privkeys='["cMgb3KM8hPATCtgMKarKMiFesLft6eEw3DY6BB8d97fkeXeqQagw"]' | jq -r '. | .hex'`); and (2) with their own private key. You can now pass the transaction on, to be signed again by anyone else required for the multisig. They do this by running the same signing command that you did but: (1) with the longer `hex` that you output from (`bitcoin-cli -named signrawtransactionwithkey hexstring=$rawtxhex prevtxs='''[ { "txid": "'$utxo_txid'", "vout": '$utxo_vout', "scriptPubKey": "'$utxo_spk'", "redeemScript": "'$redeem_script'" } ]''' privkeys='["cMgb3KM8hPATCtgMKarKMiFesLft6eEw3DY6BB8d97fkeXeqQagw"]' | jq -r '.hex'`); and (2) with their own private key.
> :information_source: **NOTE — M-OF-N VS N-OF-N:** Obviously, if you have an n-of-n signature (like the 2-of-2 multisignature in this example), then everyone has to sign, but if you hae a m-of-n multisignature where "m < n", then the signature will be complete when only some ("m") of the signers have signed. > :information_source: **NOTE — M-OF-N VS N-OF-N:** Obviously, if you have an n-of-n signature (like the 2-of-2 multisignature in this example), then everyone has to sign, but if you hae a m-of-n multisignature where "m < n", then the signature will be complete when only some ("m") of the signers have signed.
@ -215,7 +215,7 @@ This redemption methodology shows a standard way to sign and reuse P2SH transact
1. Include the `scriptPubKey`, which explains the P2SH cryptographic puzzle. 1. Include the `scriptPubKey`, which explains the P2SH cryptographic puzzle.
2. Include the `redeemScript`, which solves the P2SH cryptographic puzzle, and introduces a new puzzle of its own. 2. Include the `redeemScript`, which solves the P2SH cryptographic puzzle, and introduces a new puzzle of its own.
3. Be run on each machine holding required signatures. 3. Be run on each machine holding required private keys.
4. Include the relevant signatures, which solve the redeemScript puzzle. 4. Include the relevant signatures, which solve the redeemScript puzzle.
Here, we saw this methodology used to redeem multisig funds. In the future you can also use it to redeem funds that were locked with other, more complex P2SH scripts, as explained starting in Chapter 9. Here, we saw this methodology used to redeem multisig funds. In the future you can also use it to redeem funds that were locked with other, more complex P2SH scripts, as explained starting in Chapter 9.

View File

@ -15,13 +15,13 @@ You start off creating P2PKH addresses and retrieving public keys, as usual, for
machine1$ address3=$(bitcoin-cli getnewaddress) machine1$ address3=$(bitcoin-cli getnewaddress)
machine1$ echo $address3 machine1$ echo $address3
tb1q4ep2vmakpkkj6mflu94x5f94q662m0u5ad0t4w tb1q4ep2vmakpkkj6mflu94x5f94q662m0u5ad0t4w
machine1$ bitcoin-cli -named getaddressinfo address=$address3 | jq -r '. | .pubkey' machine1$ bitcoin-cli -named getaddressinfo address=$address3 | jq -r '.pubkey'
0297e681bff16cd4600138449e2527db4b2f83955c691a1b84254ecffddb9bfbfc 0297e681bff16cd4600138449e2527db4b2f83955c691a1b84254ecffddb9bfbfc
machine2$ address4=$(bitcoin-cli getnewaddress) machine2$ address4=$(bitcoin-cli getnewaddress)
machine2$ echo $address4 machine2$ echo $address4
tb1qa9v5h6zkhq8wh0etnv3ae9cdurkh085xufl3de tb1qa9v5h6zkhq8wh0etnv3ae9cdurkh085xufl3de
machine2$ bitcoin-cli -named getaddressinfo address=$address4 | jq -r '. | .pubkey' machine2$ bitcoin-cli -named getaddressinfo address=$address4 | jq -r '.pubkey'
02a0d96e16458ff0c90db4826f86408f2cfa0e960514c0db547ff152d3e567738f 02a0d96e16458ff0c90db4826f86408f2cfa0e960514c0db547ff152d3e567738f
``` ```
@ -49,14 +49,14 @@ As noted in the previous section, it currently doesn't matter whether you use ad
Afterward, the members of the multisig will still need to run `importaddress` to watch for funds received on the multisig address: Afterward, the members of the multisig will still need to run `importaddress` to watch for funds received on the multisig address:
``` ```
machine1$ bitcoin-cli -named importaddress address=2Mzw7WBvh9RAQ4ssKqxyNyP7L9NAojLqSW8 rescan="false" machine1$ bitcoin-cli -named importaddress address=tb1q9as46kupwcxancdx82gw65365svlzdwmjal4uxs23t3zz3rgg3wqpqlhex rescan="false"
machine2$ bitcoin-cli -named importaddress address=2Mzw7WBvh9RAQ4ssKqxyNyP7L9NAojLqSW8 rescan="false" machine2$ bitcoin-cli -named importaddress address=tb1q9as46kupwcxancdx82gw65365svlzdwmjal4uxs23t3zz3rgg3wqpqlhex rescan="false"
``` ```
## Respend with an Automated Transaction ## Respend with an Automated Transaction
Afterward, you will be able to receive funds on the multisiganture address as normal. The use of `addmultisigaddress` is simply a bureaucratic issue on the part of the recipients: a bit of bookkeeping to make life easier for them when they want to spend their funds. Afterward, you will be able to receive funds on the multisignature address as normal. The use of `addmultisigaddress` is simply a bureaucratic issue on the part of the recipients: a bit of bookkeeping to make life easier for them when they want to spend their funds.
But, it makes life a lot easier. Because information was saved into the wallet, the signers will be able to respend the funds sent to the multisignature address exactly the same as any other address ... other than the need to sign on multiple machines. But, it makes life a lot easier. Because information was saved into the wallet, the signers will be able to respend the funds sent to the multisignature address exactly the same as any other address ... other than the need to sign on multiple machines.
@ -113,7 +113,7 @@ As with the shortcut discussed in [§4.5: Sending Coins with Automated Raw Trans
## Summary: Sending & Spending an Automated Multisig ## Summary: Sending & Spending an Automated Multisig
There's an easier way to resepend funds sent to multisig addresses that simply requires use of the `addmultisigaddress` command when you create your address. It doesn't demonstrate the intricacies of P2SH respending, and it doesn't give you expansive control, but if you just want to get your money, this is the way to go. There's an easier way to respend funds sent to multisig addresses that simply requires use of the `addmultisigaddress` command when you create your address. It doesn't demonstrate the intricacies of P2SH respending, and it doesn't give you expansive control, but if you just want to get your money, this is the way to go.
## What's Next? ## What's Next?

View File

@ -4,22 +4,22 @@
Partially Signed Bitcoin Transactions (PSBTs) are the newest way to vary the creation of basic Bitcoin transactions. They do so by introducing collaboration into every step of the process, allowing people (or programs) to not just authenticate transactions together (as with multisigs), but also to easily create, fund, and broadcast collaboratively. Partially Signed Bitcoin Transactions (PSBTs) are the newest way to vary the creation of basic Bitcoin transactions. They do so by introducing collaboration into every step of the process, allowing people (or programs) to not just authenticate transactions together (as with multisigs), but also to easily create, fund, and broadcast collaboratively.
> :warning: **VERSION WARNING:** This is an innovation from Bitcoin Core v 0.17.0. Earlier versions of Bitcoin Core will not be able to work with the PSBT while it is in process (though they will still be able to recognize the final transaction). Some updates and upgrades for PSBTs have continued through 0.20.0. > :warning: **VERSION WARNING:** This is an innovation from Bitcoin Core v 0.17.0. Earlier versions of Bitcoin Core will not be able to work with the PSBT while it is in progress (though they will still be able to recognize the final transaction). Some updates and upgrades for PSBTs have continued through 0.20.0.
## Understand How PSBTs Work ## Understand How PSBTs Work
Multisignatures were great for the very specific case of jointly holding funds and setting rules for who among the joint signers could authenticate the use of those funds. There are many use cases, such as: a spousal joint bank account (a 1-of-2 signature); a fiduciary requirement for dual control (a 2-of-2 signature); and an escrow (a 2-of-3 signature). Multisignatures were great for the very specific case of jointly holding funds and setting rules for whom among the joint signers could authenticate the use of those funds. There are many use cases, such as: a spousal joint bank account (a 1-of-2 signature); a fiduciary requirement for dual control (a 2-of-2 signature); and an escrow (a 2-of-3 signature).
> :book: ***What is a PSBT?*** As the name suggests, a PSBT is a transaction that has not been fully signed. That's important, because once a transaction is signed, its content is locked in. [BIP174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki) defined an abstracted methodology for putting PSBTs together that describes and standardizes roles in their collaborative creation. A *Creator* proposes a transaction; one or more *Updaters* supplement it; and one or more *Signers* authenticate it; before a *Finalizer* completes it; and an *Extracter* turn it into a transaction for the Bitcoin network. There may also be a *Combiner* who merges parallel PSBTs from different users. > :book: ***What is a PSBT?*** As the name suggests, a PSBT is a transaction that has not been fully signed. That's important, because once a transaction is signed, its content is locked in. [BIP174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki) defined an abstracted methodology for putting PSBTs together that describes and standardizes roles in their collaborative creation. A *Creator* proposes a transaction; one or more *Updaters* supplement it; and one or more *Signers* authenticate it; before a *Finalizer* completes it; and an *Extracter* turns it into a transaction for the Bitcoin network. There may also be a *Combiner* who merges parallel PSBTs from different users.
PSBTs may initially look sort of the same as multi-sigs because they have a single overlapping bit of functionality: the ability to jointly sign a transaction. However, they were created for a totally different use case. PSBTs recognize the need for multiple programs to jointly create a transaction for a number of different reasons, and they provide a regularized format for doing so. They're especially useful for use cases involving hardware wallets (for which, see §7.3), which are protected from full access to the internet and tend to have minimal transaction history. PSBTs may initially look sort of the same as multi-sigs because they have a single overlapping bit of functionality: the ability to jointly sign a transaction. However, they were created for a totally different use case. PSBTs recognize the need for multiple programs to jointly create a transaction for a number of different reasons, and they provide a regularized format for doing so. They're especially useful for use cases involving hardware wallets (for which, see [§7.3](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/07_3_Integrating_with_Hardware_Wallets.md)), which are protected from full access to the internet and tend to have minimal transaction history.
In general, PSBTs provide a number of functional elements that improve this use case: In general, PSBTs provide a number of functional elements that improve this use case:
1. They provide a _standard_ for collaboratively creating transactions, whereas previous methodologies (including the multi-sig one from the previous chapter) were implementation dependent. 1. They provide a _standard_ for collaboratively creating transactions, whereas previous methodologies (including the multi-sig one from the previous chapter) were implementation dependent.
2. They support a _wider variety of use cases_, including simple joint funding. 2. They support a _wider variety of use cases_, including simple joint funding.
3. They support _hardware wallets_ and other cases where a node may not have full transaction history. 3. They support _hardware wallets_ and other cases where a node may not have full transaction history.
4. They optional allow for the combination of _non-serialized transactions_, not requiring an ever-bigger hex code to be passed from user to user. 4. They optionally allow for the combination of _non-serialized transactions_, not requiring an ever-bigger hex code to be passed from user to user.
PSBTs do their work by supplementing normal transaction information with a set of inputs and outputs, each of which defines everything you need to know about those UTXOs, so that even an airgapped wallet can make an informed decision about signatures. Thus, an input lists out the amount of money in a UTXO and what needs to be done to spend it, while an output does the same for the UTXOs it's creating. PSBTs do their work by supplementing normal transaction information with a set of inputs and outputs, each of which defines everything you need to know about those UTXOs, so that even an airgapped wallet can make an informed decision about signatures. Thus, an input lists out the amount of money in a UTXO and what needs to be done to spend it, while an output does the same for the UTXOs it's creating.
@ -28,7 +28,7 @@ This first section will outline the standard PSBT process of: Creator, Updater,
## Create a PSBT the Old-Fashioned Way ## Create a PSBT the Old-Fashioned Way
#### PSBT Role: Creator #### PSBT Role: Creator
The easiest way to create a PSBT is to take an existing transaction and use `converttopsbt` to turn it into a PSBT. This is certainly not the _best_ way since it requires you to make a transaction for one format (a raw transaction) then convert it to another (PSBT), but if you've got old software that can only generate raw transaction, you may need to use it. The easiest way to create a PSBT is to take an existing transaction and use `converttopsbt` to turn it into a PSBT. This is certainly not the _best_ way since it requires you to make a transaction for one format (a raw transaction) then convert it to another (PSBT), but if you've got old software that can only generate a raw transaction, you may need to use it.
You just create your raw transaction normally: You just create your raw transaction normally:
@ -467,7 +467,7 @@ $ bitcoin-cli analyzepsbt $psbt_new_f
"next": "extractor" "next": "extractor"
} }
``` ```
Now would you realy want to use `walletcreatefundedpsbt` if you were creating a `bitcoin-cli` program? Probably not. But it's the same analysis as whether to use `fundrawtransaction`. Do you let Bitcoin Core do the analysis and calculation and decisions, or do you take that on yourself? Now would you really want to use `walletcreatefundedpsbt` if you were creating a `bitcoin-cli` program? Probably not. But it's the same analysis as whether to use `fundrawtransaction`. Do you let Bitcoin Core do the analysis and calculation and decisions, or do you take that on yourself?
## Send a PSBT ## Send a PSBT
#### PSBT Role: Extractor #### PSBT Role: Extractor

View File

@ -6,7 +6,7 @@ Now that you've learned the basic workflow of generating a PSBT, you probably wa
Following are three examples of using PSBTs for: multi-sigs, pooling money, and joining coins. Following are three examples of using PSBTs for: multi-sigs, pooling money, and joining coins.
> :warning: **VERSION WARNING:** This is an innovation from Bitcoin Core v 0.17.0. Earlier versions of Bitcoin Core will not be able to work with the PSBT while it is in process (though they will still be able to recognize the final transaction). > :warning: **VERSION WARNING:** This is an innovation from Bitcoin Core v 0.17.0. Earlier versions of Bitcoin Core will not be able to work with the PSBT while it is in progress (though they will still be able to recognize the final transaction).
## Use a PSBT to Spend MultiSig Funds ## Use a PSBT to Spend MultiSig Funds
@ -425,7 +425,7 @@ Second, it's a lot more scalable. Consider a 3-of-5 multisig. Under the old meth
Multisigs like the one used in the previous example are often used to receive payments for collaborative work, whether it be royalties for a book or payments made to a company. In that situation, the above example works great: the two participants receive their money which they then split up. But what about the converse case, where two (or more) participants want to set up a joint venture, and they need to seed it with money? Multisigs like the one used in the previous example are often used to receive payments for collaborative work, whether it be royalties for a book or payments made to a company. In that situation, the above example works great: the two participants receive their money which they then split up. But what about the converse case, where two (or more) participants want to set up a joint venture, and they need to seed it with money?
The traditional answer is to create a multisig, then to have the participants individually send their funds to it. The problem is that the first payer has to depend on the good faith of the second, and that doesn't built on the strength of Bitcoin, which is its _trustlessness_. Fortunately, with the advent of PSBTs, we can now make trustless payments that pool funds. The traditional answer is to create a multisig, then to have the participants individually send their funds to it. The problem is that the first payer has to depend on the good faith of the second, and that doesn't build on the strength of Bitcoin, which is its _trustlessness_. Fortunately, with the advent of PSBTs, we can now make trustless payments that pool funds.
> :book: ***What does trustless mean?*** Trustless means that no participant has to trust any other participant. They instead expect the software protocols to ensure that everything is enacted fairly in an expected manner. Bitcoin is a trustless protocol because you don't need anyone else to act in good faith; the system manages it. Similarly, PSBTs allow for the trustless creation of transactions that pool or split funds. > :book: ***What does trustless mean?*** Trustless means that no participant has to trust any other participant. They instead expect the software protocols to ensure that everything is enacted fairly in an expected manner. Bitcoin is a trustless protocol because you don't need anyone else to act in good faith; the system manages it. Similarly, PSBTs allow for the trustless creation of transactions that pool or split funds.
@ -588,6 +588,8 @@ Each user puts in their own UTXO, and each one receives a corresponding output.
The best way to manage a CoinJoin is to send out the base PSBT to all the parties (who could be numerous), and then have them each sign the PSBT and send back to a single party who will combine, finalize, and send. The best way to manage a CoinJoin is to send out the base PSBT to all the parties (who could be numerous), and then have them each sign the PSBT and send back to a single party who will combine, finalize, and send.
> :book: ***What is CoinJoin?*** CoinJoin is a methodology whereby a group of people can mix together their cryptocurrency, helping to reduce fungibility for all the coins. Each person puts in and takes out the same amount of coins (minus transaction fees) in a multi-person transaction that is simultaneously conducted by a _large_ number of people. It's designed to be "trustless" so that the parties don't need to know or trust each other. A CoinJoin ultimately increases anonymity by making the coins hard to trace. The Wasabi Wallet and a number of "mixer" services support CoinJoin at the large-scale necessary for improved anonymity.
## Summary: Using a Partially Signed Bitcoin Transaction ## Summary: Using a Partially Signed Bitcoin Transaction
You've now seen the PSBT process that you learned in [§7.1](07_1_Creating_a_Partially_Signed_Bitcoin_Transaction.md) in use in three real-life examples: creating a multi-sig, pooling funds, and CoinJoining. These were all theoretically possible in classic Bitcoin by having multiple people sign carefully constructed transactions, but PSBTs make it standardized and simple. You've now seen the PSBT process that you learned in [§7.1](07_1_Creating_a_Partially_Signed_Bitcoin_Transaction.md) in use in three real-life examples: creating a multi-sig, pooling funds, and CoinJoining. These were all theoretically possible in classic Bitcoin by having multiple people sign carefully constructed transactions, but PSBTs make it standardized and simple.
@ -598,4 +600,4 @@ That last point, on creating a transaction on one machine and signing on another
## What's Next? ## What's Next?
Continue "Expanding Bitcoin Transactions with PSBTs" with [§7.3: Inegrating with Hardware Wallets](07_3_Integrating_with_Hardware_Wallets.md). Continue "Expanding Bitcoin Transactions with PSBTs" with [§7.3: Integrating with Hardware Wallets](07_3_Integrating_with_Hardware_Wallets.md).

View File

@ -2,27 +2,27 @@
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
One of the greatest powers of PSBTs is the ability to hand transactions off to hardware wallets. This will be a great development tool for you if you continue to program with Bitcoin. However, you can't test it out now if you're using one of the configurations we suggest for this course — a VM on Linode per [§2.1](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/02_1_Setting_Up_a_Bitcoin-Core_VPS_with_StackScript.md) or an even more farflung option such an AWS per [§2.2](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/02_2_Setting_Up_Bitcoin_Core_Other.md) — because obviously you won't have any way to hook a hardware wallet up to your remote, virtual machine. One of the greatest powers of PSBTs is the ability to hand transactions off to hardware wallets. This will be a great development tool for you if you continue to program with Bitcoin. However, you can't test it out now if you're using one of the configurations we suggest for this course — a VM on Linode per [§2.1](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/02_1_Setting_Up_a_Bitcoin-Core_VPS_with_StackScript.md) or an even more farflung option such as AWS per [§2.2](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/02_2_Setting_Up_Bitcoin_Core_Other.md) — because obviously you won't have any way to hook a hardware wallet up to your remote, virtual machine.
>: ***What is a Hardware Wallet?*** A hardware wallet is an electronic device that improves the security of cryptocurrency by maintaing all the private keys on the device, rather than ever putting them on a computer directly connected to the internet. Hardware wallets have specific protocols for providing online interactions, usually managed by a program talking to the device through a USB port. In this chapter, we'll be managing a hardware wallet with `bitcoin-cli` and the `hwy.py` program. > :book: ***What is a Hardware Wallet?*** A hardware wallet is an electronic device that improves the security of a cryptocurrency by maintaining all the private keys on the device, rather than ever putting them on a computer directly connected to the internet. Hardware wallets have specific protocols for providing online interactions, usually managed by a program talking to the device through a USB port. In this chapter, we'll be managing a hardware wallet with `bitcoin-cli` and the `hwy.py` program.
You have three options for moving through this chapter on hardware wallets: (1) read along without testing the code; (2) install Bitcoin on a local machine to fully test these commands; or (3) skip straight ahead to [Chapter 8: Expanding Bitcoin Transactions in Other Ways](08_0_Expanding_Bitcoin_Transactions_Other.md). We suggest option #1, but if you really want to get your hands dirty we'll also give some support for #2 by talking about using a Macintosh (a hardware-platform supported by [Bitcoin Standup](https://github.com/BlockchainCommons/Bitcoin-Standup)) for testing. You have three options for moving through this chapter on hardware wallets: (1) read along without testing the code; (2) install Bitcoin on a local machine to fully test these commands; or (3) skip straight ahead to [Chapter 8: Expanding Bitcoin Transactions in Other Ways](08_0_Expanding_Bitcoin_Transactions_Other.md). We suggest option #1, but if you really want to get your hands dirty we'll also give some support for #2 by talking about using a Macintosh (a hardware-platform supported by [Bitcoin Standup](https://github.com/BlockchainCommons/Bitcoin-Standup)) for testing.
> :warning: **VERSION WARNING:** PSBTs are an innovation from Bitcoin Core v 0.17.0. Earlier versions of Bitcoin Core will not be able to work with the PSBT while it is in process (though they will still be able to recognize the final transaction). The HWI interface appeared in Bitcoin Core v 0.18.0, but as long as you are using our suggested setup with Bitcoin Standup, it should work. > :warning: **VERSION WARNING:** PSBTs are an innovation from Bitcoin Core v 0.17.0. Earlier versions of Bitcoin Core will not be able to work with the PSBT while it is in progress (though they will still be able to recognize the final transaction). The HWI interface appeared in Bitcoin Core v 0.18.0, but as long as you are using our suggested setup with Bitcoin Standup, it should work.
The methodology described in this chapter for integrating with a hardware wallet depends on the [Bitcoin Hardware Wallet Interface](https://github.com/bitcoin-core/HWI) released through Bitcoin Core and builds on the [installation](https://github.com/bitcoin-core/HWI/blob/master/README.md) and [usage](https://github.com/bitcoin-core/HWI/blob/master/docs/bitcoin-core-usage.md) instructions found there. The methodology described in this chapter for integrating with a hardware wallet depends on the [Bitcoin Hardware Wallet Interface](https://github.com/bitcoin-core/HWI) released through Bitcoin Core and builds on the [installation](https://github.com/bitcoin-core/HWI/blob/master/README.md) and [usage](https://hwi.readthedocs.io) instructions found there.
> :warning **FRESHNESS WARNING:** The HWI interface is very new and raw around the edges as of Bitcoin Core v 0.20.0. It may be hard to install correctly, and it may have unintuive errors. What follows is a description of a working setup, but it took several tries to get it right, and your setup may vary. > :warning: **FRESHNESS WARNING:** The HWI interface is very new and raw around the edges as of Bitcoin Core v 0.20.0. It may be hard to install correctly, and it may have unintuitive errors. What follows is a description of a working setup, but it took several tries to get it right, and your setup may vary.
## Install Bitcoin Core on a Local Machine ## Install Bitcoin Core on a Local Machine
_If you just plan to read over this section and not test out these commands until some future date when you have a local development environment, you can skip this subsection, which is about creating a Bitcoin Core installation on a local machine such as a Mac or UNIX machine._ _If you just plan to read over this section and not test out these commands until some future date when you have a local development environment, you can skip this subsection, which is about creating a Bitcoin Core installation on a local machine such as a Mac or Linux machine._
There are alternate versions of the Bitcoin Standup script that you used to create your VM that will install on a MacOS or on a non-Linode UNIX machine. There are alternate versions of the Bitcoin Standup script that you used to create your VM that will install on a MacOS or on a non-Linode Linux machine.
If you have MacOS, you can install [Bitcoin Standup MacOS](https://github.com/BlockchainCommons/Bitcoin-Standup-MacOS/blob/master/README.md). If you have MacOS, you can install [Bitcoin Standup MacOS](https://github.com/BlockchainCommons/Bitcoin-Standup-MacOS/blob/master/README.md).
If you have a local UNIX machine, you can install [Bitcoin Standup Linux Scripts](https://github.com/BlockchainCommons/Bitcoin-Standup-MacOS/blob/master/README.md). If you have a local Linux machine, you can install [Bitcoin Standup Linux Scripts](https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts/blob/master/README.md).
Once you've gotten Bitcoin Standup running on your local machine, you'll want to sync the "Testnet" blockchain, assuming that you're continuing to follow the standard methodlogy of this course. Once you've gotten Bitcoin Standup running on your local machine, you'll want to sync the "Testnet" blockchain, assuming that you're continuing to follow the standard methodlogy of this course.
@ -91,7 +91,7 @@ HWI$ python3 setup.py install
You'll want to create an alias here too, varied by your actual install location: You'll want to create an alias here too, varied by your actual install location:
``` ```
$ alias hwi="~/Standup/HWI/hwi.py --testnet" $ alias hwi="~/Standup/HWI/hwi.py --chain test"
``` ```
Again, we've included a reference to testnet in this alias. Again, we've included a reference to testnet in this alias.
@ -104,7 +104,7 @@ If you are working with Bitcoins on your Ledger, you probably won't need to do a
To work with Testnet coins, as suggested by this course, you'll need to make a few updates: To work with Testnet coins, as suggested by this course, you'll need to make a few updates:
1. Go to Settings on your Ledger Live app (it's the gear), go to the "Experimental Features" tab, and turn on "Developer Mode". 1. Go to Settings on your Ledger Live app (it's the gear), go to the "Experimental Features" tab, and turn on "Developer Mode".
2. Go to the "Manager" and install "Bitcoin Test". The current version requires that you have "Bitcoin" and "Etereum" installed first. 2. Go to the "Manager" and install "Bitcoin Test". The current version requires that you have "Bitcoin" installed first.
3. Go to the "Manager", scroll to your new "Bitcoin Test", and "Add Account" 3. Go to the "Manager", scroll to your new "Bitcoin Test", and "Add Account"
## Link to a Ledger ## Link to a Ledger
@ -130,7 +130,7 @@ You can watch for funds by importing addresses from your hardware wallet to your
To use your hardware wallet with `bitcoin-cli`, you'll want to create a specific named wallet in Bitcoin Core, using the `createwallet` RPC, which is a command we haven't previously discussed. To use your hardware wallet with `bitcoin-cli`, you'll want to create a specific named wallet in Bitcoin Core, using the `createwallet` RPC, which is a command we haven't previously discussed.
``` ```
$ bitcoin-cli --named createwallet wallet_name="ledger" disable_private_keys="true" $ bitcoin-cli --named createwallet wallet_name="ledger" disable_private_keys="true" descriptors="false"
{ {
"name": "ledger", "name": "ledger",
"warning": "" "warning": ""
@ -154,10 +154,10 @@ Because you've created a second wallet, some commands will now require a `-rpcwa
You now have to import a watch-list of addresses from the hardware wallet. This is done with HWI's `getkeypool` command: You now have to import a watch-list of addresses from the hardware wallet. This is done with HWI's `getkeypool` command:
``` ```
$ hwi -f 9a1d520b getkeypool --wpkh 0 1000 $ hwi -f 9a1d520b getkeypool 0 1000
[{"desc": "wpkh([9a1d520b/84h/1h/0h]tpubDD7KTtoGzK9GuWUQcr1uTJazsAkqoXhdrwGXWVix6nPpNZmSbagZWD4QSaMsyK8YohAirGDPrWdRiEpKzTFB7DrTrqfzHCn7yi5EsqeR93S/0/*)#qttxy592", "range": [0, 1000], "timestamp": "now", "internal": false, "keypool": true, "active": true, "watchonly": true}, {"desc": "wpkh([9a1d520b/84h/1h/0h]tpubDD7KTtoGzK9GuWUQcr1uTJazsAkqoXhdrwGXWVix6nPpNZmSbagZWD4QSaMsyK8YohAirGDPrWdRiEpKzTFB7DrTrqfzHCn7yi5EsqeR93S/1/*)#3lw8ep4j", "range": [0, 1000], "timestamp": "now", "internal": true, "keypool": true, "active": true, "watchonly": true}] [{"desc": "wpkh([9a1d520b/84h/1h/0h]tpubDD7KTtoGzK9GuWUQcr1uTJazsAkqoXhdrwGXWVix6nPpNZmSbagZWD4QSaMsyK8YohAirGDPrWdRiEpKzTFB7DrTrqfzHCn7yi5EsqeR93S/0/*)#qttxy592", "range": [0, 1000], "timestamp": "now", "internal": false, "keypool": true, "active": true, "watchonly": true}, {"desc": "wpkh([9a1d520b/84h/1h/0h]tpubDD7KTtoGzK9GuWUQcr1uTJazsAkqoXhdrwGXWVix6nPpNZmSbagZWD4QSaMsyK8YohAirGDPrWdRiEpKzTFB7DrTrqfzHCn7yi5EsqeR93S/1/*)#3lw8ep4j", "range": [0, 1000], "timestamp": "now", "internal": true, "keypool": true, "active": true, "watchonly": true}]
``` ```
We address HWI with the `fingerprint` and ask for the first 1000 WPKH (native Segwit) addresses. In return, we receive two descriptors for the key pool: one for receiving addresses and one for change addresses. We address HWI with the `fingerprint` and ask for the first 1000 addresses. The WPKH (native Segwit) address type is used as a default. In return, we receive two descriptors for the key pool: one for receiving addresses and one for change addresses.
> :book: ***What is a key pool?*** A key pool is a group of pregenerated keys. Modern HD wallets create key pools by continuing to determine new hierarchical addresses based on the original seed. The idea of key pools was originally implemented to ease the backup requirements of wallets. This allowed a user to generate a keypool and then backup the wallet immediately, rather than requiring backups after every new address was created. The concept has also proven very useful in the modern day since it allows the importing of a whole set of future addresses from one device to another. > :book: ***What is a key pool?*** A key pool is a group of pregenerated keys. Modern HD wallets create key pools by continuing to determine new hierarchical addresses based on the original seed. The idea of key pools was originally implemented to ease the backup requirements of wallets. This allowed a user to generate a keypool and then backup the wallet immediately, rather than requiring backups after every new address was created. The concept has also proven very useful in the modern day since it allows the importing of a whole set of future addresses from one device to another.
@ -190,7 +190,7 @@ $ bitcoin-cli -rpcwallet=ledger importmulti '[{"desc": "wpkh([9a1d520b/84h/1h/0h
``` ```
(Note that HWI helpfully output the derivation path with `h`s to show hardened derivations rather than `'`s, and calculated its checksum accordingly, so that we don't have to do massive quoting like we did in §3.5.) (Note that HWI helpfully output the derivation path with `h`s to show hardened derivations rather than `'`s, and calculated its checksum accordingly, so that we don't have to do massive quoting like we did in §3.5.)
You _could_ now list all of the watch-only addresse that you received using the `getaddressesbylabel` command. All 1000 of the receive addresses are right there, in the `ledger` wallet! You _could_ now list all of the watch-only addresses that you received using the `getaddressesbylabel` command. All 1000 of the receive addresses are right there, in the `ledger` wallet!
``` ```
$ bitcoin-cli -rpcwallet=ledger getaddressesbylabel "" | more $ bitcoin-cli -rpcwallet=ledger getaddressesbylabel "" | more
{ {
@ -246,7 +246,7 @@ $ bitcoin-cli -rpcwallet=ledger listunspent
``` ```
## Create a Transaction with PSBT ## Create a Transaction with PSBT
Watching and receiving payments is just half the battle. You may also want to make payments using accounts held by your hardware wallet. This is a the fourth real-life example for using PSBTs, per the process outlined in [§7.1: Creating a Partially Signed Bitcoin Transaction](7_1_Creating_a_Partially_Signed_Bitcoin_Transaction.md). Watching and receiving payments is just half the battle. You may also want to make payments using accounts held by your hardware wallet. This is the fourth real-life example for using PSBTs, per the process outlined in [§7.1: Creating a Partially Signed Bitcoin Transaction](7_1_Creating_a_Partially_Signed_Bitcoin_Transaction.md).
The commands work exactly the same. In this case, use `walletcreatefundedpsbt` to form your PSBT because this is a situation where you don't care what UTXOs are used: The commands work exactly the same. In this case, use `walletcreatefundedpsbt` to form your PSBT because this is a situation where you don't care what UTXOs are used:
``` ```

View File

@ -1,6 +1,6 @@
# Chapter Eight: Expanding Bitcoin Transactions in Other Ways # Chapter Eight: Expanding Bitcoin Transactions in Other Ways
The definition of basic transactions back in [Chapter Six](06_0_Expanding_Bitcoin_Transactions_Multisigs.md) said that they sent _funds_ _immediately_, but those are both elementsthat can be changed. This final section on Expanding Bitcoin Transactions talks about how to send things other than cash and how to do it at a time other than now. The definition of basic transactions back in [Chapter Six](06_0_Expanding_Bitcoin_Transactions_Multisigs.md) said that they sent _funds_ _immediately_, but those are both elements that can be changed. This final section on Expanding Bitcoin Transactions talks about how to send things other than cash and how to do it at a time other than now.
## Objectives for This Section ## Objectives for This Section

View File

@ -6,13 +6,13 @@ The previous chapters showed two different ways to send funds from multiple mach
When you create a locktime transaction, you lock it with a number that represents either a block height (if it's a small number) or a UNIX timestamp (if it's a big number). This tells the Bitcoin network that the transaction may not be put into a block until either the specified time has arrived or the blockchain has reached the specified height. When you create a locktime transaction, you lock it with a number that represents either a block height (if it's a small number) or a UNIX timestamp (if it's a big number). This tells the Bitcoin network that the transaction may not be put into a block until either the specified time has arrived or the blockchain has reached the specified height.
> :book: _What is block height?_ It's the total count of blocks in the chain, going back to the genesis block for Bitcoin. > :book: **_What is block height?_** It's the total count of blocks in the chain, going back to the genesis block for Bitcoin.
When a locktime transaction is waiting to go into a block, it can be cancelled. This means that it is far, far from finalized. In fact, the ability to cancel is the whole purpose of a locktime transaction. When a locktime transaction is waiting to go into a block, it can be cancelled. This means that it is far, far from finalized. In fact, the ability to cancel is the whole purpose of a locktime transaction.
> :book: _What is nLockTime?_ It's the same thing as locktime. More specifically, it's what locktime is called internal to the Bitcoin Core source code. > :book: **_What is nLockTime?_** It's the same thing as locktime. More specifically, it's what locktime is called internal to the Bitcoin Core source code.
> :book: _What is Timelock?_ Locktime is just one way to lock Bitcoin transactions until some point in the future; collectively these methods are called timelocks. Locktime is the most basic timelock method. It locks an entire transaction with an absolute time, and it's available through `bitcoin-cli` (which is why it's the only timelock covered in this section). A parallel method, which locks a transaction with a relative time, is defined in [BIP 68](https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki) and covered in [§11.3: Using CSV in Scripts](11_3_Using_CSV_in_Scripts.md). > :book: **_What is Timelock?_** Locktime is just one way to lock Bitcoin transactions until some point in the future; collectively these methods are called timelocks. Locktime is the most basic timelock method. It locks an entire transaction with an absolute time, and it's available through `bitcoin-cli` (which is why it's the only timelock covered in this section). A parallel method, which locks a transaction with a relative time, is defined in [BIP 68](https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki) and covered in [§11.3: Using CSV in Scripts](11_3_Using_CSV_in_Scripts.md).
> Bitcoin Script further empowers both sorts of timelocks, allowing for the locking of individual outputs instead of entire transactions. Absolute timelocks (such as Locktime) are linked to the Script opcode OP_CHECKLOCKTIMEVERIFY, which is defined in [BIP 65](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki) and covered in [§11.2: Using CLTV in Scripts](11_2_Using_CLTV_in_Scripts.md), while relative timelocks (such as Timelock) are linked to the Script opcode OP_CHECKSEQUENCEVERIFY, which is defined in [BIP 112](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki) and also covered in [§11.3](11_3_Using_CSV_in_Scripts.md). > Bitcoin Script further empowers both sorts of timelocks, allowing for the locking of individual outputs instead of entire transactions. Absolute timelocks (such as Locktime) are linked to the Script opcode OP_CHECKLOCKTIMEVERIFY, which is defined in [BIP 65](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki) and covered in [§11.2: Using CLTV in Scripts](11_2_Using_CLTV_in_Scripts.md), while relative timelocks (such as Timelock) are linked to the Script opcode OP_CHECKSEQUENCEVERIFY, which is defined in [BIP 112](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki) and also covered in [§11.3](11_3_Using_CSV_in_Scripts.md).
@ -24,7 +24,7 @@ In order to create a locktime transaction, you need to first determine what you
Most frequently you will set the locktime to a UNIX timestamp representing a specific date and time. You can calculate a UNIX timestamp at a web site like [UNIX Time Stamp](http://www.unixtimestamp.com/) or [Epoch Convertor](https://www.epochconverter.com/). However, it would be better to [write your own script](https://www.epochconverter.com/#code) on your local machine, so that you know the UNIX timestamp you receive is accurate. If you don't do that, at least double check on two different sites. Most frequently you will set the locktime to a UNIX timestamp representing a specific date and time. You can calculate a UNIX timestamp at a web site like [UNIX Time Stamp](http://www.unixtimestamp.com/) or [Epoch Convertor](https://www.epochconverter.com/). However, it would be better to [write your own script](https://www.epochconverter.com/#code) on your local machine, so that you know the UNIX timestamp you receive is accurate. If you don't do that, at least double check on two different sites.
> :book: _Why Would I Use a UNIX Timestamp?_ Using a UNIX timestamp makes it easy to definitively link a transaction to a specific time, without worrying about whether the speed of block creation might change at some point. Particularly if you're creating a locktime that's far in the future, it's the safer thing to do. But, beyond that, it's just more intuitive, creating a direct correlation between some calendar date and the time when the transaction can be mined. > :book: **_Why Would I Use a UNIX Timestamp?_** Using a UNIX timestamp makes it easy to definitively link a transaction to a specific time, without worrying about whether the speed of block creation might change at some point. Particularly if you're creating a locktime that's far in the future, it's the safer thing to do. But, beyond that, it's just more intuitive, creating a direct correlation between some calendar date and the time when the transaction can be mined.
> :warning: **WARNING:** Locktime with UNIX timestamps has a bit of wriggle room: the release of blocks isn't regular and block times can be two hours ahead of real time, so a locktime actually means "within a few hours of this time, plus or minus". > :warning: **WARNING:** Locktime with UNIX timestamps has a bit of wriggle room: the release of blocks isn't regular and block times can be two hours ahead of real time, so a locktime actually means "within a few hours of this time, plus or minus".
@ -34,7 +34,7 @@ Alternatively, you can set the locktime to a smaller number representing a block
Once you've figured out the current height, you can decide how far in the future to set your locktime to. Remember that on average a new block will be created every 10 minutes. So, for example, if you wanted to set the locktime to a week in the future, you'd choose a block height that is 6 x 24 x 7 = 1,008 blocks in advance of the current one. Once you've figured out the current height, you can decide how far in the future to set your locktime to. Remember that on average a new block will be created every 10 minutes. So, for example, if you wanted to set the locktime to a week in the future, you'd choose a block height that is 6 x 24 x 7 = 1,008 blocks in advance of the current one.
> :book: _Why Would I Use a Blockheight?_ Unlike with timestamps, there's no fuzziness for blockheights. If you set a blockheight of 120,000 for your locktime, then there's absolutely no way for it to go into block 119,999. This can make it easier to algorithmically control your locktimed transaction. The downside is that you can't be as sure of when precisely the locktime will be. > :book: **_Why Would I Use a Blockheight?_** Unlike with timestamps, there's no fuzziness for blockheights. If you set a blockheight of 120,000 for your locktime, then there's absolutely no way for it to go into block 119,999. This can make it easier to algorithmically control your locktimed transaction. The downside is that you can't be as sure of when precisely the locktime will be.
> :warning: **WARNING:** If you want to set a block-height locktime, you must set the locktime to less than 500 million. If you set it to 500 million or over, your number will instead be interpreted as a timestamp. Since the UNIX timestamp of 500 million was November 5, 1985, that probably means that your transaction will be put into a block at the miners' first opportunity. > :warning: **WARNING:** If you want to set a block-height locktime, you must set the locktime to less than 500 million. If you set it to 500 million or over, your number will instead be interpreted as a timestamp. Since the UNIX timestamp of 500 million was November 5, 1985, that probably means that your transaction will be put into a block at the miners' first opportunity.
@ -128,7 +128,7 @@ Cancelling a locktime transaction is _very_ simple: you send a new transactions
Locktime offers a way to create a transaction that _should_ not be relayable to the network and that _will_ not be accepted into a block until the appropriate time has arrived. In the meantime, it can be cancelled simply by reusing a UTXO. Locktime offers a way to create a transaction that _should_ not be relayable to the network and that _will_ not be accepted into a block until the appropriate time has arrived. In the meantime, it can be cancelled simply by reusing a UTXO.
> :fire: _What is the Power of Locktime?_ The power of locktime may not be immediately obvious because of the ability to cancel it so easily. However, it's another of the bases of Smart Contracts: it has a lot of utility in a variety of custodial or contractual applications. For example, consider a situation where a third party is holding your bitcoins. In order to guarantee the return of your bitcoins if the custodian ever disappeared, they could produce a timelock transition to return the coins to you, then update that every once in a while with a new one, further in the future. If they ever failed to update, then the coins would return to you when the current timelock expired. Locktime could similarly be applied to a payment network, where the network holds coins while they're being exchanged by network participants. Finally, a will offers an example of a more complex contract, where payments are sent out to a number of people. These payments would be built on locktime transactions, and would be continually updated as long as the owner continues to show signs of life. (The unifying factor of all of these applications is, of course, _trust_. Simple locktime transactions only work if the holder of the coins can be trusted to send them out under the appropriate conditions.) > :fire: **_What is the Power of Locktime?_** The power of locktime may not be immediately obvious because of the ability to cancel it so easily. However, it's another of the bases of Smart Contracts: it has a lot of utility in a variety of custodial or contractual applications. For example, consider a situation where a third party is holding your bitcoins. In order to guarantee the return of your bitcoins if the custodian ever disappeared, they could produce a timelock transaction to return the coins to you, then update that every once in a while with a new one, further in the future. If they ever failed to update, then the coins would return to you when the current timelock expired. Locktime could similarly be applied to a payment network, where the network holds coins while they're being exchanged by network participants. Finally, a will offers an example of a more complex contract, where payments are sent out to a number of people. These payments would be built on locktime transactions, and would be continually updated as long as the owner continues to show signs of life. (The unifying factor of all of these applications is, of course, _trust_. Simple locktime transactions only work if the holder of the coins can be trusted to send them out under the appropriate conditions.)
## What's Next? ## What's Next?

View File

@ -114,7 +114,7 @@ You may note a warning about the data being in an "unknown protocol". If you wer
You can use an `OP_RETURN` opcode to store up to 80 bytes of data on the blockchain. You do this with the `data` codeword for a `vout`. You still have to send money along too, but you just send it back to a change address, minus a transaction fee. You can use an `OP_RETURN` opcode to store up to 80 bytes of data on the blockchain. You do this with the `data` codeword for a `vout`. You still have to send money along too, but you just send it back to a change address, minus a transaction fee.
> :fire: _What is the Power of OP_RETURN?_ The OP_RETURN opens up whole new possibilities for the blockchain, because you can embed data that proves that certain things happened at certain times. Various organizations have used OP_RETURNs for proof of existence, for copyright, for colored coins, and [for other purposes](https://en.bitcoin.it/wiki/OP_RETURN). Though 80 bytes might not seem a lot, it can be quite effective if OP_RETURNs are used to store hashes of the actual data. Then, you can prove the existence of your digital data by deminstrating that the hash of it matches the hash on the blockchain. > :fire: _What is the Power of OP_RETURN?_ The OP_RETURN opens up whole new possibilities for the blockchain, because you can embed data that proves that certain things happened at certain times. Various organizations have used OP_RETURNs for proof of existence, for copyright, for colored coins, and [for other purposes](https://en.bitcoin.it/wiki/OP_RETURN). Though 80 bytes might not seem a lot, it can be quite effective if OP_RETURNs are used to store hashes of the actual data. Then, you can prove the existence of your digital data by demonstrating that the hash of it matches the hash on the blockchain.
Note that there is some controversy over using the Bitcoin blockchain in this way. Note that there is some controversy over using the Bitcoin blockchain in this way.

View File

@ -2,7 +2,7 @@
To date, we've been interacting with Bitcoin at a relatively high level of abstraction. The `bitcoin-cli` program offers access to a variety of RPC commands that support the creation and control of raw Bitcoin transactions that include funds, data, timelocks, and multisigs. To date, we've been interacting with Bitcoin at a relatively high level of abstraction. The `bitcoin-cli` program offers access to a variety of RPC commands that support the creation and control of raw Bitcoin transactions that include funds, data, timelocks, and multisigs.
However, Bitcoin offers much more complexity than that. It includes a simple scripting language that can be used to create even more complex redemption conditions. If multisigs and timelocks provided the bases of Smart Contracts, then Bitcoin Script builds high on that foundation. It's the next step in empowering Bitcoin. However, Bitcoin offers much more complexity than that. It includes a simple scripting language that can be used to create even more complex redemption conditions. If multisigs and timelocks provided the basis of Smart Contracts, then Bitcoin Script builds high on that foundation. It's the next step in empowering Bitcoin.
## Objectives for This Chapter ## Objectives for This Chapter
@ -22,6 +22,6 @@ Supporting objectives include the ability to:
* [Section One: Understanding the Foundation of Transactions](09_1_Understanding_the_Foundation_of_Transactions.md) * [Section One: Understanding the Foundation of Transactions](09_1_Understanding_the_Foundation_of_Transactions.md)
* [Section Two: Running a Bitcoin Script](09_2_Running_a_Bitcoin_Script.md) * [Section Two: Running a Bitcoin Script](09_2_Running_a_Bitcoin_Script.md)
* [Section Three: Scripting a P2PKH](09_3_Scripting_a_P2PKH.md) * [Section Three: Testing a Bitcoin Script](09_3_Testing_a_Bitcoin_Script.md)
* [Section Four: Testing a Bitcoin Script](09_4_Testing_a_Bitcoin_Script.md) * [Section Four: Scripting a P2PKH](09_4_Scripting_a_P2PKH.md)
* [Section Five: Scripting a P2WPKH](09_5_Scripting_a_P2WPKH.md) * [Section Five: Scripting a P2WPKH](09_5_Scripting_a_P2WPKH.md)

View File

@ -4,20 +4,20 @@ The foundation of Bitcoin is the ability to protect transactions, something that
## Know the Parts of the Cryptographic Puzzle ## Know the Parts of the Cryptographic Puzzle
As described in [Chapter 1](01_0_Introducing_Bitcoin.md), the funds in each Bitcoin transaction are locked with a cryptographic puzzle. To be precise, we said that Bitcoin is made up of "a sequence of atomic transactions". We noted that: "Each transaction is authenticated by a sender with the solution to a previous cryptographic puzzle that was stored as a script. The new transaction is locked for the recipient with a new cryptographic puzzle that is also stored as a script." Those scripts, which lock and unlock transactions, are written in Bitcoin Script. As described in [Chapter 1](01_0_Introduction.md), the funds in each Bitcoin transaction are locked with a cryptographic puzzle. To be precise, we said that Bitcoin is made up of "a sequence of atomic transactions". We noted that: "Each transaction is authenticated by a sender with the solution to a previous cryptographic puzzle that was stored as a script. The new transaction is locked for the recipient with a new cryptographic puzzle that is also stored as a script." Those scripts, which lock and unlock transactions, are written in Bitcoin Script.
> :book: ***What is Bitcoin Script?*** Bitcoin Script is a stack-based Forth-like language that purposefully avoids loops and so is not Turing-complete. It's made up of individual opcodes. Every single transaction in Bitcoin is locked with a Bitcoin Script; when the locking transaction for a UTXO is run with the correct inputs, that UTXO can then be spent. > :book: ***What is Bitcoin Script?*** Bitcoin Script is a stack-based Forth-like language that purposefully avoids loops and so is not Turing-complete. It's made up of individual opcodes. Every single transaction in Bitcoin is locked with a Bitcoin Script; when the locking transaction for a UTXO is run with the correct inputs, that UTXO can then be spent.
The fact that transactions are locked with scripts means that they can be locked in a variety of different ways, requiring a variety of different keys. In fact, we've met a number of different locking mechanisms to date, each of which used different opcodes: The fact that transactions are locked with scripts means that they can be locked in a variety of different ways, requiring a variety of different keys. In fact, we've met a number of different locking mechanisms to date, each of which used different opcodes:
* OP_CHECKSIG, which checks a public key against a signature, is the basis of the classic P2PKH address, as will be fully detailed in [§9.3: Scripting a P2PKH](09_3_Scripting_a_P2PKH.md). * OP_CHECKSIG, which checks a public key against a signature, is the basis of the classic P2PKH address, as will be fully detailed in [§9.3: Scripting a P2PKH](09_4_Scripting_a_P2PKH.md).
* OP_CHECKMULTISIG similarly checks multisigs, as will be fully detailed in [§10.4: Scripting a Multisig](10_4_Scripting_a_Multisig.md). * OP_CHECKMULTISIG similarly checks multisigs, as will be fully detailed in [§10.4: Scripting a Multisig](10_4_Scripting_a_Multisig.md).
* OP_CHECKLOCKTIMEVERIFY and OP_SEQUENCEVERIFY form the basis of more complex Timelocks, as will be fully detailed in [§11.2: Using CLTV in Scripts](11_2_Using_CLTV_in_Scripts) and [§11.3: Using CSV in Scripts](11_3_Using_CSV_in_Scripts.md). * OP_CHECKLOCKTIMEVERIFY and OP_SEQUENCEVERIFY form the basis of more complex Timelocks, as will be fully detailed in [§11.2: Using CLTV in Scripts](11_2_Using_CLTV_in_Scripts.md) and [§11.3: Using CSV in Scripts](11_3_Using_CSV_in_Scripts.md).
* OP_RETURN is the mark of an unspendable transaction, which is why it's used to carry data, as was alluded to in [§8.2: Sending a Transaction with Data](08_2_Sending_a_Transaction_with_Data.md). * OP_RETURN is the mark of an unspendable transaction, which is why it's used to carry data, as was alluded to in [§8.2: Sending a Transaction with Data](08_2_Sending_a_Transaction_with_Data.md).
## Access Scripts In Your Transactions ## Access Scripts In Your Transactions
You may not realize it, but you've already seen these locking and unlocking scripts as part of the raw transactins you've been working with. The best way to look into these scripts in more depth is thus to create a raw transaction, then examine it. You may not realize it, but you've already seen these locking and unlocking scripts as part of the raw transactions you've been working with. The best way to look into these scripts in more depth is thus to create a raw transaction, then examine it.
### Create a Test Transaction ### Create a Test Transaction

View File

@ -12,7 +12,7 @@ Bitcoin Scripts are run from left to right. That sounds easy enough, because it'
For example, if you were adding together "1" and "2", your Bitcoin Script for that would be `1 2 OP_ADD`, _not_ "1 + 2". Since we know that OP_ADD operator takes two inputs, we know that the two inputs before it are its operands. For example, if you were adding together "1" and "2", your Bitcoin Script for that would be `1 2 OP_ADD`, _not_ "1 + 2". Since we know that OP_ADD operator takes two inputs, we know that the two inputs before it are its operands.
> :warning: **WARNING:** Technically, everything in Bitcoin Script is an opcode, thus it would be most appropriate to record the above example as `OP_1 OP_2 OP_ADD`. In our examples, we don't worry about how the constants will be evaluated, as that's a topic of translation, as is explained in [§8.2: Building the Structure of P2SH](08_2_Building_the_Structure_of_P2SH.md). Some writers prefer to also leave the "OP" prefix off all operators, but we have opted not to. > :warning: **WARNING:** Technically, everything in Bitcoin Script is an opcode, thus it would be most appropriate to record the above example as `OP_1 OP_2 OP_ADD`. In our examples, we don't worry about how the constants will be evaluated, as that's a topic of translation, as is explained in [§10.2: Building the Structure of P2SH](10_2_Building_the_Structure_of_P2SH.md). Some writers prefer to also leave the "OP" prefix off all operators, but we have opted not to.
### Understand the Stack ### Understand the Stack

View File

@ -2,7 +2,7 @@
Bitcoin Scripting allows for considerable additional control over Bitcoin transactions, but it's also somewhat dangerous. As we'll describe in [§10.1](10_1_Understanding_the_Foundation_of_P2SH.md), the actual Scripts are somewhat isolated from the Bitcoin network, which means that it's possible to write a script and have it accepted by the network even if it's impossible to redeem from that script! So, you need to thoroughly test your Scripts before you put your money into them. Bitcoin Scripting allows for considerable additional control over Bitcoin transactions, but it's also somewhat dangerous. As we'll describe in [§10.1](10_1_Understanding_the_Foundation_of_P2SH.md), the actual Scripts are somewhat isolated from the Bitcoin network, which means that it's possible to write a script and have it accepted by the network even if it's impossible to redeem from that script! So, you need to thoroughly test your Scripts before you put your money into them.
This chapter thus describes a prime method for testing Bitcoin Scripts, which we'll also be using for occasional examples throughout the rest of this Part. This chapter thus describes a prime method for testing Bitcoin Scripts, which we'll also be using for occasional examples throughout the rest of this section.
## Install btcdeb ## Install btcdeb
@ -96,9 +96,9 @@ script | stack
--------+-------- --------+--------
| 03 | 03
``` ```
And that's where our script ends, with nothing more to execute and an `03` sitting on top of our stack as the result of the Script. And that's where our script ends, with nothing more to execute and a `03` sitting on top of our stack as the result of the Script.
> :note: **NOTE:** `btcdeb` allows you to repeat the previous command by hitting enter. We will be doing this in subsequent examples, so don't be surprised about `btcdeb>` prompts with nothing as input. It is simply repeating the previous (often `step`) command. > **NOTE:** `btcdeb` allows you to repeat the previous command by hitting enter. We will be doing this in subsequent examples, so don't be surprised about `btcdeb>` prompts with nothing as input. It is simply repeating the previous (often `step`) command.
### Use btcdeb for a Subtraction Example ### Use btcdeb for a Subtraction Example
@ -182,11 +182,13 @@ btcdeb> stack
``` ```
Using these commands can make it easier to see what's going on and where you are. Using these commands can make it easier to see what's going on and where you are.
> :warning: **WARNING:** `btcdeb` is much more complex to use if you are trying to verify signatures. See [Signature Checking with btcdeb](https://github.com/bitcoin-core/btcdeb/blob/master/doc/btcdeb.md#signature-checking). This is true for any script testing, so we don't suggest it if you're trying to verify an `OP_CHECKSIG` or an `OP_CHECKMULTISIG`.
## Test a Script Online ## Test a Script Online
There are also a few web simulators that you can use to test scripts online. They can be superior to a command-line tool by offering a more graphical output, but we also find that they tend to have shortcomings. There are also a few web simulators that you can use to test scripts online. They can be superior to a command-line tool by offering a more graphical output, but we also find that they tend to have shortcomings.
In the past we've tried to give extensive guidelines on using sites such as the [Script Playground](http://www.crmarsh.com/script-playground/) or the [Bitcoin Online Script Debugger](https://bitcoin-script-debugger.visvirial.com/), but they become out of date and/or disappear too quickly to keep up with them. In the past we've tried to give extensive guidelines on using sites such as the [Script Playground](http://www.crmarsh.com/script-playground/) or the [Bitcoin Online Script Debugger](https://bitcoin-script-debugger.visvirial.com/), but they become out of date and/or disappeared too quickly to keep up with them.
Assume that these debuggers have the nice advantage of showing things visually and explicitly telling you whether a script succeeds (unlocks) or fails (stays locked). Assume that they have disadvantages with signatures, where many of them either always return `true` for signature tests or else have very cumbersome mechanisms for incorporating them. Assume that these debuggers have the nice advantage of showing things visually and explicitly telling you whether a script succeeds (unlocks) or fails (stays locked). Assume that they have disadvantages with signatures, where many of them either always return `true` for signature tests or else have very cumbersome mechanisms for incorporating them.

View File

@ -45,7 +45,7 @@ $ bitcoin-cli -named decoderawtransaction hexstring=$signedtx
] ]
} }
``` ```
You can see that its `scriptSig` unlocking script has two values. That's a `<signature>` (and an `[all]`) and a `<pubKey>`: You can see that its `scriptSig` unlocking script has two values. That's a `<signature>` (and an `[ALL]`) and a `<pubKey>`:
``` ```
304402201cc39005b076cb06534cd084fcc522e7bf937c4c9654c1c9dfba68b92cbab7d1022066f273178febc7a37568e2e9f4dec980a2e9a95441abe838c7ef64c39d85849c[ALL] 0315a0aeb37634a71ede72d903acae4c6efa77f3423dcbcd6de3e13d9fd989438b 304402201cc39005b076cb06534cd084fcc522e7bf937c4c9654c1c9dfba68b92cbab7d1022066f273178febc7a37568e2e9f4dec980a2e9a95441abe838c7ef64c39d85849c[ALL] 0315a0aeb37634a71ede72d903acae4c6efa77f3423dcbcd6de3e13d9fd989438b
``` ```
@ -346,7 +346,7 @@ error: Signature is found in scriptCode
``` ```
(Unfortunately this checking may or may not be working at any point due to vagaries of the Bitcoin Core and `btcdeb` code.) (Unfortunately this checking may or may not be working at any point due to vagaries of the Bitcoin Core and `btcdeb` code.)
As is shown, a P2PKH is quite simple: its protection comes about those the strength of its cryptography. As is shown, a P2PKH is quite simple: its protection comes about through the strength of its cryptography.
### How to Look Up a Pub Key & Signature by Hand ### How to Look Up a Pub Key & Signature by Hand

View File

@ -2,7 +2,7 @@
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
P2PKHs are fine for explaining the fundamental way that Bitcoin Scripts work, but what about native Segwit P2WPKH scripts, which are increasingly becoming the majority of Bitcoin transactions? As it turns out, P2WPKH addresses don't use Bitcoin Scripts like traditional Bitcoin addresses do, and so this section is really a digression from the scripting of this chapter — but an important one, because it outlines the _other_ major way in which Bitcoins can be transacted. P2PKHs are fine for explaining the fundamental way that Bitcoin Scripts work, but what about native SegWit P2WPKH scripts, which are increasingly becoming the majority of Bitcoin transactions? As it turns out, P2WPKH addresses don't use Bitcoin Scripts like traditional Bitcoin addresses do, and so this section is really a digression from the scripting of this chapter — but an important one, because it outlines the _other_ major way in which Bitcoins can be transacted.
## View a P2WPKH Script ## View a P2WPKH Script
@ -63,7 +63,7 @@ Here's a comparison of our two examples:
| Type | PubKeyHash | PubKey | Signature | | Type | PubKeyHash | PubKey | Signature |
|----------------|----------|-------------|---------| |----------------|----------|-------------|---------|
| SegWit | 92a0db923b3a13eb576a40c4b35515aa30206cba | 03839e6035b33e37597908c83a2f992ec835b093d65790f43218cb49ffe5538903 | 3044022064f633ccfc4e937ef9e3edcaa9835ea9a98d31fbea1622c1d8a38d4e7f8f6cb602204bffef45a094de1306f99da055bd5a603a15c277a59a48f40a615aa4f7e5038001 | | SegWit | 92a0db923b3a13eb576a40c4b35515aa30206cba | 03839e6035b33e37597908c83a2f992ec835b093d65790f43218cb49ffe5538903 | 3044022064f633ccfc4e937ef9e3edcaa9835ea9a98d31fbea1622c1d8a38d4e7f8f6cb602204bffef45a094de1306f99da055bd5a603a15c277a59a48f40a615aa4f7e5038001 |
| SegWit | 06b5c6ba5330cdf738a2ce91152bfd0e71f9ec39 | 0315a0aeb37634a71ede72d903acae4c6efa77f3423dcbcd6de3e13d9fd989438b | 04402201cc39005b076cb06534cd084fcc522e7bf937c4c9654c1c9dfba68b92cbab7d1022066f273178febc7a37568e2e9f4dec980a2e9a95441abe838c7ef64c39d85849c | | non-SegWit | 06b5c6ba5330cdf738a2ce91152bfd0e71f9ec39 | 0315a0aeb37634a71ede72d903acae4c6efa77f3423dcbcd6de3e13d9fd989438b | 04402201cc39005b076cb06534cd084fcc522e7bf937c4c9654c1c9dfba68b92cbab7d1022066f273178febc7a37568e2e9f4dec980a2e9a95441abe838c7ef64c39d85849c |
So how does this work? It depends on old code interpreting this as a valid transaction and new code knowing to check the new "witness" information So how does this work? It depends on old code interpreting this as a valid transaction and new code knowing to check the new "witness" information
@ -96,7 +96,7 @@ script | sta
``` ```
Bitcoin Scripts are considered successful if there's something in the Stack, and it's non-zero, so SegWit scripts automatically succeed on old nodes as long as the `scriptPubKey` is correctly created with a non-zero pub-key hash. This is called an "anyone-can-spend" transaction, because old nodes verified them as correct without any need for signatures. Bitcoin Scripts are considered successful if there's something in the Stack, and it's non-zero, so SegWit scripts automatically succeed on old nodes as long as the `scriptPubKey` is correctly created with a non-zero pub-key hash. This is called an "anyone-can-spend" transaction, because old nodes verified them as correct without any need for signatures.
> :book: ***What can't old nodes steal SegWit UTXOs?*** SegWit was enabled on the Bitcoin network when 95% of miners signalled that they were ready to start using it. That means that only 5% of nodes at that point might have registered anyone-can-spend SegWit transactions as valid without going through the proper work of checking the `txinwitness`. If they incorrectly incorporated an invalid anyone-can-spend UTXO into a block, the other 95% of nodes would refuse to validate that block, and so it would quickly be orphaned rather than being added to the "main" blockchain. (Certainly, 51% of nodes could choose to stop interpreting SegWit transactions correctly, but 51% of nodes can do anything on a consensus network like a blockchain.) > :book: ***Why can't old nodes steal SegWit UTXOs?*** SegWit was enabled on the Bitcoin network when 95% of miners signalled that they were ready to start using it. That means that only 5% of nodes at that point might have registered anyone-can-spend SegWit transactions as valid without going through the proper work of checking the `txinwitness`. If they incorrectly incorporated an invalid anyone-can-spend UTXO into a block, the other 95% of nodes would refuse to validate that block, and so it would quickly be orphaned rather than being added to the "main" blockchain. (Certainly, 51% of nodes could choose to stop interpreting SegWit transactions correctly, but 51% of nodes can do anything on a consensus network like a blockchain.)
Because old nodes always see SegWit scripts as correct, they will always verify them, even without understanding their content. Because old nodes always see SegWit scripts as correct, they will always verify them, even without understanding their content.

View File

@ -8,8 +8,8 @@ Here's the gotcha for using Bitcoin Scripts: for security reasons, most Bitcoin
* __Pay to Public Key (P2PK)__ — An older, deprecated transaction (`<pubKey> OP_CHECKSIG`) that has been replaced by the better security of P2PKH. * __Pay to Public Key (P2PK)__ — An older, deprecated transaction (`<pubKey> OP_CHECKSIG`) that has been replaced by the better security of P2PKH.
* __Pay to Public Key Hash (P2PKH)__ — A standard transaction (`OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG`) that pays to the hash of a public key. * __Pay to Public Key Hash (P2PKH)__ — A standard transaction (`OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG`) that pays to the hash of a public key.
* __Pay to Witness Public Key hash (P2WPKH)__ — The newest sort of public-key transaction. It's just (`OP_0 <pubKeyHash`) because it depends on miner consensus to work, as described in [§9.5](09_5_Scripting_a_P2WPKH.md). * __Pay to Witness Public Key hash (P2WPKH)__ — The newest sort of public-key transaction. It's just (`OP_0 <pubKeyHash>`) because it depends on miner consensus to work, as described in [§9.5](09_5_Scripting_a_P2WPKH.md).
* __Multisig__ — A transaction for a group of keys, as explained more fully in [§8.4](08_4_Scripting_a_Multisig.md). * __Multisig__ — A transaction for a group of keys, as explained more fully in [§10.4](10_4_Scripting_a_Multisig.md).
* __Null Data__ — An unspendable transaction (`OP_RETURN Data`). * __Null Data__ — An unspendable transaction (`OP_RETURN Data`).
* __Pay to Script Hash (P2SH)__ — A transaction that pays out to a specific script, as explained more fully here. * __Pay to Script Hash (P2SH)__ — A transaction that pays out to a specific script, as explained more fully here.
@ -19,7 +19,7 @@ So how do you write a more complex Bitcoin Script? The answer is in that last so
## Understand the P2SH Script ## Understand the P2SH Script
You already saw a P2SH transaction when you created a multisig in [§6.1: Sending a Transaction to a Multisig](06_1_Sending_a_Transaction_to_a_Multisig.md). Though multisig is one of the standard transaction types, `bitcoin-cli` simplifies the usage of its multisigs by embedding them into P2SH transactions, as described more fully in [§8.4: Scripting a Multisig](08_4_Scripting_a_Multisig.md). You already saw a P2SH transaction when you created a multisig in [§6.1: Sending a Transaction to a Multisig](06_1_Sending_a_Transaction_to_a_Multisig.md). Though multisig is one of the standard transaction types, `bitcoin-cli` simplifies the usage of its multisigs by embedding them into P2SH transactions, as described more fully in [§10.4: Scripting a Multisig](10_4_Scripting_a_Multisig.md).
So, let's look one more time at the `scriptPubKey` of that P2SH multisig: So, let's look one more time at the `scriptPubKey` of that P2SH multisig:
``` ```
@ -84,7 +84,7 @@ When a UTXO is redeemed, it runs in two rounds of verification:
3. Second, the `redeemScript` is run using the prior data that was pushed on the stack. 3. Second, the `redeemScript` is run using the prior data that was pushed on the stack.
4. If that second round of verification _also_ succeeds, the UTXO is unlocked. 4. If that second round of verification _also_ succeeds, the UTXO is unlocked.
Whereas you can't easily create a P2SH transaction without an API, you should be able to easily redeem a P2SH transaction with `bitcoin-cli`. In fact, you already did in [§6.2: Sending a Transaction to a Multisig](06_2_Spending_a_Transaction_to_a_Multisig.md). The exact process is described in [§10.6: Spending a P2SH Transaction.md](10_6_Spending_a_P2SH_Transaction.md), after we've finished with all the intricacies of P2SH transaction creation. Whereas you can't easily create a P2SH transaction without an API, you should be able to easily redeem a P2SH transaction with `bitcoin-cli`. In fact, you already did in [§6.2: Sending a Transaction to a Multisig](06_2_Spending_a_Transaction_to_a_Multisig.md). The exact process is described in [§10.6: Spending a P2SH Transaction](10_6_Spending_a_P2SH_Transaction.md), after we've finished with all the intricacies of P2SH transaction creation.
> :warning: **WARNING:** You can create a perfectly valid transaction with a correcly hashed redeemScript, but if the redeemScript doesn't run, or doesn't run correctly, your funds are lost forever. That's why it is so important to test your Scripts, as discussed in [§9.3: Testing a Bitcoin Script](09_3_Testing_a_Bitcoin_Script.md). > :warning: **WARNING:** You can create a perfectly valid transaction with a correcly hashed redeemScript, but if the redeemScript doesn't run, or doesn't run correctly, your funds are lost forever. That's why it is so important to test your Scripts, as discussed in [§9.3: Testing a Bitcoin Script](09_3_Testing_a_Bitcoin_Script.md).

View File

@ -6,7 +6,7 @@ In the previous section we overviewed the theory of how to create P2SH transacti
Any P2SH transaction starts with a locking script. This is the subject of chapters 9 and 11-12. You can use any of the Bitcoin Script methods described therein to create any sort of locking script, as long as the resulting serialized `redeemScript` is 520 bytes or less. Any P2SH transaction starts with a locking script. This is the subject of chapters 9 and 11-12. You can use any of the Bitcoin Script methods described therein to create any sort of locking script, as long as the resulting serialized `redeemScript` is 520 bytes or less.
> :book: ***Why are P2SH scripts limited to 520 bytes?*** As with many things in Bitcoin, the answer is backward compatibility: new functionality has to constantly be built within the old constraints of the system. Is this case, 520 bytes is the maximum that can be pushed onto the stack at once. Since the whole redeemScript is pushed onto the stack as part of the redemption process, it hits that limit. > :book: ***Why are P2SH scripts limited to 520 bytes?*** As with many things in Bitcoin, the answer is backward compatibility: new functionality has to constantly be built within the old constraints of the system. In this case, 520 bytes is the maximum that can be pushed onto the stack at once. Since the whole redeemScript is pushed onto the stack as part of the redemption process, it hits that limit.
## Serialize a Locking Script the Hard Way ## Serialize a Locking Script the Hard Way
@ -30,7 +30,7 @@ The integers are the most troublesome part of a locking-script translation.
First, you should verify that your number falls between -2147483647 and 2147483647, the range of four-byte integers when the most significant byte is used for signing. First, you should verify that your number falls between -2147483647 and 2147483647, the range of four-byte integers when the most significant byte is used for signing.
Second, you need to translate the decimal value into hexidecimal and pad it out to an even number of digits. This can be done with the `printf` command: Second, you need to translate the decimal value into hexadecimal and pad it out to an even number of digits. This can be done with the `printf` command:
``` ```
$ integer=1546288031 $ integer=1546288031
$ hex=$(printf '%08x\n' $integer | sed 's/^\(00\)*//') $ hex=$(printf '%08x\n' $integer | sed 's/^\(00\)*//')
@ -48,7 +48,7 @@ $ lehex=$(echo $hex | tac -rs .. | echo "$(tr -d '\n')")
$ echo $lehex $ echo $lehex
9f7b2a5c 9f7b2a5c
``` ```
In addition, you always need to know the size of any data that you put on the stack, so that you can precede it with the proper opcode. You can just remember that every two hexidecimal characters is one byte. Or, you can use `echo -n` piped to `wc -c`, and divide that in half: In addition, you always need to know the size of any data that you put on the stack, so that you can precede it with the proper opcode. You can just remember that every two hexadecimal characters is one byte. Or, you can use `echo -n` piped to `wc -c`, and divide that in half:
``` ```
$ echo -n $lehex | wc -c | awk '{print $1/2}' $ echo -n $lehex | wc -c | awk '{print $1/2}'
4 4
@ -67,7 +67,7 @@ To complete your serialization, you translate the hexcode into binary. On the co
## Run The Integer Conversion Script ## Run The Integer Conversion Script
A complete script for changing an integer between -2147483647 and 2147483647 to a little-endian signed-magnitude representation in hex can be found in th e[src code directory](src/10_2_integer2lehex.sh). You can download it as `integeer2lehex.sh`. A complete script for changing an integer between -2147483647 and 2147483647 to a little-endian signed-magnitude representation in hex can be found in the [src code directory](src/10_2_integer2lehex.sh). You can download it as `integer2lehex.sh`.
> :warning: **WARNING:** This script has not been robustly checked. If you are going to use it to create real locking scripts you should make sure to double-check and test your results. > :warning: **WARNING:** This script has not been robustly checked. If you are going to use it to create real locking scripts you should make sure to double-check and test your results.
@ -165,13 +165,13 @@ $ echo -n $redeemScript | xxd -r -p | openssl dgst -sha256 -binary | openssl dgs
``` ```
## Create a P2SH Transaction ## Create a P2SH Transaction
Creating your 20-bit hash just gives you the hash at the center of a P2SH locking script. You still need to put it together with the other opcodes that create a standard P2SH transaction: `OP_HASH160 a5d106eb8ee51b23cf60d8bd98bc285695f233f3 OP_EQUAL`. Creating your 20-byte hash just gives you the hash at the center of a P2SH locking script. You still need to put it together with the other opcodes that create a standard P2SH transaction: `OP_HASH160 a5d106eb8ee51b23cf60d8bd98bc285695f233f3 OP_EQUAL`.
Depending on your API, you might be able to enter this as an `asm`-style `scriptPubKey` for your transaction, or you might have to translate it to `hex` code as well. If you have to translate, use the same methods described above for "Creating the Hex Code" (or use `btcc`), resulting in `a914a5d106eb8ee51b23cf60d8bd98bc285695f233f387`. Depending on your API, you might be able to enter this as an `asm`-style `scriptPubKey` for your transaction, or you might have to translate it to `hex` code as well. If you have to translate, use the same methods described above for "Creating the Hex Code" (or use `btcc`), resulting in `a914a5d106eb8ee51b23cf60d8bd98bc285695f233f387`.
Note that the `hex scriptPubKey` for P2SH Script transaction will _always_ start with an `a914`, which is the `OP_HASH160` followed by an `OP_PUSHDATA` of 20 bytes (hex: `0x14`); and it will _always_ end with a `87`, which is an `OP_EQUAL`. So all you have to do is put your hashed redeem script in between those numbers. Note that the `hex scriptPubKey` for P2SH Script transaction will _always_ start with an `a914`, which is the `OP_HASH160` followed by an `OP_PUSHDATA` of 20 bytes (hex: `0x14`); and it will _always_ end with a `87`, which is an `OP_EQUAL`. So all you have to do is put your hashed redeem script in between those numbers.
## Summary: Understanding the Foundation of P2SH ## Summary: Building the Structure of P2SH
Actually creating the P2SH locking script dives further into the guts of Bitcoin than you've ever gone before. Though it's helpful to know how all of this works at a very low level, it's most likely that you'll have an API taking care of all of the heavy-lifting for you. Your task will simply be to create the Bitcoin Script to do the locking ... which is the main topic of chapters 9 and 11-12. Actually creating the P2SH locking script dives further into the guts of Bitcoin than you've ever gone before. Though it's helpful to know how all of this works at a very low level, it's most likely that you'll have an API taking care of all of the heavy-lifting for you. Your task will simply be to create the Bitcoin Script to do the locking ... which is the main topic of chapters 9 and 11-12.

View File

@ -10,7 +10,7 @@ Multisig transactions are created in Bitcoin using the `OP_CHECKMULTISIG` code.
2. Pop "n" values from the stack as Bitcoin addresses (hashed public keys). 2. Pop "n" values from the stack as Bitcoin addresses (hashed public keys).
3. Pop the next value from the stack (`<m>`). 3. Pop the next value from the stack (`<m>`).
4. Pop "m" values from the stack as potential signatures. 4. Pop "m" values from the stack as potential signatures.
5. Pop an `0` from the stack due to a mistake in the original coding. 5. Pop a `0` from the stack due to a mistake in the original coding.
6. Compare the signatures to the Bitcoin adddresses. 6. Compare the signatures to the Bitcoin adddresses.
7. Push a `True` or `False` depending on the result. 7. Push a `True` or `False` depending on the result.
@ -22,15 +22,15 @@ The requirement for that `0` as the first operand for `OP_CHECKMULTISIG` is a co
## Create a Raw Multisig ## Create a Raw Multisig
As discussed in [§10.1: Building a Bitcoin Script with P2SH](10_1_Building_a_Bitcoin_Script_with_P2SH.md), multisigs are one of the standard Bitcoin transaction types. A transaction can be created with a locking script that uses the raw `OP_CHECKMULTISIG` command, and it will be accepted into a block. This is the classic methodology for using multisigs in Bitcoin. As discussed in [§10.1: Understanding the Foundation of P2SH](10_1_Understanding_the_Foundation_of_P2SH.md), multisigs are one of the standard Bitcoin transaction types. A transaction can be created with a locking script that uses the raw `OP_CHECKMULTISIG` command, and it will be accepted into a block. This is the classic methodology for using multisigs in Bitcoin.
As an example, we will revisit the multisig created in [§8.1](08_1_Sending_a_Transaction_to_a_Multisig.md) one final time and build a new locking script for it using this methodology. As you may recall, that was a 2-of-2 multisig built from `$address1` and `$address2`. As an example, we will revisit the multisig created in [§6.1](06_1_Sending_a_Transaction_to_a_Multisig.md) one final time and build a new locking script for it using this methodology. As you may recall, that was a 2-of-2 multisig built from `$address1` and `$address2`.
As as `OP_CHECKMULTISIG` locking script requires the "m" (`2`), the addresses, and the "n" (`2`), you could write the following `scriptPubKey`: As `OP_CHECKMULTISIG` locking script requires the "m" (`2`), the addresses, and the "n" (`2`), you could write the following `scriptPubKey`:
``` ```
2 $address1 $address2 2 OP_CHECKMULTISIG 2 $address1 $address2 2 OP_CHECKMULTISIG
``` ```
If this looks familiar, that's because it's the multisig that you deserialized in [§8.2: Building the Structure of P2SH](08_2_Building_the_Structure_of_P2SH.md). If this looks familiar, that's because it's the multisig that you deserialized in [§10.2: Building the Structure of P2SH](10_2_Building_the_Structure_of_P2SH.md).
``` ```
2 02da2f10746e9778dd57bd0276a4f84101c4e0a711f9cfd9f09cde55acbdd2d191 02bfde48be4aa8f4bf76c570e98a8d287f9be5638412ab38dede8e78df82f33fa3 2 OP_CHECKMULTISIG 2 02da2f10746e9778dd57bd0276a4f84101c4e0a711f9cfd9f09cde55acbdd2d191 02bfde48be4aa8f4bf76c570e98a8d287f9be5638412ab38dede8e78df82f33fa3 2 OP_CHECKMULTISIG
``` ```
@ -99,7 +99,7 @@ These were generally problems with any sort of complex Bitcoin script, but they
## Create a P2SH Multisig ## Create a P2SH Multisig
P2SH multisigs are the modern methodology for creating multisigs on the Blockchains. They can be created very simply, using the same process seen in the previous sections. P2SH multisigs are the modern methodology for creating multisigs on the Blockchain. They can be created very simply, using the same process seen in the previous sections.
### Create the Lock for the P2SH Multisig ### Create the Lock for the P2SH Multisig
@ -142,7 +142,7 @@ Now you know how the multisig transaction in [§6.1](06_1_Sending_a_Transaction_
## Summary: Creating Multisig Scripts ## Summary: Creating Multisig Scripts
Multisigs are a standard transaction type, but they're a bit cumbersome to use, so they're regularly incorporated in P2SH transactions, as was the case in [§6.1](6_1_Sending_a_Transaction_to_a_Multisig.md) when we created our first multisigs. The result is cleaner, smaller, and more standardized — but more importantly, it's a great real-world example of how P2SH scripts really work. Multisigs are a standard transaction type, but they're a bit cumbersome to use, so they're regularly incorporated in P2SH transactions, as was the case in [§6.1](06_1_Sending_a_Transaction_to_a_Multisig.md) when we created our first multisigs. The result is cleaner, smaller, and more standardized — but more importantly, it's a great real-world example of how P2SH scripts really work.
## What's Next? ## What's Next?

View File

@ -36,66 +36,70 @@ $ bitcoin-cli listunspent
"safe": true "safe": true
} }
``` ```
More importantly, there's a `redeemScript`, which decodes to `OP_0 OP_PUSHDATA (20 bytes) 3ab2a09a1a5f2feb6c799b5ab345069a96e1a0a`. The should look familiar, because it's an `OP_0` followed by 20-byte hexcode of a public key hash. In other words, a P2SH-SegWit is just a SegWit `scriptPubKey` jammed into a script. That's all there is to it. It precisely matches how modern multisigs are a multsig jammed into a P2SH, as discussed in [§10.4: Scripting a Multisig](10_4_Scripting_a_Multisig.md). More importantly, there's a `redeemScript`, which decodes to `OP_0 OP_PUSHDATA (20 bytes) 3ab2a09a1a5f2feb6c799b5ab345069a96e1a0a`. This should look familiar, because it's an `OP_0` followed by 20-byte hexcode of a public key hash. In other words, a P2SH-SegWit is just a SegWit `scriptPubKey` jammed into a script. That's all there is to it. It precisely matches how modern multisigs are a multsig placed inside a P2SH, as discussed in [§10.4: Scripting a Multisig](10_4_Scripting_a_Multisig.md).
The raw transaction reveals a bit more when you look at the `vout` `1`: Conversely, when we spend this transaction, it looks exactly like a P2SH:
``` ```
$ hex=$(bitcoin-cli gettransaction "bb4362dec15e67d366088f5493c789f22fb4a604e767dae1f6a631687e2784aa" | jq -r '.hex') $ bitcoin-cli getrawtransaction ed752673bfd4338ccf0995983086da846ad652ae0f28280baf87f9fd44b3c45f 1
$ bitcoin-cli decoderawtransaction $hex
{ {
"txid": "bb4362dec15e67d366088f5493c789f22fb4a604e767dae1f6a631687e2784aa", "txid": "ed752673bfd4338ccf0995983086da846ad652ae0f28280baf87f9fd44b3c45f",
"hash": "6866490b16a92d68179e1cf04380fd08f16ec80bf66469af8d5e78ae624ff202", "hash": "aa4b1c2bde86ea446c9a9db2f77e27421316f26a8d88869f5b195f03b1ac4f23",
"version": 2, "version": 2,
"size": 249, "size": 247,
"vsize": 168, "vsize": 166,
"weight": 669, "weight": 661,
"locktime": 1780788, "locktime": 1781316,
"vin": [ "vin": [
{ {
"txid": "4779bb137ddbcaf796f905e264554b1ec28c0f3ab4538ca02eac5099bfc3fc1e", "txid": "59178b02cfcbdee51742a4b2658df35b63b51115a53cf802bc6674fd94fa593a",
"vout": 0, "vout": 1,
"scriptSig": { "scriptSig": {
"asm": "0014c4ea10874ae77d957e170bd43f2ee828a8e3bc71", "asm": "00149ef51fb1f5adb44e20eff758d34ae64fa781fa4f",
"hex": "160014c4ea10874ae77d957e170bd43f2ee828a8e3bc71" "hex": "1600149ef51fb1f5adb44e20eff758d34ae64fa781fa4f"
}, },
"txinwitness": [ "txinwitness": [
"3044022025ee4fd38e6865125f7c315406c0b3a8139d482e3be333727d38868baa656d3d02204b35d9b5812cb85894541da611d5cec14c374ae7a7b8ba14bb44495747b5715301", "3044022069a23fcfc421b44c622d93b7639a2152f941dbfd031970b8cef69e6f8e97bd46022026cb801f38a1313cf32a8685749546a5825b1c332ee4409db82f9dc85d99086401",
"033cae26cb3fa063c95e2c55a94bd04ab9cf173104555efe448b1bfc3a68c8f873" "030aec1384ae0ef264718b8efc1ef4318c513403d849ea8466ef2e4acb3c5ccce6"
], ],
"sequence": 4294967294 "sequence": 4294967294
} }
], ],
"vout": [ "vout": [
{ {
"value": 0.00095000, "value": 8.49029534,
"n": 0, "n": 0,
"scriptPubKey": { "scriptPubKey": {
"asm": "OP_DUP OP_HASH160 41d83eaffbf80f82dee4c152de59a38ffd0b6021 OP_EQUALVERIFY OP_CHECKSIG", "asm": "OP_HASH160 b4b656f4c4b14ee0d098299d1d6eb42d2e22adcd OP_EQUAL",
"hex": "76a91441d83eaffbf80f82dee4c152de59a38ffd0b602188ac", "hex": "a914b4b656f4c4b14ee0d098299d1d6eb42d2e22adcd87",
"reqSigs": 1, "reqSigs": 1,
"type": "pubkeyhash", "type": "scripthash",
"addresses": [ "addresses": [
"mmX7GUoXq2wVcbnrnFJrGKsGR14fXiGbD9" "2N9ik3zihJ91VGNF55sZFe9GiCAXh2cVKKW"
] ]
} }
}, },
{ {
"value": 0.01063793, "value": 0.00095000,
"n": 1, "n": 1,
"scriptPubKey": { "scriptPubKey": {
"asm": "OP_HASH160 b780fc2e945bea71b9ee2d8d2901f00914a25fbd OP_EQUAL", "asm": "OP_HASH160 ee7aceea0865a05a29a28d379cf438ac5b6cd9c6 OP_EQUAL",
"hex": "a914b780fc2e945bea71b9ee2d8d2901f00914a25fbd87", "hex": "a914ee7aceea0865a05a29a28d379cf438ac5b6cd9c687",
"reqSigs": 1, "reqSigs": 1,
"type": "scripthash", "type": "scripthash",
"addresses": [ "addresses": [
"2N9yWARt5E3TQsX2RjsauxSZaEZVhinAS4h" "2NEzBvokxh4ME4ahdT18NuSSoYvvhS7EnMU"
] ]
} }
} }
] ],
"hex": "020000000001013a59fa94fd7466bc02f83ca51511b5635bf38d65b2a44217e5decbcf028b175901000000171600149ef51fb1f5adb44e20eff758d34ae64fa781fa4ffeffffff029e299b320000000017a914b4b656f4c4b14ee0d098299d1d6eb42d2e22adcd87187301000000000017a914ee7aceea0865a05a29a28d379cf438ac5b6cd9c68702473044022069a23fcfc421b44c622d93b7639a2152f941dbfd031970b8cef69e6f8e97bd46022026cb801f38a1313cf32a8685749546a5825b1c332ee4409db82f9dc85d9908640121030aec1384ae0ef264718b8efc1ef4318c513403d849ea8466ef2e4acb3c5ccce6442e1b00",
"blockhash": "0000000069cbe44925fab2d472870608c7e1e241a1590fd78be10c63388ed6ee",
"confirmations": 282952,
"time": 1595360859,
"blocktime": 1595360859
} }
``` ```
This confirms that this is just a normal P2SH, locked by `"OP_DUP OP_HASH160 41d83eaffbf80f82dee4c152de59a38ffd0b6021 OP_EQUALVERIFY OP_CHECKSIG"`. It's when the redeem script is run that the magic occurs. Just as with a P2WPKH, an old node wil see `OP_0 OP_PUSHDATA (20 bytes) 3ab2a09a1a5f2feb6c799b5ab345069a96e1a0a` and verify it automatically, while a new node will see that, know it's a P2WPKH, and so go out to the `witnesses`. See [§9.5: Scripting a P2WPKH](09_5_Scripting_a_P2WPKH.md). Each `vout` is of the form `OP_HASH160 <HASH> OP_EQUAL`. That's a normal P2SH per [§10.2](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/82ca897286aac612804ae849b260750229fa3a52/10_2_Building_the_Structure_of_P2SH.md), which means that it's only when the redeem script is run that the magic occurs. Just as with a P2WPKH, an old node wil see `OP_0 OP_PUSHDATA (20 bytes) 3ab2a09a1a5f2feb6c799b5ab345069a96e1a0a` in the redeem script and verify it automatically, while a new node will see that, know it's a P2WPKH, and so go out to the `witnesses`. See [§9.5: Scripting a P2WPKH](09_5_Scripting_a_P2WPKH.md).
> :book: ***What are the disadvantages of nested Segwit transactions?*** They're bigger than native Segwit transactions, so you get some of advantages of Segwit, but not all of them. > :book: ***What are the disadvantages of nested Segwit transactions?*** They're bigger than native Segwit transactions, so you get some of advantages of Segwit, but not all of them.
@ -114,7 +118,7 @@ This works just like a P2WPKH address, the only difference being that instead of
There is also one more variant, a P2WSH script embedded in a P2SH script, which works much like the P2SH-Segwit described above, but for nested P2WSH scripts. (Whew!) There is also one more variant, a P2WSH script embedded in a P2SH script, which works much like the P2SH-Segwit described above, but for nested P2WSH scripts. (Whew!)
## Summary: Scripting a Pay to Witness Public Key Hash ## Summary: Scripting a Segwit Script
There are two sorts of P2SH scripts that relate to Segwit. There are two sorts of P2SH scripts that relate to Segwit.

View File

@ -4,11 +4,11 @@ Before we close out this overview of P2SH transactions, we're going to touch upo
## Use the Redeem Script ## Use the Redeem Script
As we saw in [§6.2: Spending a Transaction to a Multisig](06_2_Spending_a_Transaction_to_a_Multisig.md), spending a P2SH transaction is all about having that serialized version of the locking script, the so-called _redeemScript_. So, the first step in being able to spend a P2SH transaction is making sure that you save the _redeemScript_ before you give out the P2SH address to everyone. As we saw in [§6.2: Spending a Transaction with a Multisig](06_2_Spending_a_Transaction_to_a_Multisig.md), spending a P2SH transaction is all about having that serialized version of the locking script, the so-called _redeemScript_. So, the first step in being able to spend a P2SH transaction is making sure that you save the _redeemScript_ before you give out the P2SH address to everyone.
### Collect Your Variables ### Collect Your Variables
Because P2SH addresses other than the special multisig and nested Segwit addresses aren't integrated into `bitcoin-cli` there will be no short-cuts for P2SH spending like you saw in [§6.3: Sending an Automated Multisig](6_3_Sending_an_Automated_Multisig.md). You're going to need to collect all the more complex variables on your own! Because P2SH addresses other than the special multisig and nested Segwit addresses aren't integrated into `bitcoin-cli` there will be no short-cuts for P2SH spending like you saw in [§6.3: Sending an Automated Multisig](06_3_Sending_an_Automated_Multisig.md). You're going to need to collect all the more complex variables on your own!
This means that you need to collect: This means that you need to collect:
@ -33,7 +33,7 @@ $ bitcoin-cli -named signrawtransactionwithkey hexstring=$rawtxhex prevtxs='''[
``` ```
With any other sort of P2SH you're going to be including a different `redeemscript`, but otherwise the practice is exactly the same. The only difference is that after two chapters of work on Scripts you now understand what the `scriptPubKey` is and what the `redeemScript` is, so hopefully what were mysterious elements four chapters ago are now old hat. With any other sort of P2SH you're going to be including a different `redeemscript`, but otherwise the practice is exactly the same. The only difference is that after two chapters of work on Scripts you now understand what the `scriptPubKey` is and what the `redeemScript` is, so hopefully what were mysterious elements four chapters ago are now old hat.
## Summary: Spending a Transaction with a Bitcoin Script ## Summary: Spending a P2SH Transaction
You already spent a P2SH back in Chapter 6, when you resent a multsig transaction the hard way, which required lining up the `scriptPubKey` and `redeemScript` information. Now you know that the `scriptPubKey` is a standardized P2SH locking script, while the `redeemScript` matches a hash in that locking script and that you need to be able to run it with the proper variables to receive a `True` result. But other than knowing more, there's nothing new in spending a P2SH transaction, because you already did it! You already spent a P2SH back in Chapter 6, when you resent a multsig transaction the hard way, which required lining up the `scriptPubKey` and `redeemScript` information. Now you know that the `scriptPubKey` is a standardized P2SH locking script, while the `redeemScript` matches a hash in that locking script and that you need to be able to run it with the proper variables to receive a `True` result. But other than knowing more, there's nothing new in spending a P2SH transaction, because you already did it!

View File

@ -38,7 +38,7 @@ Or this:
### Understand a CLTV Absolute Block Height ### Understand a CLTV Absolute Block Height
This is how `OPCHECKLOCKTIMEVERIFY` would check against a blockheight that was reached on May 24, 2017: This is how `OP_CHECKLOCKTIMEVERIFY` would check against a blockheight that was reached on May 24, 2017:
``` ```
467951 OP_CHECKLOCKTIMEVERIFY 467951 OP_CHECKLOCKTIMEVERIFY
``` ```
@ -51,7 +51,7 @@ But we'll usually abtract it like this:
The above explanation is sufficient to use and understand CLTV. However, [BIP 65](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki) lays out all the details. The above explanation is sufficient to use and understand CLTV. However, [BIP 65](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki) lays out all the details.
A locking script will only allow a transaction to respend a UTXO locked with a CLTV if `OP_CHECKLOCKTIMEVALUE` verifies all of the following: A locking script will only allow a transaction to respend a UTXO locked with a CLTV if `OP_CHECKLOCKTIMEVERIFY` verifies all of the following:
* The `nSequence` field must be set to less than 0xffffffff, usually 0xffffffff-1 to avoid confilcts with relative timelocks. * The `nSequence` field must be set to less than 0xffffffff, usually 0xffffffff-1 to avoid confilcts with relative timelocks.
* CLTV must pop an operand off the stack and it must be 0 or greater. * CLTV must pop an operand off the stack and it must be 0 or greater.
@ -146,7 +146,7 @@ Finally, the remainder of the script runs, which is a normal check of a signatur
## Summary: Using CLTV in Scripts ## Summary: Using CLTV in Scripts
`OP-CHECKLOCKTIMEVERIFY` is a simple opcode that looks at a single argument, interprets it as a blockheight or UNIX timestamp, and only allows its UTXO to be unlocked if that blockheight or UNIX timestamp is in the past. Setting `nLockTime` on the spending transaction is what allows Bitcoin to make this calculation. `OP_CHECKLOCKTIMEVERIFY` is a simple opcode that looks at a single argument, interprets it as a blockheight or UNIX timestamp, and only allows its UTXO to be unlocked if that blockheight or UNIX timestamp is in the past. Setting `nLockTime` on the spending transaction is what allows Bitcoin to make this calculation.
> :fire: ***What is the Power of CLTV?*** You've already seem that simple locktimes were one of the bases of Smart Contracts. CLTV takes the next step. Now you can both guarantee that a UTXO can't be spent before a certain time _and_ guarantee that it won't be spent either. In its simplest form, this could be used to create a trust that someone could only access when they reached 18 or a retirement fund that they could only access when they turned 50. However its true power comes when combined with conditionals, where the CLTV only activates in certain situations. > :fire: ***What is the Power of CLTV?*** You've already seem that simple locktimes were one of the bases of Smart Contracts. CLTV takes the next step. Now you can both guarantee that a UTXO can't be spent before a certain time _and_ guarantee that it won't be spent either. In its simplest form, this could be used to create a trust that someone could only access when they reached 18 or a retirement fund that they could only access when they turned 50. However its true power comes when combined with conditionals, where the CLTV only activates in certain situations.

View File

@ -6,7 +6,7 @@
## Understand nSequence ## Understand nSequence
Every input into in a transaction has an `nSequence` (or if you prefer `sequence`) value. It's been a prime tool for Bitcoin expansions as discussed previously in [§5.2: Resending a Transaction with RBF](05_2_Resending_a_Transaction_with_RBF.md) and [§8.1 Sending a Transaction with a Locktime.md](08_1_Sending_a_Transaction_with_a_Locktime.md), where it was used to signal RBF and `nLockTime`, respectively. However, there's one more use for `nSequence`, described by [BIP 68](https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki): you can use it to create a relative timelock on a transaction. Every input into a transaction has an `nSequence` (or if you prefer `sequence`) value. It's been a prime tool for Bitcoin expansions as discussed previously in [§5.2: Resending a Transaction with RBF](05_2_Resending_a_Transaction_with_RBF.md) and [§8.1 Sending a Transaction with a Locktime](08_1_Sending_a_Transaction_with_a_Locktime.md), where it was used to signal RBF and `nLockTime`, respectively. However, there's one more use for `nSequence`, described by [BIP 68](https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki): you can use it to create a relative timelock on a transaction.
A relative timelock is a lock that's placed on a specific input of a transaction and that's calculated in relation to the mining date of the UTXO being used in the input. For example, if a UTXO was mined at block #468260 and a transaction was created where the input for that UTXO was given an `nSequence` of 100, then the new transaction could not be mined until at least block #468360. A relative timelock is a lock that's placed on a specific input of a transaction and that's calculated in relation to the mining date of the UTXO being used in the input. For example, if a UTXO was mined at block #468260 and a transaction was created where the input for that UTXO was given an `nSequence` of 100, then the new transaction could not be mined until at least block #468360.
@ -57,7 +57,7 @@ If you convert that back you'll see that 4224679 = 10000000111011010100111. The
## Create a Transaction with a Relative Timelock ## Create a Transaction with a Relative Timelock
So you want to create a simple transaction with a relative timelock? All you have to do is issue a tranaction where the `nSequence` in an input is set as shown above: with the `nSequence` for that input set such that the first two bytes define the timelock, the 23rd bit defines the type of timelock, and the 32nd bit is set to false. So you want to create a simple transaction with a relative timelock? All you have to do is issue a transaction where the `nSequence` in an input is set as shown above: with the `nSequence` for that input set such that the first two bytes define the timelock, the 23rd bit defines the type of timelock, and the 32nd bit is set to false.
Issue the transaction and you'll see that it can't legally be mined until enough blocks or enough time has passed beyond the time that the UTXO was mined. Issue the transaction and you'll see that it can't legally be mined until enough blocks or enough time has passed beyond the time that the UTXO was mined.

View File

@ -18,7 +18,7 @@ Manipulate one number:
Also see: `OP_0NOTEQUAL` (0x92) Also see: `OP_0NOTEQUAL` (0x92)
Manipulate two number mathematically: Manipulate two numbers mathematically:
* OP_ADD (0x93) — Add two numbers * OP_ADD (0x93) — Add two numbers
* OP_SUB (0x94) — Subtract two numbers * OP_SUB (0x94) — Subtract two numbers

View File

@ -177,7 +177,7 @@ script | stack
What if you wanted to instead write an equation system, such as `x + y = 3`, `y + z = 5`, and `x + z = 4`? A bit of algebra tells you that the answers come out to `x = 1`, `y = 2`, and `z = 3`. But, how do you script it? What if you wanted to instead write an equation system, such as `x + y = 3`, `y + z = 5`, and `x + z = 4`? A bit of algebra tells you that the answers come out to `x = 1`, `y = 2`, and `z = 3`. But, how do you script it?
Most obviously, after the redeemer inputs the three numbers, you're going to need two copies of each numbers, since each number goes into two different equations. `OP_3DUP` takes care of that and results in `x y z x y z` being on the stack. Popping off two items at a time will give you `y z`, `z x`, and `x y`. Voila! That's the three equations, so you just need to add them up and test them in the right order! Here's the full script: `OP_3DUP OP_ADD 5 OP_EQUALVERIFY OP_ADD 4 OP_EQUALVERIFY OP_ADD 3 OP_EQUAL`. Most obviously, after the redeemer inputs the three numbers, you're going to need two copies of each number, since each number goes into two different equations. `OP_3DUP` takes care of that and results in `x y z x y z` being on the stack. Popping off two items at a time will give you `y z`, `z x`, and `x y`. Voila! That's the three equations, so you just need to add them up and test them in the right order! Here's the full script: `OP_3DUP OP_ADD 5 OP_EQUALVERIFY OP_ADD 4 OP_EQUALVERIFY OP_ADD 3 OP_EQUAL`.
Here's how it runs with the correct unlocking script of `1 2 3`: Here's how it runs with the correct unlocking script of `1 2 3`:
``` ```
@ -481,7 +481,7 @@ This is a nice script because it shows careful use of logic (with the `OP_NOT` a
`btcdeb` can be run to prove the collision (and the script): `btcdeb` can be run to prove the collision (and the script):
``` ```
btcdeb $ btcdeb '[255044462d312e330a25e2e3cfd30a0a0a312030206f626a0a3c3c2f57696474682032203020522f4865696768742033203020522f547970652034203020522f537562747970652035203020522f46696c7465722036203020522f436f6c6f7253706163652037203020522f4c656e6774682038203020522f42697473506572436f6d706f6e656e7420383e3e0a73747265616d0affd8fffe00245348412d3120697320646561642121212121852fec092339759c39b1a1c63c4c97e1fffe017f46dc93a6b67e013b029aaa1db2560b45ca67d688c7f84b8c4c791fe02b3df614f86db1690901c56b45c1530afedfb76038e972722fe7ad728f0e4904e046c230570fe9d41398abe12ef5bc942be33542a4802d98b5d70f2a332ec37fac3514e74ddc0f2cc1a874cd0c78305a21566461309789606bd0bf3f98cda8044629a1 255044462d312e330a25e2e3cfd30a0a0a312030206f626a0a3c3c2f57696474682032203020522f4865696768742033203020522f547970652034203020522f537562747970652035203020522f46696c7465722036203020522f436f6c6f7253706163652037203020522f4c656e6774682038203020522f42697473506572436f6d706f6e656e7420383e3e0a73747265616d0affd8fffe00245348412d3120697320646561642121212121852fec092339759c39b1a1c63c4c97e1fffe017346dc9166b67e118f029ab621b2560ff9ca67cca8c7f85ba84c79030c2b3de218f86db3a90901d5df45c14f26fedfb3dc38e96ac22fe7bd728f0e45bce046d23c570feb141398bb552ef5a0a82be331fea48037b8b5d71f0e332edf93ac3500eb4ddc0decc1a864790c782c76215660dd309791d06bd0af3f98cda4bc4629b1 OP_2DUP OP_EQUAL OP_NOT OP_VERIFY OP_SHA1 OP_SWAP OP_SHA1 OP_EQUAL'] $ btcdeb '[255044462d312e330a25e2e3cfd30a0a0a312030206f626a0a3c3c2f57696474682032203020522f4865696768742033203020522f547970652034203020522f537562747970652035203020522f46696c7465722036203020522f436f6c6f7253706163652037203020522f4c656e6774682038203020522f42697473506572436f6d706f6e656e7420383e3e0a73747265616d0affd8fffe00245348412d3120697320646561642121212121852fec092339759c39b1a1c63c4c97e1fffe017f46dc93a6b67e013b029aaa1db2560b45ca67d688c7f84b8c4c791fe02b3df614f86db1690901c56b45c1530afedfb76038e972722fe7ad728f0e4904e046c230570fe9d41398abe12ef5bc942be33542a4802d98b5d70f2a332ec37fac3514e74ddc0f2cc1a874cd0c78305a21566461309789606bd0bf3f98cda8044629a1 255044462d312e330a25e2e3cfd30a0a0a312030206f626a0a3c3c2f57696474682032203020522f4865696768742033203020522f547970652034203020522f537562747970652035203020522f46696c7465722036203020522f436f6c6f7253706163652037203020522f4c656e6774682038203020522f42697473506572436f6d706f6e656e7420383e3e0a73747265616d0affd8fffe00245348412d3120697320646561642121212121852fec092339759c39b1a1c63c4c97e1fffe017346dc9166b67e118f029ab621b2560ff9ca67cca8c7f85ba84c79030c2b3de218f86db3a90901d5df45c14f26fedfb3dc38e96ac22fe7bd728f0e45bce046d23c570feb141398bb552ef5a0a82be331fea48037b8b5d71f0e332edf93ac3500eb4ddc0decc1a864790c782c76215660dd309791d06bd0af3f98cda4bc4629b1 OP_2DUP OP_EQUAL OP_NOT OP_VERIFY OP_SHA1 OP_SWAP OP_SHA1 OP_EQUAL]'
``` ```
Peter Todd's other [bounties](https://bitcointalk.org/index.php?topic=293382.0) remain unclaimed at the time of this writing. They're all written in the same manner as the SHA-1 example above. Peter Todd's other [bounties](https://bitcointalk.org/index.php?topic=293382.0) remain unclaimed at the time of this writing. They're all written in the same manner as the SHA-1 example above.
@ -494,7 +494,7 @@ Here's where the security falls down:
First, anyone can redeem them without knowing much of a secret. They do have to have the `redeemScript`, which offers some protection, but once they do, that's probably the only secret that's necessary — unless your puzzle is _really_ tough, such as a computational puzzle. First, anyone can redeem them without knowing much of a secret. They do have to have the `redeemScript`, which offers some protection, but once they do, that's probably the only secret that's necessary — unless your puzzle is _really_ tough, such as a computational puzzle.
Second, the actual redemption isn't secure. Normally, a Bitcoin transction is protected by the signature. Because the signature covers the transaction, no one on the network can rewrite that transaction to instead send to their address without invalidating the signature (and thus the transaction). That isn't true with a transactions whose inputs are just numbers. Anyone could grab the transaction and rewrite it to allow them to steal the funds. If they can get their transaction into a block before yours, they win, and you don't get the puzzle money. There are solutions for this, but they involve mining the block yourself or having a trusted pool mine it, and neither of those options is rational for an average Bitcoin user. Second, the actual redemption isn't secure. Normally, a Bitcoin transaction is protected by the signature. Because the signature covers the transaction, no one on the network can rewrite that transaction to instead send to their address without invalidating the signature (and thus the transaction). That isn't true with a transactions whose inputs are just numbers. Anyone could grab the transaction and rewrite it to allow them to steal the funds. If they can get their transaction into a block before yours, they win, and you don't get the puzzle money. There are solutions for this, but they involve mining the block yourself or having a trusted pool mine it, and neither of those options is rational for an average Bitcoin user.
Yet, Peter Todd's cryptographic bounties prove that puzzle scripts do have some real-world application. Yet, Peter Todd's cryptographic bounties prove that puzzle scripts do have some real-world application.

View File

@ -78,7 +78,7 @@ Script:
Running: 0 <sigVPA> <sigVPB> 2 <pubKeyVPA> <pubKeyVPB> <pubKeyVPC> 3 OP_CHECKMULTISIG Running: 0 <sigVPA> <sigVPB> 2 <pubKeyVPA> <pubKeyVPB> <pubKeyVPC> 3 OP_CHECKMULTISIG
Stack: [ ] Stack: [ ]
``` ```
You might notice that the President's signature just uses a simple `OP_CHECKSIGNATURE` rather than the more complex code ususally required for a P2PKH. We can get away with including the public key in the locking script, obviating the usual rigamarole, because it's hashed and won't be revealed (through the `redeemScript`) until the transaction is unlocked. This also allows for all of the possible signers to sign using the same methodology. You might notice that the President's signature just uses a simple `OP_CHECKSIGNATURE` rather than the more complex code usually required for a P2PKH. We can get away with including the public key in the locking script, obviating the usual rigamarole, because it's hashed and won't be revealed (through the `redeemScript`) until the transaction is unlocked. This also allows for all of the possible signers to sign using the same methodology.
The only possible problem is if the President is absent-minded and accidentally signs a transaction with one of his VPs, because he remembers this being a 2-of-3 multisig. One option is to decide that's an acceptable failure condition, because the President is using the multsig incorrectly. Another option is to turn the 2-of-3 multisig into a 2-of-4 multisig, just in case the President doesn't tolerate failure: `OP_DEPTH 1 OP_EQUAL IF <pubKeyPres> OP_CHECKSIGNATURE ELSE 2 <pubKeyVPA> <pubKeyVPB> <pubKeyVPC> <pubKeyPres> 4 OP_CHECKMULTISIG ENDIF`. This would allow the President to mistakenly sign with any Vice President, but wouldn't impact things if two Vice Presidents wanted to (correctly) sign. The only possible problem is if the President is absent-minded and accidentally signs a transaction with one of his VPs, because he remembers this being a 2-of-3 multisig. One option is to decide that's an acceptable failure condition, because the President is using the multsig incorrectly. Another option is to turn the 2-of-3 multisig into a 2-of-4 multisig, just in case the President doesn't tolerate failure: `OP_DEPTH 1 OP_EQUAL IF <pubKeyPres> OP_CHECKSIGNATURE ELSE 2 <pubKeyVPA> <pubKeyVPB> <pubKeyVPC> <pubKeyPres> 4 OP_CHECKMULTISIG ENDIF`. This would allow the President to mistakenly sign with any Vice President, but wouldn't impact things if two Vice Presidents wanted to (correctly) sign.
@ -106,7 +106,7 @@ The result of the final `OP_CHECKMULTISIG` that was run will be left on the top
We've talked a lot about escrows. Complex multisigs combined with timelocks offer an automated way to create them in a robust manner. We've talked a lot about escrows. Complex multisigs combined with timelocks offer an automated way to create them in a robust manner.
Imagine home buyer Alice and home seller Bob who are working with an escrow agent The easy way to script this would be as a multisig where any two of the three parties could release the money: either the seller and buyer agree or the escrow agent takes over and agrees with one of the parties: `2 <pubKeyA> <pubKeyB> <pubKeyEscrow> 3 OP_CHECKMULTISG`. Imagine home buyer Alice and home seller Bob who are working with an escrow agent. The easy way to script this would be as a multisig where any two of the three parties could release the money: either the seller and buyer agree or the escrow agent takes over and agrees with one of the parties: `2 <pubKeyA> <pubKeyB> <pubKeyEscrow> 3 OP_CHECKMULTISG`.
However, this weakens the power of the escrow agent and allows the seller and buyer to accidentally make a bad decision between themselves — which is one of the things an escrow system is designed to avoid. So it could be that what we really want is the system that we just laid out, where the escrow agent is a required party in the 2-of-3 multisig: `OP_3DUP 2 <pubKeyEscrow> <pubKeyA> 2 OP_CHECKMULTISIG NOTIF 2 <pubKeyEscrow> <pubKeyB> 2 OP_CHECKMULTISIG ENDIF`. However, this weakens the power of the escrow agent and allows the seller and buyer to accidentally make a bad decision between themselves — which is one of the things an escrow system is designed to avoid. So it could be that what we really want is the system that we just laid out, where the escrow agent is a required party in the 2-of-3 multisig: `OP_3DUP 2 <pubKeyEscrow> <pubKeyA> 2 OP_CHECKMULTISIG NOTIF 2 <pubKeyEscrow> <pubKeyB> 2 OP_CHECKMULTISIG ENDIF`.
@ -130,7 +130,7 @@ First, you test a signature for the buyer and the escrow agent, then a signature
### Write a Buyer-Centric Escrow Multisig ### Write a Buyer-Centric Escrow Multisig
[BIP 112](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki#Escrow_with_Timeout) offers an different example of this sort of escrow that doesn't have the extra protections to prevent going around the escrow agent, but which does give Alice total control if the escrow fails. [BIP 112](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki#Escrow_with_Timeout) offers a different example of this sort of escrow that doesn't have the extra protections to prevent going around the escrow agent, but which does give Alice total control if the escrow fails.
``` ```
IF IF

View File

@ -4,7 +4,7 @@ Bitcoin Scripts can go far beyond the relatively simple financial instruments de
## Lock for the Lightning Network ## Lock for the Lightning Network
The [Lightning Network](https://rusty.ozlabs.org/?p=450) is a payment channel that allows users to take funds off-chain and engage in numerous microtransactions before finalizing the payment channel and bringing the funds back into Bitcoin. Benefits include lower fees and faster transaction speeds. It's discussed in more detail, with examples of how to use it from the command line, starting [Chapter 18](18_0_Understanding_Your_Lightning_Setup.md). The [Lightning Network](https://rusty.ozlabs.org/?p=450) is a payment channel that allows users to take funds off-chain and engage in numerous microtransactions before finalizing the payment channel and bringing the funds back into Bitcoin. Benefits include lower fees and faster transaction speeds. It's discussed in more detail, with examples of how to use it from the command line, starting [Chapter 19](19_0_Understanding_Your_Lightning_Setup.md).
[BIP 112](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki) contains a few examples of how these off-chain transactions could be generated, using Bitcoin locking scripts. [BIP 112](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki) contains a few examples of how these off-chain transactions could be generated, using Bitcoin locking scripts.
@ -270,7 +270,7 @@ Running through the script reveals that the initial checks, above the `IF`/`ELSE
#### Understand HTLCs #### Understand HTLCs
HTLCs are quite complex, and this overview doesn't try to explain all of their intricacies. Rusty Russell's [overview](https://rusty.ozlabs.org/?p=462) explains more. and there's even more detail in his [Deployable Lightning](https://github.com/ElementsProject/lightning/blob/master/doc/deployable-lightning.pdf) paper. But don't worry if some of the intricacies still escape you, particularly the interrelations of the two scripts. HTLCs are quite complex, and this overview doesn't try to explain all of their intricacies. Rusty Russell's [overview](https://rusty.ozlabs.org/?p=462) explains more, and there's even more detail in his [Deployable Lightning](https://github.com/ElementsProject/lightning/blob/master/doc/deployable-lightning.pdf) paper. But don't worry if some of the intricacies still escape you, particularly the interrelations of the two scripts.
For the purposes of this tutorial, there are two important lessons for HTLCs: For the purposes of this tutorial, there are two important lessons for HTLCs:
@ -291,6 +291,6 @@ Move on to "Using Tor" with [Chapter Fourteen: Using Tor](14_0_Using_Tor.md).
Or, if you prefer, there are two alternate paths: Or, if you prefer, there are two alternate paths:
If you want to stay focused on Bitcoin, move on to "Programming with RPC" with [Chapter Fifteen: Talking to Bitcoind with C](15_0_Talking_to_Bitcoind.md). If you want to stay focused on Bitcoin, move on to "Programming with RPC" with [Chapter Sixteen: Talking to Bitcoind with C](16_0_Talking_to_Bitcoind.md).
Or, if you want to stay focused on the command-line because you're not a programmer, you can skip to [Chapter Eighteen: Understanding Your Lightning Seutp](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/18_0_Understanding_Your_Lightning_Setup.md) to continue your command-line education with the Lightning Network. Or, if you want to stay focused on the command-line because you're not a programmer, you can skip to [Chapter Nineteen: Understanding Your Lightning Setup](19_0_Understanding_Your_Lightning_Setup.md) to continue your command-line education with the Lightning Network.

View File

@ -6,13 +6,13 @@ If you did a standard installation with [Bitcoin Standup](https://github.com/Blo
> :book: ***What is Tor?*** Tor is a low-latency anonymity and overlay network based on onion routing and path-building design for enabling anonymous communication. It's free and open-source software with the name derived from the acronym for the original software project name: "The Onion Router". > :book: ***What is Tor?*** Tor is a low-latency anonymity and overlay network based on onion routing and path-building design for enabling anonymous communication. It's free and open-source software with the name derived from the acronym for the original software project name: "The Onion Router".
> :book: ***Why Use Tor for Bitcoin?*** The Bitcoin network is a peer-to-peer network that listens for transactions and propagates them using a public IP address. When connecting to the network not using Tor, you would share your IP address, which could expose your location, your uptime, and others details to third parties — which is an undesirable privacy practice. To protect yourself online you should use tools like Tor to hide your connection details. Tor allows improve your privacy online as your data is cryptographically encoded and goes through different nodes, each one decoding a single layer (hence the onion metaphor). > :book: ***Why Use Tor for Bitcoin?*** The Bitcoin network is a peer-to-peer network that listens for transactions and propagates them using a public IP address. When connecting to the network not using Tor, you would share your IP address, which could expose your location, your uptime, and others details to third parties — which is an undesirable privacy practice. To protect yourself online you should use tools like Tor to hide your connection details. Tor allows you to improve your privacy online as your data is cryptographically encoded and goes through different nodes, each one decoding a single layer (hence the onion metaphor).
## Understand Tor ## Understand Tor
So how does Tor work? So how does Tor work?
When a user wants to connect to an Internet server, Tor tries to build a path formed by at least three Tor nodes relays, called Guard, Middle, and Exit. While building this path, symmetric encryption keys are negotiated; when a message moves along the path, each relay then strips off its layer of encryption. In this way, the message arrives at the final destination in its original form, and each party only knows the previous and the next hop and cannot determine origin or destination. When a user wants to connect to an Internet server, Tor tries to build a path formed by at least three Tor relay nodes, called Guard, Middle, and Exit. While building this path, symmetric encryption keys are negotiated; when a message moves along the path, each relay then strips off its layer of encryption. In this way, the message arrives at the final destination in its original form, and each party only knows the previous and the next hop and cannot determine origin or destination.
Here's what a connection looks like without Tor: Here's what a connection looks like without Tor:
``` ```
@ -94,7 +94,7 @@ mgcym6je63k44b3i5uachhsndayzx7xi4ldmwrm7in7yvc766rykz6yd.onion
When you have all of that information you can issue a `bitcoin-cli` command using `torify` and specifying the `-rpcconnect` as your onion address, the `-rpcport` as your hidden service port, and the `-rpcpassword` as your password: When you have all of that information you can issue a `bitcoin-cli` command using `torify` and specifying the `-rpcconnect` as your onion address, the `-rpcport` as your hidden service port, and the `-rpcpassword` as your password:
``` ```
$ torify bitcoin-cli -rpcconnect=mgcym6je63k44b3i5uachhsndayzx7xi4ldmwrm7in7yvc766rykz6yd.onion -rpcport=1309 -rpcpassword=685316cc239c24ba71fd0969fa55634f getblockcount $ torify bitcoin-cli -rpcconnect=mgcym6je63k44b3i5uachhsndayzx7xi4ldmwrm7in7yvc766rykz6yd.onion -rpcport=1309 -rpcuser=StandUp -rpcpassword=685316cc239c24ba71fd0969fa55634f getblockcount
``` ```
### Verify Your Tor Setup for Bitcoind ### Verify Your Tor Setup for Bitcoind
@ -104,10 +104,12 @@ Bitcoin Standup also ensures that your `bitcoind` is set up to optionally commun
You can verify the initial setup of Tor for `bitcoind` by grepping for "tor" in the `debug.log` in your data directory: You can verify the initial setup of Tor for `bitcoind` by grepping for "tor" in the `debug.log` in your data directory:
``` ```
$ grep "tor:" ~/.bitcoin/testnet3/debug.log $ grep "tor:" ~/.bitcoin/testnet3/debug.log
2020-07-15T17:56:34Z tor: ADD_ONION successful 2021-06-09T14:07:04Z tor: ADD_ONION successful
2020-07-15T17:56:34Z tor: Got service ID zbyqk2tmq4c4vzeo, advertising service zbyqk2tmq4c4vzeo.onion:18333 2021-06-09T14:07:04Z tor: Got service ID vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd, advertising service vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd.onion:18333
2020-07-15T17:56:34Z tor: Cached service private key to /home/standup/.bitcoin/testnet3/onion_private_key 2021-06-09T14:07:04Z tor: Cached service private key to /home/standup/.bitcoin/testnet3/onion_v3_private_key
``` ```
> :information_source: **NOTE:** Bitcoin Core does not support v2 addresses anymore. Tor v2 support was removed in [#22050](https://github.com/bitcoin/bitcoin/pull/22050)
> **TESTNET vs MAINNET:** Mainnet `bitcoind` responds on port 8333, testnet on port 18333. > **TESTNET vs MAINNET:** Mainnet `bitcoind` responds on port 8333, testnet on port 18333.
You can verify that a Tor hidden service has been created for Bitcoin with the `getnetworkinfo` RPC call: You can verify that a Tor hidden service has been created for Bitcoin with the `getnetworkinfo` RPC call:
@ -127,14 +129,14 @@ $ bitcoin-cli getnetworkinfo
"score": 1 "score": 1
}, },
{ {
"address": "zbyqk2tmq4c4vzeo.onion", "address": "vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd.onion",
"port": 18333, "port": 18333,
"score": 4 "score": 4
} }
], ],
... ...
``` ```
This shows three addresses to access your Bitcoin server, an IPv4 address (`173.255.245.83`), an IPv6 address (`2600:3c01::f03c:92ff:fe86:f26`), and a Tor address (`zbyqk2tmq4c4vzeo.onion`). This shows three addresses to access your Bitcoin server, an IPv4 address (`173.255.245.83`), an IPv6 address (`2600:3c01::f03c:92ff:fe86:f26`), and a Tor address (`vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd.onion`).
> :warning: **WARNING:** Obviously: never reveal your Tor address in a way that's associated with your name or other PII! > :warning: **WARNING:** Obviously: never reveal your Tor address in a way that's associated with your name or other PII!
@ -191,12 +193,12 @@ You can see similar information with `getnetworkinfo`.
"score": 1 "score": 1
}, },
{ {
"address": "zbyqk2tmq4c4vzeo.onion", "address": "vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd.onion",
"port": 18333, "port": 18333,
"score": 4 "score": 4
} }
], ],
"warnings": "Warning: unknown new rules activated (versionbit 28)" "warnings": ""
} }
``` ```
This hidden service will allow anonymous connections to your `bitcoind` over the Bitcoin Network. This hidden service will allow anonymous connections to your `bitcoind` over the Bitcoin Network.

View File

@ -59,6 +59,8 @@ addnode=address.onion
addnode=address.onion addnode=address.onion
addnode=address.onion addnode=address.onion
``` ```
See [Bitcoin Onion Nodes](https://github.com/emmanuelrosa/bitcoin-onion-nodes) for a listing and an example of how to add them.
Afterward, restart `tor` and `bitcoind`. Afterward, restart `tor` and `bitcoind`.
You should now be communicating exlusively on Tor. But, unless you are in a hostile state, this level of anonymity is probably not required. It also is not particularly recommended: you might greatly decrease your number of potential peers, inviting problems of censorship or even correlation. You may also see lag. And, this setup may give you a false sense of anonymity that really doesn't exist on the Bitcoin network. You should now be communicating exlusively on Tor. But, unless you are in a hostile state, this level of anonymity is probably not required. It also is not particularly recommended: you might greatly decrease your number of potential peers, inviting problems of censorship or even correlation. You may also see lag. And, this setup may give you a false sense of anonymity that really doesn't exist on the Bitcoin network.

View File

@ -54,6 +54,6 @@ Now that you've got Tor installed and know how to use it, you can add other serv
> :fire: ***What's the power of Other Hidden Services?*** Every time you access a service on your server remotely, you leave footprints on the network. Even if the data is encrypted by something like SSH (or TLS), lurkers on the network can see where you're connecting from, where you're connecting to, and what service you're using. Does this matter? This is the question you have to ask. But if the answer is "Yes", you can protect the connection with a hidden service. > :fire: ***What's the power of Other Hidden Services?*** Every time you access a service on your server remotely, you leave footprints on the network. Even if the data is encrypted by something like SSH (or TLS), lurkers on the network can see where you're connecting from, where you're connecting to, and what service you're using. Does this matter? This is the question you have to ask. But if the answer is "Yes", you can protect the connection with a hidden service.
Move on to "Programming with RPC" with [Chapter Fifteen: Talking to Bitcoind with C](15_0_Talking_to_Bitcoind.md). ## What's Next?
Or, if you're not a programmer, you can skip to [Chapter Eighteen: Understanding Your Lightning Seutp](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/18_0_Understanding_Your_Lightning_Setup.md) to continue your command-line education with the Lightning Network. For a different sort of privacy, move on to "Using i2p" with [Chapter Fifteen: Using i2p](15_0_Using_i2p.md).

20
15_0_Using_i2p.md Normal file
View File

@ -0,0 +1,20 @@
# Chapter 15: Using I2P
There are alternatives to Tor. One is the Invisible Internet Project (I2P), a fully encrypted private network layer. It uses a distributed [network database](https://geti2p.net/en/docs/how/network-database) and encrypted unidirectional tunnels between peers. The biggest difference between Tor and I2P is that Tor is fundamentally a proxy network that offers internet services in a private form, while I2P is fundamentally a sequestered network that offers I2P services only to the I2P network, creating a "network within a network". However, you might just want it as an alternative, so that you're not dependent solely on Tor.
I2P is not currently installed by [Bitcoin Standup](https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts), as I2P support was recently added in Bitcoin Core. However, this chapter explains how to manually install it.
## Objectives for This Chapter
After working through this chapter, a developer will be able to:
* Run Bitcoin Core as an I2P (Invisible Internet Project) service
Supporting objectives include the ability to:
* Understand the I2P Network
* Learn the difference between Tor and I2P
## Table of Contents
* [Section One: Bitcoin Core as an I2P (Invisible Internet Project) service](15_1_i2p_service.md)

121
15_1_i2p_service.md Normal file
View File

@ -0,0 +1,121 @@
# 15.1: Bitcoin Core as an I2P (Invisible Internet Project) service
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
Rather than using the proxy-based Tor service to ensure the privacy of your Bitcoin communications, you may instead wish to use I2P, which is designed to act as a private network within the internet, rather than simply offering private access to internet services.
## Understand the Differences
Tor and I2P both offer private access to online services, but with different routing and databases, and with different architectures for relays. Since hidden services (such as Bitcoin access) are core to the design of I2P, they have also been better optimized:
| | Tor | I2P |
| :--- | :---: | ---: |
| Routing | [Onion](https://www.onion-router.net/) | [Garlic](https://geti2p.net/en/docs/how/garlic-routing) |
| Network Database | Trusted [Directory Servers](https://blog.torproject.org/possible-upcoming-attempts-disable-tor-network) | [Distributed network database](https://geti2p.net/en/docs/how/network-database) |
| Relay | **Two-way** encrypted connections between each Relay | **One-way** connections between every server in its tunnels |
| Hidden services | Slow | Fast |
A more detailed comparison may be found at [geti2p.net](https://geti2p.net/en/comparison/tor).
### Understand Tradeoffs for Limiting Outgoing Connections
There are [tradeoffs](https://bitcoin.stackexchange.com/questions/107060/tor-and-i2p-tradeoffs-in-bitcoin-core) if you choose to support only I2P, only Tor, or both. These configurations, which limit outgoing clearnet connections, are made in Bitcoin Core using the `onlynet` argument in your `bitcoin.conf`.
* `onlynet=onion`, which limits outgoing connections to Tor, can expose a node to Sybil attacks and can create network partitioning, because of limited connections between Tornet and the clearnet.
* `onlynet=onion` and `onlynet=i2p` in conjunction, which runs Onion service with I2P service is experimental for now.
## Install I2P
To install I2P, you should make sure your ports are correctly set up and then you can continue with your setup process.
### Prepare Ports
To use I2P, you will need to open the following ports, which are required by I2P:
1. **Outbound (Internet facing):** a random port between 9000 and 31000 is selected. It is best if all these ports are open for outbound connections, which doesn't affect your security.
- You can check firewall status using `sudo ufw status verbose`, which shouldn't deny outgoing connections by default.
2. Inbound (Internet facing): optional. A variety of inbound ports are listed in the [I2P docs](https://geti2p.net/en/faq#ports).
- For maximum privacy, it is preferable to disable accepting incoming connections.
### Run I2P
The following will run Bitcoin Core I2P services:
1. Install `i2pd` on Ubuntu:
```
sudo add-apt-repository ppa:purplei2p/i2pd
sudo apt-get update
sudo apt-get install i2pd
```
For installing on other OSes, see [these docs](https://i2pd.readthedocs.io/en/latest/user-guide/install/)
2. [Run](https://i2pd.readthedocs.io/en/latest/user-guide/run/) the I2P service:
```
$ sudo systemctl start i2pd.service
```
3. Check that I2P is running. You should see it on port 7656:
```
$ ss -nlt
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 4096 127.0.0.1:7656 0.0.0.0:*
```
4. Add the following lines in `bitcoin.conf`:
```
i2psam=127.0.0.1:7656
debug=i2p
```
The logging option, `debug=i2p`, is used to record additional information in the debug log about your I2P configuration and connections. The default location for this debugging file on Linux is: `~/.bitcoin/debug.log`:
5. Restart `bitcoind`
```
$ bitcoind
```
6. Check `debug.log` to see if I2P was setup correctly, or if any errors appeared in the logs.
```
2021-06-15T20:36:16Z i2paccept thread start
2021-06-15T20:36:16Z I2P: Creating SAM session with 127.0.0.1:7656
2021-06-15T20:36:56Z I2P: SAM session created: session id=3e0f35228b, my address=bmwyyuzyqdc5dcx27s4baltbu6zw7rbqfl2nmclt45i7ng3ul4pa.b32.i2p:18333
2021-06-15T20:36:56Z AddLocal(bmwyyuzyqdc5dcx27s4baltbu6zw7rbqfl2nmclt45i7ng3ul4pa.b32.i2p:18333,4)
```
The I2P address is mentioned in the logs, ending with _b32.i2p_. For example `bmwyyuzyqdc5dcx27s4baltbu6zw7rbqfl2nmclt45i7ng3ul4pa.b32.i2p:18333`.
7. Confirm `i2p_private_key` was created in the Bitcoin Core data directory. The first time Bitcoin Core connects to the I2P router, its I2P address (and corresponding private key) will be automatically generated and saved in a file named *i2p_private_key*:
```
~/.bitcoin/testnet3$ ls
anchors.dat chainstate i2p_private_key settings.json
banlist.dat debug.log mempool.dat wallets
blocks fee_estimates.dat peers.dat
```
8. Check that `bitcoin-cli -netinfo` or `bitcoin-cli getnetworkinfo`returns the I2P address:
```
Local addresses
bmwyyuzyqdc5dcx27s4baltbu6zw7rbqfl2nmclt45i7ng3ul4pa.b32.i2p port 18333 score 4
```
You now have your Bitcoin server accessible through the I2P network at your new local address.
## Summary: Bitcoin Core as an I2P (Invisible Internet Project) service
It is always good to have alternatives for privacy and not depend solely on Tor for running Bitcoin Core as a hidden service. Since I2P was recently added in Bitcoin Core, not many people use it. Experiment with it and report bugs if you find any issues.
> :information_source: **NOTE:** For the official i2prouter implementation in Java, visit the [I2P download page](https://geti2p.net/en/download) and follow the instructions for your Operating System. Once installed, open a terminal window and type `i2prouter start`. Then visit `127.0.0.1:7657` in your browser to enable SAM. To do so, select: "Configure Homepage", then "Clients", and finally select the "Play Button" next to SAM application Bridge. On the left side of the page, there should be a green light next to "Shared Clients".
Move on to "Programming with RPC" with [Chapter Sixteen: Talking to Bitcoind with C](16_0_Talking_to_Bitcoind.md).
Or, if you're not a programmer, you can skip to [Chapter Nineteen: Understanding Your Lightning Setup](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/19_0_Understanding_Your_Lightning_Setup.md) to continue your command-line education with the Lightning Network.

View File

@ -1,4 +1,4 @@
# Chapter 15: Talking to Bitcoind with C # Chapter 16: Talking to Bitcoind with C
While working with Bitcoin Scripts, we hit the boundaries of what's possible with `bitcoin-cli`: it can't currently be used to generate transactions containing unusual scripts. Shell scripts also aren't great for some things, such as creating listener programs that are constantly polling. Fortunately, there are other ways to access the Bitcoin network: programming APIs. While working with Bitcoin Scripts, we hit the boundaries of what's possible with `bitcoin-cli`: it can't currently be used to generate transactions containing unusual scripts. Shell scripts also aren't great for some things, such as creating listener programs that are constantly polling. Fortunately, there are other ways to access the Bitcoin network: programming APIs.
@ -20,6 +20,6 @@ Supporting objectives include the ability to:
## Table of Contents ## Table of Contents
* [Section One: Accessing Bitcoind in C with RPC Libraries](15_1_Accessing_Bitcoind_with_C.md) * [Section One: Accessing Bitcoind in C with RPC Libraries](16_1_Accessing_Bitcoind_with_C.md)
* [Section Two: Programming Bitcoind in C with RPC Libraries](15_2_Programming_Bitcoind_with_C.md) * [Section Two: Programming Bitcoind in C with RPC Libraries](16_2_Programming_Bitcoind_with_C.md)
* [Section Three: Receiving Notifications in C with ZMQ Libraries](15_3_Receiving_Bitcoind_Notifications_with_C.md) * [Section Three: Receiving Notifications in C with ZMQ Libraries](16_3_Receiving_Bitcoind_Notifications_with_C.md)

View File

@ -1,11 +1,13 @@
# 15.1: Accessing Bitcoind in C with RPC Libraries # 16.1: Accessing Bitcoind in C with RPC Libraries
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
You've already seen one alternative way to access the Bitcoind's RPC ports: `curl`, which was covered in a [Chapter 4 Interlude](04_4__Interlude_Using_Curl.md). Interacting with `bitcoind` through a RPC library in C is no different than that, you just need some good libraries to help you out. This section introduces a package called `libbitcoinrpc`, which allows you to access JSON-RPC `bitcoind` port. It uses a `curl` library for accessing the data and it uses the `jansson` library for encoding and decoding the JSON. You've already seen one alternative way to access the Bitcoind's RPC ports: `curl`, which was covered in a [Chapter 4 Interlude](04_4__Interlude_Using_Curl.md). Interacting with `bitcoind` through an RPC library in C is no different than that, you just need some good libraries to help you out. This section introduces a package called `libbitcoinrpc`, which allows you to access JSON-RPC `bitcoind` port. It uses a `curl` library for accessing the data and it uses the `jansson` library for encoding and decoding the JSON.
## Set Up libbitcoinrpc ## Set Up libbitcoinrpc
> :warning: **WARNING** It appears that `libbitcoinrpc` has been entirely abandoned. We have logged updating this to a new C library as an [issue](https://github.com/BlockchainCommons/Community/issues/140). In the meantime, the `libbitcoinrpc` library does not currently compile without intervention. As a result 16.1 and 16.2 is mainly viewable as pseudo-code that shows the process of integrating Bitcoin-Core with C.
To use `libbitcoinrpc`, you need to install a basic C setup and the dependent packages `libcurl`, `libjansson`, and `libuuid`. The following will do so on your Bitcoin Standup server (or any other Ubuntu server). To use `libbitcoinrpc`, you need to install a basic C setup and the dependent packages `libcurl`, `libjansson`, and `libuuid`. The following will do so on your Bitcoin Standup server (or any other Ubuntu server).
``` ```
$ sudo apt-get install make gcc libcurl4-openssl-dev libjansson-dev uuid-dev $ sudo apt-get install make gcc libcurl4-openssl-dev libjansson-dev uuid-dev
@ -18,13 +20,13 @@ Need to get 358 kB of archives.
After this operation, 1.696 kB of additional disk space will be used. After this operation, 1.696 kB of additional disk space will be used.
Do you want to continue? [Y/n] y Do you want to continue? [Y/n] y
``` ```
You can then download [libbitcoinrpc from Github](https://github.com/gitmarek/libbitcoinrpc/blob/master/README.md). Clone it or grab a zip file, as you prefer. You can then download [libbitcoinrpc from Github](https://github.com/BlockchainCommons/libbitcoinrpc/blob/master/README.md). Clone it or grab a zip file, as you prefer.
``` ```
$ sudo apt-get install git $ sudo apt-get install git
$ git clone https://github.com/gitmarek/libbitcoinrpc $ git clone https://github.com/BlockchainCommons/libbitcoinrpc.git
``` ```
> :warning: **WARNING** A change in the "signrawtransaction" RPC caused signing with `libbitcoinrpc` to segfault for Bitcoin 0.17 or higher. A [PR has been submitted](https://github.com/gitmarek/libbitcoinrpc/pull/1/commits) to resolve the problem, but if it hasn't yet been merged, you can just make the one simple change in the source code to `src/bitcoinrpc_method.c` before compiling. > :warning: **WARNING** A change in the "signrawtransaction" RPC caused signing with `libbitcoinrpc` to segfault for Bitcoin 0.17 or higher. A [PR has been submitted](https://github.com/gitmarek/libbitcoinrpc/pull/1) to resolve the problem, but if it hasn't yet been merged, you can just make the one simple change in the source code to `src/bitcoinrpc_method.c` before compiling.
### Compiling libbitcoinrpc ### Compiling libbitcoinrpc
@ -106,7 +108,7 @@ First, initialize the library:
``` ```
bitcoinrpc_global_init(); bitcoinrpc_global_init();
``` ```
Then connect to your `bitcoind` with `bitcoinrpc_cl_init_params`. The four arguments for `bitcoinrpc_cl_init_params` are username, password, IP address, and port. You should already know all of this information from your work with [Curl](04_4__Interlude_Using_Curl.md). As you'll recall, the IP address 127.0.0.1 and port 18332 should be correct for the standard testnet setup described in this documents, while you can extract the user and password from `~/.bitcoin/bitcoin.conf`. Then connect to your `bitcoind` with `bitcoinrpc_cl_init_params`. The four arguments for `bitcoinrpc_cl_init_params` are username, password, IP address, and port. You should already know all of this information from your work with [Curl](04_4__Interlude_Using_Curl.md). As you'll recall, the IP address 127.0.0.1 and port 18332 should be correct for the standard testnet setup described in these documents, while you can extract the user and password from `~/.bitcoin/bitcoin.conf`.
``` ```
$ cat bitcoin.conf $ cat bitcoin.conf
server=1 server=1
@ -147,7 +149,7 @@ bitcoinrpc_global_cleanup();
### Test the Test Code ### Test the Test Code
Test code can be found at [15_1_testbitcoin.c in the src directory](src/15_1_testbitcoin.c). Download it to your testnet machine, then insert the correct RPC password (and change the RPC user if you didn't create your server with StandUp). Test code can be found at [16_1_testbitcoin.c in the src directory](src/16_1_testbitcoin.c). Download it to your testnet machine, then insert the correct RPC password (and change the RPC user if you didn't create your server with StandUp).
You can compile and run this as follows: You can compile and run this as follows:
``` ```
@ -160,7 +162,7 @@ Successfully connected to server!
## Make an RPC Call ## Make an RPC Call
In order to use an RPC method using `libbitcoinrpc`, you must initialize a variable of type `bitcoinrpc_method_t`. You do so with the appropriate value for the method you want to use, all of which are listed in the [bitcoinrpc Reference](https://github.com/gitmarek/libbitcoinrpc/blob/master/doc/reference.md). In order to use an RPC method using `libbitcoinrpc`, you must initialize a variable of type `bitcoinrpc_method_t`. You do so with the appropriate value for the method you want to use, all of which are listed in the [bitcoinrpc Reference](https://github.com/BlockchainCommons/libbitcoinrpc/blob/master/doc/reference.md).
``` ```
bitcoinrpc_method_t *getmininginfo = NULL; bitcoinrpc_method_t *getmininginfo = NULL;
getmininginfo = bitcoinrpc_method_init(BITCOINRPC_METHOD_GETMININGINFO); getmininginfo = bitcoinrpc_method_init(BITCOINRPC_METHOD_GETMININGINFO);
@ -213,7 +215,7 @@ printf("Block Count: %d\n",blocks);
### Test the Info Code ### Test the Info Code
Retrieve the test code from [the src directory](15_1_getmininginfo.c). Retrieve the test code from [the src directory](src/16_1_getmininginfo.c).
``` ```
$ cc getmininginfo.c -lbitcoinrpc -ljansson -o getmininginfo $ cc getmininginfo.c -lbitcoinrpc -ljansson -o getmininginfo
$ ./getmininginfo $ ./getmininginfo
@ -278,4 +280,4 @@ By linking to the `bitcoinrpc` RPC and `jansson` JSON libraries, you can easily
## What's Next? ## What's Next?
Learn more about "Talking to Bitcoind with C" in [15.2: Programming Bitcoind in C with RPC Libraries](15_2_Programming_Bitcoind_with_C.md). Learn more about "Talking to Bitcoind with C" in [16.2: Programming Bitcoind in C with RPC Libraries](16_2_Programming_Bitcoind_with_C.md).

View File

@ -1,8 +1,8 @@
# 15.2: Programming Bitcoind in C with RPC Libraries # 16.2: Programming Bitcoind in C with RPC Libraries
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
[§15.1](15_1_Accessing_Bitcoind_with_C.md) laid out the methodology for creating C programs using RPC and JSON libraries. We're now going to show the potential of those C libraries by laying out a simplistic, first cut of an actual Bitcoin program. [§16.1](16_1_Accessing_Bitcoind_with_C.md) laid out the methodology for creating C programs using RPC and JSON libraries. We're now going to show the potential of those C libraries by laying out a simplistic, first cut of an actual Bitcoin program.
## Plan for Your Code ## Plan for Your Code
@ -55,7 +55,7 @@ printf("Sending %4.8f BTC to %s\n",tx_amount,tx_recipient);
### Step 2: Set an Arbitrary Fee ### Step 2: Set an Arbitrary Fee
This example just an arbitrary0.0005 BTC fee to ensure that the test transactions goes through quickly: This example just an arbitrary 0.0005 BTC fee to ensure that the test transactions goes through quickly:
``` ```
float tx_fee = 0.0005; float tx_fee = 0.0005;
float tx_total = tx_amount + tx_fee; float tx_total = tx_amount + tx_fee;
@ -65,7 +65,7 @@ float tx_total = tx_amount + tx_fee;
### Step 3: Prepare Your RPC ### Step 3: Prepare Your RPC
Obviously, you're going to need to get all of your variables ready again, as discussed in [§15.1: Accessing Bitcoind with C](15_1_Accessing_Bitcoind_with_C.md). You also need to initialize your library, connect your RPC client, and prepare your response object: Obviously, you're going to need to get all of your variables ready again, as discussed in [§16.1: Accessing Bitcoind with C](16_1_Accessing_Bitcoind_with_C.md). You also need to initialize your library, connect your RPC client, and prepare your response object:
``` ```
bitcoinrpc_global_init(); bitcoinrpc_global_init();
rpc_client = bitcoinrpc_cl_init_params ("bitcoinrpc", "YOUR-RPC-PASSWD", "127.0.0.1", 18332); rpc_client = bitcoinrpc_cl_init_params ("bitcoinrpc", "YOUR-RPC-PASSWD", "127.0.0.1", 18332);
@ -324,7 +324,7 @@ The entire code, with a _little_ more error-checking appears in the Appendix.
## Test Your Code ## Test Your Code
The complete code can be found in the [src directory](src/15_2_sendtoaddress.c). The complete code can be found in the [src directory](src/16_2_sendtoaddress.c).
Compile this as usual: Compile this as usual:
``` ```
@ -344,4 +344,4 @@ With access to a C library, you can create much more fully featured programs tha
## What's Next? ## What's Next?
Learn more about "Talking to Bitcoind with C" in [15.3: Receiving Notifications in C with ZMQ Libraries](15_3_Receiving_Bitcoind_Notifications_with_C.md). Learn more about "Talking to Bitcoind with C" in [16.3: Receiving Notifications in C with ZMQ Libraries](16_3_Receiving_Bitcoind_Notifications_with_C.md).

View File

@ -1,8 +1,8 @@
# 15.3 Receiving Notifications in C with ZMQ Libraries # 16.3 Receiving Notifications in C with ZMQ Libraries
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
[§15.1](15_1_Accessing_Bitcoind_with_C.md) and [§15.2](15_2_Programming_Bitcoind_with_C.md) introduced RPC and JSON libraries for C, and in doing so showed one of the advantages of accessing Bitcoin's RPC commands through a programming language: the ability to reasonably create much more complex programs. This chapter introduces a third library, for [ZMQ](http://zeromq.org/), and in doing so reveals another advantage: the ability to monitor for notifications. It will use that for coding a blockchain listener. [§16.1](16_1_Accessing_Bitcoind_with_C.md) and [§16.2](16_2_Programming_Bitcoind_with_C.md) introduced RPC and JSON libraries for C, and in doing so showed one of the advantages of accessing Bitcoin's RPC commands through a programming language: the ability to reasonably create much more complex programs. This chapter introduces a third library, for [ZMQ](http://zeromq.org/), and in doing so reveals another advantage: the ability to monitor for notifications. It will use that for coding a blockchain listener.
> :book: ***What is ZMQ?*** ZeroMQ (ZMQ)is a high-performance asynchronous messaging library that provides a message queue. ZeroMQ supports common messaging patterns (pub/sub, request/reply, client/server, and others) over a variety of transports (TCP, in-process, inter-process, multicast, WebSocket, and more), making inter-process messaging as simple as inter-thread messaging. You can find more details about ZMQ notifications and others kind of messages in [this repo](https://github.com/Actinium-project/ChainTools/blob/master/docs/chainlistener.md). > :book: ***What is ZMQ?*** ZeroMQ (ZMQ)is a high-performance asynchronous messaging library that provides a message queue. ZeroMQ supports common messaging patterns (pub/sub, request/reply, client/server, and others) over a variety of transports (TCP, in-process, inter-process, multicast, WebSocket, and more), making inter-process messaging as simple as inter-thread messaging. You can find more details about ZMQ notifications and others kind of messages in [this repo](https://github.com/Actinium-project/ChainTools/blob/master/docs/chainlistener.md).
@ -121,7 +121,7 @@ Of course when you're done, you should clean up:
### Test the Notification Code ### Test the Notification Code
The source code is in the [src directory](src/15_3_chainlistener.c) as usual. You should compile it: The source code is in the [src directory](src/16_3_chainlistener.c) as usual. You should compile it:
``` ```
$ cc -o chainlistener chainlistener.c -I/usr/local/include -L/usr/local/lib -lzmq -lczmq $ cc -o chainlistener chainlistener.c -I/usr/local/include -L/usr/local/lib -lzmq -lczmq
``` ```
@ -151,7 +151,7 @@ By using the ZMQ framework, you can easily receive notifications by subscribing
## What's Next? ## What's Next?
Learn more about "Programming with RPC" in [Chapter 16: Programming Bitcoin with Libwally](16_0_Programming_with_Libwally.md). Learn more about "Programming with RPC" in [Chapter 17: Programming Bitcoin with Libwally](17_0_Programming_with_Libwally.md).

View File

@ -1,8 +1,8 @@
# Chapter 16: Programming with Libwally # Chapter 17: Programming with Libwally
The previous chapter presented three C Libraries, for RPC, JSON, and ZMQ, all of which are intended to interact directly with `bitcoind`, just like you've been doing since the start. But, sometimes you might want to code without direct access to a `bitcoind`. This might be due to an offline client, or just because you want to keep some functionality internal to your C program. You also might want to get into deeper wallet functionality, like mnemonic word creation or address derivation. That's where Libwally comes in: it's a wallet library for C, C++, Java, NodeJS, or Python, with wrappers also available for other languages, such as Swift. The previous chapter presented three C Libraries, for RPC, JSON, and ZMQ, all of which are intended to interact directly with `bitcoind`, just like you've been doing since the start. But, sometimes you might want to code without direct access to a `bitcoind`. This might be due to an offline client, or just because you want to keep some functionality internal to your C program. You also might want to get into deeper wallet functionality, like mnemonic word creation or address derivation. That's where Libwally comes in: it's a wallet library for C, C++, Java, NodeJS, or Python, with wrappers also available for other languages, such as Swift.
This chapter touches upon the functionality possible within Libwally, most of which complements the work you've done through RPC access to `bitcoind`, but some of which replicates it. It also shows how to integrate that work with the RPC clients that you're more familiar with. However, note that this is just the barest introduction to Libwally. Several of its more improtant function sets are highlighted, but we never do more than stick our toes in. If you find its functions useful or intriguing, then you'll need to dig in much more deeply than this course can cover. This chapter touches upon the functionality possible within Libwally, most of which complements the work you've done through RPC access to `bitcoind`, but some of which replicates it. It also shows how to integrate that work with the RPC clients that you're more familiar with. However, note that this is just the barest introduction to Libwally. Several of its more important function sets are highlighted, but we never do more than stick our toes in. If you find its functions useful or intriguing, then you'll need to dig in much more deeply than this course can cover.
## Objectives for This Chapter ## Objectives for This Chapter
@ -20,10 +20,10 @@ Supporting objectives include the ability to:
## Table of Contents ## Table of Contents
* [Section One: Setting Up Libwally](16_1_Setting_Up_Libwally.md) * [Section One: Setting Up Libwally](17_1_Setting_Up_Libwally.md)
* [Section Two: Using BIP39 in Libwally](16_2_Using_BIP39_in_Libwally.md) * [Section Two: Using BIP39 in Libwally](17_2_Using_BIP39_in_Libwally.md)
* [Section Three: Using BIP32 in Libwally](16_3_Using_BIP32_in_Libwally.md) * [Section Three: Using BIP32 in Libwally](17_3_Using_BIP32_in_Libwally.md)
* [Section Four: Using PSBTs in Libwally](16_4_Using_PSBTs_in_Libwally.md) * [Section Four: Using PSBTs in Libwally](17_4_Using_PSBTs_in_Libwally.md)
* [Section Five: Using Scripts in Libwally](16_5_Using_Scripts_in_Libwally.md) * [Section Five: Using Scripts in Libwally](17_5_Using_Scripts_in_Libwally.md)
* [Section Six: Using Other Functions in Libwally](16_6_Using_Other_Functions_in_Libwally.md) * [Section Six: Using Other Functions in Libwally](17_6_Using_Other_Functions_in_Libwally.md)
* [Section Seven: Integrating Libwally and Bitcoin-CLI](16_7_Integrating_Libwally_and_Bitcoin-CLI.md) * [Section Seven: Integrating Libwally and Bitcoin-CLI](17_7_Integrating_Libwally_and_Bitcoin-CLI.md)

View File

@ -1,4 +1,4 @@
# 16.1: Setting Up Libwally # 17.1: Setting Up Libwally
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -129,7 +129,7 @@ In both cases, the argument is for flags, but is currently set to `0`.
## Test a Test Libwally Program ## Test a Test Libwally Program
The src directory contains [testwally.c](src/16_1_testwally.c), which just shows how the initialize and cleanup functions work. The src directory contains [testwally.c](src/17_1_testwally.c), which just shows how the initialize and cleanup functions work.
You can compile it as follows: You can compile it as follows:
``` ```
@ -186,12 +186,12 @@ This course will only use `libsodium` for one small (but crucial!) bit of entrop
## Summary: Setting Up Libwally ## Summary: Setting Up Libwally
By installing the Libwally (and Libsodium) includes and libraries, you gain access to a number of cryptographic and wallet functions, which can complement your RPC and ZMG libraries (or your command-line `bitcoin-cli`). By installing the Libwally (and Libsodium) includes and libraries, you gain access to a number of cryptographic and wallet functions, which can complement your RPC and ZMQ libraries (or your command-line `bitcoin-cli`).
So what precisely can you do now? That's what the rest of this chapter is about. So what precisely can you do now? That's what the rest of this chapter is about.
## What's Next? ## What's Next?
Learn more about "Programming Bitcoin with Libwally" in [16.2: Using BIP39 in Libwally](16_2_Using_BIP39_in_Libwally.md). Learn more about "Programming Bitcoin with Libwally" in [17.2: Using BIP39 in Libwally](17_2_Using_BIP39_in_Libwally.md).

View File

@ -1,4 +1,4 @@
# 16.2: Using BIP39 in Libwally # 17.2: Using BIP39 in Libwally
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -14,7 +14,7 @@ All Bitcoin keys start with entropy. This first use of Libwally, and its BIP39 m
> :book: ***What is Entropy?*** Entropy is a fancy way of saying randomness, but it's a carefully measured randomness that's used as the foundation of a true-random-number generated (TRG). Its measured in "bits", with more bits of entropy resulting in more randomness (and thus more protection for what's being generated). For Bitcoin, entropy is the foundation of your seed, which in an HD wallet generates all of your addresses. > :book: ***What is Entropy?*** Entropy is a fancy way of saying randomness, but it's a carefully measured randomness that's used as the foundation of a true-random-number generated (TRG). Its measured in "bits", with more bits of entropy resulting in more randomness (and thus more protection for what's being generated). For Bitcoin, entropy is the foundation of your seed, which in an HD wallet generates all of your addresses.
You'll always start work with Libwally by initializing the library and testing the results, as first demonstrated in [§16.1](16_1_Setting_Up_Libwally.md): You'll always start work with Libwally by initializing the library and testing the results, as first demonstrated in [§17.1](17_1_Setting_Up_Libwally.md):
``` ```
int lw_response; int lw_response;
@ -49,7 +49,7 @@ This example, which will be the only way we use the `libsodium` library, creates
``` ```
Note that you have to pass along the byte size, so if you were to increase the size of your entropy, to generate a longer mnemonic phrase, you'd also need to increase the value in this function. Note that you have to pass along the byte size, so if you were to increase the size of your entropy, to generate a longer mnemonic phrase, you'd also need to increase the value in this function.
> :note: **NOTE:** There are mnemonic word lists for different languages! The default is to use the English-language list, which is the `NULL` variable in these Libwally mnemonic commands, but you can alternatively request a different language! > **NOTE:** There are mnemonic word lists for different languages! The default is to use the English-language list, which is the `NULL` variable in these Libwally mnemonic commands, but you can alternatively request a different language!
That's it! You've created a mnemonic phrase! That's it! You've created a mnemonic phrase!
@ -57,7 +57,7 @@ That's it! You've created a mnemonic phrase!
### Translate into a Seed ### Translate into a Seed
There are some functions, such as `bip32_key_from_seed` (which we'll meet in the next section) that require you to have theseeddeed rather than the Mnemonic. The two things are functionally identical: if you have the seed, you can generate the mnemonic, and vice-versa. There are some functions, such as `bip32_key_from_seed` (which we'll meet in the next section) that require you to have the seed rather than the Mnemonic. The two things are functionally identical: if you have the seed, you can generate the mnemonic, and vice-versa.
If you need to generate the seed from your mnemonic, you just use the `bip39_mnemonic_to_seed` command: If you need to generate the seed from your mnemonic, you just use the `bip39_mnemonic_to_seed` command:
``` ```
@ -82,7 +82,7 @@ If you've done everything right, you should get back a 64-byte seed. (That's the
## Test Mnemonic Code ## Test Mnemonic Code
The full code for generating entropy, generating a BIP39 mnemonic, validating the mnemonic, and generating a seed can be found in the [src directory](src/16_2_genmnemonic.c). Download it and compile: The full code for generating entropy, generating a BIP39 mnemonic, validating the mnemonic, and generating a seed can be found in the [src directory](src/17_2_genmnemonic.c). Download it and compile:
``` ```
$ cc genmnemonic.c -lwallycore -lsodium -o genmnemonic $ cc genmnemonic.c -lwallycore -lsodium -o genmnemonic
``` ```
@ -99,8 +99,8 @@ BIP39 allows you generate a set of 12-24 Mnemonic words from a seed (and the Lib
> :fire: ***What is the power of BIP39?*** Bitcoin seeds and private keys are prone to all sorts of lossage. You mistype a single digit, and your money is gone forever. Mnemonic Words are a much more user-friendly way of representing the same data, but because they're words in the language of the user's choice, they're less prone to mistakes. The power of BIP39 is thus to improve the accessibility, usability, and safety of Bitcoin. > :fire: ***What is the power of BIP39?*** Bitcoin seeds and private keys are prone to all sorts of lossage. You mistype a single digit, and your money is gone forever. Mnemonic Words are a much more user-friendly way of representing the same data, but because they're words in the language of the user's choice, they're less prone to mistakes. The power of BIP39 is thus to improve the accessibility, usability, and safety of Bitcoin.
> :fire: ***What is the power of BIP39 in Libwally?*** Bitcoind doesn't currently support mnemonic words, so using Libwally can allow you to generate mnemonic words in conjunction with addresses held by `bitcoind` (though as we'll see in §16.7, it requires a bit of a work-around at present to import your keys into Bitcoin Core). > :fire: ***What is the power of BIP39 in Libwally?*** Bitcoind doesn't currently support mnemonic words, so using Libwally can allow you to generate mnemonic words in conjunction with addresses held by `bitcoind` (though as we'll see in §17.7, it requires a bit of a work-around at present to import your keys into Bitcoin Core).
## What's Next? ## What's Next?
Learn more about "Programming Bitcoin with Libwally" in [16.3: Using BIP32 in Libwally](16_3_Using_BIP32_in_Libwally.md). Learn more about "Programming Bitcoin with Libwally" in [17.3: Using BIP32 in Libwally](17_3_Using_BIP32_in_Libwally.md).

View File

@ -1,15 +1,15 @@
# 16.3: Using BIP32 in Libwally # 17.3: Using BIP32 in Libwally
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
In [§16.2](16_2_Using_BIP39_in_Libwally.md), you were able to use entropy to generate a seed and its related mnemonic. As you may recall from [§3.5: Understanding the Descriptor](03_5_Understanding_the_Descriptor.md), a seed is the basis of a Hierchical Deterministic (HD) Wallet, where that single seed can be used to generate many addresses. So how do you get from the seed to actual addresses? That's where [BIP32](https://en.bitcoin.it/wiki/BIP_0032) comes in. In [§17.2](17_2_Using_BIP39_in_Libwally.md), you were able to use entropy to generate a seed and its related mnemonic. As you may recall from [§3.5: Understanding the Descriptor](03_5_Understanding_the_Descriptor.md), a seed is the basis of a Hierchical Deterministic (HD) Wallet, where that single seed can be used to generate many addresses. So how do you get from the seed to actual addresses? That's where [BIP32](https://en.bitcoin.it/wiki/BIP_0032) comes in.
## Create an HD Root ## Create an HD Root
To create a HD address requires starting with a seed, and then walking down the hierarchy until the point that you create addresses. To create a HD address requires starting with a seed, and then walking down the hierarchy until the point that you create addresses.
That starts off easily enough, you just generate a seed, which you already did in the previous section: That starts off easily enough, you just generate a seed, which you already did in the previous section:
``` ```c
unsigned char entropy[16]; unsigned char entropy[16];
randombytes_buf(entropy, 16); randombytes_buf(entropy, 16);
@ -23,7 +23,7 @@ That starts off easily enough, you just generate a seed, which you already did i
### Generate a Root Key ### Generate a Root Key
With a seed in hand, you can then generate a master extended key with the `bip32_key_from_seed_alloc` function (or alternatively the `bip32_key_from_seed`, which doesn't do the `alloc`): With a seed in hand, you can then generate a master extended key with the `bip32_key_from_seed_alloc` function (or alternatively the `bip32_key_from_seed`, which doesn't do the `alloc`):
``` ```c
struct ext_key *key_root; struct ext_key *key_root;
lw_response = bip32_key_from_seed_alloc(seed,sizeof(seed),BIP32_VER_TEST_PRIVATE,0,&key_root); lw_response = bip32_key_from_seed_alloc(seed,sizeof(seed),BIP32_VER_TEST_PRIVATE,0,&key_root);
``` ```
@ -34,7 +34,7 @@ As you can see, you'll need to tell it what version of the key to return, in thi
### Generate xpub & xprv ### Generate xpub & xprv
Whenever you have a key in hand, you can turn it into xpub or xprv keys for distribution with the `bip32_key_to_base58` command. You just tell it whether you want a `PRIVATE` (xprv) or `PUBLIC` (xpub) key: Whenever you have a key in hand, you can turn it into xpub or xprv keys for distribution with the `bip32_key_to_base58` command. You just tell it whether you want a `PRIVATE` (xprv) or `PUBLIC` (xpub) key:
``` ```c
char *xprv; char *xprv;
lw_response = bip32_key_to_base58(key_root, BIP32_FLAG_KEY_PRIVATE, &xprv); lw_response = bip32_key_to_base58(key_root, BIP32_FLAG_KEY_PRIVATE, &xprv);
@ -44,7 +44,7 @@ Whenever you have a key in hand, you can turn it into xpub or xprv keys for dist
## Understand the Hierarchy ## Understand the Hierarchy
Before going further, you need to understand how the hierarchy of an HD wallet works. As discussed in [§3.5](03_5_Understanding_the_Descriptor.md), a derivation path describes the tree that you follow to get to a hierarchical key, so `[0/1/0]` is the 0th child of the 1st child of the 0th child of a root key. Sometimes part of that derivation are marked with `'`s or `h`s to show "hardened derivations, which increase security: `[0'/1'/0']`. Before going further, you need to understand how the hierarchy of an HD wallet works. As discussed in [§3.5](03_5_Understanding_the_Descriptor.md), a derivation path describes the tree that you follow to get to a hierarchical key, so `[0/1/0]` is the 0th child of the 1st child of the 0th child of a root key. Sometimes part of that derivation are marked with `'`s or `h`s to show hardened derivations, which increase security: `[0'/1'/0']`.
However, for HD wallets, each of those levels of the hierachy is used in a very specific way. This was originally defined in [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) and was later updated for Segwit in [BIP84]. However, for HD wallets, each of those levels of the hierachy is used in a very specific way. This was originally defined in [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) and was later updated for Segwit in [BIP84].
@ -71,18 +71,18 @@ To generate an address, you thus have to dig down through the whole hierarchy.
### Generate an Account Key ### Generate an Account Key
One way to do this is to use the `bip32_key_from_parent_path_alloc` function to drop down several levels of a hierarchy. You embed the levels in an array: One way to do this is to use the `bip32_key_from_parent_path_alloc` function to drop down several levels of a hierarchy. You embed the levels in an array:
``` ```c
uint32_t path_account[] = {BIP32_INITIAL_HARDENED_CHILD+84, BIP32_INITIAL_HARDENED_CHILD+1, BIP32_INITIAL_HARDENED_CHILD}; uint32_t path_account[] = {BIP32_INITIAL_HARDENED_CHILD+84, BIP32_INITIAL_HARDENED_CHILD+1, BIP32_INITIAL_HARDENED_CHILD};
``` ```
Here we'll be looking at the zeroth hardened child (that's the account) or the first hardened child (that's testnet coins) of the 84th hardened child (that's the BIP84 standard): `[m/84'/1'/0']`. Here we'll be looking at the zeroth hardened child (that's the account) or the first hardened child (that's testnet coins) of the 84th hardened child (that's the BIP84 standard): `[m/84'/1'/0']`.
You can then use that path to generate a new key from your old key: You can then use that path to generate a new key from your old key:
``` ```c
struct ext_key *key_account; struct ext_key *key_account;
lw_response = bip32_key_from_parent_path_alloc(key_root,path_account,sizeof(path_account),BIP32_FLAG_KEY_PRIVATE,&key_account); lw_response = bip32_key_from_parent_path_alloc(key_root,path_account,sizeof(path_account),BIP32_FLAG_KEY_PRIVATE,&key_account);
``` ```
Every time you have a new key, you can use that to generate new xprv and xpub keys, if you desire: Every time you have a new key, you can use that to generate new xprv and xpub keys, if you desire:
``` ```c
lw_response = bip32_key_to_base58(key_account, BIP32_FLAG_KEY_PRIVATE, &a_xprv); lw_response = bip32_key_to_base58(key_account, BIP32_FLAG_KEY_PRIVATE, &a_xprv);
lw_response = bip32_key_to_base58(key_account, BIP32_FLAG_KEY_PUBLIC, &a_xpub); lw_response = bip32_key_to_base58(key_account, BIP32_FLAG_KEY_PUBLIC, &a_xpub);
``` ```
@ -90,19 +90,19 @@ Every time you have a new key, you can use that to generate new xprv and xpub ke
### Generate an Address Key ### Generate an Address Key
Alternatively, you can use the `bip32_key_from_parent_alloc` function, which just drops down one level of the hierarchy at a time. The following example drops down to the 0th child of the account key (which is the external address) and then the 0th child of that. This would be useful because then you could continue generating the 1st address, the 2nd address, and so on from that external key: Alternatively, you can use the `bip32_key_from_parent_alloc` function, which just drops down one level of the hierarchy at a time. The following example drops down to the 0th child of the account key (which is the external address) and then the 0th child of that. This would be useful because then you could continue generating the 1st address, the 2nd address, and so on from that external key:
``` ```c
struct ext_key *key_external; struct ext_key *key_external;
lw_response = bip32_key_from_parent_alloc(key_account,0,BIP32_FLAG_KEY_PRIVATE,&key_external); lw_response = bip32_key_from_parent_alloc(key_account,0,BIP32_FLAG_KEY_PRIVATE,&key_external);
struct ext_key *key_address; struct ext_key *key_address;
lw_response = bip32_key_from_parent_alloc(key_external,0,BIP32_FLAG_KEY_PRIVATE,&key_address); lw_response = bip32_key_from_parent_alloc(key_external,0,BIP32_FLAG_KEY_PRIVATE,&key_address);
``` ```
> :warning: **WARNING::** At some point in this hierarchy, you might decide to generate `BIP32_FLAG_KEY_PUBLIC` instead of `BIP32_FLAG_KEY_PRIVATE`. Obviously this decision will be based on your security and your needs, but remember that you only need a public key to generate the actual address. > :warning: **WARNING:** At some point in this hierarchy, you might decide to generate `BIP32_FLAG_KEY_PUBLIC` instead of `BIP32_FLAG_KEY_PRIVATE`. Obviously this decision will be based on your security and your needs, but remember that you only need a public key to generate the actual address.
### Generate an Address ### Generate an Address
Finally, you're ready to generate an address from your final key. All you do is run `wally_bip32_to_addr_segwit` using your final key and a description of what sort of address this is. Finally, you're ready to generate an address from your final key. All you do is run `wally_bip32_to_addr_segwit` using your final key and a description of what sort of address this is.
``` ```c
char *segwit; char *segwit;
lw_response = wally_bip32_key_to_addr_segwit(key_address,"tb",0,&segwit); lw_response = wally_bip32_key_to_addr_segwit(key_address,"tb",0,&segwit);
@ -115,7 +115,7 @@ There is also a `wally_bip32_key_to_address` function, which can be used to gene
## Test HD Code ## Test HD Code
The code for these HD example can, as usual, be found in the [src directory](src/16_3_genhd.c). The code for these HD example can, as usual, be found in the [src directory](src/17_3_genhd.c).
You can compile and test it: You can compile and test it:
``` ```
@ -139,4 +139,4 @@ An HD wallet allows you to generate a vast number of keys from a single seed. Yo
## What's Next? ## What's Next?
Learn more about "Programming Bitcoin with Libwally" in [16.4: Using PSBTs in Libwally](16_4_Using_PSBTs_in_Libwally.md). Learn more about "Programming Bitcoin with Libwally" in [17.4: Using PSBTs in Libwally](17_4_Using_PSBTs_in_Libwally.md).

View File

@ -1,4 +1,4 @@
# 16.4: Using PSBTs in Libwally # 17.4: Using PSBTs in Libwally
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -116,7 +116,7 @@ Obviously, there's a lot more you could look at in the PSBTs. In fact, looking i
### Test Your PSBT Reader ### Test Your PSBT Reader
Again, the code for this (extremely rudimentary and specific) PSBT reader is in the [src directory](src/16_4_examinepsbt.c). Again, the code for this (extremely rudimentary and specific) PSBT reader is in the [src directory](src/17_4_examinepsbt.c).
You can compile it as normal: You can compile it as normal:
``` ```
@ -289,7 +289,7 @@ But what you have is not yet a legal PSBT, because of the lack of inputs. You ca
``` ```
### Test Your PSBT Creation ### Test Your PSBT Creation
At this point, you should have an empty, but working PSBT, which you can see by compiling and running [the program](src/16_4_createemptypsbt.c). At this point, you should have an empty, but working PSBT, which you can see by compiling and running [the program](src/17_4_createemptypsbt.c).
``` ```
$ cc createemptypsbt.c -lwallycore -o createemptypsbt $ cc createemptypsbt.c -lwallycore -o createemptypsbt
$ ./createemptypsbt $ ./createemptypsbt
@ -373,4 +373,4 @@ This section could be an entire chapter, as working with PSBTs at a low level is
## What's Next? ## What's Next?
Learn more about "Programming Bitcoin with Libwally" in [16.5: Using Scripts in Libwally](16_5_Using_Scripts_in_Libwally.md). Learn more about "Programming Bitcoin with Libwally" in [17.5: Using Scripts in Libwally](17_5_Using_Scripts_in_Libwally.md).

View File

@ -1,4 +1,4 @@
# 16.5: Using Scripts in Libwally # 17.5: Using Scripts in Libwally
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -82,7 +82,7 @@ One more command adds it to your transaction:
Creating the input is much harder because you have to pile information into the creation routines, not all of which is intuitively accessible when you're using Libwally. So, rather than going that deep into the weeds, here's where we take our shortcut. We write our code so that it's passed the hex code for a transaction that's already been created, and then we just reuse the input. Creating the input is much harder because you have to pile information into the creation routines, not all of which is intuitively accessible when you're using Libwally. So, rather than going that deep into the weeds, here's where we take our shortcut. We write our code so that it's passed the hex code for a transaction that's already been created, and then we just reuse the input.
The conversion from the hex code is done with `wally_tx_from_hex: The conversion from the hex code is done with `wally_tx_from_hex`:
``` ```
struct wally_tx *utxo; struct wally_tx *utxo;
lw_response = wally_tx_from_hex(utxo_hex,0,&utxo); lw_response = wally_tx_from_hex(utxo_hex,0,&utxo);
@ -98,7 +98,7 @@ As you might expect, you then add that input to your transaction:
lw_response = wally_tx_add_input(tx,tx_input); lw_response = wally_tx_add_input(tx,tx_input);
``` ```
> :note: **NOTE** Obviously, you'll want to be able to create your own inputs if you're using Libwally for real applications, but this is intended as a first step. And, it can actually be useful for integrating with `bitcoin-cli`, as we'll see in [§16.7](16_7_Integrating_Libwally_and_Bitcoin-CLI.md). > **NOTE** Obviously, you'll want to be able to create your own inputs if you're using Libwally for real applications, but this is intended as a first step. And, it can actually be useful for integrating with `bitcoin-cli`, as we'll see in [§16.7](17_7_Integrating_Libwally_and_Bitcoin-CLI.md).
### Print a Transaction ### Print a Transaction
@ -113,7 +113,7 @@ We'll show how to make use of that in §16.7.
## Test Your Replacement Script ## Test Your Replacement Script
You can grab the test code from the [src directory](src/16_5_replacewithscript.c) and compile it: You can grab the test code from the [src directory](src/17_5_replacewithscript.c) and compile it:
``` ```
$ cc replacewithscript.c -lwallycore -o replacewithscript $ cc replacewithscript.c -lwallycore -o replacewithscript
``` ```
@ -177,4 +177,4 @@ Creating transactions in Libwally is another topic that could take up a whole ch
## What's Next? ## What's Next?
Learn more about "Programming Bitcoin with Libwally" in [§16.6: Using Other Functions in Libwally](16_6_Using_Other_Functions_in_Libwally.md). Learn more about "Programming Bitcoin with Libwally" in [§17.6: Using Other Functions in Libwally](17_6_Using_Other_Functions_in_Libwally.md).

View File

@ -1,4 +1,4 @@
# 16.6: Using Other Functions in Libwally # 17.6: Using Other Functions in Libwally
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -45,7 +45,7 @@ Some relate to the wallet import format (WIF):
## Use BIP32 Functions ## Use BIP32 Functions
There are additional BIP32 HD-wallet functions, beyond what was covered in [§16.3: Using BIP32 in Libwally](16_3_Using_BIP32_in_Libwally.md). There are additional BIP32 HD-wallet functions, beyond what was covered in [§17.3: Using BIP32 in Libwally](17_3_Using_BIP32_in_Libwally.md).
* `bip32_key_get_fingerprint` — Generate a BIP32 fingerprint for an extended key * `bip32_key_get_fingerprint` — Generate a BIP32 fingerprint for an extended key
* `bip32_key_serialize` — Transform an extended key into serialized bytes * `bip32_key_serialize` — Transform an extended key into serialized bytes
@ -65,7 +65,7 @@ The main functions are:
## Use BIP39 Functions ## Use BIP39 Functions
A few BIP39 mnemonic-word functions were just overviewed in [§16.2: Using BIP39 in Libwally](16_2_Using_BIP39_in_Libwally.md): A few BIP39 mnemonic-word functions were just overviewed in [§17.2: Using BIP39 in Libwally](17_2_Using_BIP39_in_Libwally.md):
* `bip39_get_languages` — See a list of supported languages * `bip39_get_languages` — See a list of supported languages
* `bit39_get_word` — Retrieve a specific word from a language's word list * `bit39_get_word` — Retrieve a specific word from a language's word list
@ -73,11 +73,11 @@ A few BIP39 mnemonic-word functions were just overviewed in [§16.2: Using BIP39
## Use PSBT Functions ## Use PSBT Functions
Listings of most PSBT functions can be found in [16.4: Using PSBTs in Libwally](16_4_Using_PSBTs_in_Libwally.md). Listings of most PSBT functions can be found in [17.4: Using PSBTs in Libwally](17_4_Using_PSBTs_in_Libwally.md).
## Use Script Functions ## Use Script Functions
[§16.5: Using Scripts in Libwally](16_5_Using_Scripts_in_Libwally.md) just barely touched upon Libwally's Scripts functions. [§17.5: Using Scripts in Libwally](17_5_Using_Scripts_in_Libwally.md) just barely touched upon Libwally's Scripts functions.
There's another function that lets you determine the sort of script found in a transaction: There's another function that lets you determine the sort of script found in a transaction:
@ -102,7 +102,7 @@ Then there are a slew of functions that create `scriptPubKey` from bytes, `scrip
## Use Transaction Functions ## Use Transaction Functions
We also just barely touched upon the functions that can be used to create and convert functions in [§16.5](16_5_Using_Scripts_in_Libwally.md). We also just barely touched upon the functions that can be used to create and convert functions in [§17.5](17_5_Using_Scripts_in_Libwally.md).
There are numerous informational functions, some of the more interesting of which are: There are numerous informational functions, some of the more interesting of which are:
@ -122,6 +122,6 @@ There is much more that you can do with Libwally, more than can be covered in th
## What's Next? ## What's Next?
Finish learning about "Programming Bitcoin with Libwally" in [§16.7: Integrating Libwally and Bitcoin-CLI](16_7_Integrating_Libwally_and_Bitcoin-CLI.md). Finish learning about "Programming Bitcoin with Libwally" in [§17.7: Integrating Libwally and Bitcoin-CLI](17_7_Integrating_Libwally_and_Bitcoin-CLI.md).

View File

@ -1,4 +1,4 @@
# 16.7: Integrating Libwally and Bitcoin-CLI # 17.7: Integrating Libwally and Bitcoin-CLI
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -8,7 +8,7 @@ This final section will offer some examples of using Libwally programs to comple
## Share a Transaction ## Share a Transaction
[§16.5: Using Scripts in Libwally](16_5_Using_Scripts_in_Libwally.md) detailed how Libwally could be used to rewrite an existing transaction, to do something that `bitcoin-cli` can't: produce a transaction that contains a unique P2SH. Obviously, this is a building block; if you decide to dig further into Libwally you'll create entire transactions on your own. But, this abbreviated methodology also has its own usage: it shows how transactions can be passed back and forth between `bitcoin-cli` and Libwally, demonstrating a first example of using them in a complementary fashion. [§17.5: Using Scripts in Libwally](17_5_Using_Scripts_in_Libwally.md) detailed how Libwally could be used to rewrite an existing transaction, to do something that `bitcoin-cli` can't: produce a transaction that contains a unique P2SH. Obviously, this is a building block; if you decide to dig further into Libwally you'll create entire transactions on your own. But, this abbreviated methodology also has its own usage: it shows how transactions can be passed back and forth between `bitcoin-cli` and Libwally, demonstrating a first example of using them in a complementary fashion.
To fully demonstrate this methodology, you'll create a transaction with `bitcoin-cli`, using this UTXO: To fully demonstrate this methodology, you'll create a transaction with `bitcoin-cli`, using this UTXO:
``` ```
@ -33,7 +33,7 @@ $ utxo_vout=$(bitcoin-cli listunspent | jq -r '.[0] | .vout')
$ recipient=tb1qycsmq3jas5wkhf8xrfn8k7438cm5pc8h9ae2k0 $ recipient=tb1qycsmq3jas5wkhf8xrfn8k7438cm5pc8h9ae2k0
$ rawtxhex=$(bitcoin-cli -named createrawtransaction inputs='''[ { "txid": "'$utxo_txid'", "vout": '$utxo_vout' } ]''' outputs='''{ "'$recipient'": 0.0009 }''') $ rawtxhex=$(bitcoin-cli -named createrawtransaction inputs='''[ { "txid": "'$utxo_txid'", "vout": '$utxo_vout' } ]''' outputs='''{ "'$recipient'": 0.0009 }''')
``` ```
Though you placed a recipient and an amount in the output, it's irrelevent, because you'll be rewriting those. A fancier bit of code could read the existing `vout` info before rewriting, but we're keeping things very close to our [original code](src/16_5_replacewithscript.c). Though you placed a recipient and an amount in the output, it's irrelevent, because you'll be rewriting those. A fancier bit of code could read the existing `vout` info before rewriting, but we're keeping things very close to our [original code](src/17_5_replacewithscript.c).
Here's the one change necessary, to allow you to specify the satoshi `vout`, without having to hardcode it, as in the original: Here's the one change necessary, to allow you to specify the satoshi `vout`, without having to hardcode it, as in the original:
``` ```
@ -170,7 +170,7 @@ $ bitcoin-cli decoderawtransaction $signedtx
``` ```
Voila! That's the power of Libwally with `bitcoin-cli`. Voila! That's the power of Libwally with `bitcoin-cli`.
Obviously, you can also pass around a PSBT using the functions described in [§16.4](16_4_Using_PSBTs_in_Libwally.md) and that's a more up-to-date methodology for the modern-day usage of Bitcoin, but in either example, the concept of passing transactions from `bitcoin-cli` to Libwally code and back should be similar. Obviously, you can also pass around a PSBT using the functions described in [§17.4](17_4_Using_PSBTs_in_Libwally.md) and that's a more up-to-date methodology for the modern-day usage of Bitcoin, but in either example, the concept of passing transactions from `bitcoin-cli` to Libwally code and back should be similar.
## Import & Export BIP39 Seeds ## Import & Export BIP39 Seeds
@ -178,11 +178,11 @@ Unfortunately, not all interactions between Libwally and `bitcoin-cli` go as smo
> :book: ***What's the Difference Between Entropy & a Seed?*** Libwally says that it creates its mnemonic phrases from entropy. That's essentially the same thing as a seed: they're both large, randomized numbers. So, if `bitcoin-cli` was compatible with 512-bit mnemonic-phrase seeds, you could use one to generate the mneomnic phrases, and get the results that you'd expect. > :book: ***What's the Difference Between Entropy & a Seed?*** Libwally says that it creates its mnemonic phrases from entropy. That's essentially the same thing as a seed: they're both large, randomized numbers. So, if `bitcoin-cli` was compatible with 512-bit mnemonic-phrase seeds, you could use one to generate the mneomnic phrases, and get the results that you'd expect.
> :book: ***What's the difference between Entropy & Raw Entropy?*** Not all entropy is the same. When you input entropy into a command that creates a mnemonic seed, it has to a specific, well-understand length. Changing raw entropy into entropy requires massaging the raw entropy until it's the right length and format, and at that point you could reuse that (non-raw) entropy to always recreate the same mnemonics (which is why entropy is effectively the same thing as a seed at that point, but raw entropy isn't). > :book: ***What's the difference between Entropy & Raw Entropy?*** Not all entropy is the same. When you input entropy into a command that creates a mnemonic seed, it has to a specific, well-understood length. Changing raw entropy into entropy requires massaging the raw entropy until it's the right length and format, and at that point you could reuse that (non-raw) entropy to always recreate the same mnemonics (which is why entropy is effectively the same thing as a seed at that point, but raw entropy isn't).
## Import Private Keys ## Import Private Keys
Fortunately, you can do much the same thing by importing a private key generated in Libwally. Take a look at [genhd-for-import.c](src/16_7_genhd_for_import.c), a simplified version of the `genhd` program from [§16.3](16_3_Using_BIP32_in_Libwally.md) that also uses the `jansson` library from [§15.1](15_1_Accessing_Bitcoind_with_C.md) for regularized output. Fortunately, you can do much the same thing by importing a private key generated in Libwally. Take a look at [genhd-for-import.c](src/17_7_genhd_for_import.c), a simplified version of the `genhd` program from [§17.3](17_3_Using_BIP32_in_Libwally.md) that also uses the `jansson` library from [§16.1](15_1_Accessing_Bitcoind_with_C.md) for regularized output.
The updated code also contains one change of note: it requests a fingerprint from Libwally so that it can properly create a derivation path: The updated code also contains one change of note: it requests a fingerprint from Libwally so that it can properly create a derivation path:
``` ```
@ -195,7 +195,7 @@ The updated code also contains one change of note: it requests a fingerprint fro
> :warning: **WARNING:** Remember that the fingerprint in derivation paths is arbitrary. Because Libwally provides one, we're using it, but if you didn't have one, you could add an arbitrary 4-byte hexcode as a fingerprint to your derivation path. > :warning: **WARNING:** Remember that the fingerprint in derivation paths is arbitrary. Because Libwally provides one, we're using it, but if you didn't have one, you could add an arbitrary 4-byte hexcode as a fingerprint to your derivation path.
Be sure to compile the new code with the `jansson` library, after installing it (if necessary) per [§15.1](15_1_Accessing_Bitcoind_with_C.md). Be sure to compile the new code with the `jansson` library, after installing it (if necessary) per [§16.1](15_1_Accessing_Bitcoind_with_C.md).
``` ```
$ cc genhd-for-import.c -lwallycore -lsodium -ljansson -o genhd-for-import $ cc genhd-for-import.c -lwallycore -lsodium -ljansson -o genhd-for-import
``` ```
@ -327,4 +327,4 @@ With a foundational knowledge of Libwally, you can now complement all of the wor
## What's Next? ## What's Next?
Learn about other sorts of programming in [Chapter 17: Talking to Bitcoind with Other Languages](17_0_Talking_to_Bitcoind_Other.md). Learn about other sorts of programming in [Chapter 18: Talking to Bitcoind with Other Languages](18_0_Talking_to_Bitcoind_Other.md).

View File

@ -1,4 +1,4 @@
# Chapter 17: Talking to Bitcoind with Other Languages # Chapter 18: Talking to Bitcoind with Other Languages
You should now have a solid foundation for working with Bitcoin in C, not only using RPC, JSON, and ZMQ libraries to directly interact with `bitcoind`, but also utilizing the Libwally libraries to complement that work. And C is a great language for prototyping and abstraction — but it's probably not what you're programming in. This chapter thus takes a whirlwind tour of six other programming languages, demonstrating the barest Bitcoin functionality in each and allowing you to expand the lessons of the command line and C to the programming language of your choice. You should now have a solid foundation for working with Bitcoin in C, not only using RPC, JSON, and ZMQ libraries to directly interact with `bitcoind`, but also utilizing the Libwally libraries to complement that work. And C is a great language for prototyping and abstraction — but it's probably not what you're programming in. This chapter thus takes a whirlwind tour of six other programming languages, demonstrating the barest Bitcoin functionality in each and allowing you to expand the lessons of the command line and C to the programming language of your choice.
@ -18,9 +18,9 @@ Supporting objectives include the ability to:
## Table of Contents ## Table of Contents
* [Section One: Accessing Bitcoind with Go](17_1_Accessing_Bitcoind_with_Go.md) * [Section One: Accessing Bitcoind with Go](18_1_Accessing_Bitcoind_with_Go.md)
* [Section Two: Accessing Bitcoind with Java](17_2_Accessing_Bitcoind_with_Java.md) * [Section Two: Accessing Bitcoind with Java](18_2_Accessing_Bitcoind_with_Java.md)
* [Section Three: Accessing Bitcoind with NodeJS](17_3_Accessing_Bitcoind_with_NodeJS.md) * [Section Three: Accessing Bitcoind with NodeJS](18_3_Accessing_Bitcoind_with_NodeJS.md)
* [Section Four: Accessing Bitcoind with Python](17_4_Accessing_Bitcoind_with_Python.md) * [Section Four: Accessing Bitcoind with Python](18_4_Accessing_Bitcoind_with_Python.md)
* [Section Five: Accessing Bitcoind with Rust](17_5_Accessing_Bitcoind_with_Rust.md) * [Section Five: Accessing Bitcoind with Rust](18_5_Accessing_Bitcoind_with_Rust.md)
* [Section Six: Accessing Bitcoind with Swift](17_6_Accessing_Bitcoind_with_Swift.md) * [Section Six: Accessing Bitcoind with Swift](18_6_Accessing_Bitcoind_with_Swift.md)

View File

@ -1,4 +1,4 @@
# 17.1: Accessing Bitcoind with Go # 18.1: Accessing Bitcoind with Go
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -126,7 +126,7 @@ Every `bitcoind` function in Go begins with creating the RPC connection, using t
``` ```
The ```connCfg``` parameters allow you to choose the Bitcoin RPC port, username, password and whether you are on testnet or mainnet. The ```connCfg``` parameters allow you to choose the Bitcoin RPC port, username, password and whether you are on testnet or mainnet.
> :note: **NOTE:** Again, be sure to substitute the `User` and `Pass` with the one found in your `~/.bitcoin/bitcon.conf`. > **NOTE:** Again, be sure to substitute the `User` and `Pass` with the one found in your `~/.bitcoin/bitcon.conf`.
The```rpcclient.New(connCfg, nil)``` function then configures ```client``` to connect to your Bitcoin node. The```rpcclient.New(connCfg, nil)``` function then configures ```client``` to connect to your Bitcoin node.
@ -160,7 +160,7 @@ However, a quirk with hashes in `rpcclient` is that they will typically print in
### Run Your Code ### Run Your Code
You can download the complete code from the [src directory](src/17_1_blockinfo.go). You can download the complete code from the [src directory](src/18_1_blockinfo.go).
You can then run: You can then run:
``` ```
@ -185,7 +185,7 @@ Due to limitations of the `btcd` `rpcclient`, you can't make a use of the ```get
``` ```
```client.GetBalance("*")``` requires the ```"*"``` input, due to a quirk with `btcd`. The asterisk signifies that you want to get the balance of all of your wallets. ```client.GetBalance("*")``` requires the ```"*"``` input, due to a quirk with `btcd`. The asterisk signifies that you want to get the balance of all of your wallets.
If you run [the src code](src/17_1_getbalance.go), you should get an output similar to this: If you run [the src code](src/18_1_getbalance.go), you should get an output similar to this:
``` ```
$ go run getbalance.go $ go run getbalance.go
0.000689 BTC 0.000689 BTC
@ -268,7 +268,7 @@ The defaultNet variable is now used to specify whether your Bitcoin node is on t
} }
``` ```
> :note: **NOTE:** Change the address (`mpGpCMX6SuUimDZKiVViuhd7EGyVxkNnha`) for one actually your wallet; you can use `bitcoin-cli listunspent` to find some addresses with funds for this test. If you want to be really fancy, modify the Go code to take an argument, then write a script that runs `listunspent`, saves the info to a variable, and runs the Go code on that. > **NOTE:** Change the address (`mpGpCMX6SuUimDZKiVViuhd7EGyVxkNnha`) for one actually your wallet; you can use `bitcoin-cli listunspent` to find some addresses with funds for this test. If you want to be really fancy, modify the Go code to take an argument, then write a script that runs `listunspent`, saves the info to a variable, and runs the Go code on that.
Only afterward do you use the `getreceivedbyaddress` RPC, on your decoded address: Only afterward do you use the `getreceivedbyaddress` RPC, on your decoded address:
``` ```
@ -279,7 +279,7 @@ Only afterward do you use the `getreceivedbyaddress` RPC, on your decoded addres
fmt.Println(wallet) fmt.Println(wallet)
``` ```
When you run [the code](src/17_1_getamountreceived.go), you should get output similar to: When you run [the code](src/18_1_getamountreceived.go), you should get output similar to:
``` ```
$ go run getamountreceived.go $ go run getamountreceived.go
0.0085 BTC 0.0085 BTC
@ -331,7 +331,7 @@ func main() {
fmt.Println(sent) fmt.Println(sent)
} }
``` ```
When you run [the code](src/17_1_sendtransaction.go), the txid of the transaction is outputted: When you run [the code](src/18_1_sendtransaction.go), the txid of the transaction is outputted:
``` ```
$ go run sendtransaction.go $ go run sendtransaction.go
@ -378,7 +378,7 @@ func main() {
fmt.Println(transactions) fmt.Println(transactions)
} }
``` ```
> :note: **NOTE:** Again, you'll want to change out the txid for one actually recognized by your system. > **NOTE:** Again, you'll want to change out the txid for one actually recognized by your system.
When you run [the code](17_1_lookuptransaction.go) it will print out the details associated with a transaction, such as its amount and how many times it has been confirmed: When you run [the code](17_1_lookuptransaction.go) it will print out the details associated with a transaction, such as its amount and how many times it has been confirmed:
@ -415,4 +415,4 @@ Although the `btcd` `rpcclient` has some limits, you can still perform the main
## What's Next? ## What's Next?
Learn more about "Talking to Bitcoin in Other Languages" in [17.2: Accessing Bitcoin with Java](17_2_Accessing_Bitcoind_with_Java.md). Learn more about "Talking to Bitcoin in Other Languages" in [18.2: Accessing Bitcoin with Java](18_2_Accessing_Bitcoind_with_Java.md).

View File

@ -1,4 +1,4 @@
# 17.2: Accessing Bitcoind with Java # 18.2: Accessing Bitcoind with Java
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -154,7 +154,7 @@ PubKey: 0368d0fffa651783524f8b934d24d03b32bf8ff2c0808943a556b3d74b2e5c7d65
### Run Your Code ### Run Your Code
The code for these examples can be found in [the src directory](src/17_2_App-getinfo.java) and should be installed into the standard directory structure created here as `~/java-project/src/main/java/com/blockchaincommons/lbtc/App.java`. It can then be compiled and run. The code for these examples can be found in [the src directory](src/18_2_App-getinfo.java) and should be installed into the standard directory structure created here as `~/java-project/src/main/java/com/blockchaincommons/lbtc/App.java`. It can then be compiled and run.
``` ```
$ mvn compile $ mvn compile
@ -273,12 +273,12 @@ You now can sign transaction with the method `signRawTransactionWithKey`. This m
Finally, sending requires the `sendRawTransaction` command: Finally, sending requires the `sendRawTransaction` command:
```java ```java
String sentRawTransactionID = rpcClient.sendRawTransaction(srTx.hex()); String sentRawTransactionID = rpcClient.sendRawTransaction(srTx.hex());
System.out.println("Sent signedRawTx (txID): " + sentRawTransactionID);``` System.out.println("Sent signedRawTx (txID): " + sentRawTransactionID);
``` ```
### Run Your Code ### Run Your Code
You can now run [the transaction code](src/17_2_App-sendtx.java) as `~/java-project/src/main/java/com/blockchaincommons/lbtc/App.java`. You can now run [the transaction code](src/18_2_App-sendtx.java) as `~/java-project/src/main/java/com/blockchaincommons/lbtc/App.java`.
``` ```
$ mvn compile $ mvn compile
@ -317,7 +317,7 @@ To do this, use `JavaBitcoindRpcClient`'s `BitcoinAcceptor` class, which allows
acceptor.run(); acceptor.run();
``` ```
See [the src directory](src/17_2_App-listen.java) for the complete code. Every time a transaction is sent or a new block is generated, you should see output on your console: See [the src directory](src/18_2_App-listen.java) for the complete code. Every time a transaction is sent or a new block is generated, you should see output on your console:
``` ```
Transaction: {account=Tests, address=mhopuJzgmTwhGfpNLCJ9CRknugY691oXp1, category=receive, amount=5.0E-4, label=Tests, vout=1, confirmations=0, trusted=false, txid=361e8fcff243b74ebf396e595a007636654f67c3c7b55fd2860a3d37772155eb, walletconflicts=[], time=1513132887, timereceived=1513132887, bip125-replaceable=unknown} Transaction: {account=Tests, address=mhopuJzgmTwhGfpNLCJ9CRknugY691oXp1, category=receive, amount=5.0E-4, label=Tests, vout=1, confirmations=0, trusted=false, txid=361e8fcff243b74ebf396e595a007636654f67c3c7b55fd2860a3d37772155eb, walletconflicts=[], time=1513132887, timereceived=1513132887, bip125-replaceable=unknown}
@ -330,5 +330,5 @@ By using the javabitcoinrpc library, you can easily access bitcoind via RPC call
## What's Next? ## What's Next?
Learn more about "Talking to Bitcoin in Other Languages" in [17.3: Accessing Bitcoin with NodeJS](17_3_Accessing_Bitcoind_with_NodeJS.md). Learn more about "Talking to Bitcoin in Other Languages" in [18.3: Accessing Bitcoin with NodeJS](18_3_Accessing_Bitcoind_with_NodeJS.md).

View File

@ -1,4 +1,4 @@
# 17.3: Accessing Bitcoind with NodeJS # 18.3: Accessing Bitcoind with NodeJS
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -34,7 +34,7 @@ $ export BITCOIND_PASS=d8340efbcd34e312044c8431c59c792c
$ export BITCOIND_PORT=18332 $ export BITCOIND_PORT=18332
``` ```
> :warning: **WARNING:** Obviously, you'd never put set your password in an environmental variable in a production environment. > :warning: **WARNING:** Obviously, you'd never put your password in an environmental variable in a production environment.
> :link: **MAINNET VS TESTNET:** The port would be 8332 for a mainnet setup. > :link: **MAINNET VS TESTNET:** The port would be 8332 for a mainnet setup.
@ -111,7 +111,7 @@ The result of the BCRPC functions is a JSON object containing information about
### Run Your Code ### Run Your Code
You can find the `getinfo` code in [the src directory](src/17_3_getinfo.js). You can find the `getinfo` code in [the src directory](src/18_3_getinfo.js).
``` ```
$ node getinfo.js $ node getinfo.js
1831094 1831094
@ -163,7 +163,7 @@ agent.getWalletInfo(function (err, walletInfo) {
}); });
``` ```
The source is available as [walletinfo.js](src/17_3_walletinfo.js). The source is available as [walletinfo.js](src/18_3_walletinfo.js).
``` ```
$ node walletinfo.js $ node walletinfo.js
0.008498 0.008498
@ -261,7 +261,7 @@ You should get an output similar to this:
} }
``` ```
The full code is available as [sendtx.js](src/17_3_sendtx.js). The full code is available as [sendtx.js](src/18_3_sendtx.js).
## Summary: Accessing Bitcoind with Node ## Summary: Accessing Bitcoind with Node
@ -271,4 +271,4 @@ Based on these examples you should be able to incorporate Bitcoin in a Node.js p
## What's Next? ## What's Next?
Learn more about "Talking to Bitcoin in Other Languages" in [17.4: Accessing Bitcoin with Python](17_4_Accessing_Bitcoind_with_Python.md). Learn more about "Talking to Bitcoin in Other Languages" in [18.4: Accessing Bitcoin with Python](18_4_Accessing_Bitcoind_with_Python.md).

View File

@ -1,4 +1,4 @@
# 17.4: Accessing Bitcoind with Python # 18.4: Accessing Bitcoind with Python
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -125,7 +125,7 @@ print("---------------------------------------------------------------\n")
### Run Your Code ### Run Your Code
You can retrieve [the src code](src/17_4_getinfo.py) and run it with `python3`: You can retrieve [the src code](src/18_4_getinfo.py) and run it with `python3`:
``` ```
$ python3 getinfo.py $ python3 getinfo.py
--------------------------------------------------------------- ---------------------------------------------------------------
@ -218,7 +218,7 @@ pprint(utxos)
print("------------------------------------------\n") print("------------------------------------------\n")
``` ```
In order to manipulate an array like the one returned from `listtransactions` or `listunpsent`, you just grab the appropriate item from the appropriate element of the array: In order to manipulate an array like the one returned from `listtransactions` or `listunspent`, you just grab the appropriate item from the appropriate element of the array:
``` ```
## Select a UTXO - first one selected here ## Select a UTXO - first one selected here
utxo_txid = utxos[0]['txid'] utxo_txid = utxos[0]['txid']
@ -239,7 +239,7 @@ pprint(utxo_tx_details)
print("---------------------------------------------------------------\n") print("---------------------------------------------------------------\n")
``` ```
This code is available at [walletinfo.py](src/17_4_walletinfo.py). This code is available at [walletinfo.py](src/18_4_walletinfo.py).
``` ```
$ python3 walletinfo.py $ python3 walletinfo.py
@ -379,7 +379,7 @@ change_amt = float('%.8f'%((utxo_amt - recipient_amt) - miner_fee))
> :warning: **WARNING:** Obviously a real program would make more sophisticated choices about what UTXO to use, what to do with the funds, and what miner's fee to pay. > :warning: **WARNING:** Obviously a real program would make more sophisticated choices about what UTXO to use, what to do with the funds, and what miner's fee to pay.
### 2. Create Raw Transacion ### 2. Create Raw Transaction
Now you have all the information to send a transaction, but before you can send one, you have to create a transaction. Now you have all the information to send a transaction, but before you can send one, you have to create a transaction.
@ -418,7 +418,7 @@ send_tx = rpc_client.sendrawtransaction(signed_tx['hex'])
``` ```
### Run Your Code ### Run Your Code
The [sample code](src/17_4_sendtx.py) is full of `print` statements to demonstrate all of the data available at every point: The [sample code](src/18_4_sendtx.py) is full of `print` statements to demonstrate all of the data available at every point:
``` ```
$ python3 sendtx.py $ python3 sendtx.py
Creating a Transaction Creating a Transaction
@ -453,15 +453,16 @@ TXID of sent transaction: 187f8baa222f9f37841d966b6bad59b8131cfacca861cbe9bfc86
## Summary: Accessing Bitcoind with Python ## Summary: Accessing Bitcoind with Python
Accessing Bitcoind with Python is very easy while using the `python-bitcoinrpc` library. The first thing to always do is to establish a connection with your `bitcoind` instance, then you can call all of the bitcoin API calls as described in the bitcoin-core documentation. This makes it easy to create small or large prorgrams to manage your own node, check balances, or create cool applications on top, as you access the full power of `bitcoin-cli`. Accessing Bitcoind with Python is very easy while using the `python-bitcoinrpc` library. The first thing to always do is to establish a connection with your `bitcoind` instance, then you can call all of the bitcoin API calls as described in the bitcoin-core documentation. This makes it easy to create small or large programs to manage your own node, check balances, or create cool applications on top, as you access the full power of `bitcoin-cli`.
## What's Next? ## What's Next?
Learn more about "Talking to Bitcoin in Other Languages" in [17.5: Accessing Bitcoin with Rust](17_5_Accessing_Bitcoind_with_Rust.md). Learn more about "Talking to Bitcoin in Other Languages" in [18.5: Accessing Bitcoin with Rust](18_5_Accessing_Bitcoind_with_Rust.md).
## Variant: Build Python from Source ## Variant: Build Python from Source
If you need to install Python 3 from source, follow these instructions, then continue with ["Creating a BitcoinRPC Project"](17_4_Accessing_Bitcoind_with_Python.md#creating-a-bitcoinrpc-project). If you need to install Python 3 from source, follow these instructions, then continue with ["Create a BitcoinRPC Project"](18_4_Accessing_Bitcoind_with_Python.md#create-a-bitcoinrpc-project).
### 1. Install Dependencies ### 1. Install Dependencies
```sh ```sh

View File

@ -1,4 +1,4 @@
# 17.5: Accessing Bitcoind with Rust # 18.5: Accessing Bitcoind with Rust
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -131,11 +131,11 @@ Here's the complete code to retrieve a block hash, turn that into a block, and p
println!("{:?}", block); println!("{:?}", block);
``` ```
> :note: **NOTE:** Another possible call that we considered for this section was `get_address_info`, but unfortunately as of this writing, the `bitcoincore-rpc` function doesn't work with recent versions of Bitcoin Core due to the crate not addressing the latest API changes in Bitcoin Core. We expect this will be solved in the next crate's release, but in the meantime, _caveat programmer_. > **NOTE:** Another possible call that we considered for this section was `get_address_info`, but unfortunately as of this writing, the `bitcoincore-rpc` function doesn't work with recent versions of Bitcoin Core due to the crate not addressing the latest API changes in Bitcoin Core. We expect this will be solved in the next crate's release, but in the meantime, _caveat programmer_.
### Run Your Code ### Run Your Code
You can access the [src code](src/17_5_main-getinfo.rs) and run it. Unfortunately, the "Block" info will come out a bit ugly because this example doesn't include a library to prettify it. You can access the [src code](src/18_5_main-getinfo.rs) and run it. Unfortunately, the "Block" info will come out a bit ugly because this example doesn't include a library to prettify it.
``` ```
$ cargo run $ cargo run
Compiling btc_test v0.1.0 (/home/standup/btc_test) Compiling btc_test v0.1.0 (/home/standup/btc_test)
@ -289,7 +289,7 @@ println!("{:?}", txid_sent);
### Run Your Code ### Run Your Code
You can now run the complete code from the [src](src/17_5_main-sendtx.rs). You can now run the complete code from the [src](src/18_5_main-sendtx.rs).
``` ```
$ cargo run $ cargo run
@ -358,5 +358,5 @@ b0eda3517e6fac69e58ae315d7fe7a1981e3a858996cc1e3135618cac9b79d1a
## What's Next? ## What's Next?
Learn more about "Talking to Bitcoin in Other Languages" in [17.6: Accessing Bitcoin with Swift](17_6_Accessing_Bitcoind_with_Swift.md). Learn more about "Talking to Bitcoin in Other Languages" in [18.6: Accessing Bitcoin with Swift](18_6_Accessing_Bitcoind_with_Swift.md).

View File

@ -1,4 +1,4 @@
# 17.6: Accessing Bitcoind with Swift # 18.6: Accessing Bitcoind with Swift
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -191,7 +191,7 @@ makeCommand(method: method,param: param) { result in
### Run Your Code ### Run Your Code
The complete code is available in the [src directory](src/17_6_getinfo.playground). Load it into your Xcode playground and then "Editor -> Run Playground" and you should get results like: The complete code is available in the [src directory](src/18_6_getinfo.playground). Load it into your Xcode playground and then "Editor -> Run Playground" and you should get results like:
``` ```
{ {
bestblockhash = 00000000000000069725608ebc5b59e520572a8088cbc57ffa5ba87b7f300ac7; bestblockhash = 00000000000000069725608ebc5b59e520572a8088cbc57ffa5ba87b7f300ac7;
@ -385,7 +385,7 @@ Sending your transaction is equally simple:
} }
``` ```
The code for this transaction sender can be found in the [src directory](src/17_6_sendtx.playground). The code for this transaction sender can be found in the [src directory](src/18_6_sendtx.playground).
## Use Swift in Other Ways ## Use Swift in Other Ways
@ -400,7 +400,7 @@ Swift is a robust modern programming language that unfortunately doesn't yet hav
## What's Next? ## What's Next?
Learn about Lightning in [Chapter 18: Understanding Your Lightning Setup](18_0_Understanding_Your_Lightning_Setup.md). Learn about Lightning in [Chapter 19: Understanding Your Lightning Setup](19_0_Understanding_Your_Lightning_Setup.md).
## Variant: Deploy Swift on Ubuntu ## Variant: Deploy Swift on Ubuntu

View File

@ -1,4 +1,4 @@
# Chapter 18: Understanding Your Lighting Setup # Chapter 19: Understanding Your Lighting Setup
> :information_source: **NOTE:** This is a draft in progress, so that I can get some feedback from early reviewers. It is not yet ready for learning. > :information_source: **NOTE:** This is a draft in progress, so that I can get some feedback from early reviewers. It is not yet ready for learning.
@ -20,7 +20,7 @@ Supporting objectives include the ability to:
## Table of Contents ## Table of Contents
* [Section One: Verifying Your c-lightning Setup](18_1_Verifying_Your_Lightning_Setup.md) * [Section One: Verifying Your c-lightning Setup](19_1_Verifying_Your_Lightning_Setup.md)
* [Section Two: Knowing Your c-lightning Setup](18_2_Knowing_Your_lightning_Setup.md) * [Section Two: Knowing Your c-lightning Setup](19_2_Knowing_Your_lightning_Setup.md)
* [Interlude: Accessing a Second Lightning Node](18_2__Interlude_Accessing_a_Second_Lightning_Node.md) * [Interlude: Accessing a Second Lightning Node](19_2__Interlude_Accessing_a_Second_Lightning_Node.md)
* [Section Three: Creating a Lightning Channel](18_3_Setting_Up_a_Channel.md) * [Section Three: Creating a Lightning Channel](19_3_Setting_Up_a_Channel.md)

View File

@ -1,5 +1,4 @@
# 19.1: Creating a c-lightning Setup
# 18.1: Creating a c-lightning Setup
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -167,9 +166,9 @@ $ sudo ufw allow 9735
You can check if your Lightning node is ready to go by comparing the output of `bitcoin-cli getblockcount` with the `blockheight` result from `lightning-cli getinfo`. You can check if your Lightning node is ready to go by comparing the output of `bitcoin-cli getblockcount` with the `blockheight` result from `lightning-cli getinfo`.
``` ```
$ bitcoin-cli getblockcount $ bitcoin-cli -testnet getblockcount
1838587 1838587
$ lightning-cli getinfo $ lightning-cli --testnet getinfo
{ {
"id": "03d4592f1244cd6b5a8bb7fba6a55f8a91591d79d3ea29bf8e3c3a405d15db7bf9", "id": "03d4592f1244cd6b5a8bb7fba6a55f8a91591d79d3ea29bf8e3c3a405d15db7bf9",
"alias": "HOPPINGNET", "alias": "HOPPINGNET",
@ -266,7 +265,7 @@ Before you start playing with lightning, you should make sure that your aliases
## What's Next? ## What's Next?
Continue "Understanding Your Lightning Setup" with [§18.2: Knowing Your Lightning Setup](18_2_Knowing_Your_lightning_Setup.md). Continue "Understanding Your Lightning Setup" with [§19.2: Knowing Your Lightning Setup](19_2_Knowing_Your_lightning_Setup.md).
## Variant: Install from Ubuntu ppa ## Variant: Install from Ubuntu ppa
@ -288,5 +287,3 @@ $ cd /
$ sudo tar xf ~/clightning-v0.9.1-Ubuntu-20.04.tar.xz $ sudo tar xf ~/clightning-v0.9.1-Ubuntu-20.04.tar.xz
``` ```
Warning: this will require you to have the precise same libraries as were used to create the binary. It's often easier to just recompile. Warning: this will require you to have the precise same libraries as were used to create the binary. It's often easier to just recompile.

View File

@ -1,4 +1,4 @@
# 18.2: Knowing Your c-lightning Setup # 19.2: Knowing Your c-lightning Setup
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -334,6 +334,6 @@ The `~/.lightning` directory contains all of your files, while `lightning-cli he
## What's Next? ## What's Next?
You're going to need to have a second Linode node to test out the actual payment of invoices. If you need support in setting one up, read [Interlude: Accessing a Second Lightning Node](18_2__Interlude_Accessing_a_Second_Lightning_Node.md). You're going to need to have a second Linode node to test out the actual payment of invoices. If you need support in setting one up, read [Interlude: Accessing a Second Lightning Node](19_2__Interlude_Accessing_a_Second_Lightning_Node.md).
Otherwise, continue "Understanding Your Lightning Setup" with [§18.3: Setting Up_a_Channel](18_3_Setting_Up_a_Channel.md). Otherwise, continue "Understanding Your Lightning Setup" with [§19.3: Setting Up_a_Channel](19_3_Setting_Up_a_Channel.md).

View File

@ -52,7 +52,7 @@ They can then tell you their `id` (`03240a4878a9a64aea6c3921a434e573845267b86e89
## Create a New c-lightning Node ## Create a New c-lightning Node
However, for testing purposes, you probably want to have a second node under you own control. The easiest way to do so is to create a second c-lightning node on a new machine, using either Bitcoin Standup, per [§2.1](02_1_Setting_Up_a_Bitcoin-Core_VPS_with_StackScript.md) or compiling it by hand, per [§18.1](18_1_Verifying_Your_Lightning_Setup.md). However, for testing purposes, you probably want to have a second node under you own control. The easiest way to do so is to create a second c-lightning node on a new machine, using either Bitcoin Standup, per [§2.1](02_1_Setting_Up_a_Bitcoin-Core_VPS_with_StackScript.md) or compiling it by hand, per [§19.1](19_1_Verifying_Your_Lightning_Setup.md).
Once you have your node running, you can run `getinfo` to retrieve your information, as shown above. Once you have your node running, you can run `getinfo` to retrieve your information, as shown above.
@ -87,7 +87,7 @@ go version go1.14.4 linux/amd64
You'll also need `git` and `make`: You'll also need `git` and `make`:
``` ```
$ sudo apt-get install git $ sudo apt-get install git
$ apt-get install build-essential $ sudo apt-get install build-essential
``` ```
You're now ready to retrieve LND. Be sure to get the current verison (currently `v0.11.0-beta.rc4`). You're now ready to retrieve LND. Be sure to get the current verison (currently `v0.11.0-beta.rc4`).
``` ```
@ -111,24 +111,18 @@ $ sudo cp $GOPATH/bin/lnd $GOPATH/bin/lncli /usr/bin
Unlike with c-lightning, you will need to create a default config file for LND. Unlike with c-lightning, you will need to create a default config file for LND.
First, you need to retrieve your rpcuser and rpcpassword. Here's an automated way to do so: However first, you need to enable ZMQ on your Bitcoind, if you didn't already in [§16.3](16_3_Receiving_Bitcoind_Notifications_with_C.md).
```
$ BITCOINRPC_USER=$(cat ~standup/.bitcoin/bitcoin.conf | grep rpcuser | awk -F = '{print $2}')
$ BITCOINRPC_PASS=$(cat ~standup/.bitcoin/bitcoin.conf | grep rpcpassword | awk -F = '{print $2}')
```
> :warning: **WARNING:** Obviously, never store your RPC password in a shell variable in a production environment. This requires adding the following to your `~/.bitcoin/bitcoin.conf` file if it's not already there:
Second, you need to enable ZMQ on your Bitcoind, if you didn't already in [§15.3](15_3_Receiving_Bitcoind_Notifications_with_C.md).
This requires adding the following to your `~/.bitcoin/bitcoin.conf` file:
``` ```
zmqpubrawblock=tcp://127.0.0.1:28332 zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333 zmqpubrawtx=tcp://127.0.0.1:28333
``` ```
You must then restart bitcoin. You can test that it's working as follows: If you're using a Bitcoin config file from Standup or some other specialized `conf`, be sure you're putting your new commands in the correct section. Ideally, they should go near the top of the file, otherwise in the `[test]` section (assuming, as usual, that you're testing on testnet).
You must then restart bitcoin (or just reboot your machine). You can test that it's working as follows:
``` ```
bitcoin-cli getzmqnotifications $ bitcoin-cli getzmqnotifications
[ [
{ {
"type": "pubrawblock", "type": "pubrawblock",
@ -142,7 +136,17 @@ bitcoin-cli getzmqnotifications
} }
] ]
``` ```
Now you're ready to create a config file: Now you're ready to create a config file.
First, you need to retrieve your rpcuser and rpcpassword. Here's an automated way to do so:
```
$ BITCOINRPC_USER=$(cat ~standup/.bitcoin/bitcoin.conf | grep rpcuser | awk -F = '{print $2}')
$ BITCOINRPC_PASS=$(cat ~standup/.bitcoin/bitcoin.conf | grep rpcpassword | awk -F = '{print $2}')
```
> :warning: **WARNING:** Obviously, never store your RPC password in a shell variable in a production environment.
Then, you can write the file:
``` ```
$ mkdir ~/.lnd $ mkdir ~/.lnd
$ cat > ~/.lnd/lnd.conf << EOF $ cat > ~/.lnd/lnd.conf << EOF
@ -318,4 +322,4 @@ You always need two Lightning nodes to form a channel. If you don't have someone
Though you've possibly created an LND, c-lightning will remain the heart of our examples until we need to start using both of them, in [Chapter 19](19_0_Understanding_Your_Lightning_Setup.md). Though you've possibly created an LND, c-lightning will remain the heart of our examples until we need to start using both of them, in [Chapter 19](19_0_Understanding_Your_Lightning_Setup.md).
Continue "Understanding Your Lightning Setup" with [§18.3: Setting Up_a_Channel](18_3_Setting_Up_a_Channel.md). Continue "Understanding Your Lightning Setup" with [§19.3: Setting Up_a_Channel](19_3_Setting_Up_a_Channel.md).

View File

@ -1,4 +1,4 @@
# 18.3: Creating a Lightning Channel # 19.3: Creating a Lightning Channel
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -80,7 +80,7 @@ Now that you have funded your c-lightning wallet you will need information about
The next thing you need to do is connect your node to a peer. This is done with the `lightning-cli connect` command. Remember that if you want more information on this command, you should type `lightning-cli help connect`. The next thing you need to do is connect your node to a peer. This is done with the `lightning-cli connect` command. Remember that if you want more information on this command, you should type `lightning-cli help connect`.
To connect your node to a remote peer you need its id, which represents the target nodes public key. As a convenience, `id` may be of the form `id@host` or `id@host:port`. You may have retrieved this with `lightning-cli getinfo` (on c-lightning) or `lncli --network=testnet getinfo` (on LND) as discussed in the [previous interlude](18_2__Interlude_Accessing_a_Second_Lightning_Node.md). To connect your node to a remote peer you need its id, which represents the target nodes public key. As a convenience, `id` may be of the form `id@host` or `id@host:port`. You may have retrieved this with `lightning-cli getinfo` (on c-lightning) or `lncli --network=testnet getinfo` (on LND) as discussed in the [previous interlude](19_2__Interlude_Accessing_a_Second_Lightning_Node.md).
We've selected the LND node, `032a7572dc013b6382cde391d79f292ced27305aa4162ec3906279fc4334602543`, which is located at IP address `45.33.35.151`, which we're going to connect to from our c-lightning node: We've selected the LND node, `032a7572dc013b6382cde391d79f292ced27305aa4162ec3906279fc4334602543`, which is located at IP address `45.33.35.151`, which we're going to connect to from our c-lightning node:
@ -182,5 +182,4 @@ You need to create a channel with a remote node to be able to receive and send m
## What's Next? ## What's Next?
You're ready to go! Move on to [Chapter Nineteen: Using Lightning](19_0_Using_Lightning.md). You're ready to go! Move on to [Chapter 20: Using Lightning](20_0_Using_Lightning.md).

View File

@ -1,4 +1,4 @@
# Chapter Nineteen: Using Lightning # Chapter 20: Using Lightning
> :information_source: **NOTE:** This is a draft in progress, so that I can get some feedback from early reviewers. It is not yet ready for learning. > :information_source: **NOTE:** This is a draft in progress, so that I can get some feedback from early reviewers. It is not yet ready for learning.
@ -19,7 +19,7 @@ Supporting objectives include the ability to:
## Table of Contents ## Table of Contents
* [Section One: Generating a Payment Request](19_1_Generate_a_Payment_Request.md) * [Section One: Generating a Payment Request](20_1_Generate_a_Payment_Request.md)
* [Section Two: Paying an Invoice](19_2_Paying_a_Invoice.md) * [Section Two: Paying an Invoice](20_2_Paying_a_Invoice.md)
* [Section Three: Closing a Lightning Channel](19_3_Closing_a_Channel.md) * [Section Three: Closing a Lightning Channel](20_3_Closing_a_Channel.md)
* [Section Four: Expanding the Lightning Network](19_4_Lightning_Network_Review.md) * [Section Four: Expanding the Lightning Network](20_4_Lightning_Network_Review.md)

View File

@ -1,9 +1,8 @@
# 20.1: Generating a Payment Request
# 19.1: Generating a Payment Request
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
This section describes how payments work on the Lightning Network, how to create a payment request (or _invoice_), and finally how to make sense of it. Issuing invoices depends on your having a second Lightning node, as described in [Accessing a Second Lightning Node](18_2__Interlude_Accessing_a_Second_Lightning_Node.md). These examples will use an LND node as their secondary node, to further demonstrate the possibilities of the Lightning Network. To differentiate between the nodes in these examples, the prompts will be shown as `c$` for the c-lightning node and `lnd$` as the LND node. If you want to reproduce this steps, you should [install your own secondary LND node](18_2__Interlude_Accessing_a_Second_Lightning_Node.md#creating-a-new-lnd-node). This section describes how payments work on the Lightning Network, how to create a payment request (or _invoice_), and finally how to make sense of it. Issuing invoices depends on your having a second Lightning node, as described in [Accessing a Second Lightning Node](19_2__Interlude_Accessing_a_Second_Lightning_Node.md). These examples will use an LND node as their secondary node, to further demonstrate the possibilities of the Lightning Network. To differentiate between the nodes in these examples, the prompts will be shown as `c$` for the c-lightning node and `lnd$` as the LND node. If you want to reproduce this steps, you should [install your own secondary LND node](19_2__Interlude_Accessing_a_Second_Lightning_Node.md#creating-a-new-lnd-node).
> :book: ***What is an Invoice?** Almost all payments made on the Lightning Network require an invoice, which is nothing more than a **request for payment** made by the recipient of the money and sent by variety of means to the paying user. All payment requests are single use. Lightning invoices use bech32 encoding, which is already used by Segregated Witness for Bitcoin. > :book: ***What is an Invoice?** Almost all payments made on the Lightning Network require an invoice, which is nothing more than a **request for payment** made by the recipient of the money and sent by variety of means to the paying user. All payment requests are single use. Lightning invoices use bech32 encoding, which is already used by Segregated Witness for Bitcoin.
@ -98,7 +97,7 @@ Here's what the most relevent elements mean:
> :book: ***What is a Hashed Time Locked Contract (HTLC)?*** A Hashed Time Locked Contract is a conditional payment that use hashlocks and timelocks to ensure payment security. The receiver must present a payment preimage or generate a cryptographic proof of payment before a given time, otherwise the payer can cancel the contract by spending it. These contracts are created as outputs from the **Commitment Transaction**. > :book: ***What is a Hashed Time Locked Contract (HTLC)?*** A Hashed Time Locked Contract is a conditional payment that use hashlocks and timelocks to ensure payment security. The receiver must present a payment preimage or generate a cryptographic proof of payment before a given time, otherwise the payer can cancel the contract by spending it. These contracts are created as outputs from the **Commitment Transaction**.
> :book: ***What is a Commitment Transaction?*** A Commitment Transaction is a transaction that spends the original funding transaction. Each peer holds the other peer's signature, meaning that either one can spent his commitment transaction whatever he wants. After each new commitment transaction is created the old one is revoked. The commitment transaction is one way that the funding transaction can be unlocked on the blockchain, as discussed in [§19.3](19_3_Closing_a_Channel.md). > :book: ***What is a Commitment Transaction?*** A Commitment Transaction is a transaction that spends the original funding transaction. Each peer holds the other peer's signature, meaning that either one can spent his commitment transaction whatever he wants. After each new commitment transaction is created the old one is revoked. The commitment transaction is one way that the funding transaction can be unlocked on the blockchain, as discussed in [§20.3](20_3_Closing_a_Channel.md).
### Check Your Invoice ### Check Your Invoice
@ -108,7 +107,7 @@ There are two crucial elements to check in the invoice. The first, obviously, is
``` ```
You need to check that's the expected recipient. You need to check that's the expected recipient.
Looking back at [§18.3](18_3_Setting_Up_a_Channel.md#opening-a-channel), you can see that's indeed the peer ID that you used when you created your channel. You could also verify it on the opposite node with the `getinfo` command. Looking back at [§20.3](20_3_Closing_a_Channel.md), you can see that's indeed the peer ID that you used when you created your channel. You could also verify it on the opposite node with the `getinfo` command.
``` ```
lnd$ lncli -n testnet getinfo lnd$ lncli -n testnet getinfo
{ {
@ -182,4 +181,4 @@ In most cases you need to receive an invoice to use Lightning Network payments.
## What's Next? ## What's Next?
Continue "Using Lightning" with [§19.2: Paying_a_Invoice](19_2_Paying_a_Invoice.md). Continue "Using Lightning" with [§20.2: Paying_a_Invoice](20_2_Paying_a_Invoice.md).

View File

@ -1,8 +1,8 @@
# 19.2: Paying an Invoice # 20.2: Paying an Invoice
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
In this chapter you will learn how to pay an invoice using `lightning-cli pay` command. It assumes that you've already looked over the invoice, per [§19.1](19_1_Generate_a_Payment_Request.md) and determined it was valid. In this chapter you will learn how to pay an invoice using `lightning-cli pay` command. It assumes that you've already looked over the invoice, per [§20.1](20_1_Generate_a_Payment_Request.md) and determined it was valid.
## Check your Balance ## Check your Balance
@ -203,4 +203,4 @@ Once you've got an invoice, it's easy enough to pay with a single command in Lig
## What's Next? ## What's Next?
Continue "Using Lighting" with [§19.3: Closing a Channel](19_3_Closing_a_Channel.md). Continue "Using Lighting" with [§20.3: Closing a Channel](20_3_Closing_a_Channel.md).

View File

@ -1,4 +1,4 @@
# 19.3: Closing a Channel # 20.3: Closing a Channel
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.
@ -179,7 +179,7 @@ $ bitcoin-cli --named getrawtransaction txid=f68de52d80a1076e36c677ef640539c50e3
"blocktime": 1602713519 "blocktime": 1602713519
} }
``` ```
The input of the transaction is `66694d23ca15efe379e5f4a71d9be1a2d65e383b89ee3abe126ee36a12f23c1d`, which was the funding transaction in [§18.3](18_3_Setting_Up_a_Channel.md). The transaction then has two outputs, one for the remote node and the other for the local c-lightning wallet. The output on index 0 corresponds to the remote node with a value of 0.00010012 BTC; and the output on index 1 corresponds to the local node with a value of 0.00089804 BTC. The input of the transaction is `66694d23ca15efe379e5f4a71d9be1a2d65e383b89ee3abe126ee36a12f23c1d`, which was the funding transaction in [§19.3](19_3_Setting_Up_a_Channel.md). The transaction then has two outputs, one for the remote node and the other for the local c-lightning wallet. The output on index 0 corresponds to the remote node with a value of 0.00010012 BTC; and the output on index 1 corresponds to the local node with a value of 0.00089804 BTC.
Lightning will similarly show 89804 satoshis returned as a new UTXO in its wallet: Lightning will similarly show 89804 satoshis returned as a new UTXO in its wallet:
``` ```
@ -257,4 +257,4 @@ When you close a channel you perform an on-chain transaction ending your financi
## What's Next? ## What's Next?
Continue "Using Lightning" with [§19.4: Expanding the Lightning Network](19_4_Lightning_Network_Review.md). Continue "Using Lightning" with [§20.4: Expanding the Lightning Network](20_4_Lightning_Network_Review.md).

View File

@ -1,4 +1,4 @@
# 19.4: Expanding the Lightning Network # 20.4: Expanding the Lightning Network
> :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader. > :information_source: **NOTE:** This section has been recently added to the course and is an early draft that may still be awaiting review. Caveat reader.

View File

@ -1,6 +1,6 @@
# Appendices # Appendices
The main body of this course suggests a fairly standard setup for Bitcoin testing. What follows is these appendices are a better explanation of that setup and some options for alternatives. The main body of this course suggests a fairly standard setup for Bitcoin testing. What follows in these appendices are a better explanation of that setup and some options for alternatives.
## Objectives for This Section ## Objectives for This Section

View File

@ -28,7 +28,7 @@ $ su root
### Step 1: Update Your System ### Step 1: Update Your System
Fir, update the system using: First, update the system using:
``` ```
$ sudo apt-get update $ sudo apt-get update
``` ```

View File

@ -8,9 +8,13 @@ The majority of this course presumes that you will either use the Mainnet or Tes
After [setting up your Bitcoin-Core VPS](02_0_Setting_Up_a_Bitcoin-Core_VPS.md) or [compiling from source](A2_0_Compiling_Bitcoin_from_Source.md), you are now able to use regtest. To start your `bitcoind` on regtest and create a private Blockchain, use the following command: After [setting up your Bitcoin-Core VPS](02_0_Setting_Up_a_Bitcoin-Core_VPS.md) or [compiling from source](A2_0_Compiling_Bitcoin_from_Source.md), you are now able to use regtest. To start your `bitcoind` on regtest and create a private Blockchain, use the following command:
``` ```
$ bitcoind -regtest -daemon $ bitcoind -regtest -daemon -fallbackfee=1.0 -maxtxfee=1.1
``` ```
The arguments `-fallbackfee=1.0 -maxtxfee=1.1` will prevent the `Fee estimation failed. Fallbackfee is disabled` error.
On regtest, usually there are not enough transactions so bitcoind cannot give a reliable estimate and, without it, the wallet will not create transactions unless it is explicitly set the fee.
### Reset the Regtest Blockchain ### Reset the Regtest Blockchain
If you wish, you can later restart your Regtest with a new blockchain. If you wish, you can later restart your Regtest with a new blockchain.
@ -25,12 +29,20 @@ To start a brand new Blockchain using regtest, all you have to do is delete the
``` ```
$ rm -rf regtest $ rm -rf regtest
``` ```
## Generate Regtest Wallet
Before generating blocks, it is necessary to load a wallet using `loadwallet` or create a new one with `createwallet`. Since version 0.21, Bitcoin Core does not automatically create new wallets on startup.
The argument `descriptors=true` creates a native descriptor wallet, that stores scriptPubKey information using output descriptors. If it is `false`, it will create a legacy wallet, where keys are used to implicitly generate scriptPubKeys and addresses.
```
$ bitcoin-cli -regtest -named createwallet wallet_name="regtest_desc_wallet" descriptors=true
```
## Generate Blocks ## Generate Blocks
You can generate (mine) new blocks on a regtest chain using the RPC method `generate` with an argument for how many blocks to generate. It only makes sense to use this method on regtest; due to the high difficulty it's very unlikely that it will yield to new blocks on the mainnet or testnet: You can generate (mine) new blocks on a regtest chain using the RPC method `generate` with an argument for how many blocks to generate. It only makes sense to use this method on regtest; due to the high difficulty it's very unlikely that it will yield to new blocks on the mainnet or testnet:
``` ```
$ bitcoin-cli -regtest generate 101 $ bitcoin-cli -regtest -generate 101
[ [
"57f17afccf28b9296048b6370312678b6d8e48dc3a7b4ef7681d18ed3d91c122", "57f17afccf28b9296048b6370312678b6d8e48dc3a7b4ef7681d18ed3d91c122",
"631ff7b8135ce633c774828be3b8505726459eb65c339aab981b10363befe5a7", "631ff7b8135ce633c774828be3b8505726459eb65c339aab981b10363befe5a7",
@ -42,11 +54,11 @@ $ bitcoin-cli -regtest generate 101
> :warning: WARNING. Note that you must add the `-regtest` argument after each `bitcoin-cli` command to correctly access your Regtest environment. If you prefer, you can include a `regtest=1` command in your `~/.bitcoin/bitcoin.conf` file. > :warning: WARNING. Note that you must add the `-regtest` argument after each `bitcoin-cli` command to correctly access your Regtest environment. If you prefer, you can include a `regtest=1` command in your `~/.bitcoin/bitcoin.conf` file.
Because a block must have 100 confirmations before that reward can be spent, you generate 101 blocks, providing access to the coinbase transaction from block #1. Because this is a new blockchain using Bitcoins default rules, the first blocks pays a block reward of 50 bitcoins. Unlike mainnet, in regtest mode only the first 150 blocks pay a reward of 50 bitcoins. The reward halves after 150 blocks, so it pays 25, 12.5, and so on... Because a block must have 100 confirmations before that reward can be spent, you generate 101 blocks, providing access to the coinbase transaction from block #1. Because this is a new blockchain using Bitcoins default rules, the first blocks pay a block reward of 50 bitcoins. Unlike mainnet, in regtest mode only the first 150 blocks pay a reward of 50 bitcoins. The reward halves after 150 blocks, so it pays 25, 12.5, and so on...
The output is the block hash of every block generated. The output is the block hash of every block generated.
> :book: ***What is a coinbase transaction?*** A coinbase is the inputless transaction created when a new block is mined and given to the miner. It's how new bitcoins enter the ecosystem. The value of coinbase transactions decay over time. On the mainnet, it halves every 210,000 transactions and ends entirely with the 6,929,999th block, which is currently predicted for the 22nd century. As of May 2020, the coinbase reward is 6.25 BTC. > :book: ***What is a coinbase transaction?*** A coinbase is the inputless transaction created when a new block is mined and given to the miner. It's how new bitcoins enter the ecosystem. The value of coinbase transactions decay over time. On the mainnet, it halves every 210,000 blocks and ends entirely with the 6,929,999th block, which is currently predicted for the 22nd century. As of May 2020, the coinbase reward is 6.25 BTC.
### Verify Your Balance ### Verify Your Balance
@ -62,7 +74,7 @@ Now you should be able to use this balance for any type of interaction on your p
It is important to note that for any transactions to complete, you will have to generate (mine) new blocks, so that the transactions can be included. It is important to note that for any transactions to complete, you will have to generate (mine) new blocks, so that the transactions can be included.
For example, to create a transaction and include it in a block, you should ufirst se the `sendtoaddress` command: For example, to create a transaction and include it in a block, you should first use the `sendtoaddress` command:
``` ```
$ bitcoin-cli -regtest sendtoaddress [address] 15.1 $ bitcoin-cli -regtest sendtoaddress [address] 15.1
e834a4ac6ef754164c8e3f0be4f34531b74b768199ffb244ab9f6cb1bbc7465a e834a4ac6ef754164c8e3f0be4f34531b74b768199ffb244ab9f6cb1bbc7465a
@ -107,9 +119,9 @@ $ bitcoin-cli -regtest gettransaction e834a4ac6ef754164c8e3f0be4f34531b74b768199
``` ```
However, you must now finalize it by creating blocks on the blockchain. However, you must now finalize it by creating blocks on the blockchain.
Most applications require a six-block confirmations to consider the transaction as irreversible. If that is your case, you can mine additional six blocks into your regtest chain: Most applications require six block confirmations to consider the transaction as irreversible. If that is your case, you can mine additional six blocks into your regtest chain:
``` ```
$ bitcoin-cli -regtest generate 6 $ bitcoin-cli -regtest -generate 6
[ [
"33549b2aa249f0a814db4a2ba102194881c14a2ac041c23dcc463b9e4e128e9f", "33549b2aa249f0a814db4a2ba102194881c14a2ac041c23dcc463b9e4e128e9f",
"2cc5c2012e2cacf118f9db4cdd79582735257f0ec564418867d6821edb55715e", "2cc5c2012e2cacf118f9db4cdd79582735257f0ec564418867d6821edb55715e",
@ -127,7 +139,7 @@ When you are on regtest, you are able to simulate edge cases and attacks that mi
As discussed elsewhere in this course, using software libraries might give you more sophisticated access to some RPC commands. In this case, [bitcointest by dgarage](https://github.com/dgarage/bitcointest) for NodeJS can be used to simulate a transaction from one wallet to another; you can check [their guide](https://www.npmjs.com/package/bitcointest) for more specific attack simulations, such as double spend. As discussed elsewhere in this course, using software libraries might give you more sophisticated access to some RPC commands. In this case, [bitcointest by dgarage](https://github.com/dgarage/bitcointest) for NodeJS can be used to simulate a transaction from one wallet to another; you can check [their guide](https://www.npmjs.com/package/bitcointest) for more specific attack simulations, such as double spend.
See [§17.3](17_3_Accessing_Bitcoind_with_NodeJS.md) for the most up-to-date info on install NodeJS, then add `bitcointest`: See [§18.3](18_3_Accessing_Bitcoind_with_NodeJS.md) for the most up-to-date info on install NodeJS, then add `bitcointest`:
``` ```
$ npm install -g bitcointest $ npm install -g bitcointest
``` ```

View File

@ -0,0 +1,74 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
# Contributor License Agreement
Version 1.0
Name: hgrams
E-Mail: hgrams@protonmail.ch
Legal Jurisdiction: Wyoming, United States of America
Project: https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line
Date: 11/04/2021
## Purpose
This agreement gives Blockchain Commons, LLC the permission it needs in order to accept my contributions into its open software project and to manage the intellectual property in that project over time.
## License
I hereby license Blockchain Commons, LLC to:
1. do anything with my contributions that would otherwise infringe my copyright in them
2. do anything with my contributions that would otherwise infringe patents that I can or become able to license
3. sublicense these rights to others on any terms they like
## Reliability
I understand that Blockchain Commons will rely on this license. I may not revoke this license.
## Awareness
I promise that I am familiar with legal rules, like ["work made for hire" rules](http://worksmadeforhire.com), that can give employers and clients ownership of intellectual property in work that I do. I am also aware that legal agreements I might sign, like confidential information and invention assignment agreements, will usually give ownership of intellectual property in my work to employers, clients, and companies that I found. If someone else owns intellectual property in my work, I need their permission to license it.
## Copyright Guarantee
I promise not to offer contributions to the project that contain copyrighted work that I do not have legally binding permission to contribute under these terms. When I offer a contribution with permission, I promise to document in the contribution who owns copyright in what work, and how they gave permission to contribute it. If I later become aware that one of my contributions may have copyrighted work of others that I did not have permission to contribute, I will notify Blockchain Commons, in confidence, immediately.
## Patent Guarantee
I promise not to offer contributions to the project that I know infringe patents of others that I do not have permission to contribute under these terms.
## Open Source Guarantee
I promise not to offer contributions that contain or depend on the work of others, unless that work is available under a license that [Blue Oak Council rates bronze or better](https://blueoakconcil.org/list), such as the MIT License, two- or three-clause BSD License, the Apache License Version 2.0, or the Blue Oak Model License 1.0.0. When I offer a contribution containing or depending on others' work, I promise to document in the contribution who licenses that work, along with copies of their license terms.
## Disclaimers
***As far as the law allows, my contributions come as is, without any warranty or condition. Other than under [Copyright Guarantee](#copyright-guarantee), [Patent Guarantee](#patent-guarantee), or [Open Source Guarantee](#open-source-guarantee), I will not be liable to anyone for any damages related to my contributions or this contributor license agreement, under any kind of legal claim.***
- ---
To sign this Contributor License Agreement, fill in `$name`, `$email`, and `$date` above. Then sign using GPG using the following command `gpg --armor --clearsign --output ./CLA-signed/CLA.YOURGITHUBNAME.YOURGPGFINGERPRINT.asc CLA.md`, then either submit your signed Contributor License Agreement to this repo as a GPG signed Pull Request or email it to [ChristopherA@BlockchainCommons.com](mailto:ChristopherA@BlockchainCommons.com).
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEErtSWVI4vOBDMq+zPtqv4+8oqhOAFAmGEPzAACgkQtqv4+8oq
hOCgTA/+KMuHLFjAK/ifKuRMpKXyQWvfYlQTmaDhEUbwBs3SiF+0bN2XcDQy1/rf
ha5OEdNB8m7RxfU30fcWAHOlPRFxaaoPTDtZCETreQsIPYoccW4aXViq0B4Ww0/I
DuO49De423vPwLjfSGF+s4EQEUHVY9lERBkjhrgRKSJ28Bym/QaPhZWaWsQl9HS6
/MsvR+xbqNHFwnfJkrRHXldQzafMcH5aqWwVMFlkcOvA2rBz5zdFx/CYozOF7pcd
iV/t6ZTZJwkBWbjlzjoG4OkS+ncOEzkRK9kCfrEU7zKctXKSgh8FVvnP8gfzGh7q
tZQXecc/ojfcGRp32pcDs9IuTeEirjcJZZjHhVk3cHnULa/Bfq077Iu2yCLEgI+E
Z1BtfGdd7lvqGg9CtK9hfFSvJ4KyQQ48dOxTfg6jKXnF1t63jQ86AANJ2FCsl2tx
TWQMhYG4Ahqd/fCajxy5rG+9/muVOow/IFekKsNpb63AIerW3YwpXk28Ozl8htZo
igScab9opps3rrwEa/w9OqUkph5BpmesZdq09aHCwkBuFS92BMlpb0PXVpzk39kM
LsEvT3kDwQNsmxZgh4zYYkQFn7JBN+kMsvRvaVpEksUEEcgFFSWh8NPuETUWTBwD
/kYTr8lmBZ1PE38IWD0Bhjz+3O4vI6/u5c0c2PxiuSwtrvXyYe8=
=b5Wo
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,85 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
Comment: A revocation certificate should follow
iQGFBCABAgBvBQJg+iKHaB0CQWNjaWRlbnRhbGx5IHVwbG9hZGVkIHByaXZhdGUg
a2V5IHRvIHB1YmxpYyBnaXRodWIgcmVwbzsgcmVtb3ZlZCBjb21taXRzIGJ1dCBz
dGlsbCBpdCdzIGJlZW4gb3V0IHRoZXJlAAoJEEzhMayhJCnMhnoH/0HoVE58CR35
LhSBBtOXrGSOnRo45ss9/G+sNzMsUGAwuwVqS9cELS+BJbJTsA/ZYCsq09AtNqy5
thr9VrV4eonYZ9rZ2RIw89R15ytYBERO/R1mM+TCaMp7tFk3G9wNbkjaNPxQh4td
7mf4HExstLWy7LIGgQdsZWn4zcOH6SG4H82jZBNpRnp0L4T+tcDoRYYO2f6pOQm7
k5ls05gjx50YeCUeVIwqqZYCoCao/NFJNDkL3GzBUes8Cvgx2s+oiZdpdcY4Nb0l
z52CyHbVhqBcumbL5oirnLjTCLP+bKpb4CjafHZdYygYaZdSkbODIBbq17169g1j
U7nqW0ryAH0=
=sc+j
-----END PGP PUBLIC KEY BLOCK-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
# Contributor License Agreement
Version 1.0
Name: Ian Culp
E-Mail: icculp@gmail.com
Legal Jurisdiction: Oklahoma, United States of America
Project: https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line
Date: 07/03/2021
## Purpose
This agreement gives Blockchain Commons, LLC the permission it needs in order to accept my contributions into its open software project and to manage the intellectual property in that project over time.
## License
I hereby license Blockchain Commons, LLC to:
1. do anything with my contributions that would otherwise infringe my copyright in them
2. do anything with my contributions that would otherwise infringe patents that I can or become able to license
3. sublicense these rights to others on any terms they like
## Reliability
I understand that Blockchain Commons will rely on this license. I may not revoke this license.
## Awareness
I promise that I am familiar with legal rules, like ["work made for hire" rules](http://worksmadeforhire.com), that can give employers and clients ownership of intellectual property in work that I do. I am also aware that legal agreements I might sign, like confidential information and invention assignment agreements, will usually give ownership of intellectual property in my work to employers, clients, and companies that I found. If someone else owns intellectual property in my work, I need their permission to license it.
## Copyright Guarantee
I promise not to offer contributions to the project that contain copyrighted work that I do not have legally binding permission to contribute under these terms. When I offer a contribution with permission, I promise to document in the contribution who owns copyright in what work, and how they gave permission to contribute it. If I later become aware that one of my contributions may have copyrighted work of others that I did not have permission to contribute, I will notify Blockchain Commons, in confidence, immediately.
## Patent Guarantee
I promise not to offer contributions to the project that I know infringe patents of others that I do not have permission to contribute under these terms.
## Open Source Guarantee
I promise not to offer contributions that contain or depend on the work of others, unless that work is available under a license that [Blue Oak Council rates bronze or better](https://blueoakconcil.org/list), such as the MIT License, two- or three-clause BSD License, the Apache License Version 2.0, or the Blue Oak Model License 1.0.0. When I offer a contribution containing or depending on others' work, I promise to document in the contribution who licenses that work, along with copies of their license terms.
## Disclaimers
***As far as the law allows, my contributions come as is, without any warranty or condition. Other than under [Copyright Guarantee](#copyright-guarantee), [Patent Guarantee](#patent-guarantee), or [Open Source Guarantee](#open-source-guarantee), I will not be liable to anyone for any damages related to my contributions or this contributor license agreement, under any kind of legal claim.***
- ---
To sign this Contributor License Agreement, fill in `$name`, `$email`, and `$date` above. Then sign using GPG using the following command `gpg --armor --clearsign --output ./signed-cla/CLA.YOURGITHUBNAME.YOURGPGFINGERPRINT.asc CLA.md`, then either submit your signed Contributor License Agreement to this repo as a GPG signed Pull Request or email it to [ChristopherA@BlockchainCommons.com](mailto:ChristopherA@BlockchainCommons.com).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBCAAGBQJg4KFsAAoJEEzhMayhJCnMLoQH/jw2Dchpc5aV/rYcmCAzdqT5
R13cEr+XHOendw/9SLEGF7io2KWCCJwcZ95jyG9etSbFJHDmwSnONBpJgH7IiMgV
OYuz0LloM44WiHTwBujsb9ezjVztqgvfQqhFwVc28BB52MnXfiBzCXpfZIvcmj/H
vbTmk2o6SAyoHiZm9Jwe+R9fiTeHYEM680R1M18CWfjY04JxtTv7tXuPRedBqJzU
R9BYutO0voUJVDF3CcC3CbGKc+cHcU14MH5gjKZsMi/YPqu8XPU0tjIiDPjtSGxT
5WyFgTMoH3Wm9Xzg9eFg74feN4LlDJl2XV/ISgfkoXFowMmJlOD74RE0fo9F3iw=
=qvM2
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,65 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
# Contributor License Agreement
Version 1.0
Name: `$name`
E-Mail: `$email`
Legal Jurisdiction: Wyoming, United States of America
Project: https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line
Date: `$date`
## Purpose
This agreement gives Blockchain Commons, LLC the permission it needs in order to accept my contributions into its open software project and to manage the intellectual property in that project over time.
## License
I hereby license Blockchain Commons, LLC to:
1. do anything with my contributions that would otherwise infringe my copyright in them
2. do anything with my contributions that would otherwise infringe patents that I can or become able to license
3. sublicense these rights to others on any terms they like
## Reliability
I understand that Blockchain Commons will rely on this license. I may not revoke this license.
## Awareness
I promise that I am familiar with legal rules, like ["work made for hire" rules](http://worksmadeforhire.com), that can give employers and clients ownership of intellectual property in work that I do. I am also aware that legal agreements I might sign, like confidential information and invention assignment agreements, will usually give ownership of intellectual property in my work to employers, clients, and companies that I found. If someone else owns intellectual property in my work, I need their permission to license it.
## Copyright Guarantee
I promise not to offer contributions to the project that contain copyrighted work that I do not have legally binding permission to contribute under these terms. When I offer a contribution with permission, I promise to document in the contribution who owns copyright in what work, and how they gave permission to contribute it. If I later become aware that one of my contributions may have copyrighted work of others that I did not have permission to contribute, I will notify Blockchain Commons, in confidence, immediately.
## Patent Guarantee
I promise not to offer contributions to the project that I know infringe patents of others that I do not have permission to contribute under these terms.
## Open Source Guarantee
I promise not to offer contributions that contain or depend on the work of others, unless that work is available under a license that [Blue Oak Council rates bronze or better](https://blueoakconcil.org/list), such as the MIT License, two- or three-clause BSD License, the Apache License Version 2.0, or the Blue Oak Model License 1.0.0. When I offer a contribution containing or depending on others' work, I promise to document in the contribution who licenses that work, along with copies of their license terms.
## Disclaimers
***As far as the law allows, my contributions come as is, without any warranty or condition. Other than under [Copyright Guarantee](#copyright-guarantee), [Patent Guarantee](#patent-guarantee), or [Open Source Guarantee](#open-source-guarantee), I will not be liable to anyone for any damages related to my contributions or this contributor license agreement, under any kind of legal claim.***
- ---
To sign this Contributor License Agreement, fill in `$name`, `$email`, and `$date` above. Then sign using GPG using the following command `gpg --armor --clearsign --output ./CLA-signed/CLA.YOURGITHUBNAME.YOURGPGFINGERPRINT.asc CLA.md`, then either submit your signed Contributor License Agreement to this repo as a GPG signed Pull Request or email it to [ChristopherA@BlockchainCommons.com](mailto:ChristopherA@BlockchainCommons.com).
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQSQSH/jgB3kAxc6LtvGhebZN/3CAwUCYfxLmQAKCRDGhebZN/3C
AxImAQCBq6rX67QtcvLaUbZWGiGcb6Lwfh5Nfot2W1U0aX9MDgEAilSaykUsHmmb
+dH7vvIb5o3Su5xstebNxx9wqbBL4Ao=
=N//+
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,72 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
# Contributor License Agreement
Version 1.0
Name: Luke Pavksy
E-Mail: lukedevj.contact@protonmail.com
Legal Jurisdiction: Wyoming, United States of America
Project: https://github.com/BlockchainCommons/bc-lethe-kit
Date: `06/20/2021`
## Purpose
This agreement gives Blockchain Commons, LLC the permission it needs in order to accept my contributions into its open software project and to manage the intellectual property in that project over time.
## License
I hereby license Blockchain Commons, LLC to:
1. do anything with my contributions that would otherwise infringe my copyright in them
2. do anything with my contributions that would otherwise infringe patents that I can or become able to license
3. sublicense these rights to others on any terms they like
## Reliability
I understand that Blockchain Commons will rely on this license. I may not revoke this license.
## Awareness
I promise that I am familiar with legal rules, like ["work made for hire" rules](http://worksmadeforhire.com), that can give employers and clients ownership of intellectual property in work that I do. I am also aware that legal agreements I might sign, like confidential information and invention assignment agreements, will usually give ownership of intellectual property in my work to employers, clients, and companies that I found. If someone else owns intellectual property in my work, I need their permission to license it.
## Copyright Guarantee
I promise not to offer contributions to the project that contain copyrighted work that I do not have legally binding permission to contribute under these terms. When I offer a contribution with permission, I promise to document in the contribution who owns copyright in what work, and how they gave permission to contribute it. If I later become aware that one of my contributions may have copyrighted work of others that I did not have permission to contribute, I will notify Blockchain Commons, in confidence, immediately.
## Patent Guarantee
I promise not to offer contributions to the project that I know infringe patents of others that I do not have permission to contribute under these terms.
## Open Source Guarantee
I promise not to offer contributions that contain or depend on the work of others, unless that work is available under a license that [Blue Oak Council rates bronze or better](https://blueoakconcil.org/list), such as the MIT License, two- or three-clause BSD License, the Apache License Version 2.0, or the Blue Oak Model License 1.0.0. When I offer a contribution containing or depending on others' work, I promise to document in the contribution who licenses that work, along with copies of their license terms.
## Disclaimers
***As far as the law allows, my contributions come as is, without any warranty or condition. Other than under [Copyright Guarantee](#copyright-guarantee), [Patent Guarantee](#patent-guarantee), or [Open Source Guarantee](#open-source-guarantee), I will not be liable to anyone for any damages related to my contributions or this contributor license agreement, under any kind of legal claim.***
- ---
To sign this Contributor License Agreement, fill in `Luke Pavksy`, `lukedevj.contact@protonmail.com`, and `06/20/2021` above. Then sign using GPG using the following command `gpg --armor --clearsign --output ./signed-cla/CLA.YOURGITHUBNAME.YOURGPGFINGERPRINT.asc CLA.md`, then either submit your signed Contributor License Agreement to this repo as a GPG signed Pull Request or email it to [ChristopherA@BlockchainCommons.com](mailto:ChristopherA@BlockchainCommons.com).
-----BEGIN PGP SIGNATURE-----
iQGzBAEBCgAdFiEEiI+rRgnjX7UPocqXDrHPI+yBO78FAmDPoSUACgkQDrHPI+yB
O78efQv+IJG+7qrfk+DdLLDoubgxTUs9TUPf9SRbt71VM3tuSZ/qdnStbvQ6PRrl
qCm23cCIh0f/2icwzn1oVnMzVQs3qkmCJm25gkCUY0ABFW+4FsXXIL/kYmr3YV6+
EoU5IYhTjJJ7w5hP+cjfRQfqCSArVxUHKqazYqVe2dYNydL9drrDfAZrlfksobuE
+tZmXz1ZZ1RCn1BFExSWWK0c4ZNOKJxV3sfm4EblAx8GTFHk3lQYeP+d7uOqJdrw
BdAcNzp3hYmPCdEwiZB9IC3Jlbb0uBpclB29ADdk3N87OXrA3VpImTz0f4Mf5wla
U3ZJReuqVJdWd7jWPJELZldjumEZsP4Qfg0Q44tskrukUVUAIYFngkmstpllyabm
L9VUqpXMcFCzFtBs4waeaiWuWU5I4HJCTXrgiMwyoV8oA99+Sy+JdS0UbpokjzwQ
zF9b43K6JcOWY1ZEIx0hTeg2IlqVEE/iYJw6JeiaCJHHlR/rG7A15+0zuwppkuh5
WQp4ouPE
=M9k+
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,72 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
# Contributor License Agreement
Version 1.0
Name: Maximiliano Goyheneche
E-Mail: maxigoyheneche@gmail.com
Legal Jurisdiction: Wyoming, United States of America
Project: https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line
Date: 10/22/2021
## Purpose
This agreement gives Blockchain Commons, LLC the permission it needs in order to accept my contributions into its open software project and to manage the intellectual property in that project over time.
## License
I hereby license Blockchain Commons, LLC to:
1. do anything with my contributions that would otherwise infringe my copyright in them
2. do anything with my contributions that would otherwise infringe patents that I can or become able to license
3. sublicense these rights to others on any terms they like
## Reliability
I understand that Blockchain Commons will rely on this license. I may not revoke this license.
## Awareness
I promise that I am familiar with legal rules, like ["work made for hire" rules](http://worksmadeforhire.com), that can give employers and clients ownership of intellectual property in work that I do. I am also aware that legal agreements I might sign, like confidential information and invention assignment agreements, will usually give ownership of intellectual property in my work to employers, clients, and companies that I found. If someone else owns intellectual property in my work, I need their permission to license it.
## Copyright Guarantee
I promise not to offer contributions to the project that contain copyrighted work that I do not have legally binding permission to contribute under these terms. When I offer a contribution with permission, I promise to document in the contribution who owns copyright in what work, and how they gave permission to contribute it. If I later become aware that one of my contributions may have copyrighted work of others that I did not have permission to contribute, I will notify Blockchain Commons, in confidence, immediately.
## Patent Guarantee
I promise not to offer contributions to the project that I know infringe patents of others that I do not have permission to contribute under these terms.
## Open Source Guarantee
I promise not to offer contributions that contain or depend on the work of others, unless that work is available under a license that [Blue Oak Council rates bronze or better](https://blueoakconcil.org/list), such as the MIT License, two- or three-clause BSD License, the Apache License Version 2.0, or the Blue Oak Model License 1.0.0. When I offer a contribution containing or depending on others' work, I promise to document in the contribution who licenses that work, along with copies of their license terms.
## Disclaimers
***As far as the law allows, my contributions come as is, without any warranty or condition. Other than under [Copyright Guarantee](#copyright-guarantee), [Patent Guarantee](#patent-guarantee), or [Open Source Guarantee](#open-source-guarantee), I will not be liable to anyone for any damages related to my contributions or this contributor license agreement, under any kind of legal claim.***
- ---
To sign this Contributor License Agreement, fill in `$name`, `$email`, and `$date` above. Then sign using GPG using the following command `gpg --armor --clearsign --output ./signed-cla/CLA.YOURGITHUBNAME.YOURGPGFINGERPRINT.asc CLA.md`, then either submit your signed Contributor License Agreement to this repo as a GPG signed Pull Request or email it to [ChristopherA@BlockchainCommons.com](mailto:ChristopherA@BlockchainCommons.com).
-----BEGIN PGP SIGNATURE-----
iQGzBAEBCAAdFiEEmT8Glpq2YD0e7okNSmUz25XU4WYFAmGMAWcACgkQSmUz25XU
4WaTKAwAnSq5WktSyRlv+k0MFCpK3PFpaZuYdHF+MrmwIWRboGc8j/NYvcV50eGb
VoovOetzVqv0lkIU3u2Q8lpLTIz0uLEi0mrOv+MdKXMos7/k1W0F4t+PuPZtk6r0
bStvN3XC/kwoQW43+pO8g1bWMYzIH13b9QrJXdvGaaVm2x5s77jJCz+xQYY3bDCd
ujlRJU5mh8iGes037kFCdX+IFgee+LYd3PaoTVBs1GXBDR2eHDJK7/NIZhacsDAs
fql1lkr/LenM5XwE9+ZbG7qyABjPrGX16rq+Gl/uufxyW3GdQwwPSbPH0eC3WdPb
pF6tFqKv0mMOmq3cCln8W2M20dK8nrhtOjUIoAaBON7UuR80EiZIrab/nAamukH0
IEMlHJImNG2OTjbWzmJxMxdxpSah5w0oEYwiD/+9wF+N0mOcV7ICg4ilEBqynwf2
yq2vCMFpY5VTH3Dku6d+mqPnhcGGmadF/V0wQ70/tlE7K7jDtknB3KtnaWP7t5Ef
geVUNjwN
=dh9y
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,69 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
# Contributor License Agreement
Version 1.0
Name: Namcios
E-Mail: namcios@protonmail.com
Legal Jurisdiction: Wyoming, United States of America
Project: https://github.com/BlockchainCommons/bc-lethe-kit
Date: 06/23/2021
## Purpose
This agreement gives Blockchain Commons, LLC the permission it needs in order to accept my contributions into its open software project and to manage the intellectual property in that project over time.
## License
I hereby license Blockchain Commons, LLC to:
1. do anything with my contributions that would otherwise infringe my copyright in them
2. do anything with my contributions that would otherwise infringe patents that I can or become able to license
3. sublicense these rights to others on any terms they like
## Reliability
I understand that Blockchain Commons will rely on this license. I may not revoke this license.
## Awareness
I promise that I am familiar with legal rules, like ["work made for hire" rules](http://worksmadeforhire.com), that can give employers and clients ownership of intellectual property in work that I do. I am also aware that legal agreements I might sign, like confidential information and invention assignment agreements, will usually give ownership of intellectual property in my work to employers, clients, and companies that I found. If someone else owns intellectual property in my work, I need their permission to license it.
## Copyright Guarantee
I promise not to offer contributions to the project that contain copyrighted work that I do not have legally binding permission to contribute under these terms. When I offer a contribution with permission, I promise to document in the contribution who owns copyright in what work, and how they gave permission to contribute it. If I later become aware that one of my contributions may have copyrighted work of others that I did not have permission to contribute, I will notify Blockchain Commons, in confidence, immediately.
## Patent Guarantee
I promise not to offer contributions to the project that I know infringe patents of others that I do not have permission to contribute under these terms.
## Open Source Guarantee
I promise not to offer contributions that contain or depend on the work of others, unless that work is available under a license that [Blue Oak Council rates bronze or better](https://blueoakconcil.org/list), such as the MIT License, two- or three-clause BSD License, the Apache License Version 2.0, or the Blue Oak Model License 1.0.0. When I offer a contribution containing or depending on others' work, I promise to document in the contribution who licenses that work, along with copies of their license terms.
## Disclaimers
***As far as the law allows, my contributions come as is, without any warranty or condition. Other than under [Copyright Guarantee](#copyright-guarantee), [Patent Guarantee](#patent-guarantee), or [Open Source Guarantee](#open-source-guarantee), I will not be liable to anyone for any damages related to my contributions or this contributor license agreement, under any kind of legal claim.***
- ---
To sign this Contributor License Agreement, fill in `$name`, `$email`, and `$date` above. Then sign using GPG using the following command `gpg --armor --clearsign --output ./signed-cla/CLA.YOURGITHUBNAME.YOURGPGFINGERPRINT.asc CLA.md`, then either submit your signed Contributor License Agreement to this repo as a GPG signed Pull Request or email it to [ChristopherA@BlockchainCommons.com](mailto:ChristopherA@BlockchainCommons.com).
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEVaJL4K7l20FSxqQQjjo2gxcmmrQFAmDTgZ4ACgkQjjo2gxcm
mrRTpQgAoFpCTvov11jIeyu4kNTbFy/lxdx5vXViWSvsPa2I/Q8TgTgWoAcBw84H
lqCDweT9dFFf3XXh2NTpgpAZ+TYbzBQgC3lNMc9BhKfgUOHnR+UFwAj7HyD2fPiE
e92BCLEmuSxk4ls8KFZ0wLySXNZGSehOb/K0EdYbw1szPQGEVmOvZq+vTkPfEDqO
XK3T81r5+YCwazQHNXbOwnpbVryqi700ndF8R7MTZ6Z1LqOKQCfXBLSBiDhQ8Wk6
BhYbpXpJFGzlSrlfBG1jvQdUq2grAQ8CEhMprNJXPt294a6RAHMZ4bNz65OiAM4e
d/AaQ/DlwNvVZM7ARxorsucuqYkQUA==
=sF7Q
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,97 @@
# Contributor License Agreement
Version 1.0
Name: SAID RAHAL
E-Mail: HOLA@SAIDRAHAL.COM
Legal Jurisdiction: MADRID, SPAIN
Project: https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line
Date: 11/11/2021
## Purpose
This agreement gives Blockchain Commons, LLC the permission it needs in order to accept my contributions into its open software project and to manage the intellectual property in that project over time.
## License
I hereby license Blockchain Commons, LLC to:
1. do anything with my contributions that would otherwise infringe my copyright in them
2. do anything with my contributions that would otherwise infringe patents that I can or become able to license
3. sublicense these rights to others on any terms they like
## Reliability
I understand that Blockchain Commons will rely on this license. I may not revoke this license.
## Awareness
I promise that I am familiar with legal rules, like ["work made for hire" rules](http://worksmadeforhire.com), that can give employers and clients ownership of intellectual property in work that I do. I am also aware that legal agreements I might sign, like confidential information and invention assignment agreements, will usually give ownership of intellectual property in my work to employers, clients, and companies that I found. If someone else owns intellectual property in my work, I need their permission to license it.
## Copyright Guarantee
I promise not to offer contributions to the project that contain copyrighted work that I do not have legally binding permission to contribute under these terms. When I offer a contribution with permission, I promise to document in the contribution who owns copyright in what work, and how they gave permission to contribute it. If I later become aware that one of my contributions may have copyrighted work of others that I did not have permission to contribute, I will notify Blockchain Commons, in confidence, immediately.
## Patent Guarantee
I promise not to offer contributions to the project that I know infringe patents of others that I do not have permission to contribute under these terms.
## Open Source Guarantee
I promise not to offer contributions that contain or depend on the work of others, unless that work is available under a license that [Blue Oak Council rates bronze or better](https://blueoakconcil.org/list), such as the MIT License, two- or three-clause BSD License, the Apache License Version 2.0, or the Blue Oak Model License 1.0.0. When I offer a contribution containing or depending on others' work, I promise to document in the contribution who licenses that work, along with copies of their license terms.
## Disclaimers
***As far as the law allows, my contributions come as is, without any warranty or condition. Other than under [Copyright Guarantee](#copyright-guarantee), [Patent Guarantee](#patent-guarantee), or [Open Source Guarantee](#open-source-guarantee), I will not be liable to anyone for any damages related to my contributions or this contributor license agreement, under any kind of legal claim.***
- ---
To sign this Contributor License Agreement, fill in `$name`, `$email`, and `$date` above. Then sign using GPG using the following command `gpg --armor --clearsign --output ./signed-cla/CLA.YOURGITHUBNAME.YOURGPGFINGERPRINT.asc CLA.md`, then either submit your signed Contributor License Agreement to this repo as a GPG signed Pull Request or email it to [ChristopherA@BlockchainCommons.com](mailto:ChristopherA@BlockchainCommons.com).
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v2.0.76
yMXPAnicrVfNbxtFFE8pRWIFEhUXjkNTqR/y2kmQEIo41EnaxMhJTJp+oKhVxrtj
7+DdGbMzG8twRUgceuDjiITEEcRfwI2vHhBCggPiipBA6gVx4Fp+b2ZtJ3HSUqlK
lWZ33rz5vd/7vTdvv3325Exw+srzc0+0786/euKHH88VM/zO4PYsW9bK5rJdWJ2z
poyEMoLVu7kQmVA2CK6L3Eit2Hx1Lgg2eCYW2dV6Y4Vt1dfqzSC4HK5zmS6ytc1m
/RItuPfV5c31IGiKLk/Za0UuTSwjCy+LbL2+stVYqbCrrXpjIwhauX5TRHaRJdb2
zWKt1pU2KdrVSGe1pVRHvSjhUi3rLNPK1JqC50qqbrgkbaSlCju5zkKbiJAsuIrD
plQiCFa4Bcz5+Rr+LcwtzAfB7CxrFXlfG6xuJ9IwPoqQdeWeMGxyGCtPq7Bmc5nB
OeuLPJPGsSAtU0LEhsFO57HImdWMR5HoW5YNWTTiErZkg0VpDdN9oZjRHTvgOdz5
mBnw0m7g5l3hDsIGkaZYK8AbzHCwHdJRNuF2vE/v0bEyE1UXV5mzIGiwROSiPWRp
mcVjY9KLQTBfZSwGdjW0CShlAxA/HYI7eKCLNGYaCPOBNASzk2OL8Ob9YS67ifUw
RRYEC4/Bcx8ZVLa0arCIE92sLaALwXg7FcRcOor8JZxoivYobrjDb4fKkJ3zjywo
wsQsskmOBRHVE47DLZFK3paptEPisVDIrLEuQQRgmkgElaYsF+mQ3FpSVHk6oDSQ
0yFT2sJgT/fEwXV3YJ2UoIQxdBwSm0mH2wXLM9bhGcDw3HOXujrKi1QggYSZ7ZwZ
6LyHY2LBOiAmkbk44y1unadSQiWRhSELGNA61dSFij+E+CTdM5H1Uz0kdijYKJWO
dT1QeJXIPtOd40XpIJSYY+3iBnSeGuTeCd2tefDjcjPEjtOLkV1VhgNldGSMVQlT
aEDnGSeVOFBS7dEKPRna44p24q/iU1EYwEM2XFT/Dz8k6UPQExoqIw4qnhCd9bmS
YizEjoY2KNQO6jkTWoHC1LgTzUNPqsABdQ8Sn8z3t5WJmNEvvEKWx4W1WvCcw7XY
rxVSF0m700EzOFRZ2netsl34hMOC5DsuV6A4mD/nMeFgz2UMVLaliql+D+IcnyV8
mZTV5qoKxNxI0OoaJS5+AJkX88Qb0TGWvgaEqHC59Y3k0NZEe44P9JuB7yHELGUr
0QNf110K41jYYNglsMFSdJlJV5loltIK5Uz1LCprR9EUjbAuu8yIUBlPGD0OCjHg
1AtL2Rke2bBd0nx5RNggs0zEErjToddJy3XKxyKSBuspUDjVhKeD0w+P7Qh1OLyb
dBde1UUeiUcHvV/KaHuxgLPYd2BxKBEVAEA7HF80WKNrfw/Tirs/PDzOJpcGzHaW
0kKwTd4D/4WKJLouODCsnWv1tvBXkEUwvsnSvNLGBs17AAXrqs67tVQaiz5riihB
x3LI1hvbo2saDXigQ/JkE7SwMEp5QVf11ZV9FthS7/MI/40GstEUtlCdq/jNdL2X
WNd1LNKxKQY1/Dy4EksOqbrHNLoHVbJ3btywHqVCSy73cY7CTPVoBkDVUCtFinwD
HFM/UceKNGAEs02Om/HixYt1g7swH/GY8gH8pXqA7E4Vpy9idGF3JdhEF9bd9yhr
EtmQIsWOWJI5+NmkQAmpKrWwc0TLvXV+dlzrYXf0FundOVx3sPT1csAMZ+4cqXiY
01QYGvf+wJ5JT4DaGA0mftxBMNSY6L6nuGKeYW40NIRw6kM0Sh7mxClFmslbPWF9
fIVWRrUApz1J9dQpb22XiirSEAQhC8MQs7N297b3+sAvhwrrUBSQyu5Zhc+G3Qr+
EBnKb9d3692zMXDvYprDQFtl2yRX57swJMXV1mr5F2W+oynt9BT5SZ/tdvtdYOJ5
htND1BG+Ddz2METm+0h+tUbPIqYaqy0369U3Nq9trTa2164tbdTXL/vH1uqVxsbq
5a3WVmNju8pNxMgyi3ddGSompJMJpssMs/8Q2WLe64Oj9/1VUnb6mlTJXUDl1lYB
ZrbEW4UwlnLkaKFvC+zaWU7wvWR1H8fWL019A9EUd+s82WOKf7jpherXt5+cOR3M
PHXqCfrcmwmefm70EfjPuydmPvjur/o7a3d+/vSTj/+8tn7z958+uv/K+63PFu+1
f2lUb/z61cz91vdnvnjh9WfumuEf1+98eerev3//dvPDk2svfjP3efZy+N7efzAV
HA0=
=/+Rt
-----END PGP MESSAGE-----

4
CLA.md
View File

@ -8,7 +8,7 @@ E-Mail: `$email`
Legal Jurisdiction: Wyoming, United States of America Legal Jurisdiction: Wyoming, United States of America
Project: https://github.com/BlockchainCommons/bc-lethe-kit Project: https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line
Date: `$date` Date: `$date`
@ -52,4 +52,4 @@ I promise not to offer contributions that contain or depend on the work of other
--- ---
To sign this Contributor License Agreement, fill in `$name`, `$email`, and `$date` above. Then sign using GPG using the following command `gpg --armor --clearsign --output ./signed-cla/CLA.YOURGITHUBNAME.YOURGPGFINGERPRINT.asc CLA.md`, then either submit your signed Contributor License Agreement to this repo as a GPG signed Pull Request or email it to [ChristopherA@BlockchainCommons.com](mailto:ChristopherA@BlockchainCommons.com). To sign this Contributor License Agreement, fill in `$name`, `$email`, and `$date` above. Then sign using GPG using the following command `gpg --armor --clearsign --output ./CLA-signed/CLA.YOURGITHUBNAME.YOURGPGFINGERPRINT.asc CLA.md`, then either submit your signed Contributor License Agreement to this repo as a GPG signed Pull Request or email it to [ChristopherA@BlockchainCommons.com](mailto:ChristopherA@BlockchainCommons.com).

View File

@ -11,9 +11,9 @@ We love your input! We want to make contributing to this project as easy and tra
## We Develop with Github ## We Develop with Github
We use GitHub to host code, to track issues and feature requests, and to accept Pull Requests. We use GitHub to host code, to track issues and feature requests, and to accept Pull Requests.
## Report Bugs using Github's [issues](https://github.com/briandk/transcriptase-atom/issues) ## Report Bugs using Github's [issues](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/issues)
If you find bugs, mistakes, or inconsistencies in this project's code or documents, please let us know by [opening a new issue](./issues), but consider searching through existing issues first to check and see if the problem has already been reported. If it has, it never hurts to add a quick "+1" or "I have this problem too". This helps prioritize the most common problems and requests. If you find bugs, mistakes, or inconsistencies in this project's code or documents, please let us know by [opening a new issue](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/issues/new), but consider searching through existing issues first to check and see if the problem has already been reported. If it has, it never hurts to add a quick "+1" or "I have this problem too". This helps prioritize the most common problems and requests.
### Write Bug Reports with Detail, Background, and Sample Code ### Write Bug Reports with Detail, Background, and Sample Code
@ -35,7 +35,7 @@ People *love* thorough bug reports. I'm not even kidding.
Simple Pull Requests to fix typos, to document, or to fix small bugs are always welcome. Simple Pull Requests to fix typos, to document, or to fix small bugs are always welcome.
We ask that more significant improvements to the project be first proposed before anybody starts to code as an [issue](./issues) or as a [draft Pull Request](./pulls), which is a [nice new feature](https://github.blog/2019-02-14-introducing-draft-pull-requests/) that gives other contributors a chance to point you in the right direction, give feedback on the design, and maybe discuss if related work is already under way. We ask that more significant improvements to the project be first proposed before anybody starts to code as an [issue](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/issues) or as a [draft Pull Request](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/pulls), which is a [nice new feature](https://github.blog/2019-02-14-introducing-draft-pull-requests/) that gives other contributors a chance to point you in the right direction, give feedback on the design, and maybe discuss if related work is already under way.
### Use a Consistent Coding Style ### Use a Consistent Coding Style
@ -61,5 +61,5 @@ In short, when you submit code changes, your submissions are understood to be av
## References ## References
Portions of this CONTRIBUTING.md document were adopted from best practices of a number of open source projects, including: Portions of this CONTRIBUTING.md document were adopted from best practices of a number of open source projects, including:
* [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md) * [Facebook's Draft](https://github.com/facebook/draft-js/blob/master/CONTRIBUTING.md)
* [IPFS Contributing](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md) * [IPFS Contributing](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)

388
Chapter_word_counts.ipynb Normal file

File diff suppressed because one or more lines are too long

109
Chapter_word_counts.md Normal file
View File

@ -0,0 +1,109 @@
## Translatable word counts by chapter
Ignores code blocks and other non-translatable characters
Chapter|Word Count
---|---
01_0_Introduction.md|1144
01_1_Introducing_Bitcoin.md|2735
02_0_Setting_Up_a_Bitcoin-Core_VPS.md|226
02_1_Setting_Up_a_Bitcoin-Core_VPS_with_StackScript.md|2746
02_2_Setting_Up_Bitcoin_Core_Other.md|254
03_0_Understanding_Your_Bitcoin_Setup.md|248
03_1_Verifying_Your_Bitcoin_Setup.md|773
03_2_Knowing_Your_Bitcoin_Setup.md|517
03_3_Setting_Up_Your_Wallet.md|1699
03_3__Interlude_Using_Command-Line_Variables.md|347
03_4_Receiving_a_Transaction.md|1479
03_5_Understanding_the_Descriptor.md|1349
04_0_Sending_Bitcoin_Transactions.md|176
04_1_Sending_Coins_The_Easy_Way.md|1195
04_2_Creating_a_Raw_Transaction.md|1720
04_2__Interlude_Using_JQ.md|1956
04_3_Creating_a_Raw_Transaction_with_Named_Arguments.md|413
04_4_Sending_Coins_with_a_Raw_Transaction.md|1024
04_4__Interlude_Using_Curl.md|1643
04_5_Sending_Coins_with_Automated_Raw_Transactions.md|614
04_6_Creating_a_Segwit_Transaction.md|1172
05_0_Controlling_Bitcoin_Transactions.md|149
05_1_Watching_for_Stuck_Transactions.md|595
05_2_Resending_a_Transaction_with_RBF.md|1372
05_3_Funding_a_Transaction_with_CPFP.md|827
06_0_Expanding_Bitcoin_Transactions_Multisigs.md|155
06_1_Sending_a_Transaction_to_a_Multisig.md|1764
06_2_Spending_a_Transaction_to_a_Multisig.md|1079
06_3_Sending_an_Automated_Multisig.md|613
07_0_Expanding_Bitcoin_Transactions_PSBTs.md|169
07_1_Creating_a_Partially_Signed_Bitcoin_Transaction.md|1470
07_2_Using_a_Partially_Signed_Bitcoin_Transaction.md|1393
07_3_Integrating_with_Hardware_Wallets.md|2150
08_0_Expanding_Bitcoin_Transactions_Other.md|139
08_1_Sending_a_Transaction_with_a_Locktime.md|1483
08_2_Sending_a_Transaction_with_Data.md|580
09_0_Introducing_Bitcoin_Scripts.md|196
09_1_Understanding_the_Foundation_of_Transactions.md|989
09_2_Running_a_Bitcoin_Script.md|863
09_3_Testing_a_Bitcoin_Script.md|1000
09_4_Scripting_a_P2PKH.md|838
09_5_Scripting_a_P2WPKH.md|845
10_0_Embedding_Bitcoin_Scripts_in_P2SH_Transactions.md|170
10_1_Understanding_the_Foundation_of_P2SH.md|1164
10_2_Building_the_Structure_of_P2SH.md|1284
10_3_Running_a_Bitcoin_Script_with_P2SH.md|323
10_4_Scripting_a_Multisig.md|1016
10_5_Scripting_a_Segwit_Script.md|750
10_6_Spending_a_P2SH_Transaction.md|384
11_0_Empowering_Timelock_with_Bitcoin_Scripts.md|108
11_1_Understanding_Timelock_Options.md|557
11_2_Using_CLTV_in_Scripts.md|1197
11_3_Using_CSV_in_Scripts.md|1470
12_0_Expanding_Bitcoin_Scripts.md|99
12_1_Using_Script_Conditionals.md|1120
12_2_Using_Other_Script_Commands.md|407
13_0_Designing_Real_Bitcoin_Scripts.md|116
13_1_Writing_Puzzle_Scripts.md|998
13_2_Writing_Complex_Multisig_Scripts.md|996
13_3_Empowering_Bitcoin_with_Scripts.md|1467
14_0_Using_Tor.md|116
14_1_Verifying_Your_Tor_Setup.md|1568
14_2_Changing_Your_Bitcoin_Hidden_Services.md|434
14_3_Adding_SSH_Hidden_Services.md|330
15_0_Talking_to_Bitcoind.md|254
15_1_Accessing_Bitcoind_with_C.md|1238
15_2_Programming_Bitcoind_with_C.md|1427
15_3_Receiving_Bitcoind_Notifications_with_C.md|650
16_0_Programming_with_Libwally.md|333
16_1_Setting_Up_Libwally.md|559
16_2_Using_BIP39_in_Libwally.md|939
16_3_Using_BIP32_in_Libwally.md|959
16_4_Using_PSBTs_in_Libwally.md|989
16_5_Using_Scripts_in_Libwally.md|785
16_6_Using_Other_Functions_in_Libwally.md|655
16_7_Integrating_Libwally_and_Bitcoin-CLI.md|1380
17_0_Talking_to_Bitcoind_Other.md|286
17_1_Accessing_Bitcoind_with_Go.md|547
17_2_Accessing_Bitcoind_with_Java.md|821
17_3_Accessing_Bitcoind_with_NodeJS.md|393
17_4_Accessing_Bitcoind_with_Python.md|1158
17_5_Accessing_Bitcoind_with_Rust.md|829
17_6_Accessing_Bitcoind_with_Swift.md|1503
18_0_Understanding_Your_Lightning_Setup.md|192
18_1_Verifying_Your_Lightning_Setup.md|1294
18_2_Knowing_Your_lightning_Setup.md|399
18_2__Interlude_Accessing_a_Second_Lightning_Node.md|886
18_3_Setting_Up_a_Channel.md|1173
19_0_Using_Lightning.md|146
19_1_Generate_a_Payment_Request.md|968
19_2_Paying_a_Invoice.md|604
19_3_Closing_a_Channel.md|848
19_4_Lightning_Network_Review.md|626
A0_Appendices.md|112
A1_0_Understanding_Bitcoin_Standup.md|420
A2_0_Compiling_Bitcoin_from_Source.md|412
A3_0_Using_Bitcoin_Regtest.md|980
CLA.md|495
CONTRIBUTING.md|529
LICENSE-CC-BY-4.0.md|2716
README.md|1705
TRANSLATING.md|686
TOTAL|89069

145
README.md
View File

@ -1,4 +1,5 @@
# Learning Bitcoin from the Command Line # Learning Bitcoin from the Command Line 2.2.0
### _by Christopher Allen and Shannon Appelcline_
![](https://www.blockchaincommons.com/images/projects/lbtc-screen.png) ![](https://www.blockchaincommons.com/images/projects/lbtc-screen.png)
@ -8,6 +9,13 @@ Learning Bitcoin from the Command Line is a tutorial for working with Bitcoin (a
_This tutorial assumes that you have some minimal background of how to use the command line interface. If not, there are many tutorials available, and I have one for Mac users at https://github.com/ChristopherA/intro-mac-command-line._ _This tutorial assumes that you have some minimal background of how to use the command line interface. If not, there are many tutorials available, and I have one for Mac users at https://github.com/ChristopherA/intro-mac-command-line._
## Translations
* [Portuguese](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/tree/portuguese-translation/pt/README.md) — v2.0.1 translation
* [Spanish](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/tree/spanish-translation/es/README.md) - v2.0.1 translation
If you'd like to make your own translation, please see [Contributing](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/tree/master#contributing), below.
## Table of Contents ## Table of Contents
### PART ONE: PREPARING FOR BITCOIN ### PART ONE: PREPARING FOR BITCOIN
@ -45,8 +53,8 @@ _This tutorial assumes that you have some minimal background of how to use the c
* [5.2: Resending a Transaction with RBF](05_2_Resending_a_Transaction_with_RBF.md) * [5.2: Resending a Transaction with RBF](05_2_Resending_a_Transaction_with_RBF.md)
* [5.3: Funding a Transaction with CPFP](05_3_Funding_a_Transaction_with_CPFP.md) * [5.3: Funding a Transaction with CPFP](05_3_Funding_a_Transaction_with_CPFP.md)
* [6.0: Expanding Bitcoin Transactions with Multisigs](06_0_Expanding_Bitcoin_Transactions_Multisigs.md) * [6.0: Expanding Bitcoin Transactions with Multisigs](06_0_Expanding_Bitcoin_Transactions_Multisigs.md)
* [6.1: Sending a Transaction with a Multsig](06_1_Sending_a_Transaction_to_a_Multisig.md) * [6.1: Sending a Transaction with a Multisig](06_1_Sending_a_Transaction_to_a_Multisig.md)
* [6.2: Spending a Transaction with a Multsig](06_2_Spending_a_Transaction_to_a_Multisig.md) * [6.2: Spending a Transaction with a Multisig](06_2_Spending_a_Transaction_to_a_Multisig.md)
* [6.3: Sending & Spending an Automated Multisig](06_3_Sending_an_Automated_Multisig.md) * [6.3: Sending & Spending an Automated Multisig](06_3_Sending_an_Automated_Multisig.md)
* [7.0: Expanding Bitcoin Transactions with PSBTs](07_0_Expanding_Bitcoin_Transactions_PSBTs.md) * [7.0: Expanding Bitcoin Transactions with PSBTs](07_0_Expanding_Bitcoin_Transactions_PSBTs.md)
* [7.1: Creating a Partially Signed Bitcoin Transaction](07_1_Creating_a_Partially_Signed_Bitcoin_Transaction.md) * [7.1: Creating a Partially Signed Bitcoin Transaction](07_1_Creating_a_Partially_Signed_Bitcoin_Transaction.md)
@ -85,7 +93,7 @@ _This tutorial assumes that you have some minimal background of how to use the c
* [13.2: Writing Complex Multisig Scripts](13_2_Writing_Complex_Multisig_Scripts.md) * [13.2: Writing Complex Multisig Scripts](13_2_Writing_Complex_Multisig_Scripts.md)
* [13.3: Empowering Bitcoin with Scripts](13_3_Empowering_Bitcoin_with_Scripts.md) * [13.3: Empowering Bitcoin with Scripts](13_3_Empowering_Bitcoin_with_Scripts.md)
### PART FOUR: USING TOR ### PART FOUR: PRIVACY
**Status:** Finished. **Status:** Finished.
@ -94,44 +102,47 @@ _This tutorial assumes that you have some minimal background of how to use the c
* [14.2: Changing Your Bitcoin Hidden Services](14_2_Changing_Your_Bitcoin_Hidden_Services.md) * [14.2: Changing Your Bitcoin Hidden Services](14_2_Changing_Your_Bitcoin_Hidden_Services.md)
* [14.3: Adding SSH Hidden Services](14_3_Adding_SSH_Hidden_Services.md) * [14.3: Adding SSH Hidden Services](14_3_Adding_SSH_Hidden_Services.md)
* [15.0: Using i2p](15_0_Using_i2p.md)
* [15.1: Bitcoin Core as an I2P (Invisible Internet Project) service](15_1_i2p_service.md)
### PART FIVE: PROGRAMMING WITH RPC ### PART FIVE: PROGRAMMING WITH RPC
**Status:** Finished. **Status:** Finished.
* [15.0: Talking to Bitcoind with C](15_0_Talking_to_Bitcoind.md) * [16.0: Talking to Bitcoind with C](16_0_Talking_to_Bitcoind.md)
* [15.1: Accessing Bitcoind in C with RPC Libraries](15_1_Accessing_Bitcoind_with_C.md) * [16.1: Accessing Bitcoind in C with RPC Libraries](16_1_Accessing_Bitcoind_with_C.md)
* [15.2: Programming Bitcoind in C with RPC Libraries](15_2_Programming_Bitcoind_with_C.md) * [16.2: Programming Bitcoind in C with RPC Libraries](16_2_Programming_Bitcoind_with_C.md)
* [15.3: Receiving Notifications in C with ZMQ Libraries](15_3_Receiving_Bitcoind_Notifications_with_C.md) * [16.3: Receiving Notifications in C with ZMQ Libraries](16_3_Receiving_Bitcoind_Notifications_with_C.md)
* [16.0: Programming Bitcoin with Libwally](16_0_Programming_with_Libwally.md) * [17.0: Programming Bitcoin with Libwally](17_0_Programming_with_Libwally.md)
* [16.1: Setting Up Libwally](16_1_Setting_Up_Libwally.md) * [17.1: Setting Up Libwally](17_1_Setting_Up_Libwally.md)
* [16.2: Using BIP39 in Libwally](16_2_Using_BIP39_in_Libwally.md) * [17.2: Using BIP39 in Libwally](17_2_Using_BIP39_in_Libwally.md)
* [16.3: Using BIP32 in Libwally](16_3_Using_BIP32_in_Libwally.md) * [17.3: Using BIP32 in Libwally](17_3_Using_BIP32_in_Libwally.md)
* [16.4: Using PSBTs in Libwally](16_4_Using_PSBTs_in_Libwally.md) * [17.4: Using PSBTs in Libwally](17_4_Using_PSBTs_in_Libwally.md)
* [16.5: Using Scripts in Libwally](16_5_Using_Scripts_in_Libwally.md) * [17.5: Using Scripts in Libwally](17_5_Using_Scripts_in_Libwally.md)
* [16.6: Using Other Functions in Libwally](16_6_Using_Other_Functions_in_Libwally.md) * [17.6: Using Other Functions in Libwally](17_6_Using_Other_Functions_in_Libwally.md)
* [16.7: Integrating Libwally and Bitcoin-CLI](16_7_Integrating_Libwally_and_Bitcoin-CLI.md) * [17.7: Integrating Libwally and Bitcoin-CLI](17_7_Integrating_Libwally_and_Bitcoin-CLI.md)
* [17.0: Talking to Bitcoind with Other Languages](17_0_Talking_to_Bitcoind_Other.md) * [18.0: Talking to Bitcoind with Other Languages](18_0_Talking_to_Bitcoind_Other.md)
* [17.1: Accessing Bitcoind with Go](17_1_Accessing_Bitcoind_with_Go.md) * [18.1: Accessing Bitcoind with Go](18_1_Accessing_Bitcoind_with_Go.md)
* [17.2: Accessing Bitcoind with Java](17_2_Accessing_Bitcoind_with_Java.md) * [18.2: Accessing Bitcoind with Java](18_2_Accessing_Bitcoind_with_Java.md)
* [17.3: Accessing Bitcoind with Node JS](17_3_Accessing_Bitcoind_with_NodeJS.md) * [18.3: Accessing Bitcoind with Node JS](18_3_Accessing_Bitcoind_with_NodeJS.md)
* [17.4: Accessing Bitcoind with Python](17_4_Accessing_Bitcoind_with_Python.md) * [18.4: Accessing Bitcoind with Python](18_4_Accessing_Bitcoind_with_Python.md)
* [17.5: Accessing Bitcoind with Rust](17_5_Accessing_Bitcoind_with_Rust.md) * [18.5: Accessing Bitcoind with Rust](18_5_Accessing_Bitcoind_with_Rust.md)
* [17.6: Accessing Bitcoind with Swift](17_6_Accessing_Bitcoind_with_Swift.md) * [18.6: Accessing Bitcoind with Swift](18_6_Accessing_Bitcoind_with_Swift.md)
### PART SIX: USING LIGHTNING-CLI ### PART SIX: USING LIGHTNING-CLI
**Status:** Finished. **Status:** Finished.
* [18.0: Understanding Your Lightning Setup](18_0_Understanding_Your_Lightning_Setup.md) * [19.0: Understanding Your Lightning Setup](19_0_Understanding_Your_Lightning_Setup.md)
* [18.1: Verifying Your c-lightning Setup](18_1_Verifying_Your_Lightning_Setup.md) * [19.1: Verifying Your c-lightning Setup](19_1_Verifying_Your_Lightning_Setup.md)
* [18.2: Knowing Your c-lightning Setup](18_2_Knowing_Your_lightning_Setup.md) * [19.2: Knowing Your c-lightning Setup](19_2_Knowing_Your_lightning_Setup.md)
* [Interlude: Accessing a Second Lightning Node](18_2__Interlude_Accessing_a_Second_Lightning_Node.md) * [Interlude: Accessing a Second Lightning Node](19_2__Interlude_Accessing_a_Second_Lightning_Node.md)
* [18.3: Creating a Lightning Channel](18_3_Setting_Up_a_Channel.md) * [19.3: Creating a Lightning Channel](19_3_Setting_Up_a_Channel.md)
* [19.0: Using Lightning](19_0_Using_Lightning.md) * [20.0: Using Lightning](20_0_Using_Lightning.md)
* [19.1: Generating a Payment Request](19_1_Generate_a_Payment_Request.md) * [20.1: Generating a Payment Request](20_1_Generate_a_Payment_Request.md)
* [19.2: Paying an Invoice](19_2_Paying_a_Invoice.md) * [20.2: Paying an Invoice](20_2_Paying_a_Invoice.md)
* [19.3: Closing a Lighnting Channel]((19_3_Closing_a_Channel.md)) * [20.3: Closing a Lighnting Channel]((20_3_Closing_a_Channel.md))
* [19.4: Expanding the Lightning Network](19_4_Lightning_Network_Review.md) * [20.4: Expanding the Lightning Network](20_4_Lightning_Network_Review.md)
### APPENDICES ### APPENDICES
@ -142,13 +153,40 @@ _This tutorial assumes that you have some minimal background of how to use the c
* [Appendix II: Compiling Bitcoin from Source](A2_0_Compiling_Bitcoin_from_Source.md) * [Appendix II: Compiling Bitcoin from Source](A2_0_Compiling_Bitcoin_from_Source.md)
* [Appendix III: Using Bitcoin Regtest](A3_0_Using_Bitcoin_Regtest.md) * [Appendix III: Using Bitcoin Regtest](A3_0_Using_Bitcoin_Regtest.md)
## Status - Work in Progress ## Status - Beta
Learning Bitcoin from the Command Line is currently under active development and its writing in progress. Current chapters are functional, but need to be updated to more modern versions of Bitcoin-Core. Additional chapters also need to be written to fill out our intended scope. v2.1.0 of **Learning Bitcoin from the Command Line** is feature complete and has undergone full editing and integration. It is ready for learning
The empty chapters above show some of our current plans for future work. Other plans, mainly drawn from old issues, can be found in [TODO.md](TODO.md) We are also tentatively considering what we could include in a [v3.0](TODO-30.md) of the course. If you'd like to support work of that sort, become a [GitHub Sponsor](https://github.com/sponsors/BlockchainCommons) or support us at our [BTCPay Server](https://btcpay.blockchaincommons.com/), and let us know that **Learning Bitcoin** was the reason why.
### Version History
Obviously, this work in progress should not be used for production tasks until it is completed and has had further testing and auditing. #### 2.2.0 (November 17, 2021)
* [Portuguese translation](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/tree/master/pt)
* [Spanish translation](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/tree/master/es)
#### 2.1.0 (October 12, 2021)
* New chapter 15 (i2p).
* Added fixes to wallet usage from 0.21
* Updated install to new Bitcoin Scripts for 22.0
* Incorporated numerous fixes revealed by first translation projects
#### 2.0.1 (June 15, 2021)
* Numerous small patches following 2.0
* Intended as baseline for translations (2.2.0), but 2.1.0 material on i2p slipped in
#### 2.0.0 (November 3, 2020)
* Second major release of Learning Bitcoin
* Added material on Segwit, Tor, hardware wallets, lightning, regtest
* Completely previous unfinished work on programming using a variety of languages
#### 1.0.0 (pre-2020)
* Original, extensive but incomplete version
* Contained comprehensive sections on setup, bitcoin-cli, and scripting
## Origin, Authors, Copyright & Licenses ## Origin, Authors, Copyright & Licenses
@ -158,21 +196,24 @@ Unless otherwise noted (either in this [/README.md](./README.md) or in the file'
*Learning Bitcoin from the Command Line* is a project of [Blockchain Commons](https://www.blockchaincommons.com/). We are proudly a "not-for-profit" social benefit corporation committed to open source & open development. Our work is funded entirely by donations and collaborative partnerships with people like you. Every contribution will be spent on building open tools, technologies, and techniques that sustain and advance blockchain and internet security infrastructure and promote an open web. *Learning Bitcoin from the Command Line* is a project of [Blockchain Commons](https://www.blockchaincommons.com/). We are proudly a "not-for-profit" social benefit corporation committed to open source & open development. Our work is funded entirely by donations and collaborative partnerships with people like you. Every contribution will be spent on building open tools, technologies, and techniques that sustain and advance blockchain and internet security infrastructure and promote an open web.
To financially support further development of `$projectname` and other projects, please consider becoming a Patron of Blockchain Commons through ongoing monthly patronage as a [GitHub Sponsor](https://github.com/sponsors/BlockchainCommons). You can also support Blockchain Commons with bitcoins at our [BTCPay Server](https://btcpay.blockchaincommons.com/). To financially support further development of *Learning Bitcoin from the Command Line* and other projects, please consider becoming a Patron of Blockchain Commons through ongoing monthly patronage as a [GitHub Sponsor](https://github.com/sponsors/BlockchainCommons). You can also support Blockchain Commons with bitcoins at our [BTCPay Server](https://btcpay.blockchaincommons.com/).
## Contributing ## Contributing
We encourage public contributions through issues and pull requests! Please review [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our development process. All contributions to this repository require a GPG signed [Contributor License Agreement](./CLA.md). We encourage public contributions through issues and pull requests! Please review [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our development process. All contributions to this repository require a GPG signed [Contributor License Agreement](./CLA.md).
if you would like to provide a translation of Learning Bitcoin into another language, please additionally see [TRANSLATING.md](./TRANSLATING.md).
### Discussions ### Discussions
The best place to talk about Blockchain Commons and its projects is in our GitHub Discussions areas. The best place to talk about Blockchain Commons and its projects is in our GitHub Discussions areas.
[**Blockchain Commons Discussions**](https://github.com/BlockchainCommons/Community/discussions). For developers, interns, and patrons of Blockchain Commons, please use the discussions area of the [Community repo](https://github.com/BlockchainCommons/Community) to talk about general Blockchain Commons issues, the intern program, or topics other than the [Gordian System](https://github.com/BlockchainCommons/Gordian/discussions) or the [wallet standards](https://github.com/BlockchainCommons/AirgappedSigning/discussions), each of which have their own discussion areas. [**Blockchain Commons Discussions**](https://github.com/BlockchainCommons/Community/discussions). For developers, interns, and patrons of Blockchain Commons, please use the discussions area of the [Community repo](https://github.com/BlockchainCommons/Community) to talk about general Blockchain Commons issues, the intern program, or topics other than those covered by the [Gordian Developer Community](https://github.com/BlockchainCommons/Gordian-Developer-Community/discussions) or the
[Gordian User Community](https://github.com/BlockchainCommons/Gordian/discussions).'
### Other Questions & Problems ### Other Questions & Problems
As an open-source, open-development community, Blockchain Commons does not have the resources to provide direct support of our projects. Please consider the discussions area as a locale where you might get answers to questions. Alternatively, please use this repository's [issues](./issues) feature. Unfortunately, we can not make any promises on response time. As an open-source, open-development community, Blockchain Commons does not have the resources to provide direct support of our projects. Please consider the discussions area as a locale where you might get answers to questions. Alternatively, please use this repository's [issues](../../issues) feature. Unfortunately, we can not make any promises on response time.
If your company requires support to use our projects, please feel free to contact us directly about options. We may be able to offer you a contract for support from one of our contributors, or we might be able to point you to another entity who can offer the contractual support that you need. If your company requires support to use our projects, please feel free to contact us directly about options. We may be able to offer you a contract for support from one of our contributors, or we might be able to point you to another entity who can offer the contractual support that you need.
@ -191,10 +232,32 @@ Additional contributions are listed below:
| Role | Names | | Role | Names |
| ------------------- | ---------------------------------------- | | ------------------- | ---------------------------------------- |
| ***Contributors:*** | [gg2001](https://github.com/gg2001) (Go, Node.js sections), [gorazdko](https://github.com/gorazdko) (Rust section), [Javier Vargas](https://github.com/javiervargas) (C, Java, Lightning, Tor sections), [jodobear](https://github.com/jodobear) (Appendix: Compiling Bitcoin, Python section) | | ***Contributors:*** | [gg2001](https://github.com/gg2001) (Go, Node.js sections), [gorazdko](https://github.com/gorazdko) (Rust section), [Javier Vargas](https://github.com/javiervargas) (C, Java, Lightning, Tor sections), [jodobear](https://github.com/jodobear) (Appendix: Compiling Bitcoin, Python section), [Prayank]( https://github.com/prayank23) (i2p sections) |
| ***Reviewers:*** | Glen Willem [@gwillem](https://github.com/gwillem) | | ***Reviewers:*** | Glen Willem [@gwillem](https://github.com/gwillem) |
| ***Sponsors:*** | Blockstream Corporation | | ***Sponsors:*** | Blockstream Corporation |
### Translation Credits
Thanks to the volunteers who spent extensive time writing and reviewing other-language translations of the original English-language course.
#### Portuguese Translation
| Name | Role | Github |
| ----------------- | ------------------- | ------------------------------------------------- |
| Namcios | Translator & Reviewer | [@namcios](https://github.com/namcios) |
| Korea | Translator & Reviewer | [@KoreaComK](https://github.com/KoreaComK) |
| Luke Pavsky | Translator & Reviewer | [@lukedevj](https://github.com/lukedevj) |
| hgrams | Translator & Reviewer | [@hgrams](https://github.com/hgrams) |
#### Spanish Translation
Name | Role | GitHub |
| ---------- | -------- | ------------ |
| Ian Culp | Translator & Reviewer | [@icculp](https://github.com/icculp) |
| Maxi Goyheneche | Translator | [@maxcrowar](https://github.com/maxcrowar) |
| Said Rahal | Translator | [@srahalh](https://github.com/srahalh) |
| César A. Vallero | Translator & Reviewer | [@csralvall](https://github.com/csralvall) |
| Javier Vargas | Translator & Reviewer | [@javiervargas](https://github.com/javiervargas) |
## Responsible Disclosure ## Responsible Disclosure

View File

64
TODO-23.md Normal file
View File

@ -0,0 +1,64 @@
# Updates for v2.3 of LBTCftCL
V2.2 of LBTCftCL was drafted in the summer of 2021. The last major upgrade to the book came with the release of v0.20, but there is a smattering of content through 22.0. Bitcoin Core is now up to v23.0, and the course needs to be updated to best address these recent changes. What follows is a rough listing of updates that are likely to require changes to the course. They will all require investigation, and in some cases it might be determined that there's nothing to be done. Some of the main questions that will determine whether material should be included in the course are listed, as our ideas for where material might go in the course.
## Legacy Updates
* [ ] **Segwit**
* Segwit is now old enough that we should teach it as the default. That means that sections 3.1-4.5 should be rewritten to use Segwit as the default and 4.6 should be removed (with perhaps a bit of the information about the different types of addresses being preserved).
* It's _possible_ that the same should occur with 10.5, but it should first be reviewed to see if it's a meaningful building block in the scripting process (or not).
* [ ] **Fees**
* There was some question of if `mintxfee` is still current, or if `paytxfee` should be used. I haven't seen any evidence of obsolence, but it'd be good to check this and make sure we're still on the best practices.
* This is discussed in [4.1](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/04_1_Sending_Coins_The_Easy_Way.md)
## 23.0 Updates
See also [#575](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/issues/575) and of course the [Bitcoin Core 23.0 release notes](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-23.0.md).
* [ ] **Schnorr & Taproot**
* Obviously, the biggest update. We'll need to teach the basics of both and why they're exciting. The main question here is: what commands actually take advantage of Schnorr & Taproot, and how can we show this off.
* If there's just a little bit of functionality right now, it can go into chapter 8, probably in two new sections: 8.3 & 8.4, on Schnorr and Taproot. If there's already a lot of functionality, it should go into its own chapter, and 8 (and everything beyond it) should be shifted back.
* [ ] **Descriptor Wallets**
* Descriptor wallets are now the default. There's some unfortunate lack of integration with multisigs, but we should otherwise give them more attention. What can we do new about inputting and outputting descriptor wallets? Are there any other functions of note?
* This will likely go in [3.5](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/03_5_Understanding_the_Descriptor.md), though it's possible it go split into two chapters: Understanding the Descriptor and Understanding the Descriptor Wallet. See the [0.21 release notes at the bottom](https://bitcoincore.org/en/releases/0.21.0/) for everything about Descriptor Wallets. But note that we explicitly turn them off in 3.2, so any discussions explicitly about descriptor wallets will require creating a new wallet for that purpose
* [ ] **Freezing Coins**
* This is an interesting new ability that allows you to prevent UTXOs from being automatically selected when transactions are created.
* This would probably fit well into 4.5 as a final header-section.
* [ ] **CJDNS Network**
* I'm not familiar with CJDNS, but it sounds like a privacy option that would fit in with Tor and i2p
* If that's correctly, this would be a good 15.2, with the 15.0 chapter renamed "Using Other Privacy Options" or something like that
* [ ] **RPC Changes**
* The following RPC commands have had changes to their output and any examples should be rerun. If they are part of a sequence of commands (e.g., building out a transaction), then the whole sequence should be rerun.
* [ ] `createmultisig`,
* [ ] `addmultisigaddress`,
* [ ] `listunspent`,
* [ ] `getblockchaininfo`
* Updated RPCs may or may not exist in the text. The best way to find out is to search.
## 22.0 Updates
See [release notes](https://bitcoincore.org/en/releases/22.0/).
* [ ] **New External Signer Commands**
* There are some new external signer commands: `enumeratesigners` and `displayaddress`. Are they relevant to what we're teaching? If so, should we add info on them.
* See https://github.com/bitcoin/bitcoin/blob/22.x/doc/external-signer.md
* Any updates would go in [7.3](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/07_3_Integrating_with_Hardware_Wallets.md).
* [ ] **RPC Changes**
* Again, these commands should be reoutput.
* [ ] `getpeerinfo`,
* [ ] `gettxout`,
* [ ] `getrawtransaction`,
* [ ] `decoderawtransaction`,
* [ ] `decodescript`,
* [ ] `getnodeaddresses`
## 0.21.0 Updates
See [release notes](https://bitcoincore.org/en/releases/0.21.0/).
* [ ] **Signet**
* Signet is considered more controlled and reliable than testnet, and so should be used as our test network, along with an explanation of what it is and how it differs from other networks.
* The setup and explanation of networks appears in [3.1](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/03_1_Verifying_Your_Bitcoin_Setup.md). That should be changed, and with the change of the alias there, we should mostly be used Signet. Then the rest of the course can be searched for any references to testnet.
* [ ] **RPC Changes**
* As usual, these may or may not be used, but if they are, outputs should be redone.
* [ ] `getnetworkinfo`

View File

@ -2,12 +2,111 @@
The following TODO items are intended for a 3.0 version of Learning Bitcoin from the Command Line The following TODO items are intended for a 3.0 version of Learning Bitcoin from the Command Line
1. Section on Libwally Shim for Swift ## Medium-Scale Updates
2. Section on Wolf's Bitcoin Lib for Swift
2. Full example of creating a PSBT, handing it to Libwally, and signing it The following updates involve updates or the creation of new chapters, but their additions are generally bounded and known.
3. Miniscript
4. Schnorr (2021) 1. General Update: Consider replacing testnet with signet
5. Other BCC Command-Line Utilities? 1. New Interlude: Creating QR Codes (after 3.3)
6. Programming Lightning with C * New Subsection: Creating a QR
* _Some good docs from one of the developers are here: https://diyhpl.us/wiki/transcripts/blockstream-webinars/2019-07-31-rusty-russell-getting-started-with-c-lightning/._ * New Subsection: Creating a Quick Connect QR
1. Revise Section: Understanding the Descriptor (3.5)
* New Content: Descriptor Wallets
* New Content: Complex Descriptors
* Consider: Breaking into Two Sections
1. New Interlude: Creating Animated QR Codes (after 7.1)
* New Subsection: Understanding Uniform Resources
* New Subsection: Creating an Animated QR
* New Subsection: Creating an Animated QR of a PSBT
1. New Chapter: Using Other Command-Line Tools (between 8+9)
* 9.1: Using seedtool
* 9.2: Using keytool
* 9.3: Using bytewords-cli
1. Revise Section: Understanding Timelock Options (11.1)
* Explanation: Better distinguish differences
* Reference: consider chart at in https://prestwi.ch/bitcoin-time-locks/
1. New Chapter: Using Miniscript Command-Line Tools (between 13+14)
* 15.1: Using miniscript
* 15.2: Using Bitcoin Dev Kit (BDK)
* 15.3: Planning for the Future
1. New Content: Expand the PSBT Libwally Content (17.4) into Two Sections
* 17.4: Signing PSBTs in Libwally
* Explanation: Contains the current info on importing a PSBT, and shows how to sign it
* 17.5: Creating PSBTs in Libwally
* Explanation: Contains the current info on creating a PSBT, and shows how to export it
1. New Chapter: Talking to Bitcoind with Swift (between 17+18)
* 19.1: Accessing Bitcoind with Swift (existing section)
* 19.2: Using Swift with Bitcoin Lib [Wolf's library]
* 19.3: Using Swift with Libwally [Wolf's shim]
## Large-Scale Updates
The following updates involve the large-scale work done on Schnorr and Taproot in Bitcoin Core 0.21 and 22. This represents a first cut at how to layout the work, but revision and expansion will likely be needed as everyone's understanding of these new technologies matures.
**Chapter X: Expanding Bitcoin Transactions with Schnorr** (probably between chapters 6+7)
* New Section X.1: Understanding Schnorr Signatures
* New Subsection: Understanding the Math of Schnorr
* Explanation: Add + subtract for one signature
* New Subsection: Supporting MuSig
* New Subsection: Understanding the Use of Adapter Signatures
* New Subsection: Knowing the Advantages of Schnorr
* Explanation: size, 64 bytes vs 72, better for multisigs
* Explanation: speed, linear, validate a million-sig multisig in 2 minutes
* Explanation: privacy, no difference between MuSig and sig, no detection of Lightning
* Explanation: also better security, non-malleability
* Reference: https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki
* New Section X.2: Using Schnorr Signatures
* New Subsection: Signing with Schnorr
* New Subsection: Adding a Schnorr Signature
* New Subsection: Reading a Schnorr Signature
* New Subsection: Using Schnorr with Taproot
* Update Chapter 6 (Multisigs) to Integrate with Schnorr
**Chapter Y: Improving Bitcoin Scripts with Taproot** (probably between chapters 13+14, possibly expanding to two chapters)
* New Section Y.1: Understanding MAST
* New Subsection: Improving Privacy with MAST
* New Subsection: Laying out a Script in MAST
* New Subsection: Knowing the Advantages of MAST
* Explanation: larger scripts
* Explanation: hidden branches of scripts
* Explanation: fungibility
* https://github.com/bitcoin/bips/blob/master/bip-0114.mediawiki
* New Section Y.2: Understanding Taproot
* New Subsection: Integrating MAST with Taproot
* Explanation: Expanding Segwit
* Explanation: Integrating Schnorr Signatures
* New Subsection: KNowing the Advantages of Taproot
* Explanation: even more privacy; scripts and other addresses are indistinbuishable
* Reference: https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki
* Reference: https://github.com/bitcoin/bips/blob/master/bip-0342.mediawiki
* New Subsection Y.3: Creating a Taproot Script
* New Subsection: Defining a Taproot Script
* Explanation: Segwit v1, 32-byte program, not P2SH wrapped, leaf version is 0xc0
* New Codes: OP_CHECKSIGADD and OP_SUCCESS
* Cut Codes: OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY
* Reference: https://twitter.com/pwuille/status/1459778730369368067
* New Subsection Y.4: Importing a tr Desciptor
* New Subsection Y.5: Using Taproot in Practice
* New Subsection: Making a Taproot Payment
* New Subsection: Validating a Taproot Script
* Update Chapter 9 to Integrate with Taproot
* Mention Taproot in 9.1 or 9.2
* Add New Section 9.6: Scripting a P2TR (mostly a pointer to Chapter Y)
## Further Updates
The following updates could be part of v3.0 or could be further future, depending on interest and funding.
1. New Graphics: Animated GIFs for key demos.
* Reference: https://github.com/faressoft/terminalizer
1. New Chapter: Talking to Lightningd with C (after chapter 20)
* 22.1: Creating a Lightning Channel with C
* 22.2: Creating a Payment Request with C
* 22.3: Paying an Invoice with C
* 22.4: Closing a Lightning Channel with C
* Alternatives: Consider Swift instead of C, depending on Lightning support
* Reference: https://diyhpl.us/wiki/transcripts/blockstream-webinars/2019-07-31-rusty-russell-getting-started-with-c-lightning/
* Reference: https://twitter.com/roasbeef/status/1389649064753471488_

Some files were not shown because too many files have changed in this diff Show More