ic_tee_agent/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use serde::{Deserialize, Serialize};
use serde_bytes::ByteBuf;

pub mod agent;
pub mod http;
pub mod identity;
pub mod setting;

/// The ic_sig_verifier module uses ic_types and ic_crypto_standalone_sig_verifier crates
/// which are not published. Therefore, ic_tee_agent cannot directly depend on these crates.
/// Users can copy the code from ic_sig_verifier into their own projects.
#[cfg(test)]
mod ic_sig_verifier;

pub use identity::*;

#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct RPCRequest {
    pub method: String,
    pub params: ByteBuf, // params should be encoded in CBOR format
}

// result should be encoded in CBOR format
pub type RPCResponse = Result<ByteBuf, String>;