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 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 RefUnwindSafe for SessionSkBuilder
impl Send for SessionSkBuilder
impl Sync for SessionSkBuilder
impl Unpin for SessionSkBuilder
impl UnwindSafe for SessionSkBuilder
Blanket Implementations§
§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere T: 'a,
§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