Example of notarization with the server
Start the server
./pandora-server --config '{"rollup_node_addr" : "http://localhost:20932", "rpc_port" : 8088, "secret_key" : "edsk3xAiaeVcv2buA3CjwNaSxpgMCRNGc65ZkUoxyH7AWb5EyuH23A" }'
Notarize a document
Let's say we have a file openapi.json
that we want to notarize. We can first
get its sha256 hash with
> sha256sum openapi.json
607858f4d8600c4cf62fd5feba532e99f1d8b2d7e1e56c8c178e25ab12d22576 openapi.json
And then call the notarization endpoint with
> curl -X POST -H 'Content-Type: application/json' localhost:8088/notarize/hash -d '"607858f4d8600c4cf62fd5feba532e99f1d8b2d7e1e56c8c178e25ab12d22576"'
After a few seconds, when the notarization is effective, we can check its status with:
> curl -X POST -H 'Content-Type: application/json' localhost:8088/notarize/status -d '"607858f4d8600c4cf62fd5feba532e99f1d8b2d7e1e56c8c178e25ab12d22576"'
{
"status": "notarized",
"timetsamp": "2024-06-25T23:28:14-00:00"
}