Impl SessionCreate handling

This commit is contained in:
hu55a1n1 2024-02-27 15:29:06 -08:00
parent c7eddffc2c
commit f8db27a55f
5 changed files with 171 additions and 73 deletions

109
Cargo.lock generated
View file

@ -74,9 +74,9 @@ dependencies = [
[[package]] [[package]]
name = "anstream" name = "anstream"
version = "0.6.12" version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb"
dependencies = [ dependencies = [
"anstyle", "anstyle",
"anstyle-parse", "anstyle-parse",
@ -157,7 +157,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -168,7 +168,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -406,9 +406,9 @@ dependencies = [
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.0.86" version = "1.0.88"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f9fa1897e4325be0d68d48df6aa1a71ac2ed4d27723887e7754192705350730" checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc"
[[package]] [[package]]
name = "cfg-if" name = "cfg-if"
@ -473,7 +473,7 @@ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -834,9 +834,9 @@ dependencies = [
[[package]] [[package]]
name = "darling" name = "darling"
version = "0.20.7" version = "0.20.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a5d17510e4a1a87f323de70b7b1eaac1ee0e37866c6720b2d279452d0edf389" checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391"
dependencies = [ dependencies = [
"darling_core", "darling_core",
"darling_macro", "darling_macro",
@ -844,27 +844,27 @@ dependencies = [
[[package]] [[package]]
name = "darling_core" name = "darling_core"
version = "0.20.7" version = "0.20.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a98eea36a7ff910fa751413d0895551143a8ea41d695d9798ec7d665df7f7f5e" checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f"
dependencies = [ dependencies = [
"fnv", "fnv",
"ident_case", "ident_case",
"proc-macro2", "proc-macro2",
"quote", "quote",
"strsim 0.10.0", "strsim 0.10.0",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
name = "darling_macro" name = "darling_macro"
version = "0.20.7" version = "0.20.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6a366a3f90c5d59a4b91169775f88e52e8f71a0e7804cc98a8db2932cf4ed57" checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f"
dependencies = [ dependencies = [
"darling_core", "darling_core",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -948,14 +948,14 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
name = "dyn-clone" name = "dyn-clone"
version = "1.0.16" version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
[[package]] [[package]]
name = "ecdsa" name = "ecdsa"
@ -1275,7 +1275,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -1391,9 +1391,9 @@ dependencies = [
[[package]] [[package]]
name = "half" name = "half"
version = "1.8.2" version = "1.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403"
[[package]] [[package]]
name = "hashbrown" name = "hashbrown"
@ -1418,9 +1418,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]] [[package]]
name = "hermit-abi" name = "hermit-abi"
version = "0.3.6" version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" checksum = "379dada1584ad501b383485dd706b8afb7a70fcbc7f4da7d780638a5a6124a60"
[[package]] [[package]]
name = "hex" name = "hex"
@ -1993,9 +1993,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]] [[package]]
name = "openssl" name = "openssl"
version = "0.10.62" version = "0.10.64"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f"
dependencies = [ dependencies = [
"bitflags 2.4.2", "bitflags 2.4.2",
"cfg-if 1.0.0", "cfg-if 1.0.0",
@ -2014,7 +2014,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -2025,9 +2025,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]] [[package]]
name = "openssl-sys" name = "openssl-sys"
version = "0.9.98" version = "0.9.101"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff"
dependencies = [ dependencies = [
"cc", "cc",
"libc", "libc",
@ -2154,7 +2154,7 @@ checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -2202,9 +2202,9 @@ dependencies = [
[[package]] [[package]]
name = "pkg-config" name = "pkg-config"
version = "0.3.28" version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"
[[package]] [[package]]
name = "polyval" name = "polyval"
@ -2237,7 +2237,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -2286,7 +2286,7 @@ dependencies = [
"prost 0.12.3", "prost 0.12.3",
"prost-types 0.12.3", "prost-types 0.12.3",
"regex", "regex",
"syn 2.0.50", "syn 2.0.51",
"tempfile", "tempfile",
"which", "which",
] ]
@ -2314,7 +2314,7 @@ dependencies = [
"itertools 0.11.0", "itertools 0.11.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -2338,7 +2338,7 @@ dependencies = [
[[package]] [[package]]
name = "quartz-cw" name = "quartz-cw"
version = "0.1.0" version = "0.1.0"
source = "git+ssh://git@github.com/informalsystems/bisenzone-cw-mvp.git?branch=hu55a1n1/11-use-quartz#c49fc8da96d2039179aec962c85f190aee999d62" source = "git+ssh://git@github.com/informalsystems/bisenzone-cw-mvp.git?branch=hu55a1n1/11-use-quartz#0e877198416e3c2fb85777c177bcbabb3ca80b69"
dependencies = [ dependencies = [
"cosmwasm-schema", "cosmwasm-schema",
"cosmwasm-std", "cosmwasm-std",
@ -2348,8 +2348,6 @@ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"sha2 0.10.8", "sha2 0.10.8",
"tendermint 0.34.0",
"tendermint-light-client",
"thiserror", "thiserror",
] ]
@ -2365,6 +2363,7 @@ dependencies = [
"quartz-proto", "quartz-proto",
"quartz-relayer", "quartz-relayer",
"quartz-tee-ra", "quartz-tee-ra",
"rand",
"serde", "serde",
"serde_json", "serde_json",
"tendermint 0.34.0", "tendermint 0.34.0",
@ -2408,7 +2407,7 @@ dependencies = [
[[package]] [[package]]
name = "quartz-tee-ra" name = "quartz-tee-ra"
version = "0.1.0" version = "0.1.0"
source = "git+ssh://git@github.com/informalsystems/bisenzone-cw-mvp.git?branch=hu55a1n1/11-use-quartz#c49fc8da96d2039179aec962c85f190aee999d62" source = "git+ssh://git@github.com/informalsystems/bisenzone-cw-mvp.git?branch=hu55a1n1/11-use-quartz#0e877198416e3c2fb85777c177bcbabb3ca80b69"
dependencies = [ dependencies = [
"cosmwasm-schema", "cosmwasm-schema",
"cosmwasm-std", "cosmwasm-std",
@ -2880,7 +2879,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -2913,7 +2912,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -2953,7 +2952,7 @@ dependencies = [
"darling", "darling",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -3045,12 +3044,12 @@ checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"
[[package]] [[package]]
name = "socket2" name = "socket2"
version = "0.5.5" version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871"
dependencies = [ dependencies = [
"libc", "libc",
"windows-sys 0.48.0", "windows-sys 0.52.0",
] ]
[[package]] [[package]]
@ -3137,9 +3136,9 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.50" version = "2.0.51"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" checksum = "6ab617d94515e94ae53b8406c628598680aa0c9587474ecbe58188f7b345d66c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -3192,9 +3191,9 @@ dependencies = [
[[package]] [[package]]
name = "tempfile" name = "tempfile"
version = "3.10.0" version = "3.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"fastrand", "fastrand",
@ -3473,7 +3472,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -3612,7 +3611,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -3728,7 +3727,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"prost-build", "prost-build",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -3782,7 +3781,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]
[[package]] [[package]]
@ -3980,7 +3979,7 @@ dependencies = [
"once_cell", "once_cell",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -4014,7 +4013,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -4237,5 +4236,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.50", "syn 2.0.51",
] ]

View file

@ -8,10 +8,11 @@ clap = { version = "4.1.8", features = ["derive"] }
color-eyre = "0.6.2" color-eyre = "0.6.2"
cosmwasm-std = "1.4.0" cosmwasm-std = "1.4.0"
prost = "0.12" prost = "0.12"
tendermint = "0.34.0" rand = "0.8.5"
tendermint-light-client = "0.34.0"
serde = { version = "1.0.189", features = ["derive"] } serde = { version = "1.0.189", features = ["derive"] }
serde_json = "1.0.94" serde_json = "1.0.94"
tendermint = "0.34.0"
tendermint-light-client = "0.34.0"
tonic = "0.11" tonic = "0.11"
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }

View file

@ -37,13 +37,19 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let light_client_opts = LightClientOpts::new( let light_client_opts = LightClientOpts::new(
args.chain_id, args.chain_id,
args.trusted_height, args.trusted_height.into(),
args.trusted_hash, Vec::from(args.trusted_hash)
args.trust_threshold, .try_into()
.expect("invalid trusted hash"),
(
args.trust_threshold.numerator(),
args.trust_threshold.denominator(),
),
args.trusting_period, args.trusting_period,
args.max_clock_drift, args.max_clock_drift,
args.max_block_lag, args.max_block_lag,
); )?;
let config = Config::new( let config = Config::new(
EpidAttestor.mr_enclave()?, EpidAttestor.mr_enclave()?,
Duration::from_secs(30 * 24 * 60), Duration::from_secs(30 * 24 * 60),

View file

@ -1,9 +1,14 @@
use quartz_cw::{msg::instantiate::CoreInstantiate, state::Config}; use quartz_cw::{
msg::{execute::session_create::SessionCreate, instantiate::CoreInstantiate},
state::{Config, Nonce},
};
use quartz_proto::quartz::{ use quartz_proto::quartz::{
core_server::Core, InstantiateRequest as RawInstantiateRequest, core_server::Core, InstantiateRequest as RawInstantiateRequest,
InstantiateResponse as RawInstantiateResponse, SessionCreateRequest, SessionCreateResponse, InstantiateResponse as RawInstantiateResponse, SessionCreateRequest as RawSessionCreateRequest,
SessionCreateResponse as RawSessionCreateResponse,
}; };
use quartz_relayer::types::InstantiateResponse; use quartz_relayer::types::{InstantiateResponse, SessionCreateResponse};
use rand::Rng;
use tonic::{Request, Response, Status}; use tonic::{Request, Response, Status};
use crate::attestor::Attestor; use crate::attestor::Attestor;
@ -35,6 +40,7 @@ where
_request: Request<RawInstantiateRequest>, _request: Request<RawInstantiateRequest>,
) -> TonicResult<Response<RawInstantiateResponse>> { ) -> TonicResult<Response<RawInstantiateResponse>> {
let core_instantiate_msg = CoreInstantiate::new(self.config.clone()); let core_instantiate_msg = CoreInstantiate::new(self.config.clone());
let quote = self let quote = self
.attestor .attestor
.quote(core_instantiate_msg) .quote(core_instantiate_msg)
@ -45,14 +51,17 @@ where
} }
async fn session_create( async fn session_create(
&self, &self,
request: Request<SessionCreateRequest>, _request: Request<RawSessionCreateRequest>,
) -> TonicResult<Response<SessionCreateResponse>> { ) -> TonicResult<Response<RawSessionCreateResponse>> {
println!("Got a request: {:?}", request); let nonce = rand::thread_rng().gen::<Nonce>();
let session_create_msg = SessionCreate::new(nonce);
let reply = SessionCreateResponse { let quote = self
message: "Hello!".to_string(), .attestor
}; .quote(session_create_msg)
.map_err(|e| Status::internal(e.to_string()))?;
Ok(Response::new(reply)) let response = SessionCreateResponse::new(nonce, quote);
Ok(Response::new(response.into()))
} }
} }

View file

@ -1,6 +1,9 @@
use cosmwasm_std::{HexBinary, StdError}; use cosmwasm_std::{HexBinary, StdError};
use quartz_cw::state::{Config, RawConfig}; use quartz_cw::state::{Config, Nonce, RawConfig};
use quartz_proto::quartz::InstantiateResponse as RawInstantiateResponse; use quartz_proto::quartz::{
InstantiateResponse as RawInstantiateResponse,
SessionCreateResponse as RawSessionCreateResponse,
};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq)] #[derive(Clone, Debug, PartialEq)]
@ -82,3 +85,83 @@ impl From<InstantiateResponseMsg> for RawInstantiateResponseMsg {
} }
} }
} }
#[derive(Clone, Debug, PartialEq)]
pub struct SessionCreateResponse {
message: SessionCreateResponseMsg,
}
impl SessionCreateResponse {
pub fn new(nonce: Nonce, quote: Vec<u8>) -> Self {
Self {
message: SessionCreateResponseMsg { nonce, quote },
}
}
pub fn quote(&self) -> &[u8] {
&self.message.quote
}
pub fn into_message(self) -> SessionCreateResponseMsg {
self.message
}
}
impl TryFrom<RawSessionCreateResponse> for SessionCreateResponse {
type Error = StdError;
fn try_from(value: RawSessionCreateResponse) -> Result<Self, Self::Error> {
let raw_message: RawSessionCreateResponseMsg = serde_json::from_str(&value.message)
.map_err(|e| StdError::parse_err("RawSessionCreateResponseMsg", e))?;
Ok(Self {
message: raw_message.try_into()?,
})
}
}
impl From<SessionCreateResponse> for RawSessionCreateResponse {
fn from(value: SessionCreateResponse) -> Self {
let raw_message: RawSessionCreateResponseMsg = value.message.into();
Self {
message: serde_json::to_string(&raw_message).expect("infallible serializer"),
}
}
}
#[derive(Clone, Debug, PartialEq)]
pub struct SessionCreateResponseMsg {
nonce: Nonce,
quote: Vec<u8>,
}
impl SessionCreateResponseMsg {
pub fn into_tuple(self) -> (Nonce, Vec<u8>) {
(self.nonce, self.quote)
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct RawSessionCreateResponseMsg {
nonce: HexBinary,
quote: HexBinary,
}
impl TryFrom<RawSessionCreateResponseMsg> for SessionCreateResponseMsg {
type Error = StdError;
fn try_from(value: RawSessionCreateResponseMsg) -> Result<Self, Self::Error> {
Ok(Self {
nonce: value.nonce.to_array()?,
quote: value.quote.into(),
})
}
}
impl From<SessionCreateResponseMsg> for RawSessionCreateResponseMsg {
fn from(value: SessionCreateResponseMsg) -> Self {
Self {
nonce: value.nonce.into(),
quote: value.quote.into(),
}
}
}