Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
37ng committed Jan 30, 2024
1 parent d5fc1cd commit b8edb54
Show file tree
Hide file tree
Showing 14 changed files with 2,852 additions and 43 deletions.
11 changes: 11 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions gateway-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ edition = "2021"
[dependencies]
serde.workspace = true
lib-didethresolver.workspace = true
ethers.workspace = true
13 changes: 5 additions & 8 deletions gateway-types/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
//! Shared types between XPS Gateawy and client (libxmtp)
use ethers::prelude::Bytes;
use serde::{Deserialize, Serialize};

/// Address of the did:ethr Registry on Sepolia
pub const DID_ETH_REGISTRY: &str = "0xd1D374DDE031075157fDb64536eF5cC13Ae75000";
// Address of the Converstion on Sepolia
pub const CONVERSATION: &str = "0x15aE865d0645816d8EEAB0b7496fdd24227d1801";

/// A message sent to a conversation
#[derive(Serialize, Deserialize)]
pub struct Message {
// Unique identifier for a conversation
#[serde(rename = "conversationId")]
pub conversation_id: Vec<u8>,
pub conversation_id: [u8; 32],
/// message content in bytes
pub payload: Vec<u8>,
/// Signature of V
pub v: Vec<u8>,
/// Signature of R
pub r: Vec<u8>,
/// Signature of S
pub s: Vec<u8>,
pub payload: Bytes,
}

/// GrantInstallationResult represents the result of a grant installation operation in the DID registry.
Expand Down
7 changes: 7 additions & 0 deletions messaging/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
log.workspace = true
tracing.workspace = true
tokio.workspace = true
async-trait.workspace = true
ethers = { workspace = true, features = ["ws"] }
serde.workspace = true
thiserror.workspace = true
Loading

0 comments on commit b8edb54

Please sign in to comment.