Struct wasm_utils::note::JsNote
source · [−]pub struct JsNote {Show 16 fields
pub scheme: String,
pub protocol: NoteProtocol,
pub version: NoteVersion,
pub source_chain_id: String,
pub target_chain_id: String,
pub source_identifying_data: String,
pub target_identifying_data: String,
pub secrets: Vec<Vec<u8>>,
pub curve: Option<Curve>,
pub exponentiation: Option<i8>,
pub width: Option<usize>,
pub token_symbol: Option<String>,
pub amount: Option<String>,
pub denomination: Option<u8>,
pub backend: Option<Backend>,
pub hash_function: Option<HashFunction>,
}Fields
scheme: Stringprotocol: NoteProtocolversion: NoteVersionsource_chain_id: Stringtarget_chain_id: Stringsource_identifying_data: Stringtarget_identifying_data: Stringsecrets: Vec<Vec<u8>>mixer related items
curve: Option<Curve>Misc - zkp related items
exponentiation: Option<i8>width: Option<usize>token_symbol: Option<String>amount: Option<String>denomination: Option<u8>backend: Option<Backend>hash_function: Option<HashFunction>Implementations
sourceimpl JsNote
impl JsNote
sourcepub fn deserialize(note: &str) -> Result<Self, OpStatusCode>
pub fn deserialize(note: &str) -> Result<Self, OpStatusCode>
Deseralize note from a string
pub fn get_leaf_and_nullifier(&self) -> Result<Leaf, OperationError>
sourceimpl JsNote
impl JsNote
pub fn new(builder: JsNoteBuilder) -> Result<JsNote, JsValue>
pub fn js_deserialize(note: JsString) -> Result<JsNote, JsValue>
pub fn get_leaf_commitment(&self) -> Result<Uint8Array, JsValue>
pub fn serialize(&self) -> JsString
pub fn protocol(&self) -> Protocol
pub fn version(&self) -> Version
pub fn target_chain_id(&self) -> JsString
pub fn source_chain_id(&self) -> JsString
pub fn backend(&self) -> BE
pub fn hash_function(&self) -> JsString
pub fn curve(&self) -> WasmCurve
pub fn secrets(&self) -> JsString
pub fn token_symbol(&self) -> JsString
pub fn amount(&self) -> JsString
pub fn denomination(&self) -> JsString
pub fn width(&self) -> JsString
pub fn exponentiation(&self) -> JsString
Trait Implementations
sourceimpl FromWasmAbi for JsNote
impl FromWasmAbi for JsNote
sourceimpl IntoWasmAbi for JsNote
impl IntoWasmAbi for JsNote
sourceimpl OptionFromWasmAbi for JsNote
impl OptionFromWasmAbi for JsNote
sourceimpl OptionIntoWasmAbi for JsNote
impl OptionIntoWasmAbi for JsNote
sourceimpl RefFromWasmAbi for JsNote
impl RefFromWasmAbi for JsNote
type Anchor = Ref<'static, JsNote>
type Anchor = Ref<'static, JsNote>
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. Read more
sourceunsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
Recover a Self::Anchor from Self::Abi. Read more
sourceimpl RefMutFromWasmAbi for JsNote
impl RefMutFromWasmAbi for JsNote
impl Eq for JsNote
impl StructuralEq for JsNote
impl StructuralPartialEq for JsNote
Auto Trait Implementations
impl RefUnwindSafe for JsNote
impl Send for JsNote
impl Sync for JsNote
impl Unpin for JsNote
impl UnwindSafe for JsNote
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ReturnWasmAbi for T where
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for T where
T: IntoWasmAbi,
type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
sourcefn 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. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more