#miden #rollup #store #interaction #facilitate #rpc-client #interact

no-std miden-client

Client library that facilitates interaction with the Miden rollup

10 releases (5 breaking)

new 0.6.1 Nov 21, 2024
0.6.0 Nov 8, 2024
0.5.0 Aug 27, 2024
0.4.1 Jul 8, 2024
0.1.0 Mar 15, 2024

#985 in Magic Beans

Download history 50/week @ 2024-07-29 173/week @ 2024-08-26 2/week @ 2024-09-09 54/week @ 2024-09-16 30/week @ 2024-09-23 24/week @ 2024-09-30 1/week @ 2024-10-07 5/week @ 2024-10-14 12/week @ 2024-10-21 15/week @ 2024-10-28 145/week @ 2024-11-04 39/week @ 2024-11-11

211 downloads per month
Used in 2 crates

MIT license

700KB
15K SLoC

Rust Client Library

Rust library, which can be used by other project to programmatically interact with the Miden rollup.

Adding miden-client as a dependency

In order to utilize the miden-client library, you can add the dependency to your project's Cargo.toml file:

miden-client = { version = "0.6" }

Crate Features

  • concurrent: used to enable concurrency during execution and proof generation. Disabled by default.
  • idxdb: includes WebStore, an IdexedDB implementation of the Store trait. Disabled by default.
  • sqlite: includes SqliteStore, a SQLite implementation of the Store trait. Disabled by default.
  • tonic: includes TonicRpcClient, a Tonic client to communicate with Miden node. Disabled by default.
  • web-tonic: includes WebTonicRpcClient, an Tonic client to communicate with the Miden node in the browser. Disabled by default.
  • testing: useful feature that lowers PoW difficulty when enabled, meant to be used during development and not on production. Disabled by default.

To compile with no_std, disable default features via --no-default-features flag.

Store and RpcClient implementations

The library user can provide their own implementations of Store and RpcClient traits, which can be used as components of Client, though it is not necessary. The Store trait is used to persist the state of the client, while the RpcClient trait is used to communicate via gRPC with the Miden node.

The sqlite and tonic features provide implementations for these traits using Rusqlite and Tonic respectively. The idxdb and web-tonic features provide implementations based on IndexedDB and tonic-web which can be used in the browser.

License

This project is MIT licensed.

Dependencies

~20–58MB
~1M SLoC