Crates.io | covctl |
lib.rs | covctl |
version | 0.1.3 |
source | src |
created_at | 2022-05-22 14:40:53.929633 |
updated_at | 2022-05-25 06:22:35.483257 |
description | CLI tool to easily interact with the covalent API https://www.covalenthq.com/docs/api |
homepage | https://github.com/mark-ruddy/covctl/tree/main/covctl |
repository | https://github.com/mark-ruddy/covctl/tree/main/covctl |
max_upload_size | |
id | 591162 |
size | 51,454 |
CLI tool to interact with the Covalent Unified API: https://www.covalenthq.com/docs/api
covctl
will return JSON for each API call. It provides a convenient CLI interface to easily make Unified Covalent API calls without having to build the API URLs manually
cargo install covctl
git clone https://github.com/mark-ruddy/covctl.git
cd covctl/covctl/
cargo build --release
First register and get an API key from: https://www.covalenthq.com/
Then you can pass this key into each call e.g. covctl --api-key=<YOUR_API_KEY>
Or you can omit the --api-key
flag and set this environment variable: export COVALENT_API_KEY=<YOUR_API_KEY>
See available API endpoints to query(covctl
covers all Class A Endpoints except for NFTs): covctl --help
covctl transaction --help
- see the available flags for the transaction info API call, --help
can be passed like this to any subcommand API call e.g. covctl changes-in-token-holders --help
covctl transaction --tx-hash 0x269fad968de5baf8d324b64d0a19df72ccfc762b33e1760729633f4946e0c863
- get back JSON on thistransaction
covctl token-balances --addr 0xf4024faad5fafd0755875e3161524c9c4e1a1111 | jq
- get back JSON for token balances of this address and pipe it through jq
covctl log-events-by-topic-hashes --topic-hash 0x804c9b842b2748a22bb64b345453a3de7ca54a6ca45ce00d415894979e22897a --sender-addr 0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9 --starting-block 12500000 --ending-block 12500100
- in this example the returned items JSON array is empty because there is no information for the parameters given