Cid parse
cid-parse · version 1.0.0 · Encoding & checksums · free, no key needed
Parse a CIDv0 or CIDv1 envelope without hashing content.
Use when you need to: parse cid envelope · inspect cid multicodec · decode cid multihash.
Decide before calling
Read the versioned contract and the supported scope below. Reuse cid-parse@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use cid-parse@1.0.0 for parse cid envelope. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- parse cid envelope
- inspect cid multicodec
- decode cid multihash
- show cid digest bytes
- read cid version
- normalize cid text
Not supported
- computing a CID from content
- verifying that content matches a CID
Behavior
- CIDv0 is the legacy bare dag-pb sha2-256 multihash; CIDv1 is version varint, codec varint, and multihash.
- Canonical text is CIDv0 base58btc or CIDv1 lowercase unpadded base32.
Input
cid(string, required): max length 512input_encoding(one of "text", "hex", optional): default"text"
Output
version(one of 0, 1, required)codec(object, required)multihash(object, required)bytes_hex(string, required)canonical_text(string, required)standard(string, required)reference(string, required)data_version(string, required)
Limits
- max text characters: 512
- max binary bytes: 256
Example
Request input:
{
"cid": "QmYwAPJzv5CZsnAzt8auVZRnGi2hMrZrm2suKMaqWwaoFY"
}
Response:
{
"result": {
"version": 0,
"codec": {
"code": "0x70",
"name": "dag-pb"
},
"multihash": {
"code": "0x12",
"name": "sha2-256",
"digest_length": 32,
"digest_hex": "9d6c2be50f70695347c6da90ab413d0fdb860d3ef82fcf8282408f334e9571eb"
},
"bytes_hex": "12209d6c2be50f70695347c6da90ab413d0fdb860d3ef82fcf8282408f334e9571eb",
"canonical_text": "QmYwAPJzv5CZsnAzt8auVZRnGi2hMrZrm2suKMaqWwaoFY",
"standard": "Multiformats CID Specification 1.0",
"reference": "CID specification 1.0 §CIDv0/§CIDv1 and multicodec/multihash/multibase tables",
"data_version": "multiformats tables snapshot 2026-10-24"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "cid-parse",
"version": "1.0.0",
"input": {
"cid": "QmYwAPJzv5CZsnAzt8auVZRnGi2hMrZrm2suKMaqWwaoFY"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/cid-parse/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"cid":"QmYwAPJzv5CZsnAzt8auVZRnGi2hMrZrm2suKMaqWwaoFY"}'
The machine-readable contract is at /v1/tools/cid-parse/versions/1.0.0.
CLI
node cli.mjs run cid-parse 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Pem envelope parse: Parse one RFC 7468 textual envelope into its label and lowercase hex bytes.
- Bech32 decode: Decode Bech32 or Bech32m text into a lowercase HRP, 5-bit data, and the checksum variant.
- Cid version convert: Convert permitted CIDv0 and CIDv1 envelopes without recomputing their multihash.
- Segwit address decode: Decode a native segwit address into witness version, program hex, and script pubkey.
- Asn1 oid parse: Parse an X.680 object identifier value into numeric arcs and dotted form.
- Base64 UTF-8: Decode standard Base64 to UTF-8 text. Transformation only; no security claim.