pub struct JsMorpheusOperationSigner { /* private fields */ }
Expand description
Builder object for collecting SSI operations into a bundle signed by a single multicipher {@link PrivateKey} that has update rights on all DIDs being altered in those operations.
Implementations§
Source§impl JsMorpheusOperationSigner
impl JsMorpheusOperationSigner
Sourcepub fn new() -> JsMorpheusOperationSigner
pub fn new() -> JsMorpheusOperationSigner
Creates a new {@link MorpheusOperationSigner}.
Sourcepub fn add(&mut self, signable: &JsMorpheusSignableOperation)
pub fn add(&mut self, signable: &JsMorpheusSignableOperation)
Adds a single SSI operation into the bundle that will be signed.
@see sign, sign_with_key, MorpheusOperationBuilder, MorpheusSignableOperation.new
Sourcepub fn sign_with_key(
&self,
private_key: &JsMPrivateKey,
) -> Result<JsMorpheusSignedOperation, JsValue>
pub fn sign_with_key( &self, private_key: &JsMPrivateKey, ) -> Result<JsMorpheusSignedOperation, JsValue>
Sign the bundle of SSI operations with the provided {@link PrivateKey}.
Returns a {@link MorpheusSignedOperation} that can be provided to {@link MorpheusAssetBuilder.addSigned}.
Sourcepub fn sign(
&self,
public_key: JsMPublicKey,
morpheus_private: &JsMorpheusPrivate,
) -> Result<JsMorpheusSignedOperation, JsValue>
pub fn sign( &self, public_key: JsMPublicKey, morpheus_private: &JsMorpheusPrivate, ) -> Result<JsMorpheusSignedOperation, JsValue>
A convenience method to sign the bundle of SSI operations with a {@link PublicKey} from the vault.
Returns a {@link MorpheusSignedOperation} that can be provided to {@link MorpheusAssetBuilder.addSigned}.
@see MorpheusPrivate, MorpheusPrivate.key_by_pk
Sourcepub fn sign_with_id(
&self,
key_id: JsMKeyId,
morpheus_private: &JsMorpheusPrivate,
) -> Result<JsMorpheusSignedOperation, JsValue>
pub fn sign_with_id( &self, key_id: JsMKeyId, morpheus_private: &JsMorpheusPrivate, ) -> Result<JsMorpheusSignedOperation, JsValue>
A convenience method to sign the bundle of SSI operations with a {@link KeyId} from the vault.
Returns a {@link MorpheusSignedOperation} that can be provided to {@link MorpheusAssetBuilder.addSigned}.
@see MorpheusPrivate, MorpheusPrivate.key_by_id
Trait Implementations§
Source§impl From<JsMorpheusOperationSigner> for JsValue
impl From<JsMorpheusOperationSigner> for JsValue
Source§fn from(value: JsMorpheusOperationSigner) -> Self
fn from(value: JsMorpheusOperationSigner) -> Self
Source§impl RefFromWasmAbi for JsMorpheusOperationSigner
impl RefFromWasmAbi for JsMorpheusOperationSigner
Source§type Anchor = RcRef<JsMorpheusOperationSigner>
type Anchor = RcRef<JsMorpheusOperationSigner>
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 JsMorpheusOperationSigner
impl VectorFromWasmAbi for JsMorpheusOperationSigner
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[JsMorpheusOperationSigner]>
Source§impl VectorIntoJsValue for JsMorpheusOperationSigner
impl VectorIntoJsValue for JsMorpheusOperationSigner
fn vector_into_jsvalue(vector: Box<[JsMorpheusOperationSigner]>) -> JsValue
Source§impl VectorIntoWasmAbi for JsMorpheusOperationSigner
impl VectorIntoWasmAbi for JsMorpheusOperationSigner
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsMorpheusOperationSigner]>) -> Self::Abi
Source§impl WasmDescribeVector for JsMorpheusOperationSigner
impl WasmDescribeVector for JsMorpheusOperationSigner
impl SupportsConstructor for JsMorpheusOperationSigner
impl SupportsInstanceProperty for JsMorpheusOperationSigner
impl SupportsStaticProperty for JsMorpheusOperationSigner
Auto Trait Implementations§
impl Freeze for JsMorpheusOperationSigner
impl RefUnwindSafe for JsMorpheusOperationSigner
impl Send for JsMorpheusOperationSigner
impl Sync for JsMorpheusOperationSigner
impl Unpin for JsMorpheusOperationSigner
impl UnwindSafe for JsMorpheusOperationSigner
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
.