mirror of
https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
synced 2025-06-07 16:06:26 +00:00
Remove ':note:', it does not render in markdown
This commit is contained in:
parent
80467579f9
commit
9df9904129
@ -98,7 +98,7 @@ script | stack
|
|||||||
```
|
```
|
||||||
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.
|
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
|
||||||
|
|
||||||
|
@ -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!
|
||||||
|
|
||||||
|
@ -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](16_7_Integrating_Libwally_and_Bitcoin-CLI.md).
|
||||||
|
|
||||||
### Print a Transaction
|
### Print a Transaction
|
||||||
|
|
||||||
|
@ -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.
|
||||||
|
|
||||||
@ -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:
|
||||||
```
|
```
|
||||||
@ -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:
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ 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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user