Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions spec/JSON-RPC.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ When `Transaction` is included in any response, there will be an additional fiel
* [chain_executeTransaction](#chain_executetransaction)
* [chain_executeVM](#chain_executevm)
* [chain_getNetworkId](#chain_getnetworkid)
* [chain_getPossibleAuthors](#chain_getpossibleauthors)
***
* [mempool_sendSignedTransaction](#mempool_sendsignedtransaction)
* [mempool_getErrorHint](#mempool_geterrorhint)
Expand Down Expand Up @@ -1561,6 +1562,39 @@ No parameters

[Back to **List of methods**](#list-of-methods)

## chain_getPossibleAuthors
Returns the list of accounts that can generate the blocks at the given block number.

It returns `null` if anyone can generate the block.
Only PoW and Solo chains can return `null`. Other chains never return `null`.

The possible authors of the genesis block are always in the list that contains only the author of the genesis block, regardless of the chain types.

### Params
1. block number: `number` | `null`

### Returns
`null` | `PlatformAddress[]`

### Request Example
```
curl \
-H 'Content-Type: application/json' \
-d '{"jsonrpc": "2.0", "method": "chain_getPossibleAuthors", "params": [null], "id": "who-can-be-authors"}' \
localhost:8080
```

### Response Example
```
{
"jsonrpc":"2.0",
"result": ["tccq94guhkrfndnehnca06dlkxcfuq0gdlamvw9ga4f", "tccq8p9hr53lnxnhzcn0d065lux7etz22azaca786tt", "tccq8fj6lxn9tchqdqqe93yaga6fzxh5rndzu8k2gdw", "tccq9y6e0k6af9058qq4h4ffpt9xmat2vkeyue23j8y"],
"id": "who-can-be-authors"
}
```

[Back to **List of methods**](#list-of-methods)

## mempool_sendSignedTransaction
Sends a signed transaction, returning its hash.

Expand Down