|
1 |
| -# murmur-lib |
| 1 | +# Murmur Lib |
2 | 2 |
|
3 | 3 | An implementation of the Murmur protocol and corresponding CLI. This implements the Murmur protocol for usage with the Ideal network's randomness beacon. Specifically, it uses [TinyBLS377](https://docs.rs/w3f-bls/latest/w3f_bls/engine/type.TinyBLS377.html) and constructs basic identities which are deterministic based on block number.
|
4 | 4 |
|
5 | 5 | ## Setup
|
6 | 6 |
|
7 | 7 | To setup a dev environment:
|
8 |
| -- run a local [IDN solochain node](https://github.com/ideal-lab5/etf) |
9 |
| -- [generate chain metadata](#generate-metadata) |
| 8 | + |
| 9 | +1. Run a local [IDN solochain node](https://github.com/ideal-lab5/etf) |
| 10 | +2. [Generate chain metadata](#generate-metadata) |
10 | 11 |
|
11 | 12 | ### Build
|
12 | 13 |
|
13 |
| -`cargo build` |
| 14 | +To build the project, use the following command: |
| 15 | + |
| 16 | +```shell |
| 17 | +cargo build |
| 18 | +``` |
14 | 19 |
|
15 | 20 | ### CLI Usage
|
16 | 21 |
|
17 | 22 | ##### Create a wallet
|
18 | 23 |
|
19 |
| -``` shell |
20 |
| -# generate a wallet valid for the next 1000 blocks |
| 24 | +To generate a wallet valid for the next 1000 blocks, use: |
| 25 | + |
| 26 | +```shell |
21 | 27 | ./target/debug/murmur new --name test --seed my_secret_key --validity 100
|
22 | 28 | ```
|
23 | 29 |
|
24 | 30 | ##### Execute a balance transfer
|
25 | 31 |
|
26 |
| -``` shell |
27 |
| -# send a balance transfer |
| 32 | +To send a balance transfer, use: |
| 33 | + |
| 34 | +```shell |
28 | 35 | ./target/debug/murmur execute --name test --seed my_secret_key --to CuqfkE3QieYPAWPpwiygDufmyrKecDcVCF7PN1psaLEn8yr --amount 100_000_000
|
29 | 36 | ```
|
30 | 37 |
|
31 | 38 | ## Test
|
32 | 39 |
|
33 |
| -`cargo test` |
| 40 | +To run the tests, use the following command: |
34 | 41 |
|
| 42 | +```shell |
| 43 | +cargo test |
| 44 | +``` |
35 | 45 |
|
36 | 46 | ## Generate Metadata
|
37 | 47 |
|
38 |
| -``` shell |
39 |
| -# clone and build the node |
| 48 | +To run the tests, use the following command: |
| 49 | + |
| 50 | +1. Clone and build the node: |
| 51 | + |
| 52 | +```shell |
40 | 53 | git clone git@github.com:ideal-lab5/etf.git
|
41 | 54 | cd etf
|
42 | 55 | cargo +stable build
|
43 |
| -# run a local node |
| 56 | +``` |
| 57 | + |
| 58 | +2. Run a local node: |
| 59 | + |
| 60 | +```shell |
44 | 61 | ./target/debug/node --tmp --dev --alice --unsafe-rpc-external --rpc-cors all
|
45 |
| -# use subxt to prepare metadata |
| 62 | +``` |
| 63 | + |
| 64 | +3. Prepare metadata using `subxt`: |
| 65 | + |
| 66 | +```shel |
46 | 67 | cd /path/to/otp-wallet/
|
47 | 68 | mkdir artifacts
|
48 | 69 | cargo install subxt-cli
|
49 |
| -# Download and save all of the metadata: |
| 70 | +``` |
| 71 | + |
| 72 | +4. Download and save all of the metadata: |
| 73 | + |
| 74 | +```shell |
50 | 75 | subxt metadata > ./artifacts/metadata.scale
|
51 |
| -``` |
| 76 | +``` |
| 77 | + |
| 78 | +## Contributing |
| 79 | + |
| 80 | +Contributions are welcome! Please open an issue or submit a pull request. |
| 81 | + |
| 82 | +## License |
| 83 | + |
| 84 | +This project is licensed under the Apache-2.0. See the [LICENSE](../LICENSE) file for details. |
| 85 | + |
| 86 | +## Contact |
| 87 | + |
| 88 | +For any inquiries, please contact [Ideal Labs](https://idealabs.network). |
0 commit comments