pub struct HolderContext { /* private fields */ }Expand description
Holder-side context for generating holder identity keys.
Implementations§
Source§impl HolderContext
impl HolderContext
Sourcepub fn generate() -> HolderContext
pub fn generate() -> HolderContext
Generate a new holder context with fresh holder identity keys.
Sourcepub fn import_secret_key(secret_key: String) -> Result<HolderContext, JsError>
pub fn import_secret_key(secret_key: String) -> Result<HolderContext, JsError>
Import a holder context from a previously exported holder secret key.
Sourcepub fn export_secret_key(&self) -> String
pub fn export_secret_key(&self) -> String
Export this holder’s secret key for application-managed backup or restore.
Sourcepub fn public_key(&self) -> String
pub fn public_key(&self) -> String
Return the holder’s Nostr public key.
Create a signed holder authorization for an auxiliary subject key and selected credential.
Trait Implementations§
Source§impl Clone for HolderContext
impl Clone for HolderContext
Source§fn clone(&self) -> HolderContext
fn clone(&self) -> HolderContext
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 moreSource§impl From<HolderContext> for JsValue
impl From<HolderContext> for JsValue
Source§fn from(value: HolderContext) -> Self
fn from(value: HolderContext) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for HolderContext
impl FromWasmAbi for HolderContext
Source§impl IntoWasmAbi for HolderContext
impl IntoWasmAbi for HolderContext
Source§impl LongRefFromWasmAbi for HolderContext
impl LongRefFromWasmAbi for HolderContext
Source§type Abi = WasmPtr<WasmRefCell<HolderContext>>
type Abi = WasmPtr<WasmRefCell<HolderContext>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<HolderContext>
type Anchor = RcRef<HolderContext>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl OptionFromWasmAbi for HolderContext
impl OptionFromWasmAbi for HolderContext
Source§impl OptionIntoWasmAbi for HolderContext
impl OptionIntoWasmAbi for HolderContext
Source§impl RefFromWasmAbi for HolderContext
impl RefFromWasmAbi for HolderContext
Source§type Abi = WasmPtr<WasmRefCell<HolderContext>>
type Abi = WasmPtr<WasmRefCell<HolderContext>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<HolderContext>
type Anchor = RcRef<HolderContext>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for HolderContext
impl RefMutFromWasmAbi for HolderContext
Source§type Abi = WasmPtr<WasmRefCell<HolderContext>>
type Abi = WasmPtr<WasmRefCell<HolderContext>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<HolderContext>
type Anchor = RcRefMut<HolderContext>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl TryFromJsValue for HolderContext
impl TryFromJsValue for HolderContext
Source§impl VectorFromWasmAbi for HolderContext
impl VectorFromWasmAbi for HolderContext
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[HolderContext]>
Source§impl VectorIntoWasmAbi for HolderContext
impl VectorIntoWasmAbi for HolderContext
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[HolderContext]>) -> Self::Abi
Source§impl WasmDescribeVector for HolderContext
impl WasmDescribeVector for HolderContext
impl SupportsConstructor for HolderContext
impl SupportsInstanceProperty for HolderContext
impl SupportsStaticProperty for HolderContext
Auto Trait Implementations§
impl !Freeze for HolderContext
impl RefUnwindSafe for HolderContext
impl Send for HolderContext
impl Sync for HolderContext
impl Unpin for HolderContext
impl UnsafeUnpin for HolderContext
impl UnwindSafe for HolderContext
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.