pub struct JsMorpheusTxBuilder {}
Expand description
Builder for SSI Hydra transactions.
Implementations§
Source§impl JsMorpheusTxBuilder
impl JsMorpheusTxBuilder
Sourcepub fn build(
network_name: &str,
morpheus_asset: JsValue,
sender_pubkey: &JsSecpPublicKey,
nonce: u64,
vendor_field: Option<String>,
manual_fee: Option<u64>,
) -> Result<JsValue, JsValue>
pub fn build( network_name: &str, morpheus_asset: JsValue, sender_pubkey: &JsSecpPublicKey, nonce: u64, vendor_field: Option<String>, manual_fee: Option<u64>, ) -> Result<JsValue, JsValue>
Creates an unsigned SSI transaction on a given network from the {@link IMorpheusAsset}.
The nonce of the sender needs to be known in advance and the next transaction must be 1 above the one of the last transaction made by the sender on-chain.
Vendor field is a public memo attached to the transaction. The fee can be manually overriden, or the defaults will be calculated based on the size of the serialized transaction size and some offset based on the transaction type.
Trait Implementations§
Source§impl From<JsMorpheusTxBuilder> for JsValue
impl From<JsMorpheusTxBuilder> for JsValue
Source§fn from(value: JsMorpheusTxBuilder) -> Self
fn from(value: JsMorpheusTxBuilder) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for JsMorpheusTxBuilder
impl FromWasmAbi for JsMorpheusTxBuilder
Source§impl IntoWasmAbi for JsMorpheusTxBuilder
impl IntoWasmAbi for JsMorpheusTxBuilder
Source§impl RefFromWasmAbi for JsMorpheusTxBuilder
impl RefFromWasmAbi for JsMorpheusTxBuilder
Source§type Anchor = RcRef<JsMorpheusTxBuilder>
type Anchor = RcRef<JsMorpheusTxBuilder>
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 TryFromJsValue for JsMorpheusTxBuilder
impl TryFromJsValue for JsMorpheusTxBuilder
Source§impl VectorFromWasmAbi for JsMorpheusTxBuilder
impl VectorFromWasmAbi for JsMorpheusTxBuilder
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[JsMorpheusTxBuilder]>
Source§impl VectorIntoJsValue for JsMorpheusTxBuilder
impl VectorIntoJsValue for JsMorpheusTxBuilder
fn vector_into_jsvalue(vector: Box<[JsMorpheusTxBuilder]>) -> JsValue
Source§impl VectorIntoWasmAbi for JsMorpheusTxBuilder
impl VectorIntoWasmAbi for JsMorpheusTxBuilder
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsMorpheusTxBuilder]>) -> Self::Abi
Source§impl WasmDescribeVector for JsMorpheusTxBuilder
impl WasmDescribeVector for JsMorpheusTxBuilder
impl SupportsConstructor for JsMorpheusTxBuilder
impl SupportsInstanceProperty for JsMorpheusTxBuilder
impl SupportsStaticProperty for JsMorpheusTxBuilder
Auto Trait Implementations§
impl Freeze for JsMorpheusTxBuilder
impl RefUnwindSafe for JsMorpheusTxBuilder
impl Send for JsMorpheusTxBuilder
impl Sync for JsMorpheusTxBuilder
impl Unpin for JsMorpheusTxBuilder
impl UnwindSafe for JsMorpheusTxBuilder
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> 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
.