pub struct TransactionBody(/* private fields */);Implementations§
Source§impl TransactionBody
impl TransactionBody
Sourcepub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes
- This type type supports encoding preservation so this will preserve round-trip CBOR formats.
- If created from scratch the CBOR will be canonical.
Sourcepub fn to_canonical_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_canonical_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes using canonical CBOR encodings
Sourcepub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<TransactionBody, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<TransactionBody, JsError>
- Create this type from CBOR bytes
Sourcepub fn to_cbor_hex(&self) -> String
pub fn to_cbor_hex(&self) -> String
- Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
- This type type supports encoding preservation so this will preserve round-trip CBOR formats.
- If created from scratch the CBOR will be canonical.
Sourcepub fn to_canonical_cbor_hex(&self) -> String
pub fn to_canonical_cbor_hex(&self) -> String
- Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
Sourcepub fn from_cbor_hex(cbor_bytes: &str) -> Result<TransactionBody, JsError>
pub fn from_cbor_hex(cbor_bytes: &str) -> Result<TransactionBody, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
Source§impl TransactionBody
impl TransactionBody
pub fn inputs(&self) -> SetTransactionInput
pub fn outputs(&self) -> TransactionOutputList
pub fn fee(&self) -> Coin
pub fn set_ttl(&mut self, ttl: u64)
pub fn ttl(&self) -> Option<u64>
pub fn set_certs(&mut self, certs: &NonemptySetCertificate)
pub fn certs(&self) -> Option<NonemptySetCertificate>
pub fn set_withdrawals(&mut self, withdrawals: &Withdrawals)
pub fn withdrawals(&self) -> Option<Withdrawals>
pub fn set_auxiliary_data_hash( &mut self, auxiliary_data_hash: &AuxiliaryDataHash, )
pub fn auxiliary_data_hash(&self) -> Option<AuxiliaryDataHash>
pub fn set_validity_interval_start(&mut self, validity_interval_start: u64)
pub fn validity_interval_start(&self) -> Option<u64>
pub fn set_mint(&mut self, mint: &Mint)
pub fn mint(&self) -> Option<Mint>
pub fn set_script_data_hash(&mut self, script_data_hash: &ScriptDataHash)
pub fn script_data_hash(&self) -> Option<ScriptDataHash>
pub fn set_collateral_inputs( &mut self, collateral_inputs: &NonemptySetTransactionInput, )
pub fn collateral_inputs(&self) -> Option<NonemptySetTransactionInput>
pub fn set_required_signers(&mut self, required_signers: &RequiredSigners)
pub fn required_signers(&self) -> Option<RequiredSigners>
pub fn set_network_id(&mut self, network_id: &NetworkId)
pub fn network_id(&self) -> Option<NetworkId>
pub fn set_collateral_return(&mut self, collateral_return: &TransactionOutput)
pub fn collateral_return(&self) -> Option<TransactionOutput>
pub fn set_total_collateral(&mut self, total_collateral: Coin)
pub fn total_collateral(&self) -> Option<Coin>
pub fn set_reference_inputs( &mut self, reference_inputs: &NonemptySetTransactionInput, )
pub fn reference_inputs(&self) -> Option<NonemptySetTransactionInput>
pub fn set_voting_procedures(&mut self, voting_procedures: &VotingProcedures)
pub fn voting_procedures(&self) -> Option<VotingProcedures>
pub fn set_proposal_procedures( &mut self, proposal_procedures: &NonemptySetProposalProcedure, )
pub fn proposal_procedures(&self) -> Option<NonemptySetProposalProcedure>
pub fn set_current_treasury_value(&mut self, current_treasury_value: Coin)
pub fn current_treasury_value(&self) -> Option<Coin>
pub fn set_donation(&mut self, donation: PositiveCoin)
pub fn donation(&self) -> Option<PositiveCoin>
pub fn new( inputs: &SetTransactionInput, outputs: &TransactionOutputList, fee: Coin, ) -> Self
Trait Implementations§
Source§impl AsRef<TransactionBody> for TransactionBody
impl AsRef<TransactionBody> for TransactionBody
Source§fn as_ref(&self) -> &TransactionBody
fn as_ref(&self) -> &TransactionBody
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for TransactionBody
impl Clone for TransactionBody
Source§fn clone(&self) -> TransactionBody
fn clone(&self) -> TransactionBody
Returns a duplicate 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 TransactionBody
impl Debug for TransactionBody
Source§impl From<TransactionBody> for JsValue
impl From<TransactionBody> for JsValue
Source§fn from(value: TransactionBody) -> Self
fn from(value: TransactionBody) -> Self
Converts to this type from the input type.
Source§impl From<TransactionBody> for TransactionBody
impl From<TransactionBody> for TransactionBody
Source§fn from(native: TransactionBody) -> Self
fn from(native: TransactionBody) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for TransactionBody
impl FromWasmAbi for TransactionBody
Source§impl Into<TransactionBody> for TransactionBody
impl Into<TransactionBody> for TransactionBody
Source§fn into(self) -> TransactionBody
fn into(self) -> TransactionBody
Converts this type into the (usually inferred) input type.
Source§impl IntoWasmAbi for TransactionBody
impl IntoWasmAbi for TransactionBody
Source§impl LongRefFromWasmAbi for TransactionBody
impl LongRefFromWasmAbi for TransactionBody
Source§impl OptionFromWasmAbi for TransactionBody
impl OptionFromWasmAbi for TransactionBody
Source§impl OptionIntoWasmAbi for TransactionBody
impl OptionIntoWasmAbi for TransactionBody
Source§impl RefFromWasmAbi for TransactionBody
impl RefFromWasmAbi for TransactionBody
Source§type Anchor = RcRef<TransactionBody>
type Anchor = RcRef<TransactionBody>
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 TransactionBody
impl RefMutFromWasmAbi for TransactionBody
Source§impl TryFromJsValue for TransactionBody
impl TryFromJsValue for TransactionBody
Source§impl VectorFromWasmAbi for TransactionBody
impl VectorFromWasmAbi for TransactionBody
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[TransactionBody]>
Source§impl VectorIntoJsValue for TransactionBody
impl VectorIntoJsValue for TransactionBody
fn vector_into_jsvalue(vector: Box<[TransactionBody]>) -> JsValue
Source§impl VectorIntoWasmAbi for TransactionBody
impl VectorIntoWasmAbi for TransactionBody
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[TransactionBody]>) -> Self::Abi
Source§impl WasmDescribeVector for TransactionBody
impl WasmDescribeVector for TransactionBody
impl SupportsConstructor for TransactionBody
impl SupportsInstanceProperty for TransactionBody
impl SupportsStaticProperty for TransactionBody
Auto Trait Implementations§
impl Freeze for TransactionBody
impl RefUnwindSafe for TransactionBody
impl Send for TransactionBody
impl Sync for TransactionBody
impl Unpin for TransactionBody
impl UnwindSafe for TransactionBody
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> 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::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.