Struct aleo_wasm::programs::transaction::Transaction
source · pub struct Transaction(/* private fields */);
Expand description
Webassembly Representation of an Aleo transaction
This object is created when generating an on-chain function deployment or execution and is the object that should be submitted to the Aleo Network in order to deploy or execute a function.
Implementations§
source§impl Transaction
impl Transaction
sourcepub fn from_string(transaction: &str) -> Result<Transaction, String>
pub fn from_string(transaction: &str) -> Result<Transaction, String>
Create a transaction from a string
@param {string} transaction String representation of a transaction @returns {Transaction | Error}
sourcepub fn to_string(&self) -> String
pub fn to_string(&self) -> String
Get the transaction as a string. If you want to submit this transaction to the Aleo Network
this function will create the string that should be submitted in the POST
data.
@returns {string} String representation of the transaction
sourcepub fn transaction_id(&self) -> String
pub fn transaction_id(&self) -> String
Get the id of the transaction. This is the merkle root of the transaction’s inclusion proof.
This value can be used to query the status of the transaction on the Aleo Network to see if it was successful. If successful, the transaction will be included in a block and this value can be used to lookup the transaction data on-chain.
@returns {string} Transaction id
sourcepub fn transaction_type(&self) -> String
pub fn transaction_type(&self) -> String
Get the type of the transaction (will return “deploy” or “execute”)
@returns {string} Transaction type
Trait Implementations§
source§impl Clone for Transaction
impl Clone for Transaction
source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Transaction
impl Debug for Transaction
source§impl From<Transaction<Testnet3>> for Transaction
impl From<Transaction<Testnet3>> for Transaction
source§fn from(transaction: Transaction<Testnet3>) -> Self
fn from(transaction: Transaction<Testnet3>) -> Self
source§impl From<Transaction> for JsValue
impl From<Transaction> for JsValue
source§fn from(value: Transaction) -> Self
fn from(value: Transaction) -> Self
source§impl From<Transaction> for Transaction<Testnet3>
impl From<Transaction> for Transaction<Testnet3>
source§fn from(transaction: Transaction) -> Self
fn from(transaction: Transaction) -> Self
source§impl FromStr for Transaction
impl FromStr for Transaction
source§impl FromWasmAbi for Transaction
impl FromWasmAbi for Transaction
source§impl IntoWasmAbi for Transaction
impl IntoWasmAbi for Transaction
source§impl LongRefFromWasmAbi for Transaction
impl LongRefFromWasmAbi for Transaction
source§impl OptionFromWasmAbi for Transaction
impl OptionFromWasmAbi for Transaction
source§impl OptionIntoWasmAbi for Transaction
impl OptionIntoWasmAbi for Transaction
source§impl PartialEq for Transaction
impl PartialEq for Transaction
source§fn eq(&self, other: &Transaction) -> bool
fn eq(&self, other: &Transaction) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl RefFromWasmAbi for Transaction
impl RefFromWasmAbi for Transaction
§type Anchor = Ref<'static, Transaction>
type Anchor = Ref<'static, Transaction>
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 Transaction
impl RefMutFromWasmAbi for Transaction
source§impl TryFromJsValue for Transaction
impl TryFromJsValue for Transaction
source§impl VectorFromWasmAbi for Transaction
impl VectorFromWasmAbi for Transaction
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Transaction]>
source§impl VectorIntoWasmAbi for Transaction
impl VectorIntoWasmAbi for Transaction
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Transaction]>) -> Self::Abi
source§impl WasmDescribeVector for Transaction
impl WasmDescribeVector for Transaction
impl Eq for Transaction
impl StructuralEq for Transaction
impl StructuralPartialEq for Transaction
Auto Trait Implementations§
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§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
.