-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from LtbLightning/upgrade-v18.0
Upgrade v18.0
- Loading branch information
Showing
13 changed files
with
960 additions
and
292 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
use crate::error::PayjoinError; | ||
use crate::types::OhttpKeys; | ||
use crate::uri::Url; | ||
|
||
/// Fetch the ohttp keys from the specified payjoin directory via proxy. | ||
/// | ||
/// * `ohttp_relay`: The http CONNNECT method proxy to request the ohttp keys from a payjoin | ||
/// directory. Proxying requests for ohttp keys ensures a client IP address is never revealed to | ||
/// the payjoin directory. | ||
/// | ||
/// * `payjoin_directory`: The payjoin directory from which to fetch the ohttp keys. This | ||
/// directory stores and forwards payjoin client payloads. | ||
/// | ||
/// * `cert_der` (optional): The DER-encoded certificate to use for local HTTPS connections. This | ||
/// parameter is only available when the "danger-local-https" feature is enabled. | ||
pub async fn fetch_ohttp_keys( | ||
ohttp_relay: Url, | ||
payjoin_directory: Url, | ||
cert_der: Vec<u8>, | ||
) -> Result<OhttpKeys, PayjoinError> { | ||
payjoin::io::fetch_ohttp_keys(ohttp_relay.into(), payjoin_directory.into(), cert_der) | ||
.await | ||
.map(|e| e.into()) | ||
.map_err(|e| e.into()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.