pub struct JsNoteBuilder {Show 18 fields
pub protocol: Option<NoteProtocol>,
pub version: Option<NoteVersion>,
pub source_chain_id: Option<String>,
pub target_chain_id: Option<String>,
pub source_identifying_data: Option<String>,
pub target_identifying_data: Option<String>,
pub amount: Option<String>,
pub denomination: Option<u8>,
pub secrets: Option<Vec<Vec<u8>>>,
pub backend: Option<Backend>,
pub hash_function: Option<HashFunction>,
pub curve: Option<Curve>,
pub token_symbol: Option<String>,
pub exponentiation: Option<i8>,
pub width: Option<usize>,
pub index: Option<u64>,
pub private_key: Option<Vec<u8>>,
pub blinding: Option<Vec<u8>>,
}
Fields§
§protocol: Option<NoteProtocol>
§version: Option<NoteVersion>
§source_chain_id: Option<String>
§target_chain_id: Option<String>
§source_identifying_data: Option<String>
§target_identifying_data: Option<String>
§amount: Option<String>
§denomination: Option<u8>
§secrets: Option<Vec<Vec<u8>>>
§backend: Option<Backend>
§hash_function: Option<HashFunction>
§curve: Option<Curve>
§token_symbol: Option<String>
§exponentiation: Option<i8>
§width: Option<usize>
§index: Option<u64>
§private_key: Option<Vec<u8>>
§blinding: Option<Vec<u8>>
Implementations§
Source§impl JsNoteBuilder
impl JsNoteBuilder
pub fn new() -> Self
pub fn protocol(&mut self, protocol: Protocol) -> Result<(), JsValue>
pub fn version(&mut self, version: Version) -> Result<(), JsValue>
pub fn source_chain_id(&mut self, source_chain_id: JsString)
pub fn target_chain_id(&mut self, target_chain_id: JsString)
pub fn source_identifying_data(&mut self, source_identifying_data: JsString)
pub fn target_identifying_data(&mut self, target_identifying_data: JsString)
pub fn backend(&mut self, backend: BE)
pub fn hash_function(&mut self, hash_function: HF) -> Result<(), JsValue>
pub fn curve(&mut self, curve: WasmCurve) -> Result<(), JsValue>
pub fn token_symbol(&mut self, token_symbol: JsString)
pub fn amount(&mut self, amount: JsString)
pub fn denomination(&mut self, denomination: JsString) -> Result<(), JsValue>
pub fn index(&mut self, index: JsString) -> Result<(), JsValue>
pub fn exponentiation( &mut self, exponentiation: JsString, ) -> Result<(), JsValue>
pub fn width(&mut self, width: JsString) -> Result<(), JsValue>
pub fn set_secrets(&mut self, secrets: JsString) -> Result<(), JsValue>
pub fn set_private_key( &mut self, private_key: Uint8Array, ) -> Result<(), JsValue>
pub fn set_blinding(&mut self, blinding: Uint8Array) -> Result<(), JsValue>
pub fn build(self) -> Result<JsNote, JsValue>
Trait Implementations§
Source§impl Default for JsNoteBuilder
impl Default for JsNoteBuilder
Source§fn default() -> JsNoteBuilder
fn default() -> JsNoteBuilder
Returns the “default value” for a type. Read more
Source§impl From<JsNoteBuilder> for JsValue
impl From<JsNoteBuilder> for JsValue
Source§fn from(value: JsNoteBuilder) -> Self
fn from(value: JsNoteBuilder) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for JsNoteBuilder
impl FromWasmAbi for JsNoteBuilder
Source§impl IntoWasmAbi for JsNoteBuilder
impl IntoWasmAbi for JsNoteBuilder
Source§impl LongRefFromWasmAbi for JsNoteBuilder
impl LongRefFromWasmAbi for JsNoteBuilder
Source§impl OptionFromWasmAbi for JsNoteBuilder
impl OptionFromWasmAbi for JsNoteBuilder
Source§impl OptionIntoWasmAbi for JsNoteBuilder
impl OptionIntoWasmAbi for JsNoteBuilder
Source§impl RefFromWasmAbi for JsNoteBuilder
impl RefFromWasmAbi for JsNoteBuilder
Source§type Anchor = RcRef<JsNoteBuilder>
type Anchor = RcRef<JsNoteBuilder>
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.Source§impl RefMutFromWasmAbi for JsNoteBuilder
impl RefMutFromWasmAbi for JsNoteBuilder
Source§impl TryFromJsValue for JsNoteBuilder
impl TryFromJsValue for JsNoteBuilder
Source§impl VectorFromWasmAbi for JsNoteBuilder
impl VectorFromWasmAbi for JsNoteBuilder
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[JsNoteBuilder]>
Source§impl VectorIntoJsValue for JsNoteBuilder
impl VectorIntoJsValue for JsNoteBuilder
fn vector_into_jsvalue(vector: Box<[JsNoteBuilder]>) -> JsValue
Source§impl VectorIntoWasmAbi for JsNoteBuilder
impl VectorIntoWasmAbi for JsNoteBuilder
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsNoteBuilder]>) -> Self::Abi
Source§impl WasmDescribeVector for JsNoteBuilder
impl WasmDescribeVector for JsNoteBuilder
impl SupportsConstructor for JsNoteBuilder
impl SupportsInstanceProperty for JsNoteBuilder
impl SupportsStaticProperty for JsNoteBuilder
Auto Trait Implementations§
impl Freeze for JsNoteBuilder
impl RefUnwindSafe for JsNoteBuilder
impl Send for JsNoteBuilder
impl Sync for JsNoteBuilder
impl Unpin for JsNoteBuilder
impl UnwindSafe for JsNoteBuilder
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> 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::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
.