https://github.com/web3-storage/w3stat
CLI to diagnose a CID
https://github.com/web3-storage/w3stat
Last synced: 2 days ago
JSON representation
CLI to diagnose a CID
- Host: GitHub
- URL: https://github.com/web3-storage/w3stat
- Owner: web3-storage
- Created: 2023-09-13T19:39:46.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-18T16:15:56.000Z (over 2 years ago)
- Last Synced: 2025-02-24T00:28:07.395Z (over 1 year ago)
- Language: JavaScript
- Size: 87.9 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# w3stat
Admin tool to get info about a cid
```shell
$ w3stat cid bafybeigfpa7cugx7acsz4omli2yezj6us4xgdrgmducsjuluva7oifemtq
bafybeigfpa7cugx7acsz4omli2yezj6us4xgdrgmducsjuluva7oifemtq
đĸ ok. cid not on denylist
đ bagbaieraxlxzbs4wpoiba7zzzgo4a3zjzx5asfdrex5jholcwkwmwiu77lwa
âšī¸ {"blockmultihash":"zQmbdVNNoE96XxAoaePk1zuqhDcCq86CWh6uY7Zcvrxnxv7","offset":588,"length":58,"carpath":"us-west-2/carpark-prod-0/bagbaieraxlxzbs4wpoiba7zzzgo4a3zjzx5asfdrex5jholcwkwmwiu77lwa/bagbaieraxlxzbs4wpoiba7zzzgo4a3zjzx5asfdrex5jholcwkwmwiu77lwa.car"}
```
## Getting started
- Clone the repo
- Install the deps `npm i`
- Copy `.env.tpl` to `.env`
- Link it `npm link` to make `w3cli` available on your path
## Commands
### `w3stat cid`
Prints everything the tool can find about a given cid. It is the summary of the more specific commands listed below
### `w3stat denylist`
Is the CID on the denylist?
### `w3stat dynamo`
What block indexes do we have for the multihash in the given cid?
### `w3stat dudewhere`
Do we have any CID -> CAR CID mappings in dudewhere?
## Environment
You need the following set in the environment
- [AWS credentials set up](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html)
- `R2_ACCESS_KEY_ID` - Cloudflare s3 api key id
- `R2_SECRET_ACCESS_KEY` - Cloudflare secret key
You can copy `.env.tpl` to `.env` and set the values there.