{"id":"ipfs-cid-compute","version":"1.0.0","description":"Compute the CIDv0, CIDv1 dag-pb and CIDv1 raw content identifiers 'ipfs add' would give a single-chunk file.","supported_operations":["what cid would ipfs give this file","compute qm hash for ipfs","cidv1 for this content","ipfs content address without running a node","bafybe hash for this file","predict the cid before pinning to ipfs"],"unsupported_operations":["multi-chunk / multi-link dag-pb trees (this tool always represents content as one UnixFS chunk, kubo's default for anything at or under its size cap)","pinning, adding or fetching content from an actual IPFS node"],"semantics":["This tool always represents content as ONE UnixFS chunk (a single dag-pb node with no Links), exactly what kubo's default 256 KiB chunker produces for any input at or under this tool's max_content_bytes cap.","cid_v1_raw: multihash = 0x12 0x20 || SHA-256(content) (content hashed directly, no UnixFS/dag-pb wrapper); CID = multibase('b') || varint(1) || varint(0x55 'raw') || multihash, base32-encoded (lowercase, unpadded).","The UnixFS node bytes are: field 1 (Type=File) always present; field 2 (Data) present only when content is non-empty (an empty file omits the Data field entirely); field 3 (filesize) always present. The dag-pb node bytes are just field 1 (Data) = these UnixFS bytes, with no Links field.","cid_v0_dag_pb: multihash = 0x12 0x20 || SHA-256(dag-pb node bytes); CID = base58btc(multihash) with no multibase prefix character and no version/codec varints.","cid_v1_dag_pb: the same dag-pb node bytes and multihash as cid_v0_dag_pb, but wrapped as CIDv1 with codec 0x70 'dag-pb', base32-encoded.","size is the decoded byte length of content."],"limits":{"max_content_bytes":262144},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["content"],"properties":{"content":{"type":"string","maxLength":262144},"content_encoding":{"type":"string","enum":["utf8","hex","base64","base64url"],"default":"utf8"}}},"output_schema":{"type":"object","additionalProperties":false,"required":["cid_v1_raw","cid_v0_dag_pb","cid_v1_dag_pb","size"],"properties":{"cid_v1_raw":{"type":"string","pattern":"^b[a-z2-7]+$"},"cid_v0_dag_pb":{"type":"string","pattern":"^Qm[1-9A-HJ-NP-Za-km-z]+$"},"cid_v1_dag_pb":{"type":"string","pattern":"^b[a-z2-7]+$"},"size":{"type":"integer","minimum":0}}},"examples":[{"input":{"content":""},"output":{"cid_v1_raw":"bafkreihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku","cid_v0_dag_pb":"QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH","cid_v1_dag_pb":"bafybeif7ztnhq65lumvvtr4ekcwd2ifwgm3awq4zfr3srh462rwyinlb4y","size":0}},{"input":{"content":"hello"},"output":{"cid_v1_raw":"bafkreibm6jg3ux5qumhcn2b3flc3tyu6dmlb4xa7u5bf44yegnrjhc4yeq","cid_v0_dag_pb":"QmWfVY9y3xjsixTgbd9AorQxH7VtMpzfx2HaWtsoUYecaX","cid_v1_dag_pb":"bafybeid3weurg3gvyoi7nisadzolomlvoxoppe2sesktnpvdve3256n5tq","size":5}}],"execute_url":"/v1/tools/ipfs-cid-compute/versions/1.0.0/execute"}