Struct tx_bakery::tx_info_builder::TxScaffold
source · pub struct TxScaffold { /* private fields */ }
Expand description
Simple TransactionInfo builder
Implementations§
source§impl TxScaffold
impl TxScaffold
sourcepub fn add_input(
self,
reference: TransactionInput,
input: TxScaffoldInput
) -> Self
pub fn add_input( self, reference: TransactionInput, input: TxScaffoldInput ) -> Self
Add a transaction input
sourcepub fn add_pub_key_input(
self,
reference: TransactionInput,
output: TransactionOutput
) -> Self
pub fn add_pub_key_input( self, reference: TransactionInput, output: TransactionOutput ) -> Self
Add an inpup from a public key wallet
sourcepub fn add_script_input(
self,
reference: TransactionInput,
output: TransactionOutput,
datum: Option<DatumFromWitness>,
redeemer: Redeemer
) -> Self
pub fn add_script_input( self, reference: TransactionInput, output: TransactionOutput, datum: Option<DatumFromWitness>, redeemer: Redeemer ) -> Self
Add a input from a validator address
sourcepub fn add_inputs(
self,
inputs: BTreeMap<TransactionInput, TxScaffoldInput>
) -> Self
pub fn add_inputs( self, inputs: BTreeMap<TransactionInput, TxScaffoldInput> ) -> Self
Add multiple transaction inputs
sourcepub fn add_reference_input(
self,
reference: TransactionInput,
output: TransactionOutput
) -> Self
pub fn add_reference_input( self, reference: TransactionInput, output: TransactionOutput ) -> Self
Add a reference input
sourcepub fn add_reference_inputs(
self,
inputs: BTreeMap<TransactionInput, TransactionOutput>
) -> Self
pub fn add_reference_inputs( self, inputs: BTreeMap<TransactionInput, TransactionOutput> ) -> Self
Add multiple reference inputs
sourcepub fn add_output(self, output: TransactionOutput) -> Self
pub fn add_output(self, output: TransactionOutput) -> Self
Add a transaction output Output order will be preserved
sourcepub fn add_outputs(self, outputs: Vec<TransactionOutput>) -> Self
pub fn add_outputs(self, outputs: Vec<TransactionOutput>) -> Self
Add multiple transaction outputs
sourcepub fn add_mint(
self,
asset_class: AssetClass,
amount: i64,
redeemer: Redeemer
) -> Self
pub fn add_mint( self, asset_class: AssetClass, amount: i64, redeemer: Redeemer ) -> Self
Add new minted tokens with their corresponding redeemer
sourcepub fn add_dcerts(self, dcerts: Vec<DCert>) -> Self
pub fn add_dcerts(self, dcerts: Vec<DCert>) -> Self
Add multiple DCerts
sourcepub fn add_withdrawals(
self,
withdrawals: BTreeMap<StakingCredential, u64>
) -> Self
pub fn add_withdrawals( self, withdrawals: BTreeMap<StakingCredential, u64> ) -> Self
Add a withdrawal
sourcepub fn add_withdrawal(
self,
staking_credential: StakingCredential,
amount: u64
) -> Self
pub fn add_withdrawal( self, staking_credential: StakingCredential, amount: u64 ) -> Self
Add multiple withdrawals
sourcepub fn set_valid_range(self, valid_range: POSIXTimeRange) -> Self
pub fn set_valid_range(self, valid_range: POSIXTimeRange) -> Self
Set the validity range of the transaction
sourcepub fn add_signatory(self, signatory: PaymentPubKeyHash) -> Self
pub fn add_signatory(self, signatory: PaymentPubKeyHash) -> Self
Add a required signer of the transaction
sourcepub fn add_signatories(self, signatories: BTreeSet<PaymentPubKeyHash>) -> Self
pub fn add_signatories(self, signatories: BTreeSet<PaymentPubKeyHash>) -> Self
Add multiple required signers of the transaction
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TxScaffold
impl RefUnwindSafe for TxScaffold
impl Send for TxScaffold
impl Sync for TxScaffold
impl Unpin for TxScaffold
impl UnwindSafe for TxScaffold
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
§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 more