Skip to content

Commit

Permalink
Make mithril-client examples full crates
Browse files Browse the repository at this point in the history
Two seperates crates were created:
- `mithril-client-snapshot-example`
- `mithril-client-stake-distribution-example`
  • Loading branch information
dlachaume committed Dec 1, 2023
1 parent 426b764 commit 34c1cd1
Show file tree
Hide file tree
Showing 10 changed files with 191 additions and 9 deletions.
126 changes: 117 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ resolver = "2"

members = [
"demo/protocol-demo",
"examples/client-mithril-stake-distribution",
"examples/client-snapshot",
"mithril-aggregator",
"mithril-client",
"mithril-client-cli",
Expand Down
3 changes: 3 additions & 0 deletions examples/client-mithril-stake-distribution/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
target/
client-mithril-stake-distribution
.DS_Store
18 changes: 18 additions & 0 deletions examples/client-mithril-stake-distribution/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "client-mithril-stake-distribution"
description = "Mithril client stake distribution example"
version = "0.1.0"
authors = ["dev@iohk.io"]
documentation = "https://mithril.network/doc"
edition = "2021"
homepage = "https://mithril.network"
license = "Apache-2.0"
repository = "https://github.com/input-output-hk/mithril/"

[dependencies]
anyhow = "1.0.75"
mithril-client = "0.5.7"
slog = "2.7.0"
slog-async = "2.8.0"
slog-term = "2.9.0"
tokio = { version = "1.32.0", features = ["full"] }
15 changes: 15 additions & 0 deletions examples/client-mithril-stake-distribution/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Mithril client library example: Mithril stake distribution

## Build and run the example

```bash
# Build
cargo build -p client-mithril-stake-distribution

# Run
cargo run -p client-mithril-stake-distribution
```

## Links
- **Developer documentation**: https://docs.rs/mithril-client/0.5.7/mithril_client/
- **Crates.io**: https://crates.io/crates/mithril-client
3 changes: 3 additions & 0 deletions examples/client-snapshot/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
target/
client-snapshot
.DS_Store
18 changes: 18 additions & 0 deletions examples/client-snapshot/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "client-snapshot"
description = "Mithril client snapshot example"
version = "0.1.0"
authors = ["dev@iohk.io"]
documentation = "https://mithril.network/doc"
edition = "2021"
homepage = "https://mithril.network"
license = "Apache-2.0"
repository = "https://github.com/input-output-hk/mithril/"

[dependencies]
anyhow = "1.0.75"
async-trait = "0.1.73"
futures = "0.3.28"
indicatif = "0.17.7"
mithril-client = "0.5.7"
tokio = { version = "1.32.0", features = ["full"] }
15 changes: 15 additions & 0 deletions examples/client-snapshot/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Mithril client library example: Snapshot

## Build and run the example

```bash
# Build
cargo build -p client-snapshot

# Run
cargo run -p client-snapshot
```

## Links
- **Developer documentation**: https://docs.rs/mithril-client/0.5.7/mithril_client/
- **Crates.io**: https://crates.io/crates/mithril-client
File renamed without changes.

0 comments on commit 34c1cd1

Please sign in to comment.