-
Notifications
You must be signed in to change notification settings - Fork 10
Design
Bofu Chen edited this page Jul 22, 2022
·
8 revisions
Commit Database is an optional cache layer on top of the blockchains for speeding up the access of Commits. Instead of retrieving the Commits on chain directly, we provide a default Commit Database. You can also create your own by following the interface below.
Base URLs
- Mainnet:
https://node.numbersprotocol.io/api/1.1/wf - Testnet:
https://node.numbersprotocol.io/version-test/api/1.1/wf
Endpoints
-
commitdb_update- Request Commit Database to synchronize the Commits of the given Asset CID.
-
commitdb_amount- Get the current Commit amount of the given Asset CID in the Commit Database.
-
commitdb- Write on chain Commits into the Commit Database. Only the Commit Database has the permission to call it.
Examples
- Update an Asset CID
curl --location --request POST 'https://node.numbersprotocol.io/api/1.1/wf/commitdb_update' \
--header 'Content-Type: application/json' \
--data-raw '{
"assetCid": "bafybeie7yzw2afoi36enyuk6hdxgll3y52g3yqeuvehutoxxkxssvbzqre",
"dbEndpointUrl": "https://node.numbersprotocol.io/version-test/api/1.1/wf/commitdb"
}'