Skip to content

Commit 8d15df7

Browse files
committed
doc(silentpayments): add README section for new silent payment commands
1 parent 84f8750 commit 8d15df7

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,27 @@ To generate a new extended master key, suitable for use in a descriptor:
112112
cargo run -- key generate
113113
```
114114

115+
#### Silent payments
116+
117+
> [!WARNING]
118+
> This tool does not support silent payment scanning, nor the `silent_payment_code`
119+
> command has any control on the public keys provided. If you don't have access
120+
> to a silent payment scanner with the keys you provided, you are not going to
121+
> be able to discover any funds, and if you do not control the private keys,
122+
> you are not going to be able to spend the funds. We do not recommend the use
123+
> of any of the silent payment features with real funds.
124+
125+
To experiment with silent payments, you can get two public keys in compressed format, `A1` and `A2`, and produce a silent payment code by calling:
126+
```shell
127+
cargo run --features sp -- --network signet silent_payment_code --scan_public_key '<A1>' --spend_public_key '<A2>'
128+
```
129+
130+
Once you have a silent payment code, `SP_CODE_1` and an amount `AMOUNT_1` to send, you can create a valid transaction locking funds to a silent payment code derived address with the following command:
131+
132+
```shell
133+
cargo run --features electrum,sp -- --network testnet4 wallet --wallet sample_wallet --ext-descriptor "wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/*)" --database-type sqlite --client-type electrum --url "ssl://mempool.space:40002" create_sp_tx --to-sp <SP_CODE_1>:<AMOUNT_1>
134+
```
135+
115136
## Justfile
116137

117138
We have added the `just` command runner to help you with common commands (during development) and running regtest `bitcoind` if you are using the `rpc` feature.

0 commit comments

Comments
 (0)