pub struct RequestItem {
pub identifier: String,
pub issuer_schema_id: FieldElement,
pub signal: Option<String>,
pub genesis_issued_at_min: Option<u64>,
pub session_id: Option<FieldElement>,
}Expand description
Per-credential request payload
Fields§
§identifier: StringAn RP-defined identifier for this request item which can be used to match against constraints and responses.
Example: orb, document.
issuer_schema_id: FieldElementThe specific credential being requested as registered in the CredentialIssuerSchemaRegistry.
Serialized as hex string in JSON.
signal: Option<String>Optional RP-defined signal that will be bound into the proof.
When present, the authenticator hashes this via signal_hash
and commits it into the proof circuit so the RP can tie the proof to a
particular action.
genesis_issued_at_min: Option<u64>An optional constraint on the minimum genesis issued at timestamp on the used credential.
If present, the proof will include a constraint that the credential’s genesis issued at timestamp is greater than or equal to this value. This is useful for migration from previous protocol versions.
session_id: Option<FieldElement>If provided, a Session Proof will be generated instead of a Uniqueness Proof.
The proof will only be valid if the session ID is meant for this context and this particular World ID holder.
Implementations§
Source§impl RequestItem
impl RequestItem
Sourcepub const fn new(
identifier: String,
issuer_schema_id: FieldElement,
signal: Option<String>,
genesis_issued_at_min: Option<u64>,
session_id: Option<FieldElement>,
) -> Self
pub const fn new( identifier: String, issuer_schema_id: FieldElement, signal: Option<String>, genesis_issued_at_min: Option<u64>, session_id: Option<FieldElement>, ) -> Self
Create a new request item with the given identifier, issuer schema ID and optional signal.
Sourcepub fn signal_hash(&self) -> FieldElement
pub fn signal_hash(&self) -> FieldElement
Get the signal hash for the request item.
Trait Implementations§
Source§impl Clone for RequestItem
impl Clone for RequestItem
Source§fn clone(&self) -> RequestItem
fn clone(&self) -> RequestItem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RequestItem
impl Debug for RequestItem
Source§impl<'de> Deserialize<'de> for RequestItem
impl<'de> Deserialize<'de> for RequestItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for RequestItem
impl PartialEq for RequestItem
Source§impl Serialize for RequestItem
impl Serialize for RequestItem
impl Eq for RequestItem
impl StructuralPartialEq for RequestItem
Auto Trait Implementations§
impl Freeze for RequestItem
impl RefUnwindSafe for RequestItem
impl Send for RequestItem
impl Sync for RequestItem
impl Unpin for RequestItem
impl UnwindSafe for RequestItem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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