Prover API

A Prover is a participant that receives confirmed Cohort information from the Manager and provides it in a static form. The Prover can be an API or a decentralized static file system. Unlike the Manager API, the Prover API protocol must utilize precise implementations. External systems must appropriately call the API according to the Prover version to obtain Proof.

Release Versions

  • 1.0.0 Initial Prover API

Supported Prover Protocol Version

GET /prover/config

  • This endpoint provides the version of the protocol offered by this Prover path.

//response
{
	"statusCode": 200,
	"data": {
		"major": 1,
		"minor": 0,
		"patch": 0
	},
	"message": "success"
}

Rollup Information Provision

GET /cohort/{cohortId}/rollup/info.json

  • /cohort/{cohortId}/rollup/infos

  • Provides the current information that the Prover is aware of for a specific cohort.

  • application/json

// response
{
	"successCode": 200,
	"data": {
		// Latest Snapshot
		"current": {
			"cohortId" : 1
			"nonce": 12,
			"merkleRoot" : "0xd0e15e9b115375b9725e57604121792e871db3128dc0c5683601d8288f755930",
		  "signature":"0x99502d2cd9ea810a6a70f16374466fc45795d2c06f74e48....be8d1982ab130f9c257c73a1955479de6aeacd132133d3f861b"
      "snapshotTime": 1724151658,
      "totalCount": 0,
      "totalWeight": "0",
      "prover": "<https://api-cohort.silicon.network.dev.ozys.work>",
      "status": 0,
      "createdAt": 1724119258
		},
		
		"latestRollup": [ 
      {
        "cohortId": 11,
        "nonce": 0,
        "merkleRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "signature": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "snapshotTime": 1724151658,
        "totalCount": 0,
        "totalWeight": "0",
        "prover": "<https://api-cohort.silicon.network.dev.ozys.work>",
        "status": 0,
        "createdAt": 1724119258
      }
		]
	},
	"message": "success"
}

// fail response
// Responds in the same manner regardless of CohortId validation failure or other errors without error messages.
{
	"successCode":500
}

Rollup Information Dump

GET /cohort/{cohortId}/rollup/chunk/{n00}.csv

  • Provides the current information that the Prover is aware of for a specific cohort, in units of 100.

    • /cohort/{cohortId}/rollup/chunk/0: Provides Rollup information for nonce 0 to 99.

    • /cohort/{cohortId}/rollup/chunk/100: Provides Rollup information for nonce 100 to 199.

    • /cohort/{cohortId}/rollup/chunk/10000: Provides Rollup information for nonce 10000 to 10099.

  • text/csv

merkleRoot,singingTimestamp,signature,nonce
0x2222...8888,1718266000,0x9952...,0
0x3333...7777,1718266010,0x9953...,1
0x4444...6666,1718266020,0x9954...,2

Snapshot Basic Information Provision

GET /prover/{0xMerkleRootHash}/member/count

  • Provides the current information that the Prover is aware of for a specific cohort.

// response
{
  "statusCode": 200,
  "data": {
    "merkleRoot": "0x8d6e8e9749e227c6fa9e06b342df074e71ac3e9e859db776b72fd801ea078f83",
    "totalCount": 4,
    "totalWeight": "10"
  },

	"message": "success"
}

// fail response
{
	"successCode":500
}

GET /prover/{0xMerkleRootHash}/member/chunk/{n}

  • Provides the current information that the Prover is aware of for a specific cohort.

  • Query members for a specific merkle root in units of 1000 * n

// response
{
  "statusCode": 200,
  "data": {
    "participants": [
      {
        "address": "0xe265082f598d288e0cbafc009e2dcd1193b2cef1",
        "weight": "4"
      },
      {
        "address": "0x4774ba6738c1c739811744f5b6f8e3631825a88d",
        "weight": "3"
      },
      {
        "address": "0x2d761c33fc8e4d4a42c1379b817b84060e04de54",
        "weight": "2"
      },
      {
        "address": "0x29524b9eab6e86afa6891c89db62e7eba959bbf4",
        "weight": "1"
      }, ... 
    ]
  }
}

// fail response
{
	"successCode":500
}

GET /prover/{0xMerkleRootHash}/info.json

  • Provides information for a specific snapshot.

  • application/json

// response
{
  "successCode": 200,
  "data": {
	  "totalCount": 11,
	  "totalWeight": "72"
  }
}

// fail response
// Responds in the same manner regardless of merkleRootHash validation failure or other errors without error messages.
{
	"successCode":500
	"message": "internal_server_error"
}

