Skip to content

Instantly share code, notes, and snippets.

@alanshaw
Last active May 29, 2025 10:56
Show Gist options
  • Save alanshaw/3d1525d7f0d3078544bfa99d54d913e1 to your computer and use it in GitHub Desktop.
Save alanshaw/3d1525d7f0d3078544bfa99d54d913e1 to your computer and use it in GitHub Desktop.
Is IPNI working yet?
echo 'alantest 2025-05-29' > test.txt
storacha up test.txt --verbose
# Should get:
# bafybeidamzcqbpfirdtrbjjhhybp5nfyl5vnjudbsoszg3jnbrwrjupetm
# Does IPNI have the info?
curl https://staging.ipni.storacha.network/cid/bafybeidamzcqbpfirdtrbjjhhybp5nfyl5vnjudbsoszg3jnbrwrjupetm
# Currently:
# no results for query
# Does indexing service have the info?
indexer query -u https://staging.indexer.storacha.network bafybeidamzcqbpfirdtrbjjhhybp5nfyl5vnjudbsoszg3jnbrwrjupetm
# Yes - appears here
# Not a great test since it'll be in the cache
# Did an advert get written on the indexer for this CID?
# First we need to get the base64 encoded bytes of the multihash:
ipfs cid format -f '%M' -b base64 bafybeidamzcqbpfirdtrbjjhhybp5nfyl5vnjudbsoszg3jnbrwrjupetm
# Should get:
# EiBgZkUAvKiI5xClJz4C/rS4X2rU0GGTpZNtLQxtFNHkmw
# Get the head info:
curl https://staging-indexer-ipni-store-bucket.s3.us-east-2.amazonaws.com/ipni/v1/ad/head
# Get the latest advert (CID from response above):
curl https://staging-indexer-ipni-store-bucket.s3.us-east-2.amazonaws.com/ipni/v1/ad/baguqeerahsendmoiv6vocbivs5japcg36p454trvwb7f2utbsl7n553dp5zq
# Get the entries list:
curl https://staging-indexer-ipni-store-bucket.s3.us-east-2.amazonaws.com/ipni/v1/ad/baguqeeraa4icyk7veztfvheznxpn22bjr7ls6es5wqg5yc5xtuvyl6o33raq
# Should get:
# {"Entries":[{"/":{"bytes":"EiBgZkUAvKiI5xClJz4C/rS4X2rU0GGTpZNtLQxtFNHkmw"}},{"/":{"bytes":"EiCrrnXxQm5FXDISwe99iecEYNrGQ2sp1GOcmrmr1iUZKw"}},{"/":{"bytes":"EiDa0ZhrVI32203SktVLTIytewZH8trDoPTEwiqjCk98CQ"}}]}
# Which shows the multihash is present.
# Check provider info:
curl https://staging.ipni.storacha.network/provider/12D3KooWPMQTKSMA3eFUxc23gBfMHEgzfk7W1TBezKNsBwPMRLQ7
# This is not a good test for up to date info - we know the find service does not receive updates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment