pub struct JsNote {Show 17 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>,
    pub index: Option<u64>,
}Fields§
§scheme: String§protocol: NoteProtocol§version: NoteVersion§source_chain_id: String§target_chain_id: String§source_identifying_data: String§target_identifying_data: String§secrets: 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>§index: Option<u64>Implementations§
Source§impl JsNote
 
impl JsNote
Sourcepub fn deserialize(note: &str) -> Result<Self, OperationError>
 
pub fn deserialize(note: &str) -> Result<Self, OperationError>
Deseralize note from a string
pub fn mutate_index(&mut self, index: u64) -> Result<(), OperationError>
pub fn get_leaf_and_nullifier(&self) -> Result<JsLeaf, OperationError>
pub fn get_js_utxo(&self) -> Result<JsUtxo, OperationError>
Source§impl 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 target_identifying_data(&self) -> JsString
pub fn source_identifying_data(&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
pub fn js_mutate_index(&mut self, index: JsString) -> Result<(), JsValue>
pub fn default_utxo_note(note: &JsNote) -> Result<JsNote, OperationError>
pub fn get_utxo(&self) -> Result<JsUtxo, OperationError>
pub fn update_vanchor_utxo( &mut self, utxo: JsUtxo, ) -> Result<(), OperationError>
pub fn index(&self) -> JsString
Trait Implementations§
Source§impl FromWasmAbi for JsNote
 
impl FromWasmAbi for JsNote
Source§impl IntoWasmAbi for JsNote
 
impl IntoWasmAbi for JsNote
Source§impl LongRefFromWasmAbi for JsNote
 
impl LongRefFromWasmAbi for JsNote
Source§impl OptionFromWasmAbi for JsNote
 
impl OptionFromWasmAbi for JsNote
Source§impl OptionIntoWasmAbi for JsNote
 
impl OptionIntoWasmAbi for JsNote
Source§impl RefFromWasmAbi for JsNote
 
impl RefFromWasmAbi for JsNote
Source§impl RefMutFromWasmAbi for JsNote
 
impl RefMutFromWasmAbi for JsNote
Source§impl TryFromJsValue for JsNote
 
impl TryFromJsValue for JsNote
Source§impl VectorFromWasmAbi for JsNote
 
impl VectorFromWasmAbi for JsNote
Source§impl VectorIntoWasmAbi for JsNote
 
impl VectorIntoWasmAbi for JsNote
impl Eq for JsNote
impl StructuralPartialEq for JsNote
impl SupportsConstructor for JsNote
impl SupportsInstanceProperty for JsNote
impl SupportsStaticProperty for JsNote
Auto Trait Implementations§
impl Freeze for JsNote
impl RefUnwindSafe for JsNote
impl Send for JsNote
impl Sync for JsNote
impl Unpin for JsNote
impl UnwindSafe for JsNote
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<T> Instrument for T
 
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
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
Same as 
IntoWasmAbi::AbiSource§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.