You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify nigiri commands in the payjoin-cli README (payjoin#691)
A couple of clarifications with the commands could be helpful for easier
copying and pasting. Without the `-rpcwallet` set, it defaults to the incorrect
wallet. Also the parameters were in the wrong order
see: <https://developer.bitcoin.org/reference/rpc/generatetoaddress.html>
Copy file name to clipboardExpand all lines: payjoin-cli/README.md
+19-13Lines changed: 19 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,41 +24,48 @@ Payjoin `v2` allows for transactions to be completed asynchronously. Thus the se
24
24
To get started, install `nigiri` and [`docker`](https://www.docker.com/get-started). Payjoin requires the sender and receiver each to have spendable [UTXOs](https://www.unchained.com/blog/what-is-a-utxo-bitcoin), so we'll create two wallets and fund each.
25
25
26
26
```sh
27
-
# Download nigiri and check install succeeded
27
+
# Download nigiri and check that installation has succeeded.
28
28
curl https://getnigiri.vulpem.com | bash
29
29
nigiri --version
30
30
31
-
# Create two regtest wallets
32
-
nigiri rpc createwallet "sender"
33
-
nigiri rpc createwallet "receiver"
31
+
# Create two regtest wallets.
32
+
nigiri rpc createwallet sender
33
+
nigiri rpc createwallet receiver
34
34
35
35
# We need 101 blocks for the UTXOs to be spendable due to the coinbase maturity requirement.
# Check the balances before doing a Payjoin transaction.
40
+
nigiri rpc -rpcwallet=sender getbalance
41
+
nigiri rpc -rpcwallet=receiver getbalance
38
42
```
39
43
40
-
Great! Our wallets are setup, now let's do an async payjoin.
44
+
Great! Our wallets are setup. Now let's do an async payjoin.
41
45
42
46
### Install `payjoin-cli`
43
47
48
+
The following command will install the most recent version of payjoin-cli. See the crates.io page [here](https://crates.io/crates/payjoin-cli).
49
+
44
50
```sh
45
-
cargo install payjoin-cli --version $VERSION
51
+
cargo install payjoin-cli
46
52
```
47
53
48
-
where `$VERSION` is the [latest version](https://crates.io/crates/payjoin-cli).
54
+
Optionally, you can install a specific version by setting the `--version` flag in the command.
49
55
50
56
Next, create a directory for the sender & receiver and create a file called `config.toml` for each. This file provides the information required for `payjoin-cli` to connect to your node and, for `v2`, to know which Payjoin Directory and OHTTP Relay to use.
51
57
58
+
When running commands, `payjoin-cli` will read the `config.toml` file which is in the current working directory.
0 commit comments