Skip to content

Commit

Permalink
docs: re-generate rpc-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Apr 21, 2023
1 parent 9e79847 commit a23d582
Showing 1 changed file with 28 additions and 100 deletions.
128 changes: 28 additions & 100 deletions rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5202,7 +5202,7 @@ It includes the rewards details and when it is finalized.

* `txs_fee`: [`Capacity`](#type-capacity) - The total fees of all transactions committed in the block.

* `finalized_at`: [`H256`](#type-h256) - The block hash of the block which creates the rewards as cells in its cellbase transaction.
* `finalized_at`: https://doc.rust-lang.org/1.67.1/core/clone/trait.Clone.html - Returns a copy of the value. [Read more](#method-clone)


### Type `BlockFilter`
Expand Down Expand Up @@ -5289,11 +5289,7 @@ Miners optional pick transactions and then assemble the final block.

Miners must use it unchanged in the assembled block.

* `parent_hash`: [`H256`](#type-h256) - The parent block hash of the new block.

Miners must use it unchanged in the assembled block.

* `cycles_limit`: [`Cycle`](#type-cycle) - The cycles limit.
* `parent_hash`: [`Cycle`](#type-cycle) - The cycles limit.

Miners must keep the total cycles below this limit, otherwise, the CKB node will reject the block submission.

Expand Down Expand Up @@ -5388,7 +5384,7 @@ The cell data content and hash.

* `content`: [`JsonBytes`](#type-jsonbytes) - Cell content.

* `hash`: [`H256`](#type-h256) - Cell content hash.
* `hash`: https://doc.rust-lang.org/1.67.1/core/fmt/trait.Debug.html - Formats the value using the given formatter. [Read more](#method-fmt)


### Type `CellDep`
Expand Down Expand Up @@ -5584,9 +5580,7 @@ The cellbase transaction template of the new block for miners.

`CellbaseTemplate` is a JSON object with the following fields.

* `hash`: [`H256`](#type-h256) - The cellbase transaction hash.

* `cycles`: [`Cycle`](#type-cycle) `|` `null` - The hint of how many cycles this transaction consumes.
* `hash`: [`Cycle`](#type-cycle) `|` `null` - The hint of how many cycles this transaction consumes.

Miners can utilize this field to ensure that the total cycles do not exceed the limit while selecting transactions.

Expand Down Expand Up @@ -5636,15 +5630,7 @@ Consensus defines various parameters that influence chain consensus

* `id`: `string` - Names the network.

* `genesis_hash`: [`H256`](#type-h256) - The genesis block hash

* `dao_type_hash`: [`H256`](#type-h256) `|` `null` - The dao type hash

* `secp256k1_blake160_sighash_all_type_hash`: [`H256`](#type-h256) `|` `null` - The secp256k1_blake160_sighash_all_type_hash

* `secp256k1_blake160_multisig_all_type_hash`: [`H256`](#type-h256) `|` `null` - The secp256k1_blake160_multisig_all_type_hash

* `initial_primary_epoch_reward`: [`Capacity`](#type-capacity) - The initial primary_epoch_reward
* `genesis_hash`: [`Capacity`](#type-capacity) `|` `null` `|` `null` `|` `null` - The initial primary_epoch_reward

* `secondary_epoch_reward`: [`Capacity`](#type-capacity) - The secondary primary_epoch_reward

Expand All @@ -5670,9 +5656,7 @@ Consensus defines various parameters that influence chain consensus

* `tx_version`: [`Version`](#type-version) - The tx version number supported

* `type_id_code_hash`: [`H256`](#type-h256) - The “TYPE_ID” in hex

* `max_block_proposals_limit`: [`Uint64`](#type-uint64) - The Limit to the number of proposals per block
* `type_id_code_hash`: [`Uint64`](#type-uint64) - The Limit to the number of proposals per block

* `primary_epoch_reward_halving_interval`: [`Uint64`](#type-uint64) - Primary reward is cut in half every halving_interval epoch

Expand Down Expand Up @@ -5781,9 +5765,7 @@ Chain information.

`DeploymentsInfo` is a JSON object with the following fields.

* `hash`: [`H256`](#type-h256) - requested block hash

* `epoch`: [`EpochNumber`](#type-epochnumber) - requested block epoch
* `hash`: [`EpochNumber`](#type-epochnumber) - requested block epoch

* `deployments`: `{ [ key:` [`DeploymentPos`](#type-deploymentpos) `]: ` [`DeploymentInfo`](#type-deploymentinfo) `}` - deployments info

Expand Down Expand Up @@ -5931,29 +5913,7 @@ Refer to RFC [CKB Block Structure](https://github.com/nervosnetwork/rfcs/blob/ma

See `EpochNumberWithFraction` for details.

* `parent_hash`: [`H256`](#type-h256) - The header hash of the parent block.

* `transactions_root`: [`H256`](#type-h256) - The commitment to all the transactions in the block.

It is a hash on two Merkle Tree roots:

* The root of a CKB Merkle Tree, which items are the transaction hashes of all the transactions in the block.

* The root of a CKB Merkle Tree, but the items are the transaction witness hashes of all the transactions in the block.

* `proposals_hash`: [`H256`](#type-h256) - The hash on `proposals` in the block body.

It is all zeros when `proposals` is empty, or the hash on all the bytes concatenated together.

* `extra_hash`: [`H256`](#type-h256) - The hash on `uncles` and extension in the block body.

The uncles hash is all zeros when `uncles` is empty, or the hash on all the uncle header hashes concatenated together. The extension hash is the hash of the extension. The extra hash is the hash on uncles hash and extension hash concatenated together.

##### Notice

This field is renamed from `uncles_hash` since 0.100.0. More details can be found in [CKB RFC 0031](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0031-variable-length-header-field/0031-variable-length-header-field.md).

* `dao`: [`Byte32`](#type-byte32) - DAO fields.
* `parent_hash`: https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0031-variable-length-header-field/0031-variable-length-header-field.md - DAO fields.

See RFC [Deposit and Withdraw in Nervos DAO](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0023-dao-deposit-withdraw/0023-dao-deposit-withdraw.md#calculation).

Expand Down Expand Up @@ -5993,7 +5953,7 @@ This structure is serialized into a JSON object with field `hash` and all the fi

* `inner`: [`Header`](#type-header) - All the fields in `Header` are included in `HeaderView` in JSON.

* `hash`: [`H256`](#type-h256) - The header hash. It is also called the block hash.
* `hash`: https://doc.rust-lang.org/1.67.1/core/clone/trait.Clone.html - Returns a copy of the value. [Read more](#method-clone)


### Type `IndexerCell`
Expand Down Expand Up @@ -6025,9 +5985,7 @@ Cells capacity

* `capacity`: [`Capacity`](#type-capacity) - total capacity

* `block_hash`: [`H256`](#type-h256) - indexed tip block hash

* `block_number`: [`BlockNumber`](#type-blocknumber) - indexed tip block number
* `block_hash`: [`BlockNumber`](#type-blocknumber) - indexed tip block number


### Type `IndexerOrder`
Expand Down Expand Up @@ -6123,9 +6081,7 @@ Indexer tip information

`IndexerTip` is a JSON object with the following fields.

* `block_hash`: [`H256`](#type-h256) - indexed tip block hash

* `block_number`: [`BlockNumber`](#type-blocknumber) - indexed tip block number
* `block_hash`: [`BlockNumber`](#type-blocknumber) - indexed tip block number


### Type `IndexerTx`
Expand All @@ -6142,7 +6098,7 @@ Indexer Transaction Object

`IndexerTxWithCell` is a JSON object with the following fields.

* `tx_hash`: [`H256`](#type-h256) - transaction hash
* `tx_hash`: [`H256`] - transaction hash

* `block_number`: [`BlockNumber`](#type-blocknumber) - the number of the transaction committed in the block

Expand All @@ -6160,7 +6116,7 @@ Indexer Transaction Object

`IndexerTxWithCells` is a JSON object with the following fields.

* `tx_hash`: [`H256`](#type-h256) - transaction hash
* `tx_hash`: [`H256`] - transaction hash

* `block_number`: [`BlockNumber`](#type-blocknumber) - the number of the transaction committed in the block

Expand Down Expand Up @@ -6287,7 +6243,7 @@ CKB Merkle Tree is a [CBMT](https://github.com/nervosnetwork/rfcs/blob/master/rf

These are indices in the CBMT tree not the transaction indices in the block.

* `lemmas`: `Array<` [`H256`](#type-h256) `>` - Hashes of all siblings along the paths to root.
* `lemmas`: `Array<` https://doc.rust-lang.org/1.67.1/core/clone/trait.Clone.html `>` - Returns a copy of the value. [Read more](#method-clone)


### Type `MinerReward`
Expand Down Expand Up @@ -6349,9 +6305,7 @@ Reference to a cell via transaction hash and output index.

`OutPoint` is a JSON object with the following fields.

* `tx_hash`: [`H256`](#type-h256) - Transaction hash in which the cell is an output.

* `index`: [`Uint32`](#type-uint32) - The output index of the cell in the transaction specified by `tx_hash`.
* `tx_hash`: [`Uint32`](#type-uint32) - The output index of the cell in the transaction specified by `tx_hash`.


### Type `OutputsValidator`
Expand Down Expand Up @@ -6653,9 +6607,7 @@ Describes the lock script and type script for a cell.

`Script` is a JSON object with the following fields.

* `code_hash`: [`H256`](#type-h256) - The hash used to match the script code.

* `hash_type`: [`ScriptHashType`](#type-scripthashtype) - Specifies how to use the `code_hash` to match the script code.
* `code_hash`: [`ScriptHashType`](#type-scripthashtype) - Specifies how to use the `code_hash` to match the script code.

* `args`: [`JsonBytes`](#type-jsonbytes) - Arguments for script.

Expand Down Expand Up @@ -6769,13 +6721,7 @@ Refer to RFC [CKB Transaction Structure](https://github.com/nervosnetwork/rfcs/b

Unlike inputs, the live cells can be used as cell deps in multiple transactions.

* `header_deps`: `Array<` [`H256`](#type-h256) `>` - An array of header deps.

The block must already be in the canonical chain.

Lock script and type script can read the header information of blocks listed here.

* `inputs`: `Array<` [`CellInput`](#type-cellinput) `>` - An array of input cells.
* `header_deps`: `Array<` `Array<` [`CellInput`](#type-cellinput) `>` `>` - An array of input cells.

In the canonical chain, any cell can only appear as an input once.

Expand All @@ -6800,9 +6746,7 @@ Merkle proof for transactions’ witnesses in a block.

`TransactionAndWitnessProof` is a JSON object with the following fields.

* `block_hash`: [`H256`](#type-h256) - Block hash

* `transactions_proof`: [`MerkleProof`](#type-merkleproof) - Merkle proof of all transactions’ hash
* `block_hash`: [`MerkleProof`](#type-merkleproof) - Merkle proof of all transactions’ hash

* `witnesses_proof`: [`MerkleProof`](#type-merkleproof) - Merkle proof of transactions’ witnesses

Expand All @@ -6815,11 +6759,7 @@ Merkle proof for transactions in a block.

`TransactionProof` is a JSON object with the following fields.

* `block_hash`: [`H256`](#type-h256) - Block hash

* `witnesses_root`: [`H256`](#type-h256) - Merkle root of all transactions’ witness hash

* `proof`: [`MerkleProof`](#type-merkleproof) - Merkle proof of all transactions’ hash
* `block_hash`: [`MerkleProof`](#type-merkleproof) - Merkle proof of all transactions’ hash


### Type `TransactionTemplate`
Expand All @@ -6830,9 +6770,7 @@ Transaction template which is ready to be committed in the new block.

`TransactionTemplate` is a JSON object with the following fields.

* `hash`: [`H256`](#type-h256) - Transaction hash.

* `required`: `boolean` - Whether miner must include this transaction in the new block.
* `hash`: `boolean` - Whether miner must include this transaction in the new block.

* `cycles`: [`Cycle`](#type-cycle) `|` `null` - The hint of how many cycles this transaction consumes.

Expand Down Expand Up @@ -6912,7 +6850,7 @@ This structure is serialized into a JSON object with field `hash` and all the fi

* `inner`: [`Transaction`](#type-transaction) - All the fields in `Transaction` are included in `TransactionView` in JSON.

* `hash`: [`H256`](#type-h256) - The transaction hash.
* `hash`: https://doc.rust-lang.org/1.67.1/core/clone/trait.Clone.html - Returns a copy of the value. [Read more](#method-clone)


### Type `TransactionWithStatusResponse`
Expand All @@ -6927,6 +6865,8 @@ The JSON view of a transaction as well as its status.

* `cycles`: [`Cycle`](#type-cycle) `|` `null` - The transaction consumed cycles.

* `enter_tx_pool_timestamp`: https://doc.rust-lang.org/1.67.1/std/primitive.u64.html `|` `null` - If the transaction is in tx-pool, `enter_tx_pool_timestamp` represent when it enter the tx-pool

* `tx_status`: [`TxStatus`](#type-txstatus) - The Transaction status.


Expand All @@ -6938,9 +6878,7 @@ Tx-pool entries object

`TxPoolEntries` is a JSON object with the following fields.

* `pending`: `{ [ key:` [`H256`](#type-h256) `]: ` [`TxPoolEntry`](#type-txpoolentry) `}` - Pending tx verbose info

* `proposed`: `{ [ key:` [`H256`](#type-h256) `]: ` [`TxPoolEntry`](#type-txpoolentry) `}` - Proposed tx verbose info
* `pending`: `{ [ key:` [`TxPoolEntry`](#type-txpoolentry) `]: ` `{ [ key:` [`TxPoolEntry`](#type-txpoolentry) `]: ` https://doc.rust-lang.org/1.67.1/core/clone/trait.Clone.html `}` `}` - Returns a copy of the value. [Read more](#method-clone)


### Type `TxPoolEntry`
Expand Down Expand Up @@ -6974,9 +6912,7 @@ Array of transaction ids

`TxPoolIds` is a JSON object with the following fields.

* `pending`: `Array<` [`H256`](#type-h256) `>` - Pending transaction ids

* `proposed`: `Array<` [`H256`](#type-h256) `>` - Proposed transaction ids
* `pending`: `Array<` `Array<` https://doc.rust-lang.org/1.67.1/core/clone/trait.Clone.html `>` `>` - Returns a copy of the value. [Read more](#method-clone)


### Type `TxPoolInfo`
Expand All @@ -6987,11 +6923,7 @@ Transaction pool information.

`TxPoolInfo` is a JSON object with the following fields.

* `tip_hash`: [`H256`](#type-h256) - The associated chain tip block hash.

The transaction pool is stateful. It manages the transactions which are valid to be committed after this block.

* `tip_number`: [`BlockNumber`](#type-blocknumber) - The block number of the block `tip_hash`.
* `tip_hash`: [`BlockNumber`](#type-blocknumber) - The block number of the block `tip_hash`.

* `pending`: [`Uint64`](#type-uint64) - Count of transactions in the pending state.

Expand Down Expand Up @@ -7032,9 +6964,7 @@ Transaction status and the block hash if it is committed.

* `status`: [`Status`](#type-status) - The transaction status, allowed values: “pending”, “proposed” “committed” “unknown” and “rejected”.

* `block_hash`: [`H256`](#type-h256) `|` `null` - The block hash of the block which has committed this transaction in the canonical chain.

* `reason`: `string` `|` `null` - The reason why the transaction is rejected
* `block_hash`: `string` `|` `null` `|` `null` - The reason why the transaction is rejected


### Type `U256`
Expand Down Expand Up @@ -7144,9 +7074,7 @@ The uncle block template of the new block for miners.

`UncleTemplate` is a JSON object with the following fields.

* `hash`: [`H256`](#type-h256) - The uncle block hash.

* `required`: `boolean` - Whether miners must include this uncle in the submit block.
* `hash`: `boolean` - Whether miners must include this uncle in the submit block.

* `proposals`: `Array<` [`ProposalShortId`](#type-proposalshortid) `>` - The proposals of the uncle block.

Expand Down

0 comments on commit a23d582

Please sign in to comment.