pub struct JsDid { /* private fields */ }
Expand description
An object representing a valid DID. This identifier can be used to look up a DID document on multiple blockchains. Without any on-chain SSI transactions, there will be a single key that can update and impersonate the DID, which has the default key identifier.
@see defaultKeyId
Implementations§
Source§impl JsDid
impl JsDid
Sourcepub fn from_key_id(key_id: &JsMKeyId) -> JsDid
pub fn from_key_id(key_id: &JsMKeyId) -> JsDid
Creates a DID from a multicipher {@KeyId}, so the default key identifier of the DID will match that.
@see defaultKeyId
Sourcepub fn default_key_id(&self) -> JsMKeyId
pub fn default_key_id(&self) -> JsMKeyId
Returns the default key identifier for a DID that has update and impersonation rights unless the DID document was modified on chain.
Trait Implementations§
Source§impl FromWasmAbi for JsDid
impl FromWasmAbi for JsDid
Source§impl IntoWasmAbi for JsDid
impl IntoWasmAbi for JsDid
Source§impl LongRefFromWasmAbi for JsDid
impl LongRefFromWasmAbi for JsDid
Source§impl OptionFromWasmAbi for JsDid
impl OptionFromWasmAbi for JsDid
Source§impl OptionIntoWasmAbi for JsDid
impl OptionIntoWasmAbi for JsDid
Source§impl RefFromWasmAbi for JsDid
impl RefFromWasmAbi for JsDid
Source§type Anchor = RcRef<JsDid>
type Anchor = RcRef<JsDid>
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§unsafe fn ref_from_abi(
js: <JsDid as RefFromWasmAbi>::Abi,
) -> <JsDid as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <JsDid as RefFromWasmAbi>::Abi, ) -> <JsDid as RefFromWasmAbi>::Anchor
Source§impl RefMutFromWasmAbi for JsDid
impl RefMutFromWasmAbi for JsDid
Source§impl TryFromJsValue for JsDid
impl TryFromJsValue for JsDid
Source§impl VectorFromWasmAbi for JsDid
impl VectorFromWasmAbi for JsDid
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: <JsDid as VectorFromWasmAbi>::Abi) -> Box<[JsDid]>
Source§impl VectorIntoWasmAbi for JsDid
impl VectorIntoWasmAbi for JsDid
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsDid]>) -> <JsDid as VectorIntoWasmAbi>::Abi
Auto Trait Implementations§
impl Freeze for JsDid
impl RefUnwindSafe for JsDid
impl Send for JsDid
impl Sync for JsDid
impl Unpin for JsDid
impl UnwindSafe for JsDid
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> 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::Abi
Source§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
.