pub struct KeyPair { /* private fields */ }
Expand description
Key pair object containing both the function proving and verifying keys
Implementations§
source§impl KeyPair
impl KeyPair
sourcepub fn new(proving_key: ProvingKey, verifying_key: VerifyingKey) -> KeyPair
pub fn new(proving_key: ProvingKey, verifying_key: VerifyingKey) -> KeyPair
Create new key pair from proving and verifying keys
@param {ProvingKey} proving_key Proving key corresponding to a function in an Aleo program @param {VerifyingKey} verifying_key Verifying key corresponding to a function in an Aleo program @returns {KeyPair} Key pair object containing both the function proving and verifying keys
sourcepub fn proving_key(&mut self) -> Result<ProvingKey, String>
pub fn proving_key(&mut self) -> Result<ProvingKey, String>
Get the proving key. This method will remove the proving key from the key pair
@returns {ProvingKey | Error}
sourcepub fn verifying_key(&mut self) -> Result<VerifyingKey, String>
pub fn verifying_key(&mut self) -> Result<VerifyingKey, String>
Get the verifying key. This method will remove the verifying key from the key pair
@returns {VerifyingKey | Error}
Trait Implementations§
source§impl FromWasmAbi for KeyPair
impl FromWasmAbi for KeyPair
source§impl IntoWasmAbi for KeyPair
impl IntoWasmAbi for KeyPair
source§impl LongRefFromWasmAbi for KeyPair
impl LongRefFromWasmAbi for KeyPair
source§impl OptionFromWasmAbi for KeyPair
impl OptionFromWasmAbi for KeyPair
source§impl OptionIntoWasmAbi for KeyPair
impl OptionIntoWasmAbi for KeyPair
source§impl RefFromWasmAbi for KeyPair
impl RefFromWasmAbi for KeyPair
source§impl RefMutFromWasmAbi for KeyPair
impl RefMutFromWasmAbi for KeyPair
source§impl TryFromJsValue for KeyPair
impl TryFromJsValue for KeyPair
source§impl VectorFromWasmAbi for KeyPair
impl VectorFromWasmAbi for KeyPair
source§impl VectorIntoWasmAbi for KeyPair
impl VectorIntoWasmAbi for KeyPair
Auto Trait Implementations§
impl RefUnwindSafe for KeyPair
impl Send for KeyPair
impl Sync for KeyPair
impl Unpin for KeyPair
impl UnwindSafe for KeyPair
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
§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>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere T: IntoWasmAbi,
§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
.