Skip to content

Commit

Permalink
docs: update READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuttymoon committed May 30, 2023
1 parent cb57d7b commit f6a2a8e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 44 deletions.
39 changes: 9 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,19 @@ This project provides Rust crates to interact with:

## Crates

- [ash_sdk](crates/ash_sdk): Ash Rust SDK
- [ash_cli](crates/ash_cli): Ash CLI
- [ash_sdk](crates/ash_sdk): Ash Rust SDK
[<img alt="crates.io" src="https://img.shields.io/crates/v/ash_sdk.svg?style=flat&color=fc8d62&logo=rust">](https://crates.io/crates/ash_sdk)
[<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-ash_sdk-green?style=flat&labelColor=555555&logo=docs.rs">](https://docs.rs/ash_sdk)
- [ash_cli](crates/ash_cli): Ash CLI
[<img alt="crates.io" src="https://img.shields.io/crates/v/ash_cli.svg?style=flat&color=fc8d62&logo=rust">](https://crates.io/crates/ash_cli)

## Ash CLI Installation

```sh
git clone https://github.com/AshAvalanche/ash-rs.git
cd ash-rs

cargo install --path crates/ash_cli

# The CLI is then available globally
ash --help
```

See [Available commands](crates/ash_cli/README.md#available-commands).
See the [Installation](https://ash.center/docs/toolkit/ash-cli/installation) section of the documentation.

## Configuration

A YAML configuration file can be generated using the `ash conf init` command, enriched and then reused in commands with the `--config` flag.

This allows to query custom networks with the CLI:

```yaml
avalancheNetworks:
- name: local
subnets:
- id: 11111111111111111111111111111111LpoYY
blockchains:
- id: yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp
name: C-Chain
vmType: Coreth
rpcUrl: https://localhost:9650/ext/bc/C/rpc
```
See the [Custom Configuration tutorial](https://ash.center/docs/toolkit/ash-cli/tutorials/custom-configuration) section of the documentation.

## Development

Expand Down Expand Up @@ -108,6 +87,6 @@ ASH_TEST_AVAX_CONFIG="$PWD/target/ash-test-avax-conf.yml" cargo test
- [x] Get Subnets and blockchains information from the Avalanche P-Chain
- [x] Get nodes information from the Avalanche P-Chain
- [x] Get Subnet validators information from the Avalanche P-Chain
- [ ] Subnet creation
- [ ] Blockchain creation
- [x] Subnet creation
- [x] Blockchain creation
- [ ] WASM integration (to allow the library to be used from JavaScript)
37 changes: 30 additions & 7 deletions crates/ash_cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,42 @@ ash avalanche subnet list --network mainnet

# Show detailed information about one of the mainnet Subnets
# The output can be set to JSON and piped to jq for maximum flexibility
ash avalanche subnet info --id Vn3aX6hNRstj5VHHm63TCgPNaeGnRSqCYXQqemSqDd2TQH4qJ --json | jq '.blockchains'
ash avalanche subnet info Vn3aX6hNRstj5VHHm63TCgPNaeGnRSqCYXQqemSqDd2TQH4qJ --json | jq '.blockchains'

# Show detailed information about a validator of the mainnet Subnet
ash avalanche validator info --network fuji --id NodeID-FhFWdWodxktJYq884nrJjWD8faLTk9jmp
ash avalanche validator info --network fuji NodeID-FhFWdWodxktJYq884nrJjWD8faLTk9jmp
```

## Available commands

- `ash conf`: Manipulate the Ash lib configuration
- `ash avalanche network`: Interact with Avalanche networks
- `ash avalanche node`: Interact with Avalanche nodes
- `ash avalanche subnet`: Interact with Avalanche Subnets
- `ash avalanche validator`: Interact with Avalanche validators
- `ash conf`

```bash
Interact with Ash configuration files

Usage: ash conf [OPTIONS] <COMMAND>

Commands:
init Initialize an Ash config file
```

- `ash avalanche`

```bash
Interact with Avalanche Subnets, blockchains and nodes

Usage: ash avalanche [OPTIONS] <COMMAND>

Commands:
blockchain Interact with Avalanche blockchains
network Interact with Avalanche networks
node Interact with Avalanche nodes
subnet Interact with Avalanche Subnets
validator Interact with Avalanche validators
vm Interact with Avalanche VMs
wallet Interact with Avalanche wallets
x Interact with Avalanche X-Chain
```

## Tutorials

Expand Down
9 changes: 2 additions & 7 deletions crates/ash_sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ash_sdk
# `ash_sdk` Crate

`ash-rs` is a Rust SDK for [Avalanche](https://avax.network) and [Ash](https://ash.center) tools.

Expand Down Expand Up @@ -88,9 +88,4 @@ One can check out the [CLI code](https://github.com/AshAvalanche/ash-rs/tree/mai

## Modules

- `conf`: Interact with the library configuration in YAML
- `errors`: Generate errors for the library
- `avalanche`: Interact with Avalanche networks, Subnets and blockchains
- `avalanche::subnets`: Interact with Avalanche Subnets and validators
- `avalanche::blockchains`: Interact with Avalanche blockchains
- `avalanche::jsonrpc`: Interact with Avalanche VMs JSON RPC endpoints
See the [docs.rs documentation](https://docs.rs/ash_sdk) for more details.

0 comments on commit f6a2a8e

Please sign in to comment.