Struct aleo_wasm::programs::proving_key::ProvingKey
source · pub struct ProvingKey(/* private fields */);
Expand description
Proving key for a function within an Aleo program
Implementations§
source§impl ProvingKey
impl ProvingKey
sourcepub fn is_bond_public_prover(&self) -> bool
pub fn is_bond_public_prover(&self) -> bool
Verify if the proving key is for the bond_public function
@example const provingKey = ProvingKey.fromBytes(“bond_public_proving_key.bin”); provingKey.isBondPublicProver() ? console.log(“Key verified”) : throw new Error(“Invalid key”);
@returns {boolean} returns true if the proving key is for the bond_public function, false if otherwise
sourcepub fn is_claim_unbond_public_prover(&self) -> bool
pub fn is_claim_unbond_public_prover(&self) -> bool
Verify if the proving key is for the claim_unbond function
@example const provingKey = ProvingKey.fromBytes(“claim_unbond_proving_key.bin”); provingKey.isClaimUnbondProver() ? console.log(“Key verified”) : throw new Error(“Invalid key”);
@returns {boolean} returns true if the proving key is for the claim_unbond function, false if otherwise
sourcepub fn is_fee_private_prover(&self) -> bool
pub fn is_fee_private_prover(&self) -> bool
Verify if the proving key is for the fee_private function
@example const provingKey = ProvingKey.fromBytes(“fee_private_proving_key.bin”); provingKey.isFeePrivateProver() ? console.log(“Key verified”) : throw new Error(“Invalid key”);
@returns {boolean} returns true if the proving key is for the fee_private function, false if otherwise
sourcepub fn is_fee_public_prover(&self) -> bool
pub fn is_fee_public_prover(&self) -> bool
Verify if the proving key is for the fee_public function
@example const provingKey = ProvingKey.fromBytes(“fee_public_proving_key.bin”); provingKey.isFeePublicProver() ? console.log(“Key verified”) : throw new Error(“Invalid key”);
@returns {boolean} returns true if the proving key is for the fee_public function, false if otherwise
sourcepub fn is_inclusion_prover(&self) -> bool
pub fn is_inclusion_prover(&self) -> bool
Verify if the proving key is for the inclusion function
@example const provingKey = ProvingKey.fromBytes(“inclusion_proving_key.bin”); provingKey.isInclusionProver() ? console.log(“Key verified”) : throw new Error(“Invalid key”);
@returns {boolean} returns true if the proving key is for the inclusion function, false if otherwise
sourcepub fn is_join_prover(&self) -> bool
pub fn is_join_prover(&self) -> bool
Verify if the proving key is for the join function
@example const provingKey = ProvingKey.fromBytes(“join_proving_key.bin”); provingKey.isJoinProver() ? console.log(“Key verified”) : throw new Error(“Invalid key”);
@returns {boolean} returns true if the proving key is for the join function, false if otherwise
sourcepub fn is_set_validator_state_prover(&self) -> bool
pub fn is_set_validator_state_prover(&self) -> bool
Verify if the proving key is for the set_validator_state function
@example const provingKey = ProvingKey.fromBytes(“set_validator_set_proving_key.bin”); provingKey.isSetValidatorStateProver() ? console.log(“Key verified”) : throw new Error(“Invalid key”);
@returns {boolean} returns true if the proving key is for the set_validator_state function, false if otherwise
sourcepub fn is_split_prover(&self) -> bool
pub fn is_split_prover(&self) -> bool
Verify if the proving key is for the split function
@example const provingKey = ProvingKey.fromBytes(“split_proving_key.bin”); provingKey.isSplitProver() ? console.log(“Key verified”) : throw new Error(“Invalid key”);
@returns {boolean} returns true if the proving key is for the split function, false if otherwise
sourcepub fn is_transfer_private_prover(&self) -> bool
pub fn is_transfer_private_prover(&self) -> bool
Verify if the proving key is for the transfer_private function
@example const provingKey = ProvingKey.fromBytes(“transfer_private_proving_key.bin”); provingKey.isTransferPrivateProver() ? console.log(“Key verified”) : throw new Error(“Invalid key”);
@returns {boolean} returns true if the proving key is for the transfer_private function, false if otherwise
sourcepub fn is_transfer_private_to_public_prover(&self) -> bool
pub fn is_transfer_private_to_public_prover(&self) -> bool
Verify if the proving key is for the transfer_private_to_public function
@example const provingKey = ProvingKey.fromBytes(“transfer_private_to_public_proving_key.bin”); provingKey.isTransferPrivateToPublicProver() ? console.log(“Key verified”) : throw new Error(“Invalid key”);
@returns {boolean} returns true if the proving key is for the transfer_private_to_public function, false if otherwise
sourcepub fn is_transfer_public_prover(&self) -> bool
pub fn is_transfer_public_prover(&self) -> bool
Verify if the proving key is for the transfer_public function
@example const provingKey = ProvingKey.fromBytes(“transfer_public_proving_key.bin”); provingKey.isTransferPublicProver() ? console.log(“Key verified”) : throw new Error(“Invalid key”);
@returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise
sourcepub fn is_transfer_public_to_private_prover(&self) -> bool
pub fn is_transfer_public_to_private_prover(&self) -> bool
Verify if the proving key is for the transfer_public_to_private function
@example const provingKey = ProvingKey.fromBytes(“transfer_public_to_private_proving_key.bin”); provingKey.isTransferPublicToPrivateProver() ? console.log(“Key verified”) : throw new Error(“Invalid key”);
@returns {boolean} returns true if the proving key is for the transfer_public_to_private function, false if otherwise
sourcepub fn is_unbond_delegator_as_validator_prover(&self) -> bool
pub fn is_unbond_delegator_as_validator_prover(&self) -> bool
Verify if the proving key is for the unbond_delegator_as_validator function
@example const provingKey = ProvingKey.fromBytes(“unbond_delegator_as_validator_proving_key.bin”); provingKey.isUnbondDelegatorAsValidatorProver() ? console.log(“Key verified”) : throw new Error(“Invalid key”);
@returns {boolean} returns true if the proving key is for the unbond_delegator_as_validator function, false if otherwise
sourcepub fn is_unbond_public_prover(&self) -> bool
pub fn is_unbond_public_prover(&self) -> bool
Verify if the proving key is for the unbond_delegator_as_delegator function
@example const provingKey = ProvingKey.fromBytes(“unbond_delegator_as_delegator_proving_key.bin”); provingKey.isUnbondDelegatorAsDelegatorProver() ? console.log(“Key verified”) : throw new Error(“Invalid key”);
@returns {boolean} returns true if the proving key is for the unbond_delegator_as_delegator function, false if otherwise
source§impl ProvingKey
impl ProvingKey
sourcepub fn checksum(&self) -> String
pub fn checksum(&self) -> String
Return the checksum of the proving key
@returns {string} Checksum of the proving key
sourcepub fn copy(&self) -> ProvingKey
pub fn copy(&self) -> ProvingKey
Create a copy of the proving key
@returns {ProvingKey} A copy of the proving key
sourcepub fn from_bytes(bytes: &[u8]) -> Result<ProvingKey, String>
pub fn from_bytes(bytes: &[u8]) -> Result<ProvingKey, String>
Construct a new proving key from a byte array
@param {Uint8Array} bytes Byte array representation of a proving key @returns {ProvingKey | Error}
sourcepub fn from_string(string: &str) -> Result<ProvingKey, String>
pub fn from_string(string: &str) -> Result<ProvingKey, String>
Create a proving key from string
@param {string | Error} String representation of the proving key
Methods from Deref<Target = ProvingKey<Testnet3>>§
Trait Implementations§
source§impl Clone for ProvingKey
impl Clone for ProvingKey
source§fn clone(&self) -> ProvingKey
fn clone(&self) -> ProvingKey
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ProvingKey
impl Debug for ProvingKey
source§impl Deref for ProvingKey
impl Deref for ProvingKey
source§impl From<ProvingKey<Testnet3>> for ProvingKey
impl From<ProvingKey<Testnet3>> for ProvingKey
source§fn from(proving_key: ProvingKey<Testnet3>) -> ProvingKey
fn from(proving_key: ProvingKey<Testnet3>) -> ProvingKey
source§impl From<ProvingKey> for JsValue
impl From<ProvingKey> for JsValue
source§fn from(value: ProvingKey) -> Self
fn from(value: ProvingKey) -> Self
source§impl From<ProvingKey> for ProvingKey<Testnet3>
impl From<ProvingKey> for ProvingKey<Testnet3>
source§fn from(proving_key: ProvingKey) -> ProvingKey<Testnet3>
fn from(proving_key: ProvingKey) -> ProvingKey<Testnet3>
source§impl FromWasmAbi for ProvingKey
impl FromWasmAbi for ProvingKey
source§impl IntoWasmAbi for ProvingKey
impl IntoWasmAbi for ProvingKey
source§impl LongRefFromWasmAbi for ProvingKey
impl LongRefFromWasmAbi for ProvingKey
source§impl OptionFromWasmAbi for ProvingKey
impl OptionFromWasmAbi for ProvingKey
source§impl OptionIntoWasmAbi for ProvingKey
impl OptionIntoWasmAbi for ProvingKey
source§impl PartialEq for ProvingKey
impl PartialEq for ProvingKey
source§impl RefFromWasmAbi for ProvingKey
impl RefFromWasmAbi for ProvingKey
§type Anchor = Ref<'static, ProvingKey>
type Anchor = Ref<'static, ProvingKey>
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 RefMutFromWasmAbi for ProvingKey
impl RefMutFromWasmAbi for ProvingKey
source§impl TryFromJsValue for ProvingKey
impl TryFromJsValue for ProvingKey
source§impl VectorFromWasmAbi for ProvingKey
impl VectorFromWasmAbi for ProvingKey
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[ProvingKey]>
source§impl VectorIntoWasmAbi for ProvingKey
impl VectorIntoWasmAbi for ProvingKey
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[ProvingKey]>) -> Self::Abi
source§impl WasmDescribeVector for ProvingKey
impl WasmDescribeVector for ProvingKey
Auto Trait Implementations§
impl RefUnwindSafe for ProvingKey
impl Send for ProvingKey
impl Sync for ProvingKey
impl Unpin for ProvingKey
impl UnwindSafe for ProvingKey
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
§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
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
.