Program Registry API
Program Registry
Program Registry API
The Program Registry is a server that accepts compiled Cairo programs (also known as CASM files), fetches the compiler version dynamically, computes the correct program hash, and stores the bytecode of the Cairo program along with the program hash.
To trigger a Module task via the Data Processor API, the target module program should have already been uploaded.
Submit Program (/submit-program
)
/submit-program
)curl --location 'https://sharp.api.herodotus.cloud/submit-program?apiKey={yourApiKey}' \
--form 'programFile=@"./hdp.json"' \
Response:
0x343995a543ac64616d33fa77670cfa4e498691c96c2d964a0a07181dff4ce81
Get Program (/get-program
)
/get-program
)curl --location --request GET 'https://hdp.api.herodotus.cloud/get-program?program_hash=0x343995a543ac64616d33fa77670cfa4e498691c96c2d964a0a07181dff4ce81' \
--header 'Content-Type: application/json'
The response will be a JSON file of the target program.
Get Metadata (/get-metadata
)
/get-metadata
)Request:
curl --location 'http://program-registery.api.herodotus.cloud/get-metadata?program_hash=0x1cdc17f32a75a973497d9e4cf282dfbe12ef03df994cc35e3a54f8b7b98d67d'
Response:
{
"layout": "recursive_with_poseidon",
"version": 2
}
Last updated