Commit 175a606
committed
Merge #200: feat: add non-persisted Async Payjoin support
c6bce58 docs: add Payjoin capability to the README (Mehmet Efe Umit)
4cab2fa feat: add payjoin receive support (Mehmet Efe Umit)
0112c92 feat: add payjoin send support (Mehmet Efe Umit)
f62287a refactor: move broadcast to a helper function (Mehmet Efe Umit)
a28076a refactor: move sync to a helper function (Mehmet Efe Umit)
Pull request description:
### Description
This change implements the online commands for both sending and receiving a Payjoin. Note that this PR does not implement Payjoin persistence.
### Notes to the reviewers
Tested on my local regtest with rpc using the OHTTP relays and directories in the [payjoin-cli README](https://github.com/payjoin/rust-payjoin/tree/master/payjoin-cli). Feel free to do the same, and let me know if there are comments, documentation, etc. which should be changed with this. I was not able to find any...
Here are the sample command you can use to test on regtest:
**Send**
```
cargo run --features=rpc -- -n regtest wallet -a USERNAME:PASSWORD -w WALLET_NAME -e "DESCRIPTOR" send_payjoin --ohttp_relay "RELAY1" --ohttp_relay "RELAY2" --fee_rate 1 --uri "URI"
```
**Receive**
```
cargo run --features=rpc -- -n regtest wallet -a USERNAME:PASSWORD -w WALLET_NAME -e "DESCRIPTOR" receive_payjoin --max_fee_rate 1000 --directory "https://payjo.in" --ohttp_relay "RELAY1" --ohttp_relay "RELAY2" --amount AMOUNT
```
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [X] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md)
* [X] I ran `cargo fmt` and `cargo clippy` before committing
#### New Features:
* [] I've added tests for the new feature <--- There is no testing suite for this.
* [X] I've added docs for the new feature
* [N/A] I've updated `CHANGELOG.md`
#### Bugfixes:
* [ ] This pull request breaks the existing API
* [ ] I've added tests to reproduce the issue which are now passing
* [ ] I'm linking the issue being fixed by this PR
ACKs for top commit:
tvpeter:
tACK c6bce58
spacebear21:
utACK c6bce58
Tree-SHA512: 1da8295d0eedf6fd31095085e6ef0d90ab46d5eed6c2f21a7539a6c3ff6d1127d0cdbb664d519bcb4a783ea2707452bf8cd3cb961a67ba3e61d989701e205dcaFile tree
9 files changed
+1897
-160
lines changed- src
- payjoin
9 files changed
+1897
-160
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | | - | |
33 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
115 | 128 | | |
116 | 129 | | |
117 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
433 | 468 | | |
434 | 469 | | |
435 | 470 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
106 | 115 | | |
107 | 116 | | |
108 | 117 | | |
| |||
0 commit comments