pub struct Transaction(/* private fields */);
Implementations§
Source§impl Transaction
impl Transaction
pub fn new_session( builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams, ) -> Result<Transaction, String>
pub fn new_transfer( maybe_source: Option<URef>, target_account: &str, amount: &str, transaction_params: TransactionStrParams, maybe_id: Option<String>, ) -> Result<Transaction, String>
pub fn with_ttl(&self, ttl: &str, secret_key: Option<String>) -> Transaction
pub fn with_timestamp( &self, timestamp: &str, secret_key: Option<String>, ) -> Transaction
pub fn with_chain_name( &self, chain_name: &str, secret_key: Option<String>, ) -> Transaction
pub fn with_public_key( &self, public_key: PublicKey, secret_key: Option<String>, ) -> Transaction
pub fn with_account_hash( &self, account_hash: AccountHash, secret_key: Option<String>, ) -> Transaction
pub fn with_entry_point( &self, entry_point: &str, secret_key: Option<String>, ) -> Transaction
pub fn with_entity_hash( &self, hash: AddressableEntityHash, secret_key: Option<String>, ) -> Transaction
pub fn with_package_hash( &self, package_hash: PackageHash, secret_key: Option<String>, ) -> Transaction
pub fn with_transaction_bytes( &self, transaction_bytes: Bytes, is_install_upgrade: Option<bool>, secret_key: Option<String>, ) -> Transaction
pub fn with_secret_key(&self, secret_key: Option<String>) -> Transaction
pub fn verify(&self) -> bool
pub fn hash(&self) -> TransactionHash
pub fn expired(&self) -> bool
pub fn sign(&mut self, secret_key: &str) -> Transaction
pub fn is_native(&self) -> bool
pub fn is_standard_payment(&self) -> bool
pub fn add_signature_json_alias( &self, public_key: &str, signature: &str, ) -> Transaction
pub fn entry_point(&self) -> String
pub fn ttl(&self) -> String
pub fn timestamp(&self) -> String
pub fn size_estimate(&self) -> usize
pub fn chain_name(&self) -> String
pub fn initiator_addr(&self) -> String
pub fn pricing_mode(&self) -> PricingMode
pub fn payment_amount(&self) -> Option<u64>
pub fn additional_computation_factor(&self) -> u8
pub fn receipt(&self) -> Digest
pub fn gas_price_tolerance(&self) -> u8
pub fn account_hash(&self) -> AccountHash
Source§impl Transaction
impl Transaction
pub fn session_args(&self) -> RuntimeArgs
pub fn target(&self) -> Result<TransactionTarget, Box<SdkError>>
pub fn add_arg( &mut self, new_value_arg: String, secret_key: Option<String>, ) -> Transaction
pub fn to_json_string(&self) -> Result<String, Box<SdkError>>
pub fn from_json_string(json_str: &str) -> Result<Self, Box<SdkError>>
pub fn compute_approvals_hash(&self) -> Result<ApprovalsHash, Error>
pub fn approvals(&self) -> Vec<Approval>
pub fn expires(&self) -> Timestamp
pub fn signers(&self) -> Vec<AccountHash>
pub fn add_signature(&self, public_key: &str, signature: &str) -> Transaction
Trait Implementations§
Source§impl Clone for Transaction
impl Clone for Transaction
Source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Transaction
impl Debug for Transaction
Source§impl<'de> Deserialize<'de> for Transaction
impl<'de> Deserialize<'de> for Transaction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Deploy> for Transaction
impl From<Deploy> for Transaction
Source§impl From<Transaction> for JsValue
impl From<Transaction> for JsValue
Source§fn from(value: Transaction) -> Self
fn from(value: Transaction) -> Self
Converts to this type from the input type.
Source§impl From<Transaction> for Transaction
impl From<Transaction> for Transaction
Source§fn from(transaction: Transaction) -> Self
fn from(transaction: Transaction) -> Self
Converts to this type from the input type.
Source§impl From<Transaction> for Transaction
impl From<Transaction> for Transaction
Source§fn from(transaction: _Transaction) -> Self
fn from(transaction: _Transaction) -> Self
Converts to this type from the input type.
Source§impl From<TransactionV1> for Transaction
impl From<TransactionV1> for Transaction
Source§fn from(transaction: TransactionV1) -> Self
fn from(transaction: TransactionV1) -> Self
Converts to this type from the input type.
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 RefFromWasmAbi for Transaction
impl RefFromWasmAbi for Transaction
Source§type Anchor = RcRef<Transaction>
type Anchor = RcRef<Transaction>
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 Transaction
impl RefMutFromWasmAbi for Transaction
Source§impl Serialize for Transaction
impl Serialize 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 VectorIntoJsValue for Transaction
impl VectorIntoJsValue for Transaction
fn vector_into_jsvalue(vector: Box<[Transaction]>) -> JsValue
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
Auto Trait Implementations§
impl !Freeze for Transaction
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§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
.