IPFS hash converter
Documentation for Indexers how to get subgraph's ipfs hash from id and vise versa

  • Transform id to ipfsh hash using python:
    $ pip install base58
    $ python
    print("0x"+base58.b58decode("ipfs_hash").hex()[4:])

  • Get id using graphql request
    query {
    subgraphDeployments {
    id
    }
    }
  • Transform ipfs hash to id using python
    $ pip install base58
    $ python
    print(base58.b58encode(bytes.fromhex("1220"+"subgraph_id"[2:])).decode('utf-8'))

  • You can use python script which located here
  • Online tool also available here
  • Some techical overview available here
Copy link
On this page
Getting id from ipfs hash
Getting ipfs from id
Scripts and links