Snapshot Proof Information Dump

GET /prover/{0xMerkleRootHash}/chunk/{n0000}.csv

  • Provides all associated addresses and information that can prove the merkleRootHash for a specific snapshot. Provided in units of 10000.

    • /prover/{0xMerkleRootHash}/chunk/0.csv: Provides information for index 1 to 10000.

    • /prover/{0xMerkleRootHash}/chunk/10000.csv: Provides information for index 10001 to 20000.

    • /prover/{0xMerkleRootHash}/chunk/20000.csv: Provides information for index 20001 to 30000.

    • /prover/{0xMerkleRootHash}/chunk/100000.csv: Provides information for index 100001 to 110000.

  • text/csv

index,address,weight
1,0xc6a2ad8cc6e4a7e08fc37cc5954be07d499e7654,0x445435
2,0x2f3713f388bc4b8b364a7a2d8d57c5ff4e054830,0x2454
3,0x662b67d00a13faf93254714dd601f5ed49ef2f51,0x1454
4,0xa323d7386b671e8799dca3582d6658fdcdcd940a,0x44
...

Snapshot Proof Information Retrieval

GET /prover/{0xMerkleRootHash}/proof/{0xAddress}

  • Provides the proof information for the requested address in the specified snapshot.

  • application/json

// response
{
  "statusCode": 200,
  "data": {
    "merkleRoot": "0x0000000000000006d5a671e01e395d007592733b7350b46496125d7d13e",
    "accountAddress": "0x000000000B1c24066781dcf6D5a2E0a8e580D1bd",
    "index": "0",
    "weight": "11",
    "proofs": [
      "0x48d95521cdc425f30d203135600000000000020e7833945b6b932590fe1d2b47",
      "0x775ba10acf69f4c46f9c4d06a000000000000dc3fa2e9179fd92dbe1d1755732",
      "0x2537ad083a72a378000000000000000000000fcdc6644b4eb70fa4707148e043",
      "0xbd53d4a35056a7fb1e031e2cbdac1e3a0d00000000000000629669c5a34bf6162"
    ]
  }
  
  // fail response
  {
	  "statusCode": 500,
	  "message": error_message
  }

Identity-EOA Mapping Signature Information Retrieval

GET /identity/signature/{signer}/{0xIdentity}

  • Provides the proof information for the requested address in the specified snapshot.

  • application/json

{
	"successCode": 200,
	"data":{
		"signature":"0xd0e15e9b115375b9725e57604121792e871db3128dc0c5683601d8288f75593099f80a49c04a10a3158e13edf16c9f87f5e1cab776e930f036f6f00d2e2c4d401b"	
	}
}

  // fail response
  {
	  "statusCode": error_code,
	  "message": error_message
  }

Identity-EOA Mapping Signature Information Dump

GGET /identity/chunk/{signer}/{n0000}.csv

  • Provides EOA mappings for all identities related to a specific cohort. Provided in units of 10000.

    • /identity/{signer}/chunk/0.csv: Provides the first mapping from 1 to 10000.

    • /identity/{signer}/chunk/10000.csv: Provides mapping information from 10001 to 20000.

    • /identity/{signer}/chunk/20000.csv: Provides mapping information from 20001 to 30000.

    • /identity/{signer}/chunk/100000.csv: Provides mapping information from 100001 to 110000.

  • text/csv

identity,address,signature
0x0000000000000000000000000000000000000400,0xc6a2ad8cc6e4a7e08fc37cc5954be07d499e7654,0xd0e15e9b115375b9725e57604121792e871db3128dc0c...b776e930f036f6f00d2e2c4d401b
0x0000000000000000000000000000000000000500,0x2f3713f388bc4b8b364a7a2d8d57c5ff4e054830,0x93099f80a49c040a49a10a3158e13edf3128dc9f87f5e1cab...d0e0c5683601d8288f755d1b
0x0000000000000000000000000000000000000600,0x662b67d00a13faf93254714dd601f5ed49ef2f51,0x792e810a3158e13edf8e13edf16c7f5e1cab77...115375b9725e576041213099f80a49c041c
0x0000000000000000000000000000000000000700,0xa323d7386b671e8799dca3582d6658fdcdcd940a,0x31f87f5e1cab776e930f...3158e513edf16c9d0e15e9b115375b9725e57604121792e871d1b
...

Last updated

Logo

Copyright HIGHDRAW. All Rights Reserved.