-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d38e43d
commit 0095c94
Showing
1 changed file
with
19 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,20 @@ | ||
### Metadata | ||
# API for [aleph-node](https://github.com/Cardinal-Cryptography/aleph-node) chain. | ||
|
||
We use autogenerated metadata in this lib. To generate it you will need subxt-cli. See [here](https://github.com/paritytech/subxt) for instructions how to install it. | ||
The metadata is generated by: | ||
```bash | ||
subxt codegen --derive Clone Debug Eq PartialEq | rustfmt --edition=2021 > src/aleph_zero.rs | ||
``` | ||
This crate provides a Rust application interface for submitting transactions to `aleph-node` chain. | ||
Most of the [pallets](https://docs.substrate.io/reference/frame-pallets/) are common to any | ||
[Substrate](https://github.com/paritytech/substrate) chain, but there are some unique to `aleph-node`, | ||
e.g. [`pallets::elections::ElectionsApi`](./src/pallets/elections.rs). | ||
|
||
## Build | ||
|
||
Just use `cargo build` or `cargo build --release`, depends on your usecase. | ||
|
||
## Contributions | ||
|
||
All contributions are welcome, e.g. adding new API for pallets in `aleph-node`. | ||
|
||
## Metadata | ||
|
||
`aleph-client` uses [`subxt`](https://github.com/paritytech/subxt) to communicate with a Substrate-based chain which | ||
`aleph-node` is. In order to provide a strong type safety, it uses a manually generated file [`aleph_zero.rs`](src/aleph_zero.rs) | ||
which refers to top of the `main` branch in `aleph-node` repository. See more info [here](docker/README.md). |