feat: upgrade pubky-common and http-relay

This commit is contained in:
nazeh
2025-02-13 14:27:04 +03:00
parent 9065d157d6
commit 91d834f9d8
6 changed files with 18 additions and 18 deletions

20
Cargo.lock generated
View File

@@ -1233,9 +1233,7 @@ dependencies = [
[[package]]
name = "http-relay"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e21bdfe99224d6d446eb1b6ecc139ed96a7a8f0a77a123158b9c31d1dbbbcb08"
version = "0.2.0"
dependencies = [
"anyhow",
"axum",
@@ -1250,6 +1248,8 @@ dependencies = [
[[package]]
name = "http-relay"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0043bce2a7f4a4fbc870c4489223052b3aba084ead8a39581ea69d3e9a3e04a9"
dependencies = [
"anyhow",
"axum",
@@ -2112,7 +2112,7 @@ dependencies = [
"js-sys",
"log",
"pkarr",
"pubky-common 0.2.0",
"pubky-common 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"pubky-testnet",
"reqwest",
"thiserror 2.0.11",
@@ -2127,9 +2127,7 @@ dependencies = [
[[package]]
name = "pubky-common"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c3fc5af2af85da2967ce17a91aae82c828b750db748e24eadb5e06c0ade2ad2"
version = "0.3.0"
dependencies = [
"argon2",
"base32",
@@ -2149,6 +2147,8 @@ dependencies = [
[[package]]
name = "pubky-common"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77dddc23db4c39c39412fdede996c16e36c93aedfe61226913f389df118a9254"
dependencies = [
"argon2",
"base32",
@@ -2185,7 +2185,7 @@ dependencies = [
"page_size",
"pkarr",
"postcard",
"pubky-common 0.2.0",
"pubky-common 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde",
"tokio",
"toml",
@@ -2202,11 +2202,11 @@ name = "pubky-testnet"
version = "0.1.0"
dependencies = [
"anyhow",
"http-relay 0.1.0",
"http-relay 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"mainline",
"pkarr-relay",
"pubky",
"pubky-common 0.2.0",
"pubky-common 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"pubky-homeserver",
"tokio",
"tracing-subscriber",

View File

@@ -18,7 +18,7 @@ hex = "0.4.3"
httpdate = "1.0.3"
postcard = { version = "1.1.1", features = ["alloc"] }
pkarr = { version = "3.1.1", features = ["dht", "lmdb-cache", "tls"] }
pubky-common = "0.2.0"
pubky-common = "0.3.0"
serde = { version = "1.0.217", features = ["derive"] }
tokio = { version = "1.43.0", features = ["full"] }
toml = "0.8.20"

View File

@@ -12,11 +12,11 @@ categories = ["web-programming", "authentication", "cryptography"]
[dependencies]
anyhow = "1.0.95"
http-relay = "0.1.0"
http-relay = "0.2.0"
mainline = "5.2.0"
pkarr-relay = "0.3.0"
pubky = { version = "0.3.0", path = "../pubky" }
pubky-common = "0.2.0"
pubky-common = "0.3.0"
pubky-homeserver = { version = "0.1.0", path = "../pubky-homeserver" }
tokio = { version = "1.43.0", features = ["full"] }
tracing-subscriber = "0.3.19"

View File

@@ -25,7 +25,7 @@ cookie_store = { version = "0.21.1", default-features = false }
anyhow = "1.0.95"
flume = { version = "0.11.1", default-features = false, features = ["async"] }
futures-util = "0.3.31"
pubky-common = "0.2.0"
pubky-common = "0.3.0"
# Native dependencies
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]

View File

@@ -134,7 +134,7 @@ impl Client {
let token = AuthToken::sign(keypair, capabilities);
let encrypted_token = encrypt(&token.serialize(), &client_secret)?;
let encrypted_token = encrypt(&token.serialize(), &client_secret);
let engine = base64::engine::GeneralPurpose::new(&URL_SAFE, NO_PAD);

View File

@@ -6,10 +6,10 @@ use crate::wasm::wrappers::keys::Keypair;
/// Create a recovery file of the `keypair`, containing the secret key encrypted
/// using the `passphrase`.
#[wasm_bindgen(js_name = "createRecoveryFile")]
pub fn create_recovery_file(keypair: &Keypair, passphrase: &str) -> Result<Uint8Array, JsValue> {
pub fn create_recovery_file(keypair: &Keypair, passphrase: &str) -> Uint8Array {
pubky_common::recovery_file::create_recovery_file(keypair.as_inner(), passphrase)
.map(|b| b.as_slice().into())
.map_err(|e| JsValue::from_str(&e.to_string()))
.as_slice()
.into()
}
/// Create a recovery file of the `keypair`, containing the secret key encrypted