mirror of
https://github.com/tlsnotary/tlsn-js.git
synced 2026-02-19 11:55:09 -05:00
* WIP: preparing for alpha5 release * Put version number in notary url * chore: updating deps for alpha-5 release * refactor: updated prover and request options for alpha-5 * chore: adding tracing crate back * feature: max_sent_data set to the length of the request as per sinu --------- Co-authored-by: Tanner Shaw <traumaaa@gmail.com>
30 lines
997 B
Rust
30 lines
997 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
/// Response object of the /session API
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct NotarizationSessionResponse {
|
|
/// Unique session id that is generated by notary and shared to prover
|
|
pub session_id: String,
|
|
}
|
|
|
|
/// Request object of the /session API
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct NotarizationSessionRequest {
|
|
pub client_type: ClientType,
|
|
/// Maximum number of bytes that can be sent in bytes.
|
|
pub max_sent_data: Option<usize>,
|
|
/// Maximum number of bytes that can be received in bytes.
|
|
pub max_recv_data: Option<usize>,
|
|
}
|
|
|
|
/// Types of client that the prover is using
|
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
|
pub enum ClientType {
|
|
/// Client that has access to the transport layer
|
|
Tcp,
|
|
/// Client that cannot directly access transport layer, e.g. browser extension
|
|
Websocket,
|
|
}
|