pub struct AuthenticatedParams<'a> { /* private fields */ }Implementations§
Source§impl<'a> AuthenticatedParams<'a>
impl<'a> AuthenticatedParams<'a>
Sourcepub fn prepare(
keypair: &Keypair,
id: &Id<'_>,
method: &str,
params: Option<Cow<'a, RawValue>>,
now: u64,
) -> Self
pub fn prepare( keypair: &Keypair, id: &Id<'_>, method: &str, params: Option<Cow<'a, RawValue>>, now: u64, ) -> Self
Prepare authenticated params at a given timestamp.
Sourcepub fn prepare_now(
keypair: &Keypair,
id: &Id<'a>,
method: &'a str,
params: Option<Cow<'a, RawValue>>,
) -> Result<Self, Error>
pub fn prepare_now( keypair: &Keypair, id: &Id<'a>, method: &'a str, params: Option<Cow<'a, RawValue>>, ) -> Result<Self, Error>
Prepare authenticated params using the current SystemTime.
§Errors
This function will return an error if current timpestamp generation fails.
Sourcepub fn verify<VT: VerifyTimestamp>(
self,
id: &Id<'_>,
method: &str,
verify_timestamp: &VT,
) -> Result<VerifiedParams<'a>, Error>
pub fn verify<VT: VerifyTimestamp>( self, id: &Id<'_>, method: &str, verify_timestamp: &VT, ) -> Result<VerifiedParams<'a>, Error>
Verify authenticated params at a given timestamp.
§Errors
This function will return an error if the signature or timestamp verification fails.
Trait Implementations§
Source§impl<'a> Clone for AuthenticatedParams<'a>
impl<'a> Clone for AuthenticatedParams<'a>
Source§fn clone(&self) -> AuthenticatedParams<'a>
fn clone(&self) -> AuthenticatedParams<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for AuthenticatedParams<'a>
impl<'a> Debug for AuthenticatedParams<'a>
Source§impl<'de, 'a> Deserialize<'de> for AuthenticatedParams<'a>
impl<'de, 'a> Deserialize<'de> for AuthenticatedParams<'a>
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> Serialize for AuthenticatedParams<'a>
impl<'a> Serialize for AuthenticatedParams<'a>
Source§impl ToRpcParams for AuthenticatedParams<'_>
impl ToRpcParams for AuthenticatedParams<'_>
Auto Trait Implementations§
impl<'a> Freeze for AuthenticatedParams<'a>
impl<'a> RefUnwindSafe for AuthenticatedParams<'a>
impl<'a> Send for AuthenticatedParams<'a>
impl<'a> Sync for AuthenticatedParams<'a>
impl<'a> Unpin for AuthenticatedParams<'a>
impl<'a> UnsafeUnpin for AuthenticatedParams<'a>
impl<'a> UnwindSafe for AuthenticatedParams<'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