Clique module
This method drops a currently running proposal. The signer will not cast further votes (either for or against) the address.
Invocation |
---|
{"method":"clique_discard","params":[signer]} |
Parameter | Type | Description |
---|---|---|
signer | Address | |
Returned type | Description |
---|---|
Boolean | |
Example request of clique_discard
curl --data '{"method":"clique_discard","params":[signer],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Retrieves the signer of the block with the given hash. Returns error of a block with the given hash does not exist.
Invocation |
---|
{"method":"clique_getBlockSigner","params":[hash]} |
Parameter | Type | Description |
---|---|---|
hash | Hash | |
Returned type | Description |
---|---|
Address | |
Example request of clique_getBlockSigner
curl --data '{"method":"clique_getBlockSigner","params":[hash],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Retrieves the list of authorized signers.
Invocation |
---|
{"method":"clique_getSigners","params":[]} |
Returned type | Description |
---|---|
Address | |
Example request of clique_getSigners
curl --data '{"method":"clique_getSigners","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Retrieves the list of authorized signers but with signer names instead of addresses
Invocation |
---|
{"method":"clique_getSignersAnnotated","params":[]} |
Returned type | Description |
---|---|
String | |
Example request of clique_getSignersAnnotated
curl --data '{"method":"clique_getSignersAnnotated","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Retrieves the list of authorized signers at the specified block by hash.
Invocation |
---|
{"method":"clique_getSignersAtHash","params":[hash]} |
Parameter | Type | Description |
---|---|---|
hash | Hash | |
Returned type | Description |
---|---|
Address | |
Example request of clique_getSignersAtHash
curl --data '{"method":"clique_getSignersAtHash","params":[hash],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Retrieves the list of authorized signers at the specified block by hash but with signer names instead of addresses
Invocation |
---|
{"method":"clique_getSignersAtHashAnnotated","params":[hash]} |
Parameter | Type | Description |
---|---|---|
hash | Hash | |
Returned type | Description |
---|---|
String | |
Example request of clique_getSignersAtHashAnnotated
curl --data '{"method":"clique_getSignersAtHashAnnotated","params":[hash],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Retrieves the list of authorized signers at the specified block by block number.
Invocation |
---|
{"method":"clique_getSignersAtNumber","params":[number]} |
Parameter | Type | Description |
---|---|---|
number | Quantity | |
Returned type | Description |
---|---|
Address | |
Example request of clique_getSignersAtNumber
curl --data '{"method":"clique_getSignersAtNumber","params":[number],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Retrieves a snapshot of all clique state at a given block.
Invocation |
---|
{"method":"clique_getSnapshot","params":[]} |
Returned type | Description |
---|---|
Snapshot object | |
Example request of clique_getSnapshot
Objects in clique_getSnapshot
curl --data '{"method":"clique_getSnapshot","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Snapshot
Field name | Type |
---|---|
Number | Quantity |
Hash | Hash |
Signers | Array |
SignerLimit | Quantity |
Retrieves the state snapshot at a given block.
Invocation |
---|
{"method":"clique_getSnapshotAtHash","params":[hash]} |
Parameter | Type | Description |
---|---|---|
hash | Hash | |
Returned type | Description |
---|---|
Snapshot object | |
Example request of clique_getSnapshotAtHash
Objects in clique_getSnapshotAtHash
curl --data '{"method":"clique_getSnapshotAtHash","params":[hash],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Snapshot
Field name | Type |
---|---|
Number | Quantity |
Hash | Hash |
Signers | Array |
SignerLimit | Quantity |
Forces Clique block producer to produce a new block
Invocation |
---|
{"method":"clique_produceBlock","params":[parentHash]} |
Parameter | Type | Description |
---|---|---|
parentHash | Hash | |
Returned type | Description |
---|---|
Boolean | |
Example request of clique_produceBlock
curl --data '{"method":"clique_produceBlock","params":[parentHash],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Adds a new authorization proposal that the signer will attempt to push through. If the
vote
parameter is true, the local signer votes for the given address to be included in the set of authorized signers. With vote
set to false, the signer is against the address.Invocation |
---|
{"method":"clique_propose","params":[signer, vote]} |
Parameter | Type | Description |
---|---|---|
signer | Address | |
vote | Boolean | |
Returned type | Description |
---|---|
Boolean | |
Example request of clique_propose
curl --data '{"method":"clique_propose","params":[signer, vote],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Last modified 1yr ago