Catalog/encoding-multihash-parse

Encoding

Parse multihash bytes API

Parses a hex/base64 multihash (IPFS) into its varint hash-function code, declared digest length, named algorithm, and the digest itself — validating length consistency. Answers 'What hash algorithm does this multihash use?', 'Extract the digest from this multihash.'

Price$0.02per request
MethodPOST
Route/v1/encoding/multihash-parse
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
multihashipfssha2-256varintparsedigestself-describingencoding
API URLhttps://x402.hexl.dev/v1/encoding/multihash-parse
Integration docs
Example request
{
  "value": "1220abababababababababababababababababababababababababababababababab"
}
Example response
{
  "hashCode": 18,
  "hashCodeHex": "0x12",
  "algorithm": "sha2-256",
  "digestLength": 32,
  "digestHex": "abababababababababababababababababababababababababababababababab",
  "totalBytes": 34,
  "interpretation": "Multihash: sha2-256 (0x12), 32-byte digest."
}
Input schema
{
  "type": "object",
  "required": [
    "value"
  ],
  "properties": {
    "value": {
      "type": "string",
      "examples": [
        "1220abababababababababababababababababababababababababababababababab"
      ]
    },
    "inputEncoding": {
      "type": "string",
      "examples": [
        "hex",
        "base64"
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}