diff --git a/README.md b/README.md index 6d1fba1..a9c4c07 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ - [tx-bakery](https://github.com/mlabs-haskell/tx-village/tree/main/tx-bakery) - Transaction Bakery - Rust based transaction builder library -- [tx-bakery-ogmios](https://github.com/mlabs-haskell/tx-village/tree/main/tx-bakery-ogmios) - Ogmios Support for Transaction Bakery -- [tx-bakery-plutip](https://github.com/mlabs-haskell/tx-village/tree/main/tx-bakery-plutip) - Plutip Support for Transaction Bakery +- [tx-bakery-ogmios](https://github.com/mlabs-haskell/tx-village/tree/main/tx-bakery-ogmios) - Ogmios support for Transaction Bakery +- [tx-bakery-plutip](https://github.com/mlabs-haskell/tx-village/tree/main/tx-bakery-plutip) - Plutip support for Transaction Bakery - [tx-indexer](https://github.com/mlabs-haskell/tx-village/tree/main/tx-indexer) - Transaction Indexer - Rust based chain follower and indexer diff --git a/artifacts/tx-bakery-ogmios/src/tx_bakery_ogmios/lib.rs.html b/artifacts/tx-bakery-ogmios/src/tx_bakery_ogmios/lib.rs.html index 87e0852..5b9a32e 100644 --- a/artifacts/tx-bakery-ogmios/src/tx_bakery_ogmios/lib.rs.html +++ b/artifacts/tx-bakery-ogmios/src/tx_bakery_ogmios/lib.rs.html @@ -4,7 +4,11 @@

Files

2 3 4 +5 +6
mod api;
+#[cfg(feature = "clap")]
+pub mod clap;
 pub mod client;
 pub mod error;
 pub mod launcher;
diff --git a/artifacts/tx-bakery-ogmios/tx_bakery_ogmios/index.html b/artifacts/tx-bakery-ogmios/tx_bakery_ogmios/index.html
index d429742..9f65ad6 100644
--- a/artifacts/tx-bakery-ogmios/tx_bakery_ogmios/index.html
+++ b/artifacts/tx-bakery-ogmios/tx_bakery_ogmios/index.html
@@ -1,3 +1,3 @@
 tx_bakery_ogmios - Rust
-    
\ No newline at end of file +
\ No newline at end of file diff --git a/artifacts/tx-bakery/src/tx_bakery/lib.rs.html b/artifacts/tx-bakery/src/tx_bakery/lib.rs.html index 6dd22f9..106b430 100644 --- a/artifacts/tx-bakery/src/tx_bakery/lib.rs.html +++ b/artifacts/tx-bakery/src/tx_bakery/lib.rs.html @@ -887,6 +887,8 @@

Files

885 886 887 +888 +889
//! Transaction Bakery
 
 use crate::error::{Error, Result};
@@ -925,6 +927,8 @@ 

Files

use utils::script::ScriptOrRef; pub mod chain_query; +#[cfg(feature = "clap")] +pub mod clap; pub mod error; pub mod metadata; pub mod submitter; @@ -935,7 +939,7 @@

Files

/// Transaction builder /// -/// The purpose of this component is to convert a raw TransactionInfo (dough) +/// The purpose of this component is to convert a raw TransactionInfo (dough) /// into a fully baked valid transaction. /// TxBakery does not perform IO and won't change it's internal state once initialized. pub struct TxBakery { diff --git a/artifacts/tx-bakery/tx_bakery/enum.ChangeStrategy.html b/artifacts/tx-bakery/tx_bakery/enum.ChangeStrategy.html index d327ff5..23614c0 100644 --- a/artifacts/tx-bakery/tx_bakery/enum.ChangeStrategy.html +++ b/artifacts/tx-bakery/tx_bakery/enum.ChangeStrategy.html @@ -1,12 +1,12 @@ ChangeStrategy in tx_bakery - Rust -
pub enum ChangeStrategy {
+    
pub enum ChangeStrategy {
     Address(Address),
     LastOutput,
 }
Expand description

Options to deal with change outputs and collateral returns

Variants§

§

Address(Address)

Send all change to an address

§

LastOutput

Use the last output of the TransactionInfo as change output (modify it’s value) Collateral returns are following the address of the last output

-

Trait Implementations§

source§

impl Clone for ChangeStrategy

source§

fn clone(&self) -> ChangeStrategy

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ChangeStrategy

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

source§

impl Clone for ChangeStrategy

source§

fn clone(&self) -> ChangeStrategy

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ChangeStrategy

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for T
where diff --git a/artifacts/tx-bakery/tx_bakery/enum.CollateralStrategy.html b/artifacts/tx-bakery/tx_bakery/enum.CollateralStrategy.html index abd57c5..4b15633 100644 --- a/artifacts/tx-bakery/tx_bakery/enum.CollateralStrategy.html +++ b/artifacts/tx-bakery/tx_bakery/enum.CollateralStrategy.html @@ -1,5 +1,5 @@ CollateralStrategy in tx_bakery - Rust -
pub enum CollateralStrategy {
+    
pub enum CollateralStrategy {
     Automatic {
         amount: u64,
     },
@@ -12,7 +12,7 @@
 

Variants§

§

Automatic

Fields

§amount: u64

Automatically pick a suitable UTxO from the transaction inputs

§

Explicit

Fields

§utxo: TxInInfo
§amount: u64

Explicitly set a UTxO (doesn’t have to be an input UTxO)

§

None

No collateral (for transaction without scripts)

-

Trait Implementations§

source§

impl Clone for CollateralStrategy

source§

fn clone(&self) -> CollateralStrategy

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CollateralStrategy

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

source§

impl Clone for CollateralStrategy

source§

fn clone(&self) -> CollateralStrategy

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CollateralStrategy

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for T
where diff --git a/artifacts/tx-bakery/tx_bakery/index.html b/artifacts/tx-bakery/tx_bakery/index.html index 5919150..a4f11a0 100644 --- a/artifacts/tx-bakery/tx_bakery/index.html +++ b/artifacts/tx-bakery/tx_bakery/index.html @@ -1,4 +1,4 @@ tx_bakery - Rust -

Crate tx_bakery

source ·
Expand description

Transaction Bakery

+

Crate tx_bakery

source ·
Expand description

Transaction Bakery

Modules§

Structs§

  • Transaction builder
  • TransactionInfo with additional context required to build a valid transaction

Enums§

\ No newline at end of file diff --git a/artifacts/tx-bakery/tx_bakery/struct.TxBakery.html b/artifacts/tx-bakery/tx_bakery/struct.TxBakery.html index 0fb7ba0..5293418 100644 --- a/artifacts/tx-bakery/tx_bakery/struct.TxBakery.html +++ b/artifacts/tx-bakery/tx_bakery/struct.TxBakery.html @@ -1,11 +1,11 @@ TxBakery in tx_bakery - Rust -

Struct tx_bakery::TxBakery

source ·
pub struct TxBakery { /* private fields */ }
Expand description

Transaction builder

-

The purpose of this component is to convert a raw TransactionInfo (dough) +

Struct tx_bakery::TxBakery

source ·
pub struct TxBakery { /* private fields */ }
Expand description

Transaction builder

+

The purpose of this component is to convert a raw TransactionInfo (dough) into a fully baked valid transaction. TxBakery does not perform IO and won’t change it’s internal state once initialized.

-

Implementations§

source§

impl TxBakery

source

pub async fn init(chain_query: &impl ChainQuery) -> Result<Self>

Query all the parameters required to build a transaction and store it for later use. +

Implementations§

source§

impl TxBakery

source

pub async fn init(chain_query: &impl ChainQuery) -> Result<Self>

Query all the parameters required to build a transaction and store it for later use. This command will call the ChainQuery service to pull certain chain parameters

-
source

pub async fn init_with_config( +

source

pub async fn init_with_config( network: &Network, protocol_params: &ProtocolParameters, system_start: DateTime<Utc>, @@ -13,10 +13,10 @@ ) -> Result<Self>

Init TxBakey with the required configurations This allows to directly inject configurations, and handle them separately from the bakery (for example prefetch and cache them)

-
source

pub fn mk_tx_builder(&self, tx: &TxWithCtx<'_>) -> Result<TransactionBuilder>

Convert a PLA TransactionInfo into a CSL transaction builder. +

source

pub fn mk_tx_builder(&self, tx: &TxWithCtx<'_>) -> Result<TransactionBuilder>

Convert a PLA TransactionInfo into a CSL transaction builder. The result is not yet balanced and witnesses are not added. This is useful for some further manual processing of the transaction before finalising.

-
source

pub fn mk_tx_body(&self, tx: &TxWithCtx<'_>) -> Result<TransactionBody>

source

pub async fn bake_balanced_tx( +

source

pub fn mk_tx_body(&self, tx: &TxWithCtx<'_>) -> Result<TransactionBody>

source

pub async fn bake_balanced_tx( &self, submitter: &impl Submitter, tx: TxWithCtx<'_> @@ -24,13 +24,13 @@ wallet signatures) If the transaction context does not include execution units, we use Ogmios to calculate those

-

source

pub async fn bake_signed_tx( +

source

pub async fn bake_signed_tx( &self, submitter: &impl Submitter, wallet: &impl Wallet, tx: TxWithCtx<'_> ) -> Result<Transaction>

Convert a TransactionInfo into a valid signed Transaction

-
source

pub async fn bake_and_deliver( +

source

pub async fn bake_and_deliver( &self, submitter: &impl Submitter, wallet: &impl Wallet, diff --git a/artifacts/tx-bakery/tx_bakery/struct.TxWithCtx.html b/artifacts/tx-bakery/tx_bakery/struct.TxWithCtx.html index ab29a11..f84e781 100644 --- a/artifacts/tx-bakery/tx_bakery/struct.TxWithCtx.html +++ b/artifacts/tx-bakery/tx_bakery/struct.TxWithCtx.html @@ -1,5 +1,5 @@ TxWithCtx in tx_bakery - Rust -

Struct tx_bakery::TxWithCtx

source ·
pub struct TxWithCtx<'a> {
+    

Struct tx_bakery::TxWithCtx

source ·
pub struct TxWithCtx<'a> {
     pub tx_info: &'a TransactionInfo,
     pub scripts: &'a BTreeMap<ScriptHash, ScriptOrRef>,
     pub collateral_strategy: &'a CollateralStrategy,
@@ -7,17 +7,17 @@
     pub metadata: Option<&'a TransactionMetadata>,
     pub ex_units_map: Option<&'a BTreeMap<(RedeemerTag, BigNum), ExUnits>>,
 }
Expand description

TransactionInfo with additional context required to build a valid transaction

-

Fields§

§tx_info: &'a TransactionInfo§scripts: &'a BTreeMap<ScriptHash, ScriptOrRef>§collateral_strategy: &'a CollateralStrategy§change_strategy: &'a ChangeStrategy§metadata: Option<&'a TransactionMetadata>§ex_units_map: Option<&'a BTreeMap<(RedeemerTag, BigNum), ExUnits>>

Implementations§

source§

impl<'a> TxWithCtx<'a>

source

pub fn new( +

Fields§

§tx_info: &'a TransactionInfo§scripts: &'a BTreeMap<ScriptHash, ScriptOrRef>§collateral_strategy: &'a CollateralStrategy§change_strategy: &'a ChangeStrategy§metadata: Option<&'a TransactionMetadata>§ex_units_map: Option<&'a BTreeMap<(RedeemerTag, BigNum), ExUnits>>

Implementations§

source§

impl<'a> TxWithCtx<'a>

source

pub fn new( tx_info: &'a TransactionInfo, scripts: &'a BTreeMap<ScriptHash, ScriptOrRef>, collateral_strategy: &'a CollateralStrategy, change_strategy: &'a ChangeStrategy -) -> Self

source

pub fn with_metadata(self, metadata: &'a TransactionMetadata) -> Self

Attach transaction metadata to the context

-
source

pub fn with_ex_units( +) -> Self

source

pub fn with_metadata(self, metadata: &'a TransactionMetadata) -> Self

Attach transaction metadata to the context

+
source

pub fn with_ex_units( self, ex_units_map: &'a BTreeMap<(RedeemerTag, BigNum), ExUnits> ) -> Self

Explicitly add execution units instead of running the ChainQuery evaluation

-

Trait Implementations§

source§

impl<'a> Clone for TxWithCtx<'a>

source§

fn clone(&self) -> TxWithCtx<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for TxWithCtx<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for TxWithCtx<'a>

§

impl<'a> RefUnwindSafe for TxWithCtx<'a>

§

impl<'a> Send for TxWithCtx<'a>

§

impl<'a> Sync for TxWithCtx<'a>

§

impl<'a> Unpin for TxWithCtx<'a>

§

impl<'a> UnwindSafe for TxWithCtx<'a>

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

source§

impl<'a> Clone for TxWithCtx<'a>

source§

fn clone(&self) -> TxWithCtx<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for TxWithCtx<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for TxWithCtx<'a>

§

impl<'a> RefUnwindSafe for TxWithCtx<'a>

§

impl<'a> Send for TxWithCtx<'a>

§

impl<'a> Sync for TxWithCtx<'a>

§

impl<'a> Unpin for TxWithCtx<'a>

§

impl<'a> UnwindSafe for TxWithCtx<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for T
where