Note: The library is under active development!
This is Rust library representing a convenient client for connecting to Indy2 Ledger and executing transactions/queries/contracts.
The library provides methods to:
- connect to node
- build transactions executing predefined contract methods
- obtain transaction bytes to make EcDSA Recoverable signature
- send transactions to connected node
- parse response returned from the node
- Indy2 Ledger running - see instructions on how to run local network.
In order to build library, you must have Rust installed.
Used Rust version: 1.70.0
cargo build
To use vdr, add this to your Cargo.toml
:
[dependencies]
indy_besu_vdr = { path = "../path/to/crate" }
Library uses Rustfmt to define code formatting rules.
In order to run code formatting, run the following command:
cargo +nightly fmt
migration
(Optional) - module providing helper methods to convert old indy styled objects (schema id, schema, credential definition id, credential definition).ledger_test
(Optional) - ledger integration tests requiring running network.basic_signer
(Optional) - basic helper module for EcDSA signing.wasm
(Optional) - library which can be compiled for Web-Assembly
-
Basic: run ledger agnostic test:
cargo test
-
Integrations: run tests interacting with the ledger
RUST_TEST_THREADS=1 cargo test --features "ledger_test"
- To see the logs, please set
RUST_LOG
environment variable to desired log level:info
,debug
,trace
etc.
Indy-VDR
library uses uniffi to generate bindings for Kotlin, Python, Swift languages.
See instructions here.
Indy-VDR
library uses wasm-bindgen to generate bindings for JavaScript, NodeJs, WebAssembly.
See instructions here.