pub struct BuildRequestInput<'a> {
pub method: &'a str,
pub path: &'a str,
pub raw_query: &'a str,
pub canonical_body: &'a str,
pub nonce: &'a str,
pub context_id: &'a str,
pub timestamp: &'a str,
pub scope: Option<&'a [&'a str]>,
pub previous_proof: Option<&'a str>,
}Expand description
Input for high-level request proof building.
The client SDK is responsible for:
- Obtaining
nonceandcontext_idfrom the server - Canonicalizing the body (based on content type)
- Generating a current timestamp
The builder handles everything else: nonce validation, timestamp validation, binding normalization, body hashing, secret derivation, and proof computation.
Fields§
§method: &'a strHTTP method (e.g., “POST”, “GET”)
path: &'a strURL path without query string (e.g., “/api/transfer”)
raw_query: &'a strRaw query string without leading ? (e.g., “page=1&sort=name”)
canonical_body: &'a strCanonicalized body string (caller canonicalizes based on content type)
nonce: &'a strServer nonce (from context response)
context_id: &'a strContext ID (from context response)
timestamp: &'a strUnix timestamp as string (caller generates current time)
scope: Option<&'a [&'a str]>Optional: scope fields for scoped proof (e.g., &[“amount”, “recipient”])
previous_proof: Option<&'a str>Optional: previous proof hex for request chaining
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for BuildRequestInput<'a>
impl<'a> RefUnwindSafe for BuildRequestInput<'a>
impl<'a> Send for BuildRequestInput<'a>
impl<'a> Sync for BuildRequestInput<'a>
impl<'a> Unpin for BuildRequestInput<'a>
impl<'a> UnsafeUnpin for BuildRequestInput<'a>
impl<'a> UnwindSafe for BuildRequestInput<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more