Skip to content

Commit 330aa35

Browse files
committed
Merge branch 'master' into Renaming-changes
2 parents eee58e0 + da49c64 commit 330aa35

25 files changed

Lines changed: 365 additions & 52 deletions

File tree

.cargo/mutants.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
additional_cargo_args = ["--all-features"]
2-
examine_globs = ["payjoin/src/uri/*.rs", "payjoin/src/receive/**/*.rs", "payjoin/src/send/**/*.rs"]
2+
examine_globs = ["payjoin/src/core/uri/*.rs", "payjoin/src/core/receive/**/*.rs", "payjoin/src/core/send/**/*.rs"]
33
exclude_globs = []
44
exclude_re = [
55
"impl Debug",
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: General Bug Report
2+
description: Submit a new bug report
3+
labels: [bug]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
### This issue tracker is only for technical issues related to the following crates:
9+
- [`payjoin-cli`](https://github.com/payjoin/rust-payjoin/tree/master/payjoin-cli)
10+
- [`payjoin-directory`](https://github.com/payjoin/rust-payjoin/tree/master/payjoin-directory)
11+
- [`payjoin-test-utils`](https://github.com/payjoin/rust-payjoin/tree/master/payjoin-test-utils)
12+
- [`payjoin-ffi`](https://github.com/payjoin/rust-payjoin/tree/master/payjoin-ffi)
13+
14+
### For bugs relating to the [payjoin](https://github.com/payjoin/rust-payjoin/tree/master/payjoin) crate, [see here](./bug-payjoin-crate.yml).
15+
16+
----
17+
- type: checkboxes
18+
attributes:
19+
label: Is there an existing issue for this?
20+
description: Please search to see if an issue already exists for the bug you encountered.
21+
options:
22+
- label: I have searched the existing issues
23+
required: true
24+
- type: dropdown
25+
attributes:
26+
label: Which crate is this issue for?
27+
multiple: false
28+
options:
29+
- payjoin-cli
30+
- payjoin-directory
31+
- payjoin-test-utils
32+
- payjoin-ffi
33+
- type: dropdown
34+
attributes:
35+
label: How did you obtain this crate?
36+
multiple: false
37+
options:
38+
- Compiled from source
39+
- Pre-built binaries
40+
- Package manager
41+
- Docker Image
42+
- Other
43+
validations:
44+
required: true
45+
- type: textarea
46+
id: features
47+
attributes:
48+
label: Features
49+
description: |
50+
If you selected "Compiled from source" what features did you use?
51+
validations:
52+
required: false
53+
- type: input
54+
id: pdk-version
55+
attributes:
56+
label: What version of the selected crate are you using?
57+
description:
58+
Run `payjoin-cli --version` or `payjoin-directory --version` for the binaries.
59+
For the library crates (`payjoin-test-utils`, and `payjoin-ffi`),
60+
check your respective package manager file to see which version you have installed.
61+
placeholder: e.g. payjoin-0.23.0 or master@ceef77b
62+
validations:
63+
required: true
64+
- type: textarea
65+
id: current-behavior
66+
attributes:
67+
label: Current behavior
68+
description: Tell us what went wrong
69+
validations:
70+
required: true
71+
- type: textarea
72+
id: expected-behavior
73+
attributes:
74+
label: Expected behavior
75+
description: Tell us what you expected to happen
76+
validations:
77+
required: true
78+
- type: textarea
79+
id: reproduction-steps
80+
attributes:
81+
label: Steps to reproduce
82+
description: |
83+
Tell us how to reproduce your bug. Please attach related screenshots if necessary.
84+
* Run-time or compile-time configuration options
85+
* Actions taken
86+
validations:
87+
required: true
88+
- type: textarea
89+
id: logs
90+
attributes:
91+
label: Relevant log output
92+
description: |
93+
Please copy and paste any relevant log output.
94+
95+
Please be aware that the log might contain personally identifying information.
96+
validations:
97+
required: false
98+
- type: input
99+
id: os
100+
attributes:
101+
label: Operating system and version
102+
placeholder: e.g. "MacOS Ventura 13.2" or "Ubuntu 22.04 LTS"
103+
validations:
104+
required: true
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: payjoin crate bug report
2+
description: Submit a new bug report for the payjoin crate
3+
labels: [bug]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
## This issue tracker is only for technical issues related to the [payjoin](https://github.com/payjoin/rust-payjoin/tree/master/payjoin) crate.
9+
10+
## Bugs for all other crates should [this template](./bug-general.yml).
11+
12+
----
13+
- type: checkboxes
14+
attributes:
15+
label: Is there an existing issue for this?
16+
description: Please search to see if an issue already exists for the bug you encountered.
17+
options:
18+
- label: I have searched the existing issues
19+
required: true
20+
- type: checkboxes
21+
attributes:
22+
label: Are you using payjoin-ffi?
23+
options:
24+
- label: Yes I am
25+
required: false
26+
- type: dropdown
27+
attributes:
28+
label: If so, which host language?
29+
multiple: false
30+
options:
31+
- python
32+
- other
33+
validations:
34+
required: false
35+
- type: textarea
36+
id: features
37+
attributes:
38+
label: Did you enable any features on the crate?
39+
description: e.g. `v2`
40+
validations:
41+
required: false
42+
- type: input
43+
id: pdk-version
44+
attributes:
45+
label: What version of the payjoin crate are you using?
46+
description: Check your respective package manager file to see which version you have installed.
47+
placeholder: e.g. payjoin-0.23.0 or master@ceef77b
48+
validations:
49+
required: true
50+
- type: textarea
51+
id: current-behavior
52+
attributes:
53+
label: Current behavior
54+
description: Tell us what went wrong
55+
validations:
56+
required: true
57+
- type: textarea
58+
id: expected-behavior
59+
attributes:
60+
label: Expected behavior
61+
description: Tell us what you expected to happen
62+
validations:
63+
required: true
64+
- type: textarea
65+
id: reproduction-steps
66+
attributes:
67+
label: Steps to reproduce
68+
description: |
69+
Tell us how to reproduce your bug. Please attach related screenshots if necessary.
70+
* Run-time or compile-time configuration options
71+
* Actions taken
72+
validations:
73+
required: true
74+
- type: textarea
75+
id: logs
76+
attributes:
77+
label: Relevant log output
78+
description: |
79+
Please copy and paste any relevant log output. This can be enabled by prefixing `RUST_LOG=debug cargo run ...`
80+
81+
Please be aware that the log might contain personally identifying information.
82+
validations:
83+
required: false

Cargo-minimal.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,7 @@ dependencies = [
16231623

16241624
[[package]]
16251625
name = "payjoin-cli"
1626-
version = "0.1.0"
1626+
version = "0.2.0"
16271627
dependencies = [
16281628
"anyhow",
16291629
"async-trait",
@@ -1651,7 +1651,7 @@ dependencies = [
16511651

16521652
[[package]]
16531653
name = "payjoin-directory"
1654-
version = "0.0.2"
1654+
version = "0.0.3"
16551655
dependencies = [
16561656
"anyhow",
16571657
"bhttp",
@@ -1674,7 +1674,7 @@ dependencies = [
16741674

16751675
[[package]]
16761676
name = "payjoin-test-utils"
1677-
version = "0.0.0"
1677+
version = "0.0.1"
16781678
dependencies = [
16791679
"bitcoin",
16801680
"bitcoin-ohttp",

Cargo-recent.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,7 @@ dependencies = [
16231623

16241624
[[package]]
16251625
name = "payjoin-cli"
1626-
version = "0.1.0"
1626+
version = "0.2.0"
16271627
dependencies = [
16281628
"anyhow",
16291629
"async-trait",
@@ -1651,7 +1651,7 @@ dependencies = [
16511651

16521652
[[package]]
16531653
name = "payjoin-directory"
1654-
version = "0.0.2"
1654+
version = "0.0.3"
16551655
dependencies = [
16561656
"anyhow",
16571657
"bhttp",
@@ -1674,7 +1674,7 @@ dependencies = [
16741674

16751675
[[package]]
16761676
name = "payjoin-test-utils"
1677-
version = "0.0.0"
1677+
version = "0.0.1"
16781678
dependencies = [
16791679
"bitcoin",
16801680
"bitcoin-ohttp",

payjoin-cli/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# payjoin-cli Changelog
22

3+
## 0.2.0
4+
5+
- Support sender and receiver being generic over their typestate ([#728](https://github.com/payjoin/rust-payjoin/pull/728), [#719](https://github.com/payjoin/rust-payjoin/pull/719))
6+
- Remove existing persistence strategy and replace with new SessionPersister trait ([#789](https://github.com/payjoin/rust-payjoin/pull/789), [#750](https://github.com/payjoin/rust-payjoin/pull/750))
7+
- Update references to BIP-77 ([#733](https://github.com/payjoin/rust-payjoin/pull/733))
8+
- Rename RelayState to RelayManager for clarity ([#727](https://github.com/payjoin/rust-payjoin/pull/727))
9+
- Refactor config to use proc macros over builder ([#703](https://github.com/payjoin/rust-payjoin/pull/703))
10+
- Create fallback ohttp-relay logic for payjoin-cli ([#607](https://github.com/payjoin/rust-payjoin/pull/607))
11+
- Separate v2 cli logic into mod and ohttp components ([#714](https://github.com/payjoin/rust-payjoin/pull/714))
12+
- Update Nigiri instructions ([#691](https://github.com/payjoin/rust-payjoin/pull/691), [#682](https://github.com/payjoin/rust-payjoin/pull/682))
13+
- Dedupe ImplementationError ([#669](https://github.com/payjoin/rust-payjoin/pull/669))
14+
- Add Quick Start, Configuration, Reference to CLI README ([#624](https://github.com/payjoin/rust-payjoin/pull/624))
15+
316
## 0.1.0
417

518
- Bump payjoin to 0.23.0 with stable wire protocol

payjoin-cli/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "payjoin-cli"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
authors = ["Dan Gould <d@ngould.dev>"]
55
description = "A command-line Payjoin client for Bitcoin Core"
66
repository = "https://github.com/payjoin/rust-payjoin"
@@ -49,4 +49,4 @@ url = { version = "2.3.1", features = ["serde"] }
4949

5050
[dev-dependencies]
5151
nix = "0.26.4"
52-
payjoin-test-utils = { version = "0.0.0" }
52+
payjoin-test-utils = { version = "0.0.1" }

payjoin-directory/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# payjoin-directory Changelog
22

3+
## 0.0.3
4+
5+
- Update links to reference BIP-77 document [#733](https://github.com/payjoin/rust-payjoin/pull/733)
6+
- Fix uninline format clippy violations [#667](https://github.com/payjoin/rust-payjoin/pull/667)
7+
- Serve a page on / for payjoin-directory [#824](https://github.com/payjoin/rust-payjoin/pull/824)
8+
39
## 0.0.2
410

511
- Do not log ERROR on directory validation errors [#628](https://github.com/payjoin/rust-payjoin/pull/628)

payjoin-directory/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "payjoin-directory"
3-
version = "0.0.2"
3+
version = "0.0.3"
44
authors = ["Dan Gould <d@ngould.dev>"]
55
description = "A store-and-forward and Oblivious Gateway Resource directory server for Async Payjoin"
66
repository = "https://github.com/payjoin/rust-payjoin"

payjoin-directory/src/lib.rs

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ async fn serve_payjoin_directory(
185185
(Method::GET, ["", "ohttp-keys"]) => get_ohttp_keys(&ohttp).await,
186186
(Method::POST, ["", id]) => post_fallback_v1(id, query, body, pool).await,
187187
(Method::GET, ["", "health"]) => health_check().await,
188+
(Method::GET, ["", ""]) => handle_directory_home_path().await,
188189
_ => Ok(not_found()),
189190
}
190191
.unwrap_or_else(|e| e.to_response());
@@ -267,6 +268,67 @@ async fn health_check() -> Result<Response<BoxBody<Bytes, hyper::Error>>, Handle
267268
Ok(Response::new(empty()))
268269
}
269270

271+
async fn handle_directory_home_path() -> Result<Response<BoxBody<Bytes, hyper::Error>>, HandlerError>
272+
{
273+
let mut res = Response::new(empty());
274+
*res.status_mut() = StatusCode::OK;
275+
res.headers_mut().insert(CONTENT_TYPE, HeaderValue::from_static("text/html"));
276+
277+
let html = r#"
278+
<!DOCTYPE html>
279+
<html lang="en">
280+
<head>
281+
<meta charset="UTF-8">
282+
<title>Payjoin Directory</title>
283+
<style>
284+
body {
285+
background-color: #0f0f0f;
286+
color: #eaeaea;
287+
font-family: Manrope, sans-serif;
288+
padding: 2rem;
289+
display: flex;
290+
justify-content: center;
291+
align-items: center;
292+
height: 100vh;
293+
}
294+
.container {
295+
background: #1a1a1a;
296+
border: 1px solid #333;
297+
border-radius: 8px;
298+
padding: 2rem;
299+
box-shadow: 0 0 10px rgba(0, 170, 255, 0.2);
300+
text-align: center;
301+
}
302+
h1 {
303+
color: black;
304+
background-color: #C71585;
305+
margin-bottom: 1rem;
306+
padding: 0.5rem;
307+
border-radius: 4px;
308+
}
309+
p {
310+
color: #ccc;
311+
}
312+
a{
313+
color: #F75394;
314+
text-decoration: none;
315+
}
316+
</style>
317+
</head>
318+
<body>
319+
<div class="container">
320+
<h1>Payjoin Directory</h1>
321+
<p>The Payjoin Directory provides a rendezvous point for sender and receiver to meet. The directory stores Payjoin payloads to support asynchronous communication.</p>
322+
<p>Learn more about how asynchronous payjoin works here: <a href="https://payjoin.org/docs/how-it-works/payjoin-v2-bip-77">Payjoin V2</a></p>
323+
</div>
324+
</body>
325+
</html>
326+
"#;
327+
328+
*res.body_mut() = full(html);
329+
Ok(res)
330+
}
331+
270332
#[derive(Debug)]
271333
enum HandlerError {
272334
PayloadTooLarge,

0 commit comments

Comments
 (0)