11 releases (5 breaking)

new 0.6.1 Nov 8, 2024
0.6.0 Nov 6, 2024
0.5.0 Aug 27, 2024
0.4.0 Jul 4, 2024
0.1.0 Mar 5, 2024

#506 in Magic Beans

Download history 134/week @ 2024-07-21 76/week @ 2024-07-28 26/week @ 2024-08-04 48/week @ 2024-08-11 37/week @ 2024-08-18 866/week @ 2024-08-25 328/week @ 2024-09-01 254/week @ 2024-09-08 67/week @ 2024-09-15 62/week @ 2024-09-22 35/week @ 2024-09-29 20/week @ 2024-10-06 14/week @ 2024-10-13 20/week @ 2024-10-20 30/week @ 2024-10-27 1031/week @ 2024-11-03

1,097 downloads per month
Used in 8 crates (5 directly)

MIT license

1MB
19K SLoC

Miden Transaction

This crate contains tool for creating, executing, and proving Miden rollup transaction.

Usage

This crate exposes a few components to compile, run, and prove transactions.

The first requirement is to have a DataStore implementation. DataStore objects are responsible to load the data needed by the transactions executor, specially the account's code, the reference block data, and the note's inputs.

let store = DataStore:new();

Once a store is available, a TransactionExecutor object can be used to execute a transaction. Consuming a zero or more notes, and possibly calling some of the account's code.

let executor = TransactionExecutor::new(store);
let executed_transaction = executor.execute_transaction(account_id, block_ref, note_ids, tx_args);

With the transaction execution done, it is then possible to create a proof:

let prover = LocalTransactionProver::new(ProvingOptions::default());
let proven_transaction = prover.prove(executed_transaction);

And to verify a proof:

let verifier = TransactionVerifier::new(SECURITY_LEVEL);
verifier.verify(proven_transaction);

Features

Features Description
std Enable usage of Rust's std, use --no-default-features for no-std support.
concurrent Enables concurrent code to speed up runtime execution.

License

This project is MIT licensed.

Dependencies

~14–42MB
~654K SLoC