pub struct JsMorpheusPrivateKind { /* private fields */ }
Expand description
Private keys for a given DID kind in the Morpheus subtree in a vault.
@see MorpheusPrivate.kind
Implementations§
Source§impl JsMorpheusPrivateKind
impl JsMorpheusPrivateKind
Sourcepub fn bip32_path(&self) -> String
pub fn bip32_path(&self) -> String
Accessor for the BIP32 path of the subtree with the given DID kinds.
Sourcepub fn count(&self) -> Result<u32, JsValue>
pub fn count(&self) -> Result<u32, JsValue>
Retrieves how many DIDs have already be generated of this kind.
Sourcepub fn neuter(&self) -> JsMorpheusPublicKind
pub fn neuter(&self) -> JsMorpheusPublicKind
Accessor for the public keys that belong to this subtree in a vault.
@see MorpheusPlugin.pub, MorpheusPublic.kind
Sourcepub fn key(&mut self, idx: i32) -> Result<JsMorpheusPrivateKey, JsValue>
pub fn key(&mut self, idx: i32) -> Result<JsMorpheusPrivateKey, JsValue>
Generates the {@link MorpheusPrivateKey} with the given index.
The result has methods to be converted into a {@link Did} or a {@link KeyId} or for authenticating actions signed by the {@link PrivateKey} that belongs to that key.
Sourcepub fn did(&mut self, idx: i32) -> Result<JsDid, JsValue>
pub fn did(&mut self, idx: i32) -> Result<JsDid, JsValue>
Generates the {@link Did} with the given index.
Sourcepub fn key_by_pk(
&self,
id: &JsMPublicKey,
) -> Result<JsMorpheusPrivateKey, JsValue>
pub fn key_by_pk( &self, id: &JsMPublicKey, ) -> Result<JsMorpheusPrivateKey, JsValue>
Finds the {@link MorpheusPrivateKey} that belongs to the given multicipher {@link PublicKey}. You can check the DID kind or index of the key or get the actual {@link PrivateKey} from the returned object.
An error will be thrown if the public key has never been used yet in this vault or is not this kind of DID.
Trait Implementations§
Source§impl From<JsMorpheusPrivateKind> for JsValue
impl From<JsMorpheusPrivateKind> for JsValue
Source§fn from(value: JsMorpheusPrivateKind) -> Self
fn from(value: JsMorpheusPrivateKind) -> Self
Source§impl From<PrivateKind> for JsMorpheusPrivateKind
impl From<PrivateKind> for JsMorpheusPrivateKind
Source§fn from(inner: PrivateKind) -> Self
fn from(inner: PrivateKind) -> Self
Source§impl FromWasmAbi for JsMorpheusPrivateKind
impl FromWasmAbi for JsMorpheusPrivateKind
Source§impl IntoWasmAbi for JsMorpheusPrivateKind
impl IntoWasmAbi for JsMorpheusPrivateKind
Source§impl RefFromWasmAbi for JsMorpheusPrivateKind
impl RefFromWasmAbi for JsMorpheusPrivateKind
Source§type Anchor = RcRef<JsMorpheusPrivateKind>
type Anchor = RcRef<JsMorpheusPrivateKind>
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 VectorFromWasmAbi for JsMorpheusPrivateKind
impl VectorFromWasmAbi for JsMorpheusPrivateKind
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[JsMorpheusPrivateKind]>
Source§impl VectorIntoJsValue for JsMorpheusPrivateKind
impl VectorIntoJsValue for JsMorpheusPrivateKind
fn vector_into_jsvalue(vector: Box<[JsMorpheusPrivateKind]>) -> JsValue
Source§impl VectorIntoWasmAbi for JsMorpheusPrivateKind
impl VectorIntoWasmAbi for JsMorpheusPrivateKind
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsMorpheusPrivateKind]>) -> Self::Abi
Source§impl WasmDescribeVector for JsMorpheusPrivateKind
impl WasmDescribeVector for JsMorpheusPrivateKind
Source§impl Wraps<PrivateKind> for JsMorpheusPrivateKind
impl Wraps<PrivateKind> for JsMorpheusPrivateKind
Source§fn inner(&self) -> &PrivateKind
fn inner(&self) -> &PrivateKind
Source§impl WrapsMut<PrivateKind> for JsMorpheusPrivateKind
impl WrapsMut<PrivateKind> for JsMorpheusPrivateKind
Source§fn inner_mut(&mut self) -> &mut PrivateKind
fn inner_mut(&mut self) -> &mut PrivateKind
impl SupportsConstructor for JsMorpheusPrivateKind
impl SupportsInstanceProperty for JsMorpheusPrivateKind
impl SupportsStaticProperty for JsMorpheusPrivateKind
Auto Trait Implementations§
impl Freeze for JsMorpheusPrivateKind
impl !RefUnwindSafe for JsMorpheusPrivateKind
impl !Send for JsMorpheusPrivateKind
impl !Sync for JsMorpheusPrivateKind
impl Unpin for JsMorpheusPrivateKind
impl !UnwindSafe for JsMorpheusPrivateKind
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> 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
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.