pub struct PublicInputs {
pub npub_hex: String,
pub merkle_root: String,
pub session_binding: Option<String>,
/* private fields */
}Expand description
Public inputs to the proof
Fields§
§npub_hex: StringThe npub (NOSTR public key) extracted from public outputs
merkle_root: StringMerkle root hash
session_binding: Option<String>Session binding (if present)
Implementations§
Source§impl PublicInputs
impl PublicInputs
Sourcepub fn from_json(json: &str) -> Result<Self, SdkError>
pub fn from_json(json: &str) -> Result<Self, SdkError>
Parse public inputs from snarkjs JSON format (array of decimal strings)
Sourcepub fn from_strings(strings: &[String]) -> Result<Self, SdkError>
pub fn from_strings(strings: &[String]) -> Result<Self, SdkError>
Parse from string array
Sourcepub fn npub_bech32(&self) -> Result<String, SdkError>
pub fn npub_bech32(&self) -> Result<String, SdkError>
Get the npub in bech32 format
Trait Implementations§
Source§impl Clone for PublicInputs
impl Clone for PublicInputs
Source§fn clone(&self) -> PublicInputs
fn clone(&self) -> PublicInputs
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PublicInputs
impl RefUnwindSafe for PublicInputs
impl Send for PublicInputs
impl Sync for PublicInputs
impl Unpin for PublicInputs
impl UnsafeUnpin for PublicInputs
impl UnwindSafe for PublicInputs
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more