Struct rings_core::session::SessionSkBuilder
source · pub struct SessionSkBuilder { /* private fields */ }Expand description
SessionSkBuilder is used to build a SessionSk.
Firstly, you need to provide the account’s entity and type to SessionSkBuilder::new method.
Then you can call pack_session to get the session dump for signing.
After signing, you can call sig to set the signature back to builder.
Finally, you can call build to get the SessionSk.
Implementations§
source§impl SessionSkBuilder
impl SessionSkBuilder
sourcepub fn new(account_entity: String, account_type: String) -> SessionSkBuilder
pub fn new(account_entity: String, account_type: String) -> SessionSkBuilder
sourcepub fn validate_account(&self) -> bool
pub fn validate_account(&self) -> bool
This is a helper method to let user know if the account params is valid.
sourcepub fn unsigned_proof(&self) -> String
pub fn unsigned_proof(&self) -> String
Construct unsigned_info string for signing.
sourcepub fn set_session_sig(self, sig: Vec<u8>) -> Self
pub fn set_session_sig(self, sig: Vec<u8>) -> Self
Set the signature of session that signed by account.
Auto Trait Implementations§
impl Freeze for SessionSkBuilder
impl RefUnwindSafe for SessionSkBuilder
impl Send for SessionSkBuilder
impl Sync for SessionSkBuilder
impl Unpin for SessionSkBuilder
impl UnwindSafe for SessionSkBuilder
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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