Learn how to query the KaiSign subgraph to retrieve contract specifications and blob metadata (EIP-4844).
The subgraph endpoint is public and doesn't require authentication. Just use the URL directly in your requests.
Test any blob hash to see API endpoints and fetch UTF-8 metadata directly in your browser.
https://api.studio.thegraph.com/query/117022/kaisign-subgraph/version/latestid - Unique identifieruser - Creator addressblobHash - Blob hash containing metadata (EIP-4844)targetContract - Contract addresschainID - Blockchain chain IDblockTimestamp - Creation timestampstatus - PROPOSED, SUBMITTED, FINALIZED, REJECTEDRetrieve all contract specifications from the subgraph
curl -s -X POST \
-H "Content-Type: application/json" \
-d '{"query":"{ specs(first: 10) { id user blobHash targetContract chainID blockTimestamp status } }"}' \
"https://api.studio.thegraph.com/query/117022/kaisign-subgraph/version/latest"Get specifications for a specific contract
curl -s -X POST \
-H "Content-Type: application/json" \
-d '{"query":"{ specs(where: {targetContract: \"0x4dFEA0C2B472a14cD052a8f9DF9f19fa5CF03719\"}) { blobHash targetContract status } }"}' \
"https://api.studio.thegraph.com/query/117022/kaisign-subgraph/version/latest"Retrieve only specs that have been processed by handleResult
curl -s -X POST \
-H "Content-Type: application/json" \
-d '{"query":"{ specs(where: {status: FINALIZED}) { blobHash targetContract } }"}' \
"https://api.studio.thegraph.com/query/117022/kaisign-subgraph/version/latest"Get the actual UTF-8 blob data directly
curl -s "https://storage.googleapis.com/blobscan-production/11155111/01/96/d7/0196d7c56bbc18b22ea2ac4e65b968e39c918bfed9f7ac0c0fccabda8d0e2239.bin" | tr -d '\0'Save as query.sh and run to get specs and fetch their blob metadata
#!/bin/bash
URL="https://api.studio.thegraph.com/query/117022/kaisign-subgraph/version/latest"
CONTRACT_ADDRESS="0x4dFEA0C2B472a14cD052a8f9DF9f19fa5CF03719"
echo "Getting specs for contract $CONTRACT_ADDRESS..."
SPECS=$(curl -s -X POST \
-H "Content-Type: application/json" \
-d "{\"query\":\"{ specs(where: {targetContract: \\\"$CONTRACT_ADDRESS\\\"}) { blobHash targetContract status } }\"}" \
"$URL")
echo "$SPECS"
BLOB_HASH=$(echo "$SPECS" | jq -r '.data.specs[0].blobHash')
if [ "$BLOB_HASH" != "null" ]; then
echo -e "\n\nFetching UTF-8 metadata from blob: $BLOB_HASH"
# Get storage URL from API
STORAGE_URL=$(curl -s "https://api.sepolia.blobscan.com/blobs/$BLOB_HASH" | jq -r '.dataStorageReferences[] | select(.storage=="google") | .url')
# Get actual UTF-8 blob data
curl -s "$STORAGE_URL"
else
echo "No specs found for this contract"
fiFetch proposed ERC-7730 metadata for the KaiSign contract
curl -s -X POST \
-H "Content-Type: application/json" \
-d '{"query":"{ specs(where: {targetContract: \"0x4dfea0c2b472a14cd052a8f9df9f19fa5cf03719\", status: \"PROPOSED\"}) { blobHash blockTimestamp user } }"}' \
"https://api.studio.thegraph.com/query/117022/kaisign-subgraph/version/latest"Get created incentives data from the subgraph
curl -s -X POST \
-H "Content-Type: application/json" \
-d '{"query":"{ logIncentiveCreateds(first: 10) { incentiveId creator targetContract amount deadline description blockTimestamp } }"}' \
"https://api.studio.thegraph.com/query/117022/kaisign-subgraph/version/latest"Get claimed incentives data from the subgraph
curl -s -X POST \
-H "Content-Type: application/json" \
-d '{"query":"{ logIncentiveClaimeds(first: 10) { incentiveId claimer specID amount blockTimestamp } }"}' \
"https://api.studio.thegraph.com/query/117022/kaisign-subgraph/version/latest"Get all specs created by a specific user
curl -s -X POST \
-H "Content-Type: application/json" \
-d '{"query":"{ specs(where: {user: \"0x89839eF5911343a6134c28B96342f7fb3ae5D483\"}) { id blobHash targetContract status blockTimestamp incentiveId } }"}' \
"https://api.studio.thegraph.com/query/117022/kaisign-subgraph/version/latest"Get multiple data types in one request
curl -s -X POST \
-H "Content-Type: application/json" \
-d '{"query":"{ proposedSpecs: specs(where: {status: \"PROPOSED\"}, first: 5) { id user blobHash targetContract blockTimestamp } finalizedSpecs: specs(where: {status: \"FINALIZED\"}, first: 5) { id user blobHash targetContract isAccepted } recentSpecs: specs(first: 5, orderBy: blockTimestamp, orderDirection: desc) { id status blockTimestamp } }"}' \
"https://api.studio.thegraph.com/query/117022/kaisign-subgraph/version/latest"Step-by-step instructions to run the shell script
# 1. Save the script to a file
echo '#!/bin/bash...' > query.sh
# 2. Make it executable
chmod +x query.sh
# 3. Run the script
./query.sh
# 4. To use a different contract address, edit the script:
# Change CONTRACT_ADDRESS="0x4dFEA0C2B472a14cD052a8f9DF9f19fa5CF03719"
# to your desired contract address
# 5. Requirements:
# - curl (usually pre-installed)
# - jq (install with: brew install jq on macOS or apt install jq on Ubuntu)Multiple ways to access blob data with browser-friendly options:
https://sepolia.blobscan.com/blob/[blobHash]Click to open in new tab - works perfectly in browsers
https://api.gateway.ethswarm.org/bzz/[swarmReference]Direct JSON viewing - browser friendly
https://api.sepolia.blobscan.com/blobs/[blobHash]Returns metadata and storage references
curl -s "https://storage.googleapis.com/..." | tr -d '\0'Command line access for developers