pub struct CggmpProtocol { /* private fields */ }Expand description
CGGMP protocol.
Implementations§
Source§impl CggmpProtocol
impl CggmpProtocol
Sourcepub fn new(
options: SessionOptions,
key_share: KeyShare,
) -> Result<CggmpProtocol>
pub fn new( options: SessionOptions, key_share: KeyShare, ) -> Result<CggmpProtocol>
Create a CGGMP protocol.
Sourcepub fn verifying_key(&self) -> Vec<u8>
pub fn verifying_key(&self) -> Vec<u8>
Verifying key for this signer.
Sourcepub async fn dkg(
options: SessionOptions,
party: PartyOptions,
session_id_seed: Vec<u8>,
signer: Vec<u8>,
) -> Result<KeyShare>
pub async fn dkg( options: SessionOptions, party: PartyOptions, session_id_seed: Vec<u8>, signer: Vec<u8>, ) -> Result<KeyShare>
Distributed key generation.
Sourcepub async fn sign(
&self,
party: PartyOptions,
session_id_seed: Vec<u8>,
signer: Vec<u8>,
message: String,
) -> Result<RecoverableSignature>
pub async fn sign( &self, party: PartyOptions, session_id_seed: Vec<u8>, signer: Vec<u8>, message: String, ) -> Result<RecoverableSignature>
Sign a message.
Reshare key shares.
Sourcepub fn derive_bip32(&self, derivation_path: String) -> Result<KeyShare, JsError>
pub fn derive_bip32(&self, derivation_path: String) -> Result<KeyShare, JsError>
Generate a BIP32 derived child key.
Trait Implementations§
Source§impl FromNapiMutRef for CggmpProtocol
impl FromNapiMutRef for CggmpProtocol
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for CggmpProtocol
impl FromNapiRef for CggmpProtocol
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl FromNapiValue for &CggmpProtocol
impl FromNapiValue for &CggmpProtocol
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl FromNapiValue for &mut CggmpProtocol
impl FromNapiValue for &mut CggmpProtocol
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl JavaScriptClassExt for CggmpProtocol
impl JavaScriptClassExt for CggmpProtocol
fn into_instance<'scope>( self, env: &'scope Env, ) -> Result<ClassInstance<'scope, Self>>
fn into_reference(self, env: Env) -> Result<Reference<Self>>
fn instance_of<V: NapiRaw>(env: Env, value: V) -> Result<bool>
Source§impl ToNapiValue for CggmpProtocol
impl ToNapiValue for CggmpProtocol
Source§unsafe fn to_napi_value(env: napi_env, val: CggmpProtocol) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: CggmpProtocol) -> Result<napi_value>
Safety Read more
Source§impl TypeName for &CggmpProtocol
impl TypeName for &CggmpProtocol
Source§impl TypeName for &mut CggmpProtocol
impl TypeName for &mut CggmpProtocol
Source§impl TypeName for CggmpProtocol
impl TypeName for CggmpProtocol
Source§impl ValidateNapiValue for &CggmpProtocol
impl ValidateNapiValue for &CggmpProtocol
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &mut CggmpProtocol
impl ValidateNapiValue for &mut CggmpProtocol
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl Freeze for CggmpProtocol
impl RefUnwindSafe for CggmpProtocol
impl Send for CggmpProtocol
impl Sync for CggmpProtocol
impl Unpin for CggmpProtocol
impl UnwindSafe for CggmpProtocol
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