|
@@ -7,6 +7,7 @@ use lox_library::scalar_u32;
|
|
|
use lox_library::IssuerPubKey;
|
|
|
use lox_library::OPENINV_LENGTH;
|
|
|
use lox_utils::EncBridgeTable;
|
|
|
+use lox_utils::Invite;
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
use serde_with::serde_as;
|
|
|
use std::collections::HashMap;
|
|
@@ -21,15 +22,6 @@ pub trait Networking {
|
|
|
async fn request(&self, endpoint: String, body: Vec<u8>) -> Vec<u8>;
|
|
|
}
|
|
|
|
|
|
-// From https://gitlab.torproject.org/onyinyang/lox-server/-/blob/main/src/main.rs
|
|
|
-// TODO: Move this to main Lox library?
|
|
|
-#[serde_as]
|
|
|
-#[derive(Serialize, Deserialize)]
|
|
|
-pub struct Invite {
|
|
|
- #[serde_as(as = "[_; OPENINV_LENGTH]")]
|
|
|
- invite: [u8; OPENINV_LENGTH],
|
|
|
-}
|
|
|
-
|
|
|
// Helper functions to get public keys from vector
|
|
|
pub fn get_lox_pub(lox_auth_pubkeys: &Vec<IssuerPubKey>) -> &IssuerPubKey {
|
|
|
&lox_auth_pubkeys[0]
|