forked from ProvableHQ/snarkOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ProvableHQ#1590 from AleoHQ/pool_endpoints
Add extra RPC endpoints for operator
- Loading branch information
Showing
9 changed files
with
209 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Get Provers | ||
Returns the Aleo addresses of all provers which have submitted shares to an operator. | ||
|
||
### Arguments | ||
|
||
None | ||
|
||
### Response | ||
|
||
| Parameter | Type | Description | | ||
|:---------:|:------:|:---------------------------------------------------------------------:| | ||
| `result` | array | All of the Aleo addresses which have submitted shares to the operator | | ||
|
||
### Example Request | ||
```ignore | ||
curl --data-binary '{"jsonrpc": "2.0", "id":"1", "method": "getprovers", "params": [] }' -H 'content-type: application/json' http://127.0.0.1:3030/ | ||
``` | ||
|
||
### Example Response | ||
```json | ||
{ | ||
"jsonrpc":"2.0", | ||
"result": ["aleo1...", "aleo1..."], | ||
"id":"1" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Get Shares | ||
Returns the total number of shares submitted to an operator. | ||
|
||
### Arguments | ||
|
||
None | ||
|
||
### Response | ||
|
||
| Parameter | Type | Description | | ||
|:---------:|:------:|:----------------------------------------------------:| | ||
| `result` | u64 | The total number of shares submitted to the operator | | ||
|
||
### Example Request | ||
```ignore | ||
curl --data-binary '{"jsonrpc": "2.0", "id":"1", "method": "getshares", "params": [] }' -H 'content-type: application/json' http://127.0.0.1:3030/ | ||
``` | ||
|
||
### Example Response | ||
```json | ||
{ | ||
"jsonrpc":"2.0", | ||
"result":"46239", | ||
"id":"1" | ||
} | ||
``` |
28 changes: 28 additions & 0 deletions
28
src/rpc/documentation/public_endpoints/getsharesforprover.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Get Shares For Prover | ||
Returns the number of shares submitted by a prover, given their address. | ||
|
||
### Arguments | ||
|
||
| Parameter | Type | Required | Description | | ||
|:---------:|:------:|:--------:|:------------------------------:| | ||
| `prover` | string | Yes | The Aleo address of the prover | | ||
|
||
### Response | ||
|
||
| Parameter | Type | Description | | ||
|:---------:|:------:|:--------------------------------------------:| | ||
| `result` | u64 | The number of shares submitted by the prover | | ||
|
||
### Example Request | ||
```ignore | ||
curl --data-binary '{"jsonrpc": "2.0", "id":"1", "method": "getsharesforprover", "params": ["aleo_address"] }' -H 'content-type: application/json' http://127.0.0.1:3030/ | ||
``` | ||
|
||
### Example Response | ||
```json | ||
{ | ||
"jsonrpc":"2.0", | ||
"result":"581", | ||
"id":"1" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters