Skip to content

Commit

Permalink
fix: update ed25519 dep (#367)
Browse files Browse the repository at this point in the history
* fix: update ed25519 dep

* fix: don't use re-exported dep

* chore: use tagged version

* chore: remove unnecessary type
  • Loading branch information
chris13524 authored Feb 16, 2024
1 parent 9274577 commit b725054
Show file tree
Hide file tree
Showing 26 changed files with 138 additions and 197 deletions.
118 changes: 27 additions & 91 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ regex = "1.7.1"
url = "2.3.1"
sha256 = "1.1.1"
chacha20poly1305 = "0.10.1"
ed25519-dalek = { version = "2.0.0", features = ["rand_core"] }
rand = "0.7.0"
rand_core = "0.5.0"
rand = "0.8.5"
ring = "0.16.20"
jsonwebtoken = "8.2.0"
data-encoding = "2.3.3"
Expand All @@ -74,8 +72,8 @@ futures = "0.3.26"
futures-util = "0.3"
dashmap = "5.4.0"

relay_rpc = { git = "https://github.com/WalletConnect/WalletConnectRust.git", tag = "v0.26.2", features = ["cacao"] }
relay_client = { git = "https://github.com/WalletConnect/WalletConnectRust.git", tag = "v0.26.2" }
relay_rpc = { git = "https://github.com/WalletConnect/WalletConnectRust.git", tag = "v0.26.4", features = ["cacao"] }
relay_client = { git = "https://github.com/WalletConnect/WalletConnectRust.git", tag = "v0.26.4" }
x25519-dalek = { version = "2.0.0", features = ["static_secrets"] }
hkdf = "0.12.3"
sha2 = "0.10.6"
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ clippy:

if command -v cargo-clippy >/dev/null; then
echo '==> Running clippy'
cargo clippy --all-features --tests -- -D warnings
cargo clippy --workspace --all-features --all-targets -- -D warnings
else
echo '==> clippy not found in PATH, skipping'
fi
Expand Down
4 changes: 2 additions & 2 deletions src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ use {
base64::{DecodeError, Engine},
chrono::{DateTime, Duration as CDuration, Utc},
core::fmt,
ed25519_dalek::{Signer, SigningKey},
hyper::StatusCode,
relay_rpc::{
auth::{
cacao::{Cacao, CacaoError},
did::{combine_did_data, extract_did_data, DidError},
ed25519_dalek::{Signer, SigningKey},
},
domain::{ClientIdDecodingError, DecodedClientId},
jwt::{JwtHeader, JWT_HEADER_ALG, JWT_HEADER_TYP},
Expand Down Expand Up @@ -458,7 +458,7 @@ pub fn from_jwt<T: DeserializeOwned + GetSharedClaims>(jwt: &str) -> Result<T, J

pub fn sign_jwt<T: Serialize>(
message: T,
private_key: &ed25519_dalek::SigningKey,
private_key: &SigningKey,
) -> Result<String, NotifyServerError> {
let header = {
let data = JwtHeader {
Expand Down
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use {
data_encoding::DecodeError,
hyper::StatusCode,
relay_rpc::{
auth::did::DidError,
auth::{did::DidError, ed25519_dalek::ed25519},
domain::{ClientIdDecodingError, ProjectId, Topic},
},
serde_json::json,
Expand Down Expand Up @@ -159,7 +159,7 @@ pub enum NotifyServerError {
ToStrError(#[from] hyper::header::ToStrError),

#[error(transparent)]
EdDalek(#[from] ed25519_dalek::ed25519::Error),
EdDalek(#[from] ed25519::Error),

#[error("The requested app does not match the project's app domain")]
AppDoesNotMatch,
Expand Down
Loading

0 comments on commit b725054

Please sign in to comment.