diff --git a/docs/ckb_rpc_openrpc/json/alert_rpc_doc.json b/docs/ckb_rpc_openrpc/json/alert_rpc_doc.json deleted file mode 100644 index fee4a3d6f34..00000000000 --- a/docs/ckb_rpc_openrpc/json/alert_rpc_doc.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "components": { - "schemas": { - "Alert": { - "description": "An alert is a message about critical problems to be broadcast to all nodes via the p2p network.\n\n## Examples\n\nAn example in JSON\n\n```\n # serde_json::from_str::(r#\"\n {\n \"id\": \"0x1\",\n \"cancel\": \"0x0\",\n \"min_version\": \"0.1.0\",\n \"max_version\": \"1.0.0\",\n \"priority\": \"0x1\",\n \"message\": \"An example alert message!\",\n \"notice_until\": \"0x24bcca57c00\",\n \"signatures\": [\n \"0xbd07059aa9a3d057da294c2c4d96fa1e67eeb089837c87b523f124239e18e9fc7d11bb95b720478f7f937d073517d0e4eb9a91d12da5c88a05f750362f4c214dd0\",\n \"0x0242ef40bb64fe3189284de91f981b17f4d740c5e24a3fc9b70059db6aa1d198a2e76da4f84ab37549880d116860976e0cf81cd039563c452412076ebffa2e4453\"\n ]\n }\n # \"#).unwrap();\n```", - "properties": { - "cancel": { - "$ref": "#/components/schemas/Uint32", - "description": "Cancel a previous sent alert." - }, - "id": { - "$ref": "#/components/schemas/Uint32", - "description": "The identifier of the alert. Clients use id to filter duplicated alerts." - }, - "max_version": { - "description": "Optionally set the maximal version of the target clients.\n\nSee [Semantic Version](https://semver.org/) about how to specify a version.", - "type": [ - "string", - "null" - ] - }, - "message": { - "description": "Alert message.", - "type": "string" - }, - "min_version": { - "description": "Optionally set the minimal version of the target clients.\n\nSee [Semantic Version](https://semver.org/) about how to specify a version.", - "type": [ - "string", - "null" - ] - }, - "notice_until": { - "$ref": "#/components/schemas/Uint64", - "description": "The alert is expired after this timestamp." - }, - "priority": { - "$ref": "#/components/schemas/Uint32", - "description": "Alerts are sorted by priority, highest first." - }, - "signatures": { - "description": "The list of required signatures.", - "items": { - "$ref": "#/components/schemas/JsonBytes" - }, - "type": "array" - } - }, - "required": [ - "cancel", - "id", - "message", - "notice_until", - "priority", - "signatures" - ], - "type": "object" - }, - "JsonBytes": { - "type": "string" - }, - "Uint32": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "Uint64": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - } - } - }, - "info": { - "description": " RPC Module Alert for network alerts.\n\n An alert is a message about critical problems to be broadcast to all nodes via the p2p network.\n\n The alerts must be signed by 2-of-4 signatures, where the public keys are hard-coded in the source code\n and belong to early CKB developers.", - "title": "alert_rpc", - "version": "0.115.0-pre" - }, - "methods": [ - { - "description": " Sends an alert.\n\n This RPC returns `null` on success.\n\n ## Errors\n\n * [`AlertFailedToVerifySignatures (-1000)`](../enum.RPCError.html#variant.AlertFailedToVerifySignatures) - Some signatures in the request are invalid.\n * [`P2PFailedToBroadcast (-101)`](../enum.RPCError.html#variant.P2PFailedToBroadcast) - Alert is saved locally but has failed to broadcast to the P2P network.\n * `InvalidParams (-32602)` - The time specified in `alert.notice_until` must be in the future.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"jsonrpc\": \"2.0\",\n \"method\": \"send_alert\",\n \"params\": [\n {\n \"id\": \"0x1\",\n \"cancel\": \"0x0\",\n \"priority\": \"0x1\",\n \"message\": \"An example alert message!\",\n \"notice_until\": \"0x24bcca57c00\",\n \"signatures\": [\n \"0xbd07059aa9a3d057da294c2c4d96fa1e67eeb089837c87b523f124239e18e9fc7d11bb95b720478f7f937d073517d0e4eb9a91d12da5c88a05f750362f4c214dd0\",\n \"0x0242ef40bb64fe3189284de91f981b17f4d740c5e24a3fc9b70059db6aa1d198a2e76da4f84ab37549880d116860976e0cf81cd039563c452412076ebffa2e4453\"\n ]\n }\n ],\n \"id\": 42\n }\n ```\n\n Response\n\n ```json\n {\n \"error\": {\n \"code\": -1000,\n \"data\": \"SigNotEnough\",\n \"message\":\"AlertFailedToVerifySignatures: The count of sigs is less than threshold.\"\n },\n \"jsonrpc\": \"2.0\",\n \"result\": null,\n \"id\": 42\n }\n ```", - "name": "send_alert", - "params": [ - { - "name": "alert", - "schema": { - "$ref": "#/components/schemas/Alert" - } - } - ], - "result": { - "name": "send_alert", - "schema": { - "type": "null" - } - } - } - ], - "openrpc": "1.2.6" -} \ No newline at end of file diff --git a/docs/ckb_rpc_openrpc/json/chain_rpc_doc.json b/docs/ckb_rpc_openrpc/json/chain_rpc_doc.json deleted file mode 100644 index 3523e45751d..00000000000 --- a/docs/ckb_rpc_openrpc/json/chain_rpc_doc.json +++ /dev/null @@ -1,1973 +0,0 @@ -{ - "components": { - "schemas": { - "BlockEconomicState": { - "description": "Block Economic State.\n\nIt includes the rewards details and when it is finalized.", - "properties": { - "finalized_at": { - "$ref": "#/components/schemas/H256", - "description": "The block hash of the block which creates the rewards as cells in its cellbase transaction." - }, - "issuance": { - "$ref": "#/components/schemas/BlockIssuance", - "description": "Block base rewards." - }, - "miner_reward": { - "$ref": "#/components/schemas/MinerReward", - "description": "Block rewards for miners." - }, - "txs_fee": { - "$ref": "#/components/schemas/Uint64", - "description": "The total fees of all transactions committed in the block." - } - }, - "required": [ - "finalized_at", - "issuance", - "miner_reward", - "txs_fee" - ], - "type": "object" - }, - "BlockFilter": { - "description": "Block filter data and hash.", - "properties": { - "data": { - "$ref": "#/components/schemas/JsonBytes", - "description": "The the hex-encoded filter data of the block" - }, - "hash": { - "$ref": "#/components/schemas/Byte32", - "description": "The filter hash, blake2b hash of the parent block filter hash and the filter data, blake2b(parent_block_filter_hash | current_block_filter_data)" - } - }, - "required": [ - "data", - "hash" - ], - "type": "object" - }, - "BlockIssuance": { - "description": "Block base rewards.", - "properties": { - "primary": { - "$ref": "#/components/schemas/Uint64", - "description": "The primary base rewards." - }, - "secondary": { - "$ref": "#/components/schemas/Uint64", - "description": "The secondary base rewards." - } - }, - "required": [ - "primary", - "secondary" - ], - "type": "object" - }, - "BlockResponse": { - "anyOf": [ - { - "$ref": "#/components/schemas/Either_for_BlockView_and_JsonBytes", - "description": "The block response regular format\n\n[`BlockView`] | [\\`SerializedBlock\\`](#type-serializedblock) - The block structure" - }, - { - "$ref": "#/components/schemas/BlockWithCyclesResponse", - "description": "The block with cycles response format\n\nA JSON object with the following fields:\n* `block`: [`BlockView`] | [\\`SerializedBlock\\`](#type-serializedblock) - The block structure\n* `cycles`: `Array<` [`Cycle`](#type-cycle) `>` `|` `null` - The block transactions consumed cycles." - } - ], - "description": "The wrapper represent response of `get_block` | `get_block_by_number`, return a Block with cycles." - }, - "BlockView": { - "description": "The JSON view of a Block including header and body.", - "properties": { - "extension": { - "anyOf": [ - { - "$ref": "#/components/schemas/JsonBytes" - }, - { - "type": "null" - } - ], - "description": "The extension in the block body.\n\nThis is a field introduced in [CKB RFC 0031]. Since the activation of [CKB RFC 0044], this field is at least 32 bytes, and at most 96 bytes. The consensus rule of first 32 bytes is defined in the RFC 0044.\n\n[CKB RFC 0031]: https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0031-variable-length-header-field/0031-variable-length-header-field.md\n[CKB RFC 0044]: https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0044-ckb-light-client/0044-ckb-light-client.md" - }, - "header": { - "$ref": "#/components/schemas/HeaderView", - "description": "The block header." - }, - "proposals": { - "description": "The proposal IDs in the block body.", - "items": { - "$ref": "#/components/schemas/ProposalShortId" - }, - "type": "array" - }, - "transactions": { - "description": "The transactions in the block body.", - "items": { - "$ref": "#/components/schemas/TransactionView" - }, - "type": "array" - }, - "uncles": { - "description": "The uncles blocks in the block body.", - "items": { - "$ref": "#/components/schemas/UncleBlockView" - }, - "type": "array" - } - }, - "required": [ - "header", - "proposals", - "transactions", - "uncles" - ], - "type": "object" - }, - "BlockWithCyclesResponse": { - "description": "BlockResponse with cycles format wrapper", - "properties": { - "block": { - "$ref": "#/components/schemas/Either_for_BlockView_and_JsonBytes", - "description": "The block structure" - }, - "cycles": { - "default": null, - "description": "The block transactions consumed cycles.", - "items": { - "$ref": "#/components/schemas/Uint64" - }, - "type": [ - "array", - "null" - ] - } - }, - "required": [ - "block" - ], - "type": "object" - }, - "Buried": { - "description": "Represent soft fork deployments where the activation epoch is hard-coded into the client implementation", - "properties": { - "active": { - "description": "Whether the rules are active", - "type": "boolean" - }, - "epoch": { - "$ref": "#/components/schemas/Uint64", - "description": "The first epoch which the rules will be enforced" - }, - "status": { - "$ref": "#/components/schemas/SoftForkStatus", - "description": "SoftFork status" - } - }, - "required": [ - "active", - "epoch", - "status" - ], - "type": "object" - }, - "Byte32": { - "items": { - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "CellData": { - "description": "The cell data content and hash.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"content\": \"0x7f454c460201010000000000000000000200f3000100000078000100000000004000000000000000980000000000000005000000400038000100400003000200010000000500000000000000000000000000010000000000000001000000000082000000000000008200000000000000001000000000000001459308d00573000000002e7368737472746162002e74657874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b000000010000000600000000000000780001000000000078000000000000000a0000000000000000000000000000000200000000000000000000000000000001000000030000000000000000000000000000000000000082000000000000001100000000000000000000000000000001000000000000000000000000000000\",\n \"hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\"\n }\n # \"#).unwrap();\n```", - "properties": { - "content": { - "$ref": "#/components/schemas/JsonBytes", - "description": "Cell content." - }, - "hash": { - "$ref": "#/components/schemas/H256", - "description": "Cell content hash." - } - }, - "required": [ - "content", - "hash" - ], - "type": "object" - }, - "CellDep": { - "additionalProperties": false, - "description": "The cell dependency of a transaction.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"dep_type\": \"code\",\n \"out_point\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\"\n }\n }\n # \"#).unwrap();\n```", - "properties": { - "dep_type": { - "$ref": "#/components/schemas/DepType", - "description": "Dependency type." - }, - "out_point": { - "$ref": "#/components/schemas/OutPoint", - "description": "Reference to the cell." - } - }, - "required": [ - "dep_type", - "out_point" - ], - "type": "object" - }, - "CellInfo": { - "description": "The JSON view of a cell combining the fields in cell output and cell data.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"data\": {\n \"content\": \"0x7f454c460201010000000000000000000200f3000100000078000100000000004000000000000000980000000000000005000000400038000100400003000200010000000500000000000000000000000000010000000000000001000000000082000000000000008200000000000000001000000000000001459308d00573000000002e7368737472746162002e74657874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b000000010000000600000000000000780001000000000078000000000000000a0000000000000000000000000000000200000000000000000000000000000001000000030000000000000000000000000000000000000082000000000000001100000000000000000000000000000001000000000000000000000000000000\",\n \"hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\"\n },\n \"output\": {\n \"capacity\": \"0x802665800\",\n \"lock\": {\n \"args\": \"0x\",\n \"code_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"hash_type\": \"data\"\n },\n \"type\": null\n }\n }\n # \"#).unwrap();\n```", - "properties": { - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/CellData" - }, - { - "type": "null" - } - ], - "description": "Cell data.\n\nThis is `null` when the data is not requested, which does not mean the cell data is empty." - }, - "output": { - "$ref": "#/components/schemas/CellOutput", - "description": "Cell fields appears in the transaction `outputs` array." - } - }, - "required": [ - "output" - ], - "type": "object" - }, - "CellInput": { - "additionalProperties": false, - "description": "The input cell of a transaction.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"previous_output\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n },\n \"since\": \"0x0\"\n }\n # \"#).unwrap();\n```", - "properties": { - "previous_output": { - "$ref": "#/components/schemas/OutPoint", - "description": "Reference to the input cell." - }, - "since": { - "$ref": "#/components/schemas/Uint64", - "description": "Restrict when the transaction can be committed into the chain.\n\nSee the RFC [Transaction valid since](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0017-tx-valid-since/0017-tx-valid-since.md)." - } - }, - "required": [ - "previous_output", - "since" - ], - "type": "object" - }, - "CellOutput": { - "additionalProperties": false, - "description": "The fields of an output cell except the cell data.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"capacity\": \"0x2540be400\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n # \"#).unwrap();\n```", - "properties": { - "capacity": { - "$ref": "#/components/schemas/Uint64", - "description": "The cell capacity.\n\nThe capacity of a cell is the value of the cell in Shannons. It is also the upper limit of the cell occupied storage size where every 100,000,000 Shannons give 1-byte storage." - }, - "lock": { - "$ref": "#/components/schemas/Script", - "description": "The lock script." - }, - "type": { - "anyOf": [ - { - "$ref": "#/components/schemas/Script" - }, - { - "type": "null" - } - ], - "description": "The optional type script.\n\nThe JSON field name is \"type\"." - } - }, - "required": [ - "capacity", - "lock" - ], - "type": "object" - }, - "CellWithStatus": { - "description": "The JSON view of a cell with its status information.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"cell\": {\n \"data\": {\n \"content\": \"0x7f454c460201010000000000000000000200f3000100000078000100000000004000000000000000980000000000000005000000400038000100400003000200010000000500000000000000000000000000010000000000000001000000000082000000000000008200000000000000001000000000000001459308d00573000000002e7368737472746162002e74657874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b000000010000000600000000000000780001000000000078000000000000000a0000000000000000000000000000000200000000000000000000000000000001000000030000000000000000000000000000000000000082000000000000001100000000000000000000000000000001000000000000000000000000000000\",\n \"hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\"\n },\n \"output\": {\n \"capacity\": \"0x802665800\",\n \"lock\": {\n \"args\": \"0x\",\n \"code_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"hash_type\": \"data\"\n },\n \"type\": null\n }\n },\n \"status\": \"live\"\n }\n # \"#).unwrap();\n```\n\n```\n # serde_json::from_str::(r#\"\n {\n \"cell\": null,\n \"status\": \"unknown\"\n }\n # \"#).unwrap();\n```", - "properties": { - "cell": { - "anyOf": [ - { - "$ref": "#/components/schemas/CellInfo" - }, - { - "type": "null" - } - ], - "description": "The cell information.\n\nFor performance issues, CKB only keeps the information for live cells." - }, - "status": { - "description": "Status of the cell.\n\nAllowed values: \"live\", \"dead\", \"unknown\".\n\n* `live` - The transaction creating this cell is in the chain, and there are no transactions found in the chain that uses this cell as an input.\n* `dead` - (**Deprecated**: the dead status will be removed since 0.36.0, please do not rely on the logic that differentiates dead and unknown cells.) The transaction creating this cell is in the chain, and a transaction is found in the chain which uses this cell as an input.\n* `unknown` - CKB does not know the status of the cell. Either the transaction creating this cell is not in the chain yet, or it is no longer live.", - "type": "string" - } - }, - "required": [ - "status" - ], - "type": "object" - }, - "Consensus": { - "description": "Consensus defines various parameters that influence chain consensus", - "properties": { - "block_version": { - "$ref": "#/components/schemas/Uint32", - "description": "The block version number supported" - }, - "cellbase_maturity": { - "$ref": "#/components/schemas/Uint64", - "description": "The Cellbase maturity" - }, - "dao_type_hash": { - "$ref": "#/components/schemas/H256", - "description": "The dao type hash" - }, - "epoch_duration_target": { - "$ref": "#/components/schemas/Uint64", - "description": "The expected epoch_duration" - }, - "genesis_hash": { - "$ref": "#/components/schemas/H256", - "description": "The genesis block hash" - }, - "hardfork_features": { - "description": "Hardfork features", - "items": { - "$ref": "#/components/schemas/HardForkFeature" - }, - "type": "array" - }, - "id": { - "description": "Names the network.", - "type": "string" - }, - "initial_primary_epoch_reward": { - "$ref": "#/components/schemas/Uint64", - "description": "The initial primary_epoch_reward" - }, - "max_block_bytes": { - "$ref": "#/components/schemas/Uint64", - "description": "Maximum number of bytes to use for the entire block" - }, - "max_block_cycles": { - "$ref": "#/components/schemas/Uint64", - "description": "Maximum cycles that all the scripts in all the commit transactions can take" - }, - "max_block_proposals_limit": { - "$ref": "#/components/schemas/Uint64", - "description": "The Limit to the number of proposals per block" - }, - "max_uncles_num": { - "$ref": "#/components/schemas/Uint64", - "description": "The maximum amount of uncles allowed for a block" - }, - "median_time_block_count": { - "$ref": "#/components/schemas/Uint64", - "description": "This parameter indicates the count of past blocks used in the median time calculation" - }, - "orphan_rate_target": { - "description": "The expected orphan_rate", - "format": "rational_u256", - "type": "string" - }, - "permanent_difficulty_in_dummy": { - "description": "Keep difficulty be permanent if the pow is dummy", - "type": "boolean" - }, - "primary_epoch_reward_halving_interval": { - "$ref": "#/components/schemas/Uint64", - "description": "Primary reward is cut in half every halving_interval epoch" - }, - "proposer_reward_ratio": { - "description": "The two-step-transaction-confirmation proposer reward ratio", - "format": "rational_u256", - "type": "string" - }, - "secondary_epoch_reward": { - "$ref": "#/components/schemas/Uint64", - "description": "The secondary primary_epoch_reward" - }, - "secp256k1_blake160_multisig_all_type_hash": { - "anyOf": [ - { - "$ref": "#/components/schemas/H256" - }, - { - "type": "null" - } - ], - "description": "The secp256k1_blake160_multisig_all_type_hash" - }, - "secp256k1_blake160_sighash_all_type_hash": { - "anyOf": [ - { - "$ref": "#/components/schemas/H256" - }, - { - "type": "null" - } - ], - "description": "The secp256k1_blake160_sighash_all_type_hash" - }, - "softforks": { - "additionalProperties": { - "$ref": "#/components/schemas/SoftFork" - }, - "description": "`HashMap` - Softforks", - "type": "object" - }, - "tx_proposal_window": { - "$ref": "#/components/schemas/ProposalWindow", - "description": "The two-step-transaction-confirmation proposal window" - }, - "tx_version": { - "$ref": "#/components/schemas/Uint32", - "description": "The tx version number supported" - }, - "type_id_code_hash": { - "$ref": "#/components/schemas/H256", - "description": "The \"TYPE_ID\" in hex" - } - }, - "required": [ - "block_version", - "cellbase_maturity", - "dao_type_hash", - "epoch_duration_target", - "genesis_hash", - "hardfork_features", - "id", - "initial_primary_epoch_reward", - "max_block_bytes", - "max_block_cycles", - "max_block_proposals_limit", - "max_uncles_num", - "median_time_block_count", - "orphan_rate_target", - "permanent_difficulty_in_dummy", - "primary_epoch_reward_halving_interval", - "proposer_reward_ratio", - "secondary_epoch_reward", - "softforks", - "tx_proposal_window", - "tx_version", - "type_id_code_hash" - ], - "type": "object" - }, - "DepType": { - "description": "The dep cell type. Allowed values: \"code\" and \"dep_group\".", - "oneOf": [ - { - "description": "Type \"code\".\n\nUse the cell itself as the dep cell.", - "enum": [ - "code" - ], - "type": "string" - }, - { - "description": "Type \"dep_group\".\n\nThe cell is a dep group which members are cells. These members are used as dep cells instead of the group itself.\n\nThe dep group stores the array of `OutPoint`s serialized via molecule in the cell data. Each `OutPoint` points to one cell member.", - "enum": [ - "dep_group" - ], - "type": "string" - } - ] - }, - "Deployment": { - "description": "RFC0043 deployment params", - "properties": { - "bit": { - "description": "Determines which bit in the `version` field of the block is to be used to signal the softfork lock-in and activation. It is chosen from the set {0,1,2,...,28}.", - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "min_activation_epoch": { - "$ref": "#/components/schemas/Uint64", - "description": "Specifies the epoch at which the softfork is allowed to become active." - }, - "period": { - "$ref": "#/components/schemas/Uint64", - "description": "Specifies length of epochs of the signalling period." - }, - "start": { - "$ref": "#/components/schemas/Uint64", - "description": "Specifies the first epoch in which the bit gains meaning." - }, - "threshold": { - "$ref": "#/components/schemas/Ratio", - "description": "Specifies the minimum ratio of block per `period`, which indicate the locked_in of the softfork during the `period`." - }, - "timeout": { - "$ref": "#/components/schemas/Uint64", - "description": "Specifies an epoch at which the miner signaling ends. Once this epoch has been reached, if the softfork has not yet locked_in (excluding this epoch block's bit state), the deployment is considered failed on all descendants of the block." - } - }, - "required": [ - "bit", - "min_activation_epoch", - "period", - "start", - "threshold", - "timeout" - ], - "type": "object" - }, - "Either_for_BlockView_and_JsonBytes": { - "anyOf": [ - { - "$ref": "#/components/schemas/BlockView", - "description": "A value of type `L`." - }, - { - "$ref": "#/components/schemas/JsonBytes", - "description": "A value of type `R`." - } - ], - "description": "The enum `Either` with variants `Left` and `Right` is a general purpose sum type with two cases." - }, - "Either_for_HeaderView_and_JsonBytes": { - "anyOf": [ - { - "$ref": "#/components/schemas/HeaderView", - "description": "A value of type `L`." - }, - { - "$ref": "#/components/schemas/JsonBytes", - "description": "A value of type `R`." - } - ], - "description": "The enum `Either` with variants `Left` and `Right` is a general purpose sum type with two cases." - }, - "Either_for_TransactionView_and_JsonBytes": { - "anyOf": [ - { - "$ref": "#/components/schemas/TransactionView", - "description": "A value of type `L`." - }, - { - "$ref": "#/components/schemas/JsonBytes", - "description": "A value of type `R`." - } - ], - "description": "The enum `Either` with variants `Left` and `Right` is a general purpose sum type with two cases." - }, - "EpochView": { - "description": "JSON view of an epoch.\n\nCKB adjusts difficulty based on epochs.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"compact_target\": \"0x1e083126\",\n \"length\": \"0x708\",\n \"number\": \"0x1\",\n \"start_number\": \"0x3e8\"\n }\n # \"#).unwrap();\n```", - "properties": { - "compact_target": { - "$ref": "#/components/schemas/Uint32", - "description": "The difficulty target for any block in this epoch." - }, - "length": { - "$ref": "#/components/schemas/Uint64", - "description": "The number of blocks in this epoch." - }, - "number": { - "$ref": "#/components/schemas/Uint64", - "description": "Consecutive epoch number starting from 0." - }, - "start_number": { - "$ref": "#/components/schemas/Uint64", - "description": "The block number of the first block in the epoch.\n\nIt also equals the total count of blocks in all the epochs which epoch number is less than this epoch." - } - }, - "required": [ - "compact_target", - "length", - "number", - "start_number" - ], - "type": "object" - }, - "EstimateCycles": { - "description": "Response result of the RPC method `estimate_cycles`.", - "properties": { - "cycles": { - "$ref": "#/components/schemas/Uint64", - "description": "The count of cycles that the VM has consumed to verify this transaction." - } - }, - "required": [ - "cycles" - ], - "type": "object" - }, - "FeeRateStatistics": { - "description": "The fee_rate statistics information, includes mean and median, unit: shannons per kilo-weight", - "properties": { - "mean": { - "$ref": "#/components/schemas/Uint64", - "description": "mean" - }, - "median": { - "$ref": "#/components/schemas/Uint64", - "description": "median" - } - }, - "required": [ - "mean", - "median" - ], - "type": "object" - }, - "H256": { - "description": "The 32-byte fixed-length binary data.\n\nThe name comes from the number of bits in the data.\n\nIn JSONRPC, it is encoded as a 0x-prefixed hex string.", - "items": { - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "HardForkFeature": { - "description": "The information about one hardfork feature.", - "properties": { - "epoch_number": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ], - "description": "The first epoch when the feature is enabled, `null` indicates that the RFC has never been enabled." - }, - "rfc": { - "description": "The related RFC ID.", - "type": "string" - } - }, - "required": [ - "rfc" - ], - "type": "object" - }, - "HeaderView": { - "description": "The JSON view of a Header.\n\nThis structure is serialized into a JSON object with field `hash` and all the fields in\n[`Header`](struct.Header.html).\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"compact_target\": \"0x1e083126\",\n \"dao\": \"0xb5a3e047474401001bc476b9ee573000c0c387962a38000000febffacf030000\",\n \"epoch\": \"0x7080018000001\",\n \"hash\": \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\",\n \"nonce\": \"0x0\",\n \"number\": \"0x400\",\n \"parent_hash\": \"0xae003585fa15309b30b31aed3dcf385e9472c3c3e93746a6c4540629a6a1ed2d\",\n \"proposals_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"timestamp\": \"0x5cd2b117\",\n \"transactions_root\": \"0xc47d5b78b3c4c4c853e2a32810818940d0ee403423bea9ec7b8e566d9595206c\",\n \"extra_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"version\": \"0x0\"\n }\n # \"#).unwrap();\n```", - "properties": { - "compact_target": { - "$ref": "#/components/schemas/Uint32", - "description": "The block difficulty target.\n\nIt can be converted to a 256-bit target. Miners must ensure the Eaglesong of the header is within the target." - }, - "dao": { - "$ref": "#/components/schemas/Byte32", - "description": "DAO fields.\n\nSee 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)." - }, - "epoch": { - "$ref": "#/components/schemas/Uint64", - "description": "The epoch information of this block.\n\nSee `EpochNumberWithFraction` for details." - }, - "extra_hash": { - "$ref": "#/components/schemas/H256", - "description": "The hash on `uncles` and extension in the block body.\n\nThe 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.\n\n**Notice**\n\nThis field is renamed from `uncles_hash` since 0.100.0. More details can be found in [CKB RFC 0031].\n\n[CKB RFC 0031]: https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0031-variable-length-header-field/0031-variable-length-header-field.md" - }, - "hash": { - "$ref": "#/components/schemas/H256", - "description": "The header hash. It is also called the block hash." - }, - "nonce": { - "$ref": "#/components/schemas/Uint128", - "description": "Miner can modify this field to find a proper value such that the Eaglesong of the header is within the target encoded from `compact_target`." - }, - "number": { - "$ref": "#/components/schemas/Uint64", - "description": "The consecutive block number starting from 0." - }, - "parent_hash": { - "$ref": "#/components/schemas/H256", - "description": "The header hash of the parent block." - }, - "proposals_hash": { - "$ref": "#/components/schemas/H256", - "description": "The hash on `proposals` in the block body.\n\nIt is all zeros when `proposals` is empty, or the hash on all the bytes concatenated together." - }, - "timestamp": { - "$ref": "#/components/schemas/Uint64", - "description": "The block timestamp.\n\nIt is a Unix timestamp in milliseconds (1 second = 1000 milliseconds).\n\nMiners should put the time when the block is created in the header, however, the precision is not guaranteed. A block with a higher block number may even have a smaller timestamp." - }, - "transactions_root": { - "$ref": "#/components/schemas/H256", - "description": "The commitment to all the transactions in the block.\n\nIt is a hash on two Merkle Tree roots:\n\n* The root of a CKB Merkle Tree, which items are the transaction hashes of all the transactions in the block.\n* The root of a CKB Merkle Tree, but the items are the transaction witness hashes of all the transactions in the block." - }, - "version": { - "$ref": "#/components/schemas/Uint32", - "description": "The block version.\n\nIt must equal to 0 now and is reserved for future upgrades." - } - }, - "required": [ - "compact_target", - "dao", - "epoch", - "extra_hash", - "hash", - "nonce", - "number", - "parent_hash", - "proposals_hash", - "timestamp", - "transactions_root", - "version" - ], - "type": "object" - }, - "JsonBytes": { - "type": "string" - }, - "MerkleProof": { - "description": "Proof of CKB Merkle Tree.\n\nCKB Merkle Tree is a [CBMT](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0006-merkle-tree/0006-merkle-tree.md) using CKB blake2b hash as the merge function.", - "properties": { - "indices": { - "description": "Leaves indices in the CBMT that are proved present in the block.\n\nThese are indices in the CBMT tree not the transaction indices in the block.", - "items": { - "$ref": "#/components/schemas/Uint32" - }, - "type": "array" - }, - "lemmas": { - "description": "Hashes of all siblings along the paths to root.", - "items": { - "$ref": "#/components/schemas/H256" - }, - "type": "array" - } - }, - "required": [ - "indices", - "lemmas" - ], - "type": "object" - }, - "MinerReward": { - "description": "Block rewards for miners.", - "properties": { - "committed": { - "$ref": "#/components/schemas/Uint64", - "description": "The transaction fees that are rewarded to miners because the transaction is committed in the block.\n\nMiners get 60% of the transaction fee for each transaction committed in the block." - }, - "primary": { - "$ref": "#/components/schemas/Uint64", - "description": "The primary base block reward allocated to miners." - }, - "proposal": { - "$ref": "#/components/schemas/Uint64", - "description": "The transaction fees that are rewarded to miners because the transaction is proposed in the block or its uncles.\n\nMiners get 40% of the transaction fee for each transaction proposed in the block and committed later in its active commit window." - }, - "secondary": { - "$ref": "#/components/schemas/Uint64", - "description": "The secondary base block reward allocated to miners." - } - }, - "required": [ - "committed", - "primary", - "proposal", - "secondary" - ], - "type": "object" - }, - "OutPoint": { - "additionalProperties": false, - "description": "Reference to a cell via transaction hash and output index.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n }\n # \"#).unwrap();\n```", - "properties": { - "index": { - "$ref": "#/components/schemas/Uint32", - "description": "The output index of the cell in the transaction specified by `tx_hash`." - }, - "tx_hash": { - "$ref": "#/components/schemas/H256", - "description": "Transaction hash in which the cell is an output." - } - }, - "required": [ - "index", - "tx_hash" - ], - "type": "object" - }, - "ProposalShortId": { - "description": "The 10-byte fixed-length binary encoded as a 0x-prefixed hex string in JSON.\n\n## Example\n\n```text\n 0xa0ef4eb5f4ceeb08a4c8\n```", - "items": { - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "maxItems": 10, - "minItems": 10, - "type": "array" - }, - "ProposalWindow": { - "description": "Two protocol parameters `closest` and `farthest` define the closest and farthest on-chain distance between a transaction's proposal and commitment.\n\nA non-cellbase transaction is committed at height h_c if all of the following conditions are met:\n1) it is proposed at height h_p of the same chain, where w_close <= h_c − h_p <= w_far ;\n2) it is in the commitment zone of the main chain block with height h_c ;\n\n```text\n ProposalWindow { closest: 2, farthest: 10 }\n propose\n \\\n \\\n 13 14 [15 16 17 18 19 20 21 22 23]\n \\_______________________/\n \\\n commit\n```", - "properties": { - "closest": { - "$ref": "#/components/schemas/Uint64", - "description": "The closest distance between the proposal and the commitment." - }, - "farthest": { - "$ref": "#/components/schemas/Uint64", - "description": "The farthest distance between the proposal and the commitment." - } - }, - "required": [ - "closest", - "farthest" - ], - "type": "object" - }, - "Ratio": { - "description": "Represents the ratio `numerator / denominator`, where `numerator` and `denominator` are both unsigned 64-bit integers.", - "properties": { - "denom": { - "$ref": "#/components/schemas/Uint64", - "description": "Denominator." - }, - "numer": { - "$ref": "#/components/schemas/Uint64", - "description": "Numerator." - } - }, - "required": [ - "denom", - "numer" - ], - "type": "object" - }, - "Rfc0043": { - "description": "Represent soft fork deployments where activation is controlled by rfc0043 signaling", - "properties": { - "rfc0043": { - "$ref": "#/components/schemas/Deployment", - "description": "RFC0043 deployment params" - }, - "status": { - "$ref": "#/components/schemas/SoftForkStatus", - "description": "SoftFork status" - } - }, - "required": [ - "rfc0043", - "status" - ], - "type": "object" - }, - "Script": { - "additionalProperties": false, - "description": "Describes the lock script and type script for a cell.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n }\n # \"#).unwrap();\n```", - "properties": { - "args": { - "$ref": "#/components/schemas/JsonBytes", - "description": "Arguments for script." - }, - "code_hash": { - "$ref": "#/components/schemas/H256", - "description": "The hash used to match the script code." - }, - "hash_type": { - "$ref": "#/components/schemas/ScriptHashType", - "description": "Specifies how to use the `code_hash` to match the script code." - } - }, - "required": [ - "args", - "code_hash", - "hash_type" - ], - "type": "object" - }, - "ScriptHashType": { - "description": "Specifies how the script `code_hash` is used to match the script code and how to run the code.\n\nAllowed kinds: \"data\", \"type\", \"data1\" and \"data2\"\n\nRefer to the section [Code Locating](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md#code-locating) and [Upgradable Script](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md#upgradable-script) in the RFC *CKB Transaction Structure*.\n\nThe hash type is split into the high 7 bits and the low 1 bit, when the low 1 bit is 1, it indicates the type, when the low 1 bit is 0, it indicates the data, and then it relies on the high 7 bits to indicate that the data actually corresponds to the version.", - "oneOf": [ - { - "description": "Type \"data\" matches script code via cell data hash, and run the script code in v0 CKB VM.", - "enum": [ - "data" - ], - "type": "string" - }, - { - "description": "Type \"type\" matches script code via cell type script hash.", - "enum": [ - "type" - ], - "type": "string" - }, - { - "description": "Type \"data1\" matches script code via cell data hash, and run the script code in v1 CKB VM.", - "enum": [ - "data1" - ], - "type": "string" - }, - { - "description": "Type \"data2\" matches script code via cell data hash, and run the script code in v2 CKB VM.", - "enum": [ - "data2" - ], - "type": "string" - } - ] - }, - "SoftFork": { - "anyOf": [ - { - "$ref": "#/components/schemas/Buried", - "description": "buried - the activation epoch is hard-coded into the client implementation" - }, - { - "$ref": "#/components/schemas/Rfc0043", - "description": "rfc0043 - the activation is controlled by rfc0043 signaling" - } - ], - "description": "SoftFork information" - }, - "SoftForkStatus": { - "description": "SoftForkStatus which is either `buried` (for soft fork deployments where the activation epoch is hard-coded into the client implementation), or `rfc0043` (for soft fork deployments where activation is controlled by rfc0043 signaling).", - "oneOf": [ - { - "description": "the activation epoch is hard-coded into the client implementation", - "enum": [ - "buried" - ], - "type": "string" - }, - { - "description": "the activation is controlled by rfc0043 signaling", - "enum": [ - "rfc0043" - ], - "type": "string" - } - ] - }, - "Status": { - "description": "Status for transaction", - "oneOf": [ - { - "description": "Status \"pending\". The transaction is in the pool, and not proposed yet.", - "enum": [ - "pending" - ], - "type": "string" - }, - { - "description": "Status \"proposed\". The transaction is in the pool and has been proposed.", - "enum": [ - "proposed" - ], - "type": "string" - }, - { - "description": "Status \"committed\". The transaction has been committed to the canonical chain.", - "enum": [ - "committed" - ], - "type": "string" - }, - { - "description": "Status \"unknown\". The node has not seen the transaction, or it should be rejected but was cleared due to storage limitations.", - "enum": [ - "unknown" - ], - "type": "string" - }, - { - "description": "Status \"rejected\". The transaction has been recently removed from the pool. Due to storage limitations, the node can only hold the most recently removed transactions.", - "enum": [ - "rejected" - ], - "type": "string" - } - ] - }, - "Transaction": { - "additionalProperties": false, - "description": "The transaction.\n\nRefer to RFC [CKB Transaction Structure](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md).", - "properties": { - "cell_deps": { - "description": "An array of cell deps.\n\nCKB locates lock script and type script code via cell deps. The script also can use syscalls to read the cells here.\n\nUnlike inputs, the live cells can be used as cell deps in multiple transactions.", - "items": { - "$ref": "#/components/schemas/CellDep" - }, - "type": "array" - }, - "header_deps": { - "description": "An array of header deps.\n\nThe block must already be in the canonical chain.\n\nLock script and type script can read the header information of blocks listed here.", - "items": { - "$ref": "#/components/schemas/H256" - }, - "type": "array" - }, - "inputs": { - "description": "An array of input cells.\n\nIn the canonical chain, any cell can only appear as an input once.", - "items": { - "$ref": "#/components/schemas/CellInput" - }, - "type": "array" - }, - "outputs": { - "description": "An array of output cells.", - "items": { - "$ref": "#/components/schemas/CellOutput" - }, - "type": "array" - }, - "outputs_data": { - "description": "Output cells data.\n\nThis is a parallel array of outputs. The cell capacity, lock, and type of the output i is `outputs[i]` and its data is `outputs_data[i]`.", - "items": { - "$ref": "#/components/schemas/JsonBytes" - }, - "type": "array" - }, - "version": { - "$ref": "#/components/schemas/Uint32", - "description": "Reserved for future usage. It must equal 0 in current version." - }, - "witnesses": { - "description": "An array of variable-length binaries.\n\nLock script and type script can read data here to verify the transaction.\n\nFor example, the bundled secp256k1 lock script requires storing the signature in `witnesses`.", - "items": { - "$ref": "#/components/schemas/JsonBytes" - }, - "type": "array" - } - }, - "required": [ - "cell_deps", - "header_deps", - "inputs", - "outputs", - "outputs_data", - "version", - "witnesses" - ], - "type": "object" - }, - "TransactionAndWitnessProof": { - "description": "Merkle proof for transactions' witnesses in a block.", - "properties": { - "block_hash": { - "$ref": "#/components/schemas/H256", - "description": "Block hash" - }, - "transactions_proof": { - "$ref": "#/components/schemas/MerkleProof", - "description": "Merkle proof of all transactions' hash" - }, - "witnesses_proof": { - "$ref": "#/components/schemas/MerkleProof", - "description": "Merkle proof of transactions' witnesses" - } - }, - "required": [ - "block_hash", - "transactions_proof", - "witnesses_proof" - ], - "type": "object" - }, - "TransactionProof": { - "description": "Merkle proof for transactions in a block.", - "properties": { - "block_hash": { - "$ref": "#/components/schemas/H256", - "description": "Block hash" - }, - "proof": { - "$ref": "#/components/schemas/MerkleProof", - "description": "Merkle proof of all transactions' hash" - }, - "witnesses_root": { - "$ref": "#/components/schemas/H256", - "description": "Merkle root of all transactions' witness hash" - } - }, - "required": [ - "block_hash", - "proof", - "witnesses_root" - ], - "type": "object" - }, - "TransactionView": { - "description": "The JSON view of a Transaction.\n\nThis structure is serialized into a JSON object with field `hash` and all the fields in\n[`Transaction`](struct.Transaction.html).\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"cell_deps\": [\n {\n \"dep_type\": \"code\",\n \"out_point\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\"\n }\n }\n ],\n \"hash\": \"0xa0ef4eb5f4ceeb08a4c8524d84c5da95dce2f608e0ca2ec8091191b0f330c6e3\",\n \"header_deps\": [\n \"0x7978ec7ce5b507cfb52e149e36b1a23f6062ed150503c85bbf825da3599095ed\"\n ],\n \"inputs\": [\n {\n \"previous_output\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n },\n \"since\": \"0x0\"\n }\n ],\n \"outputs\": [\n {\n \"capacity\": \"0x2540be400\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n ],\n \"outputs_data\": [\n \"0x\"\n ],\n \"version\": \"0x0\",\n \"witnesses\": []\n }\n # \"#).unwrap();\n```", - "properties": { - "cell_deps": { - "description": "An array of cell deps.\n\nCKB locates lock script and type script code via cell deps. The script also can use syscalls to read the cells here.\n\nUnlike inputs, the live cells can be used as cell deps in multiple transactions.", - "items": { - "$ref": "#/components/schemas/CellDep" - }, - "type": "array" - }, - "hash": { - "$ref": "#/components/schemas/H256", - "description": "The transaction hash." - }, - "header_deps": { - "description": "An array of header deps.\n\nThe block must already be in the canonical chain.\n\nLock script and type script can read the header information of blocks listed here.", - "items": { - "$ref": "#/components/schemas/H256" - }, - "type": "array" - }, - "inputs": { - "description": "An array of input cells.\n\nIn the canonical chain, any cell can only appear as an input once.", - "items": { - "$ref": "#/components/schemas/CellInput" - }, - "type": "array" - }, - "outputs": { - "description": "An array of output cells.", - "items": { - "$ref": "#/components/schemas/CellOutput" - }, - "type": "array" - }, - "outputs_data": { - "description": "Output cells data.\n\nThis is a parallel array of outputs. The cell capacity, lock, and type of the output i is `outputs[i]` and its data is `outputs_data[i]`.", - "items": { - "$ref": "#/components/schemas/JsonBytes" - }, - "type": "array" - }, - "version": { - "$ref": "#/components/schemas/Uint32", - "description": "Reserved for future usage. It must equal 0 in current version." - }, - "witnesses": { - "description": "An array of variable-length binaries.\n\nLock script and type script can read data here to verify the transaction.\n\nFor example, the bundled secp256k1 lock script requires storing the signature in `witnesses`.", - "items": { - "$ref": "#/components/schemas/JsonBytes" - }, - "type": "array" - } - }, - "required": [ - "cell_deps", - "hash", - "header_deps", - "inputs", - "outputs", - "outputs_data", - "version", - "witnesses" - ], - "type": "object" - }, - "TransactionWithStatusResponse": { - "description": "The JSON view of a transaction as well as its status.", - "properties": { - "cycles": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ], - "description": "The transaction consumed cycles." - }, - "fee": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ], - "description": "The transaction fee of the transaction" - }, - "min_replace_fee": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ], - "description": "The minimal fee required to replace this transaction" - }, - "time_added_to_pool": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ], - "description": "If the transaction is in tx-pool, `time_added_to_pool` represent when it enters the tx-pool. unit: Millisecond" - }, - "transaction": { - "anyOf": [ - { - "$ref": "#/components/schemas/Either_for_TransactionView_and_JsonBytes" - }, - { - "type": "null" - } - ], - "description": "The transaction." - }, - "tx_status": { - "$ref": "#/components/schemas/TxStatus", - "description": "The Transaction status." - } - }, - "required": [ - "tx_status" - ], - "type": "object" - }, - "TxStatus": { - "description": "Transaction status and the block hash if it is committed.", - "properties": { - "block_hash": { - "anyOf": [ - { - "$ref": "#/components/schemas/H256" - }, - { - "type": "null" - } - ], - "description": "The block hash of the block which has committed this transaction in the canonical chain." - }, - "block_number": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ], - "description": "The block number of the block which has committed this transaction in the canonical chain." - }, - "reason": { - "description": "The reason why the transaction is rejected", - "type": [ - "string", - "null" - ] - }, - "status": { - "$ref": "#/components/schemas/Status", - "description": "The transaction status, allowed values: \"pending\", \"proposed\" \"committed\" \"unknown\" and \"rejected\"." - } - }, - "required": [ - "status" - ], - "type": "object" - }, - "Uint128": { - "format": "uint128", - "minimum": 0.0, - "type": "integer" - }, - "Uint32": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "Uint64": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "UncleBlockView": { - "description": "The uncle block.\n\nThe chain stores only the uncle block header and proposal IDs. The header ensures the block is covered by PoW and can pass the consensus rules on uncle blocks. Proposal IDs are there because a block can commit transactions proposed in an uncle.\n\nA block B1 is considered to be the uncle of another block B2 if all the following conditions are met:\n\n1. They are in the same epoch, sharing the same difficulty;\n2. B2 block number is larger than B1;\n3. B1's parent is either B2's ancestor or an uncle embedded in B2 or any of B2's ancestors.\n4. B2 is the first block in its chain to refer to B1.", - "properties": { - "header": { - "$ref": "#/components/schemas/HeaderView", - "description": "The uncle block header." - }, - "proposals": { - "description": "Proposal IDs in the uncle block body.", - "items": { - "$ref": "#/components/schemas/ProposalShortId" - }, - "type": "array" - } - }, - "required": [ - "header", - "proposals" - ], - "type": "object" - } - } - }, - "info": { - "description": " RPC Module Chain for methods related to the canonical chain.\n\n This module queries information about the canonical chain.\n\n ## Canonical Chain\n\n A canonical chain is the one with the most accumulated work. The accumulated work is\n the sum of difficulties of all the blocks in the chain.\n\n ## Chain Reorganization\n\n Chain Reorganization happens when CKB found a chain that has accumulated more work than the\n canonical chain. The reorganization revert the blocks in the current canonical chain if needed,\n and switch the canonical chain to that better chain.\n\n ## Live Cell\n\n A cell is live if\n\n * it is found as an output in any transaction in the [canonical chain](#canonical-chain),\n and\n * it is not found as an input in any transaction in the canonical chain.", - "title": "chain_rpc", - "version": "0.115.0-pre" - }, - "methods": [ - { - "description": " Returns the information about a block by hash.\n\n ## Params\n\n * `block_hash` - the block hash.\n * `verbosity` - result format which allows 0 and 2. (**Optional**, the default is 2.)\n * `with_cycles` - whether the return cycles of block transactions. (**Optional**, default false.)\n\n ## Returns\n\n The RPC returns a block or null. When the RPC returns a block, the block hash must equal to\n the parameter `block_hash`.\n\n If the block is in the [canonical chain](#canonical-chain), the RPC must return the block\n information. Otherwise, the behavior is undefined. The RPC may return blocks found in local\n storage or simply returns null for all blocks that are not in the canonical chain. And\n because of [chain reorganization](#chain-reorganization), for the same `block_hash`, the\n RPC may sometimes return null and sometimes return the block.\n\n When `verbosity` is 2, it returns a JSON object as the `result`. See `BlockView` for the\n schema.\n\n When `verbosity` is 0, it returns a 0x-prefixed hex string as the `result`. The string\n encodes the block serialized by molecule using schema `table Block`.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_block\",\n \"params\": [\n \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"header\": {\n \"compact_target\": \"0x1e083126\",\n \"dao\": \"0xb5a3e047474401001bc476b9ee573000c0c387962a38000000febffacf030000\",\n \"epoch\": \"0x7080018000001\",\n \"extra_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"hash\": \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\",\n \"nonce\": \"0x0\",\n \"number\": \"0x400\",\n \"parent_hash\": \"0xae003585fa15309b30b31aed3dcf385e9472c3c3e93746a6c4540629a6a1ed2d\",\n \"proposals_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"timestamp\": \"0x5cd2b117\",\n \"transactions_root\": \"0xc47d5b78b3c4c4c853e2a32810818940d0ee403423bea9ec7b8e566d9595206c\",\n \"version\": \"0x0\"\n },\n \"proposals\": [],\n \"transactions\": [\n {\n \"cell_deps\": [],\n \"hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\",\n \"header_deps\": [],\n \"inputs\": [\n {\n \"previous_output\": {\n \"index\": \"0xffffffff\",\n \"tx_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"since\": \"0x400\"\n }\n ],\n \"outputs\": [\n {\n \"capacity\": \"0x18e64b61cf\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n ],\n \"outputs_data\": [\n \"0x\"\n ],\n \"version\": \"0x0\",\n \"witnesses\": [\n \"0x450000000c000000410000003500000010000000300000003100000028e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5000000000000000000\"\n ]\n }\n ],\n \"uncles\": []\n }\n }\n ```\n\n The response looks like below when `verbosity` is 0.\n\n ```text\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0x...\"\n }\n ```\n\n When specifying with_cycles, the response object will be different like below:\n\n ```text\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"block\": or \"0x...\",\n \"cycles\": []\n }\n }\n ```", - "name": "get_block", - "params": [ - { - "name": "block_hash", - "schema": { - "$ref": "#/components/schemas/H256" - } - }, - { - "name": "verbosity", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint32" - }, - { - "type": "null" - } - ] - } - }, - { - "name": "with_cycles", - "schema": { - "type": [ - "boolean", - "null" - ] - } - } - ], - "result": { - "name": "get_block", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/BlockResponse" - }, - { - "type": "null" - } - ] - } - } - }, - { - "description": " Returns the block in the [canonical chain](#canonical-chain) with the specific block number.\n\n ## Params\n\n * `block_number` - the block number.\n * `verbosity` - result format which allows 0 and 2. (**Optional**, the default is 2.)\n * `with_cycles` - whether the return cycles of block transactions. (**Optional**, default false.)\n\n ## Returns\n\n The RPC returns the block when `block_number` is less than or equal to the tip block\n number returned by [`get_tip_block_number`](#tymethod.get_tip_block_number) and returns\n null otherwise.\n\n Because of [chain reorganization](#chain-reorganization), the PRC may return null or even\n different blocks in different invocations with the same `block_number`.\n\n When `verbosity` is 2, it returns a JSON object as the `result`. See `BlockView` for the\n schema.\n\n When `verbosity` is 0, it returns a 0x-prefixed hex string as the `result`. The string\n encodes the block serialized by molecule using schema `table Block`.\n\n ## Errors\n\n * [`ChainIndexIsInconsistent (-201)`](../enum.RPCError.html#variant.ChainIndexIsInconsistent) - The index is inconsistent. It says a block hash is in the main chain, but cannot read it from the database.\n * [`DatabaseIsCorrupt (-202)`](../enum.RPCError.html#variant.DatabaseIsCorrupt) - The data read from database is dirty. Please report it as a bug.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_block_by_number\",\n \"params\": [\n \"0x400\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"header\": {\n \"compact_target\": \"0x1e083126\",\n \"dao\": \"0xb5a3e047474401001bc476b9ee573000c0c387962a38000000febffacf030000\",\n \"epoch\": \"0x7080018000001\",\n \"extra_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"hash\": \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\",\n \"nonce\": \"0x0\",\n \"number\": \"0x400\",\n \"parent_hash\": \"0xae003585fa15309b30b31aed3dcf385e9472c3c3e93746a6c4540629a6a1ed2d\",\n \"proposals_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"timestamp\": \"0x5cd2b117\",\n \"transactions_root\": \"0xc47d5b78b3c4c4c853e2a32810818940d0ee403423bea9ec7b8e566d9595206c\",\n \"version\": \"0x0\"\n },\n \"proposals\": [],\n \"transactions\": [\n {\n \"cell_deps\": [],\n \"hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\",\n \"header_deps\": [],\n \"inputs\": [\n {\n \"previous_output\": {\n \"index\": \"0xffffffff\",\n \"tx_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"since\": \"0x400\"\n }\n ],\n \"outputs\": [\n {\n \"capacity\": \"0x18e64b61cf\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n ],\n \"outputs_data\": [\n \"0x\"\n ],\n \"version\": \"0x0\",\n \"witnesses\": [\n \"0x450000000c000000410000003500000010000000300000003100000028e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5000000000000000000\"\n ]\n }\n ],\n \"uncles\": []\n }\n }\n ```\n\n The response looks like below when `verbosity` is 0.\n\n ```text\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0x...\"\n }\n ```\n\n When specifying with_cycles, the response object will be different like below:\n\n ```text\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"block\": or \"0x...\",\n \"cycles\": []\n }\n }\n ```", - "name": "get_block_by_number", - "params": [ - { - "name": "block_number", - "schema": { - "$ref": "#/components/schemas/Uint64" - } - }, - { - "name": "verbosity", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint32" - }, - { - "type": "null" - } - ] - } - }, - { - "name": "with_cycles", - "schema": { - "type": [ - "boolean", - "null" - ] - } - } - ], - "result": { - "name": "get_block_by_number", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/BlockResponse" - }, - { - "type": "null" - } - ] - } - } - }, - { - "description": " Returns the information about a block header by hash.\n\n ## Params\n\n * `block_hash` - the block hash.\n * `verbosity` - result format which allows 0 and 1. (**Optional**, the default is 1.)\n\n ## Returns\n\n The RPC returns a header or null. When the RPC returns a header, the block hash must equal to\n the parameter `block_hash`.\n\n If the block is in the [canonical chain](#canonical-chain), the RPC must return the header\n information. Otherwise, the behavior is undefined. The RPC may return blocks found in local\n storage or simply returns null for all blocks that are not in the canonical chain. And\n because of [chain reorganization](#chain-reorganization), for the same `block_hash`, the\n RPC may sometimes return null and sometimes return the block header.\n\n When `verbosity` is 1, it returns a JSON object as the `result`. See `HeaderView` for the\n schema.\n\n When `verbosity` is 0, it returns a 0x-prefixed hex string as the `result`. The string\n encodes the block header serialized by molecule using schema `table Header`.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_header\",\n \"params\": [\n \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"compact_target\": \"0x1e083126\",\n \"dao\": \"0xb5a3e047474401001bc476b9ee573000c0c387962a38000000febffacf030000\",\n \"epoch\": \"0x7080018000001\",\n \"extra_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"hash\": \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\",\n \"nonce\": \"0x0\",\n \"number\": \"0x400\",\n \"parent_hash\": \"0xae003585fa15309b30b31aed3dcf385e9472c3c3e93746a6c4540629a6a1ed2d\",\n \"proposals_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"timestamp\": \"0x5cd2b117\",\n \"transactions_root\": \"0xc47d5b78b3c4c4c853e2a32810818940d0ee403423bea9ec7b8e566d9595206c\",\n \"version\": \"0x0\"\n }\n }\n ```\n\n The response looks like below when `verbosity` is 0.\n\n ```text\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0x...\"\n }\n ```", - "name": "get_header", - "params": [ - { - "name": "block_hash", - "schema": { - "$ref": "#/components/schemas/H256" - } - }, - { - "name": "verbosity", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint32" - }, - { - "type": "null" - } - ] - } - } - ], - "result": { - "name": "get_header", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Either_for_HeaderView_and_JsonBytes" - }, - { - "type": "null" - } - ] - } - } - }, - { - "description": " Returns the block header in the [canonical chain](#canonical-chain) with the specific block\n number.\n\n ## Params\n\n * `block_number` - Number of a block\n * `verbosity` - result format which allows 0 and 1. (**Optional**, the default is 1.)\n\n ## Returns\n\n The RPC returns the block header when `block_number` is less than or equal to the tip block\n number returned by [`get_tip_block_number`](#tymethod.get_tip_block_number) and returns\n null otherwise.\n\n Because of [chain reorganization](#chain-reorganization), the PRC may return null or even\n different block headers in different invocations with the same `block_number`.\n\n When `verbosity` is 1, it returns a JSON object as the `result`. See `HeaderView` for the\n schema.\n\n When `verbosity` is 0, it returns a 0x-prefixed hex string as the `result`. The string\n encodes the block header serialized by molecule using schema `table Header`.\n\n ## Errors\n\n * [`ChainIndexIsInconsistent (-201)`](../enum.RPCError.html#variant.ChainIndexIsInconsistent) - The index is inconsistent. It says a block hash is in the main chain, but cannot read it from the database.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_header_by_number\",\n \"params\": [\n \"0x400\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"compact_target\": \"0x1e083126\",\n \"dao\": \"0xb5a3e047474401001bc476b9ee573000c0c387962a38000000febffacf030000\",\n \"epoch\": \"0x7080018000001\",\n \"extra_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"hash\": \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\",\n \"nonce\": \"0x0\",\n \"number\": \"0x400\",\n \"parent_hash\": \"0xae003585fa15309b30b31aed3dcf385e9472c3c3e93746a6c4540629a6a1ed2d\",\n \"proposals_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"timestamp\": \"0x5cd2b117\",\n \"transactions_root\": \"0xc47d5b78b3c4c4c853e2a32810818940d0ee403423bea9ec7b8e566d9595206c\",\n \"version\": \"0x0\"\n }\n }\n ```\n\n The response looks like below when `verbosity` is 0.\n\n ```text\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0x...\"\n }\n ```", - "name": "get_header_by_number", - "params": [ - { - "name": "block_number", - "schema": { - "$ref": "#/components/schemas/Uint64" - } - }, - { - "name": "verbosity", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint32" - }, - { - "type": "null" - } - ] - } - } - ], - "result": { - "name": "get_header_by_number", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Either_for_HeaderView_and_JsonBytes" - }, - { - "type": "null" - } - ] - } - } - }, - { - "description": " Returns the block filter by block hash.\n\n ## Params\n\n * `block_hash` - the block hash.\n\n ## Returns\n\n The block filter data\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_block_filter\",\n \"params\": [\n \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": null\n }\n ```\n\n The response looks like below when the block have block filter.\n\n ```text\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"data\": \"0x...\",\n \"hash\": \"0x...\"\n }\n }\n ```", - "name": "get_block_filter", - "params": [ - { - "name": "block_hash", - "schema": { - "$ref": "#/components/schemas/H256" - } - } - ], - "result": { - "name": "get_block_filter", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/BlockFilter" - }, - { - "type": "null" - } - ] - } - } - }, - { - "description": " Returns the information about a transaction requested by transaction hash.\n\n ## Returns\n\n This RPC returns `null` if the transaction is not committed in the\n [canonical chain](#canonical-chain) nor the transaction memory pool.\n\n If the transaction is in the chain, the block hash is also returned.\n\n ## Params\n\n * `tx_hash` - Hash of a transaction\n * `verbosity` - result format which allows 0, 1 and 2. (**Optional**, the defaults to 2.)\n * `only_committed` - whether to query committed transaction only. (**Optional**, if not set, it will query all status of transactions.)\n\n ## Returns\n\n When verbosity=0, it's response value is as same as verbosity=2, but it\n return a 0x-prefixed hex encoded molecule packed::Transaction on `transaction` field\n\n When verbosity is 1: The RPC does not return the transaction content and the field transaction must be null.\n\n When verbosity is 2: if tx_status.status is pending, proposed, or committed,\n the RPC returns the transaction content as field transaction, otherwise the field is null.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_transaction\",\n \"params\": [\n \"0xa0ef4eb5f4ceeb08a4c8524d84c5da95dce2f608e0ca2ec8091191b0f330c6e3\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"transaction\": {\n \"cell_deps\": [\n {\n \"dep_type\": \"code\",\n \"out_point\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\"\n }\n }\n ],\n \"hash\": \"0xa0ef4eb5f4ceeb08a4c8524d84c5da95dce2f608e0ca2ec8091191b0f330c6e3\",\n \"header_deps\": [\n \"0x7978ec7ce5b507cfb52e149e36b1a23f6062ed150503c85bbf825da3599095ed\"\n ],\n \"inputs\": [\n {\n \"previous_output\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n },\n \"since\": \"0x0\"\n }\n ],\n \"outputs\": [\n {\n \"capacity\": \"0x2540be400\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n ],\n \"outputs_data\": [\n \"0x\"\n ],\n \"version\": \"0x0\",\n \"witnesses\": []\n },\n \"cycles\": \"0x219\",\n \"time_added_to_pool\" : \"0x187b3d137a1\",\n \"fee\": \"0x16923f7dcf\",\n \"min_replace_fee\": \"0x16923f7f6a\",\n \"tx_status\": {\n \"block_hash\": null,\n \"block_number\": null,\n \"status\": \"pending\",\n \"reason\": null\n }\n }\n }\n ```\n\n\n The response looks like below when `verbosity` is 0.\n\n ```text\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"transaction\": \"0x.....\",\n \"cycles\": \"0x219\",\n \"tx_status\": {\n \"block_hash\": null,\n \"block_number\": null,\n \"status\": \"pending\",\n \"reason\": null\n }\n }\n }\n ```\n", - "name": "get_transaction", - "params": [ - { - "name": "tx_hash", - "schema": { - "$ref": "#/components/schemas/H256" - } - }, - { - "name": "verbosity", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint32" - }, - { - "type": "null" - } - ] - } - }, - { - "name": "only_committed", - "schema": { - "type": [ - "boolean", - "null" - ] - } - } - ], - "result": { - "name": "get_transaction", - "schema": { - "$ref": "#/components/schemas/TransactionWithStatusResponse" - } - } - }, - { - "description": " Returns the hash of a block in the [canonical chain](#canonical-chain) with the specified\n `block_number`.\n\n ## Params\n\n * `block_number` - Block number\n\n ## Returns\n\n The RPC returns the block hash when `block_number` is less than or equal to the tip block\n number returned by [`get_tip_block_number`](#tymethod.get_tip_block_number) and returns\n null otherwise.\n\n Because of [chain reorganization](#chain-reorganization), the PRC may return null or even\n different block hashes in different invocations with the same `block_number`.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_block_hash\",\n \"params\": [\n \"0x400\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\"\n }\n ```", - "name": "get_block_hash", - "params": [ - { - "name": "block_number", - "schema": { - "$ref": "#/components/schemas/Uint64" - } - } - ], - "result": { - "name": "get_block_hash", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/H256" - }, - { - "type": "null" - } - ] - } - } - }, - { - "description": " Returns the header with the highest block number in the [canonical chain](#canonical-chain).\n\n Because of [chain reorganization](#chain-reorganization), the block number returned can be\n less than previous invocations and different invocations may return different block headers\n with the same block number.\n\n ## Params\n\n * `verbosity` - result format which allows 0 and 1. (**Optional**, the default is 1.)\n\n ## Returns\n\n When `verbosity` is 1, the RPC returns a JSON object as the `result`. See HeaderView for the\n schema.\n\n When `verbosity` is 0, it returns a 0x-prefixed hex string as the `result`. The string\n encodes the header serialized by molecule using schema `table Header`.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_tip_header\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"compact_target\": \"0x1e083126\",\n \"dao\": \"0xb5a3e047474401001bc476b9ee573000c0c387962a38000000febffacf030000\",\n \"epoch\": \"0x7080018000001\",\n \"extra_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"hash\": \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\",\n \"nonce\": \"0x0\",\n \"number\": \"0x400\",\n \"parent_hash\": \"0xae003585fa15309b30b31aed3dcf385e9472c3c3e93746a6c4540629a6a1ed2d\",\n \"proposals_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"timestamp\": \"0x5cd2b117\",\n \"transactions_root\": \"0xc47d5b78b3c4c4c853e2a32810818940d0ee403423bea9ec7b8e566d9595206c\",\n \"version\": \"0x0\"\n },\n \"id\": 42\n }\n ```\n\n The response looks like below when `verbosity` is 0.\n\n ```text\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0x...\"\n }\n ```", - "name": "get_tip_header", - "params": [ - { - "name": "verbosity", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint32" - }, - { - "type": "null" - } - ] - } - } - ], - "result": { - "name": "get_tip_header", - "schema": { - "$ref": "#/components/schemas/Either_for_HeaderView_and_JsonBytes" - } - } - }, - { - "description": " Returns the status of a cell. The RPC returns extra information if it is a [live cell](#live-cell).\n\n ## Returns\n\n This RPC tells whether a cell is live or not.\n\n If the cell is live, the RPC will return details about the cell. Otherwise, the field `cell` is\n null in the result.\n\n If the cell is live and `with_data` is set to `false`, the field `cell.data` is null in the\n result.\n\n ## Params\n\n * `out_point` - Reference to the cell by transaction hash and output index.\n * `with_data` - Whether the RPC should return cell data. Cell data can be huge, if the client\n does not need the data, it should set this to `false` to save bandwidth.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_live_cell\",\n \"params\": [\n {\n \"index\": \"0x0\",\n \"tx_hash\": \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\"\n },\n true\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"cell\": {\n \"data\": {\n \"content\": \"0x7f454c460201010000000000000000000200f3000100000078000100000000004000000000000000980000000000000005000000400038000100400003000200010000000500000000000000000000000000010000000000000001000000000082000000000000008200000000000000001000000000000001459308d00573000000002e7368737472746162002e74657874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b000000010000000600000000000000780001000000000078000000000000000a0000000000000000000000000000000200000000000000000000000000000001000000030000000000000000000000000000000000000082000000000000001100000000000000000000000000000001000000000000000000000000000000\",\n \"hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\"\n },\n \"output\": {\n \"capacity\": \"0x802665800\",\n \"lock\": {\n \"code_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n },\n \"status\": \"live\"\n }\n }\n ```", - "name": "get_live_cell", - "params": [ - { - "name": "out_point", - "schema": { - "$ref": "#/components/schemas/OutPoint" - } - }, - { - "name": "with_data", - "schema": { - "type": "boolean" - } - } - ], - "result": { - "name": "get_live_cell", - "schema": { - "$ref": "#/components/schemas/CellWithStatus" - } - } - }, - { - "description": " Returns the highest block number in the [canonical chain](#canonical-chain).\n\n Because of [chain reorganization](#chain-reorganization), the returned block number may be\n less than a value returned in the previous invocation.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_tip_block_number\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0x400\"\n }\n ```", - "name": "get_tip_block_number", - "params": [], - "result": { - "name": "get_tip_block_number", - "schema": { - "$ref": "#/components/schemas/Uint64" - } - } - }, - { - "description": " Returns the epoch with the highest number in the [canonical chain](#canonical-chain).\n\n Pay attention that like blocks with the specific block number may change because of [chain\n reorganization](#chain-reorganization), This RPC may return different epochs which have\n the same epoch number.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_current_epoch\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"compact_target\": \"0x1e083126\",\n \"length\": \"0x708\",\n \"number\": \"0x1\",\n \"start_number\": \"0x3e8\"\n }\n }\n ```", - "name": "get_current_epoch", - "params": [], - "result": { - "name": "get_current_epoch", - "schema": { - "$ref": "#/components/schemas/EpochView" - } - } - }, - { - "description": " Returns the epoch in the [canonical chain](#canonical-chain) with the specific epoch number.\n\n ## Params\n\n * `epoch_number` - Epoch number\n\n ## Returns\n\n The RPC returns the epoch when `epoch_number` is less than or equal to the current epoch number\n returned by [`get_current_epoch`](#tymethod.get_current_epoch) and returns null otherwise.\n\n Because of [chain reorganization](#chain-reorganization), for the same `epoch_number`, this\n RPC may return null or different epochs in different invocations.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_epoch_by_number\",\n \"params\": [\n \"0x0\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"compact_target\": \"0x20010000\",\n \"length\": \"0x3e8\",\n \"number\": \"0x0\",\n \"start_number\": \"0x0\"\n }\n }\n ```", - "name": "get_epoch_by_number", - "params": [ - { - "name": "epoch_number", - "schema": { - "$ref": "#/components/schemas/Uint64" - } - } - ], - "result": { - "name": "get_epoch_by_number", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/EpochView" - }, - { - "type": "null" - } - ] - } - } - }, - { - "description": " Returns increased issuance, miner reward, and the total transaction fee of a block.\n\n This RPC returns null if the block is not in the [canonical chain](#canonical-chain).\n\n CKB delays CKB creation for miners. The output cells in the cellbase of block N are for the\n miner creating block `N - 1 - ProposalWindow.farthest`.\n\n In mainnet, `ProposalWindow.farthest` is 10, so the outputs in block 100 are rewards for\n miner creating block 89.\n\n Because of the delay, this RPC returns null if the block rewards are not finalized yet. For\n example, the economic state for block 89 is only available when the number returned by\n [`get_tip_block_number`](#tymethod.get_tip_block_number) is greater than or equal to 100.\n\n ## Params\n\n * `block_hash` - Specifies the block hash which rewards should be analyzed.\n\n ## Returns\n\n If the block with the hash `block_hash` is in the [canonical chain](#canonical-chain) and\n its rewards have been finalized, return the block rewards analysis for this block. A special\n case is that the return value for genesis block is null.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_block_economic_state\",\n \"params\": [\n \"0x02530b25ad0ff677acc365cb73de3e8cc09c7ddd58272e879252e199d08df83b\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"finalized_at\": \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\",\n \"issuance\": {\n \"primary\": \"0x18ce922bca\",\n \"secondary\": \"0x7f02ec655\"\n },\n \"miner_reward\": {\n \"committed\": \"0x0\",\n \"primary\": \"0x18ce922bca\",\n \"proposal\": \"0x0\",\n \"secondary\": \"0x17b93605\"\n },\n \"txs_fee\": \"0x0\"\n }\n }\n ```", - "name": "get_block_economic_state", - "params": [ - { - "name": "block_hash", - "schema": { - "$ref": "#/components/schemas/H256" - } - } - ], - "result": { - "name": "get_block_economic_state", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/BlockEconomicState" - }, - { - "type": "null" - } - ] - } - } - }, - { - "description": " Returns a Merkle proof that transactions are included in a block.\n\n ## Params\n\n * `tx_hashes` - Transaction hashes, all transactions must be in the same block\n * `block_hash` - An optional parameter, if specified, looks for transactions in the block with this hash\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_transaction_proof\",\n \"params\": [\n [ \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\" ]\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"block_hash\": \"0x7978ec7ce5b507cfb52e149e36b1a23f6062ed150503c85bbf825da3599095ed\",\n \"proof\": {\n \"indices\": [ \"0x0\" ],\n \"lemmas\": []\n },\n \"witnesses_root\": \"0x2bb631f4a251ec39d943cc238fc1e39c7f0e99776e8a1e7be28a03c70c4f4853\"\n }\n }\n ```", - "name": "get_transaction_proof", - "params": [ - { - "name": "tx_hashes", - "schema": { - "items": { - "$ref": "#/components/schemas/H256" - }, - "type": "array" - } - }, - { - "name": "block_hash", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/H256" - }, - { - "type": "null" - } - ] - } - } - ], - "result": { - "name": "get_transaction_proof", - "schema": { - "$ref": "#/components/schemas/TransactionProof" - } - } - }, - { - "description": " Verifies that a proof points to transactions in a block, returning the transaction hashes it commits to.\n\n ## Parameters\n\n * `transaction_proof` - proof generated by [`get_transaction_proof`](#tymethod.get_transaction_proof).\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"verify_transaction_proof\",\n \"params\": [\n {\n \"block_hash\": \"0x7978ec7ce5b507cfb52e149e36b1a23f6062ed150503c85bbf825da3599095ed\",\n \"proof\": {\n \"indices\": [ \"0x0\" ],\n \"lemmas\": []\n },\n \"witnesses_root\": \"0x2bb631f4a251ec39d943cc238fc1e39c7f0e99776e8a1e7be28a03c70c4f4853\"\n }\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": [\n \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\"\n ]\n }\n ```", - "name": "verify_transaction_proof", - "params": [ - { - "name": "tx_proof", - "schema": { - "$ref": "#/components/schemas/TransactionProof" - } - } - ], - "result": { - "name": "verify_transaction_proof", - "schema": { - "items": { - "$ref": "#/components/schemas/H256" - }, - "type": "array" - } - } - }, - { - "description": " Returns a Merkle proof of transactions' witness included in a block.\n\n ## Params\n\n * `tx_hashes` - Transaction hashes, all transactions must be in the same block\n * `block_hash` - An optional parameter, if specified, looks for transactions in the block with this hash\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_transaction_and_witness_proof\",\n \"params\": [\n [ \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\" ]\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"block_hash\": \"0x7978ec7ce5b507cfb52e149e36b1a23f6062ed150503c85bbf825da3599095ed\",\n \"transactions_proof\": {\n \"indices\": [ \"0x0\" ],\n \"lemmas\": []\n },\n \"witnesses_proof\": {\n \"indices\": [\n \"0x0\"\n ],\n \"lemmas\": []\n }\n },\n \"id\": 42\n }\n ```", - "name": "get_transaction_and_witness_proof", - "params": [ - { - "name": "tx_hashes", - "schema": { - "items": { - "$ref": "#/components/schemas/H256" - }, - "type": "array" - } - }, - { - "name": "block_hash", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/H256" - }, - { - "type": "null" - } - ] - } - } - ], - "result": { - "name": "get_transaction_and_witness_proof", - "schema": { - "$ref": "#/components/schemas/TransactionAndWitnessProof" - } - } - }, - { - "description": " Verifies that a proof points to transactions in a block, returning the transaction hashes it commits to.\n\n ## Parameters\n\n * `tx_proof` - proof generated by [`get_transaction_and_witness_proof`](#tymethod.get_transaction_and_witness_proof).\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"verify_transaction_and_witness_proof\",\n \"params\": [\n {\n \"block_hash\": \"0x7978ec7ce5b507cfb52e149e36b1a23f6062ed150503c85bbf825da3599095ed\",\n \"transactions_proof\": {\n \"indices\": [ \"0x0\" ],\n \"lemmas\": []\n },\n \"witnesses_proof\": {\n \"indices\": [\n \"0x0\"\n ],\n \"lemmas\": []\n }\n }\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": [\n \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\"\n ]\n }\n ```", - "name": "verify_transaction_and_witness_proof", - "params": [ - { - "name": "tx_proof", - "schema": { - "$ref": "#/components/schemas/TransactionAndWitnessProof" - } - } - ], - "result": { - "name": "verify_transaction_and_witness_proof", - "schema": { - "items": { - "$ref": "#/components/schemas/H256" - }, - "type": "array" - } - } - }, - { - "description": " Returns the information about a fork block by hash.\n\n ## Params\n\n * `block_hash` - the fork block hash.\n * `verbosity` - result format which allows 0 and 2. (**Optional**, the default is 2.)\n\n ## Returns\n\n The RPC returns a fork block or null. When the RPC returns a block, the block hash must equal to\n the parameter `block_hash`.\n\n Please note that due to the technical nature of the peer to peer sync, the RPC may return null or a fork block\n result on different nodes with same `block_hash` even they are fully synced to the [canonical chain](#canonical-chain).\n And because of [chain reorganization](#chain-reorganization), for the same `block_hash`, the\n RPC may sometimes return null and sometimes return the fork block.\n\n When `verbosity` is 2, it returns a JSON object as the `result`. See `BlockView` for the\n schema.\n\n When `verbosity` is 0, it returns a 0x-prefixed hex string as the `result`. The string\n encodes the block serialized by molecule using schema `table Block`.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_fork_block\",\n \"params\": [\n \"0xdca341a42890536551f99357612cef7148ed471e3b6419d0844a4e400be6ee94\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"header\": {\n \"compact_target\": \"0x1e083126\",\n \"dao\": \"0xb5a3e047474401001bc476b9ee573000c0c387962a38000000febffacf030000\",\n \"epoch\": \"0x7080018000001\",\n \"extra_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"hash\": \"0xdca341a42890536551f99357612cef7148ed471e3b6419d0844a4e400be6ee94\",\n \"nonce\": \"0x0\",\n \"number\": \"0x400\",\n \"parent_hash\": \"0xae003585fa15309b30b31aed3dcf385e9472c3c3e93746a6c4540629a6a1ed2d\",\n \"proposals_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"timestamp\": \"0x5cd2b118\",\n \"transactions_root\": \"0xc47d5b78b3c4c4c853e2a32810818940d0ee403423bea9ec7b8e566d9595206c\",\n \"version\": \"0x0\"\n },\n \"proposals\": [],\n \"transactions\": [\n {\n \"cell_deps\": [],\n \"hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\",\n \"header_deps\": [],\n \"inputs\": [\n {\n \"previous_output\": {\n \"index\": \"0xffffffff\",\n \"tx_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"since\": \"0x400\"\n }\n ],\n \"outputs\": [\n {\n \"capacity\": \"0x18e64b61cf\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n ],\n \"outputs_data\": [\n \"0x\"\n ],\n \"version\": \"0x0\",\n \"witnesses\": [\n \"0x450000000c000000410000003500000010000000300000003100000028e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5000000000000000000\"\n ]\n }\n ],\n \"uncles\": []\n }\n }\n ```\n\n The response looks like below when `verbosity` is 0.\n\n ```text\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0x...\"\n }\n ```", - "name": "get_fork_block", - "params": [ - { - "name": "block_hash", - "schema": { - "$ref": "#/components/schemas/H256" - } - }, - { - "name": "verbosity", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint32" - }, - { - "type": "null" - } - ] - } - } - ], - "result": { - "name": "get_fork_block", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Either_for_BlockView_and_JsonBytes" - }, - { - "type": "null" - } - ] - } - } - }, - { - "description": " Return various consensus parameters.\n\n ## Returns\n\n If any hardfork feature has `epoch=null`, it means the feature will never be activated.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_consensus\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"block_version\": \"0x0\",\n \"cellbase_maturity\": \"0x10000000000\",\n \"dao_type_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"epoch_duration_target\": \"0x3840\",\n \"genesis_hash\": \"0x7978ec7ce5b507cfb52e149e36b1a23f6062ed150503c85bbf825da3599095ed\",\n \"hardfork_features\": [\n { \"rfc\": \"0028\", \"epoch_number\": \"0x1526\" },\n { \"rfc\": \"0029\", \"epoch_number\": \"0x0\" },\n { \"rfc\": \"0030\", \"epoch_number\": \"0x0\" },\n { \"rfc\": \"0031\", \"epoch_number\": \"0x0\" },\n { \"rfc\": \"0032\", \"epoch_number\": \"0x1526\" },\n { \"rfc\": \"0036\", \"epoch_number\": \"0x0\" },\n { \"rfc\": \"0038\", \"epoch_number\": \"0x0\" },\n { \"rfc\": \"0048\", \"epoch_number\": null },\n { \"rfc\": \"0049\", \"epoch_number\": null }\n ],\n \"id\": \"main\",\n \"initial_primary_epoch_reward\": \"0x71afd498d000\",\n \"max_block_bytes\": \"0x91c08\",\n \"max_block_cycles\": \"0xd09dc300\",\n \"max_block_proposals_limit\": \"0x5dc\",\n \"max_uncles_num\": \"0x2\",\n \"median_time_block_count\": \"0x25\",\n \"orphan_rate_target\": {\n \"denom\": \"0x28\",\n \"numer\": \"0x1\"\n },\n \"permanent_difficulty_in_dummy\": false,\n \"primary_epoch_reward_halving_interval\": \"0x2238\",\n \"proposer_reward_ratio\": {\n \"denom\": \"0xa\",\n \"numer\": \"0x4\"\n },\n \"secondary_epoch_reward\": \"0x37d0c8e28542\",\n \"secp256k1_blake160_multisig_all_type_hash\": null,\n \"secp256k1_blake160_sighash_all_type_hash\": null,\n \"softforks\": {\n \"testdummy\": {\n \"status\": \"rfc0043\",\n \"rfc0043\": {\n \"bit\": 1,\n \"min_activation_epoch\": \"0x0\",\n \"period\": \"0xa\",\n \"start\": \"0x0\",\n \"threshold\": {\n \"denom\": \"0x4\",\n \"numer\": \"0x3\"\n },\n \"timeout\": \"0x0\"\n }\n }\n },\n \"tx_proposal_window\": {\n \"closest\": \"0x2\",\n \"farthest\": \"0xa\"\n },\n \"tx_version\": \"0x0\",\n \"type_id_code_hash\": \"0x00000000000000000000000000000000000000000000000000545950455f4944\"\n }\n }\n ```", - "name": "get_consensus", - "params": [], - "result": { - "name": "get_consensus", - "schema": { - "$ref": "#/components/schemas/Consensus" - } - } - }, - { - "description": " Returns the past median time by block hash.\n\n ## Params\n\n * `block_hash` - A median time is calculated for a consecutive block sequence. `block_hash` indicates the highest block of the sequence.\n\n ## Returns\n\n When the given block hash is not on the current canonical chain, this RPC returns null;\n otherwise returns the median time of the consecutive 37 blocks where the given block_hash has the highest height.\n\n Note that the given block is included in the median time. The included block number range is `[MAX(block - 36, 0), block]`.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_block_median_time\",\n \"params\": [\n \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0x5cd2b105\"\n }\n ```", - "name": "get_block_median_time", - "params": [ - { - "name": "block_hash", - "schema": { - "$ref": "#/components/schemas/H256" - } - } - ], - "result": { - "name": "get_block_median_time", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ] - } - } - }, - { - "description": " `estimate_cycles` run a transaction and return the execution consumed cycles.\n\n This method will not check the transaction validity, but only run the lock script\n and type script and then return the execution cycles.\n\n It is used to estimate how many cycles the scripts consume.\n\n ## Errors\n\n * [`TransactionFailedToResolve (-301)`](../enum.RPCError.html#variant.TransactionFailedToResolve) - Failed to resolve the referenced cells and headers used in the transaction, as inputs or dependencies.\n * [`TransactionFailedToVerify (-302)`](../enum.RPCError.html#variant.TransactionFailedToVerify) - There is a script returns with an error.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"estimate_cycles\",\n \"params\": [\n {\n \"cell_deps\": [\n {\n \"dep_type\": \"code\",\n \"out_point\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\"\n }\n }\n ],\n \"header_deps\": [\n \"0x7978ec7ce5b507cfb52e149e36b1a23f6062ed150503c85bbf825da3599095ed\"\n ],\n \"inputs\": [\n {\n \"previous_output\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n },\n \"since\": \"0x0\"\n }\n ],\n \"outputs\": [\n {\n \"capacity\": \"0x2540be400\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n ],\n \"outputs_data\": [\n \"0x\"\n ],\n \"version\": \"0x0\",\n \"witnesses\": []\n }\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"cycles\": \"0x219\"\n }\n }\n ```", - "name": "estimate_cycles", - "params": [ - { - "name": "tx", - "schema": { - "$ref": "#/components/schemas/Transaction" - } - } - ], - "result": { - "name": "estimate_cycles", - "schema": { - "$ref": "#/components/schemas/EstimateCycles" - } - } - }, - { - "description": " Returns the fee_rate statistics of confirmed blocks on the chain\n\n ## Params\n\n * `target` - Specify the number (1 - 101) of confirmed blocks to be counted.\n If the number is even, automatically add one. If not specified, defaults to 21\n\n ## Returns\n\n If the query finds the corresponding historical data,\n the corresponding statistics are returned,\n containing the mean and median, in shannons per kilo-weight.\n If not, it returns null.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_fee_rate_statics\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"mean\": \"0xe79d\",\n \"median\": \"0x14a8\"\n }\n }\n ```", - "name": "get_fee_rate_statics", - "params": [ - { - "name": "target", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ] - } - } - ], - "result": { - "name": "get_fee_rate_statics", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/FeeRateStatistics" - }, - { - "type": "null" - } - ] - } - } - }, - { - "description": " Returns the fee_rate statistics of confirmed blocks on the chain\n\n ## Params\n\n * `target` - Specify the number (1 - 101) of confirmed blocks to be counted.\n If the number is even, automatically add one. If not specified, defaults to 21\n\n ## Returns\n\n If the query finds the corresponding historical data,\n the corresponding statistics are returned,\n containing the mean and median, in shannons per kilo-weight.\n If not, it returns null.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_fee_rate_statistics\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"mean\": \"0xe79d\",\n \"median\": \"0x14a8\"\n }\n }\n ```", - "name": "get_fee_rate_statistics", - "params": [ - { - "name": "target", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ] - } - } - ], - "result": { - "name": "get_fee_rate_statistics", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/FeeRateStatistics" - }, - { - "type": "null" - } - ] - } - } - } - ], - "openrpc": "1.2.6" -} \ No newline at end of file diff --git a/docs/ckb_rpc_openrpc/json/debug_rpc_doc.json b/docs/ckb_rpc_openrpc/json/debug_rpc_doc.json deleted file mode 100644 index d85ae2526dd..00000000000 --- a/docs/ckb_rpc_openrpc/json/debug_rpc_doc.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "components": { - "schemas": { - "ExtraLoggerConfig": { - "description": "Runtime logger config for extra loggers.", - "properties": { - "filter": { - "description": "Sets log levels for different modules.\n\n## Examples\n\nSet the log level to info for all modules\n\n```text\n info\n```\n\nSet the log level to debug for listed modules and info for other modules.\n\n```text\n info,ckb-rpc=debug,ckb-sync=debug,ckb-relay=debug,ckb-tx-pool=debug,ckb-network=debug\n```", - "type": "string" - } - }, - "required": [ - "filter" - ], - "type": "object" - }, - "MainLoggerConfig": { - "description": "Runtime logger config.", - "properties": { - "color": { - "description": "Whether using color when printing the logs to the process stdout.\n\n`null` means keeping the current option unchanged.", - "type": [ - "boolean", - "null" - ] - }, - "filter": { - "description": "Sets log levels for different modules.\n\n`null` means keeping the current option unchanged.\n\n## Examples\n\nSet the log level to info for all modules\n\n```text\n info\n```\n\nSet the log level to debug for listed modules and info for other modules.\n\n```text\n info,ckb-rpc=debug,ckb-sync=debug,ckb-relay=debug,ckb-tx-pool=debug,ckb-network=debug\n```", - "type": [ - "string", - "null" - ] - }, - "to_file": { - "description": "Whether appending the logs to the log file.\n\n`null` means keeping the current option unchanged.", - "type": [ - "boolean", - "null" - ] - }, - "to_stdout": { - "description": "Whether printing the logs to the process stdout.\n\n`null` means keeping the current option unchanged.", - "type": [ - "boolean", - "null" - ] - } - }, - "type": "object" - } - } - }, - "info": { - "description": " RPC Module Debug for internal RPC methods.\n\n **This module is for CKB developers and will not guarantee compatibility.** The methods here\n will be changed or removed without advanced notification.", - "title": "debug_rpc", - "version": "0.115.0-pre" - }, - "methods": [ - { - "description": " Dumps jemalloc memory profiling information into a file.\n\n The file is stored in the server running the CKB node.\n\n The RPC returns the path to the dumped file on success or returns an error on failure.", - "name": "jemalloc_profiling_dump", - "params": [], - "result": { - "name": "jemalloc_profiling_dump", - "schema": { - "type": "string" - } - } - }, - { - "description": " Changes main logger config options while CKB is running.", - "name": "update_main_logger", - "params": [ - { - "name": "config", - "schema": { - "$ref": "#/components/schemas/MainLoggerConfig" - } - } - ], - "result": { - "name": "update_main_logger", - "schema": { - "type": "null" - } - } - }, - { - "description": " Sets logger config options for extra loggers.\n\n CKB nodes allow setting up extra loggers. These loggers will have their own log files and\n they only append logs to their log files.\n\n ## Params\n\n * `name` - Extra logger name\n * `config_opt` - Adds a new logger or update an existing logger when this is not null.\n Removes the logger when this is null.", - "name": "set_extra_logger", - "params": [ - { - "name": "name", - "schema": { - "type": "string" - } - }, - { - "name": "config_opt", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ExtraLoggerConfig" - }, - { - "type": "null" - } - ] - } - } - ], - "result": { - "name": "set_extra_logger", - "schema": { - "type": "null" - } - } - } - ], - "openrpc": "1.2.6" -} \ No newline at end of file diff --git a/docs/ckb_rpc_openrpc/json/experiment_rpc_doc.json b/docs/ckb_rpc_openrpc/json/experiment_rpc_doc.json deleted file mode 100644 index 68c334a0ea0..00000000000 --- a/docs/ckb_rpc_openrpc/json/experiment_rpc_doc.json +++ /dev/null @@ -1,331 +0,0 @@ -{ - "components": { - "schemas": { - "CellDep": { - "additionalProperties": false, - "description": "The cell dependency of a transaction.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"dep_type\": \"code\",\n \"out_point\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\"\n }\n }\n # \"#).unwrap();\n```", - "properties": { - "dep_type": { - "$ref": "#/components/schemas/DepType", - "description": "Dependency type." - }, - "out_point": { - "$ref": "#/components/schemas/OutPoint", - "description": "Reference to the cell." - } - }, - "required": [ - "dep_type", - "out_point" - ], - "type": "object" - }, - "CellInput": { - "additionalProperties": false, - "description": "The input cell of a transaction.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"previous_output\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n },\n \"since\": \"0x0\"\n }\n # \"#).unwrap();\n```", - "properties": { - "previous_output": { - "$ref": "#/components/schemas/OutPoint", - "description": "Reference to the input cell." - }, - "since": { - "$ref": "#/components/schemas/Uint64", - "description": "Restrict when the transaction can be committed into the chain.\n\nSee the RFC [Transaction valid since](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0017-tx-valid-since/0017-tx-valid-since.md)." - } - }, - "required": [ - "previous_output", - "since" - ], - "type": "object" - }, - "CellOutput": { - "additionalProperties": false, - "description": "The fields of an output cell except the cell data.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"capacity\": \"0x2540be400\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n # \"#).unwrap();\n```", - "properties": { - "capacity": { - "$ref": "#/components/schemas/Uint64", - "description": "The cell capacity.\n\nThe capacity of a cell is the value of the cell in Shannons. It is also the upper limit of the cell occupied storage size where every 100,000,000 Shannons give 1-byte storage." - }, - "lock": { - "$ref": "#/components/schemas/Script", - "description": "The lock script." - }, - "type": { - "anyOf": [ - { - "$ref": "#/components/schemas/Script" - }, - { - "type": "null" - } - ], - "description": "The optional type script.\n\nThe JSON field name is \"type\"." - } - }, - "required": [ - "capacity", - "lock" - ], - "type": "object" - }, - "DaoWithdrawingCalculationKind": { - "anyOf": [ - { - "$ref": "#/components/schemas/H256", - "description": "the assumed reference block hash for withdrawing phase 1 transaction" - }, - { - "$ref": "#/components/schemas/OutPoint", - "description": "the out point of the withdrawing phase 1 transaction" - } - ], - "description": "An enum to represent the two kinds of dao withdrawal amount calculation option. `DaoWithdrawingCalculationKind` is equivalent to [`H256`] `|` [`OutPoint`].\n\n[`H256`]: struct.H256.html\n[`OutPoint`]: struct.OutPoint.html" - }, - "DepType": { - "description": "The dep cell type. Allowed values: \"code\" and \"dep_group\".", - "oneOf": [ - { - "description": "Type \"code\".\n\nUse the cell itself as the dep cell.", - "enum": [ - "code" - ], - "type": "string" - }, - { - "description": "Type \"dep_group\".\n\nThe cell is a dep group which members are cells. These members are used as dep cells instead of the group itself.\n\nThe dep group stores the array of `OutPoint`s serialized via molecule in the cell data. Each `OutPoint` points to one cell member.", - "enum": [ - "dep_group" - ], - "type": "string" - } - ] - }, - "EstimateCycles": { - "description": "Response result of the RPC method `estimate_cycles`.", - "properties": { - "cycles": { - "$ref": "#/components/schemas/Uint64", - "description": "The count of cycles that the VM has consumed to verify this transaction." - } - }, - "required": [ - "cycles" - ], - "type": "object" - }, - "H256": { - "description": "The 32-byte fixed-length binary data.\n\nThe name comes from the number of bits in the data.\n\nIn JSONRPC, it is encoded as a 0x-prefixed hex string.", - "items": { - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "JsonBytes": { - "type": "string" - }, - "OutPoint": { - "additionalProperties": false, - "description": "Reference to a cell via transaction hash and output index.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n }\n # \"#).unwrap();\n```", - "properties": { - "index": { - "$ref": "#/components/schemas/Uint32", - "description": "The output index of the cell in the transaction specified by `tx_hash`." - }, - "tx_hash": { - "$ref": "#/components/schemas/H256", - "description": "Transaction hash in which the cell is an output." - } - }, - "required": [ - "index", - "tx_hash" - ], - "type": "object" - }, - "Script": { - "additionalProperties": false, - "description": "Describes the lock script and type script for a cell.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n }\n # \"#).unwrap();\n```", - "properties": { - "args": { - "$ref": "#/components/schemas/JsonBytes", - "description": "Arguments for script." - }, - "code_hash": { - "$ref": "#/components/schemas/H256", - "description": "The hash used to match the script code." - }, - "hash_type": { - "$ref": "#/components/schemas/ScriptHashType", - "description": "Specifies how to use the `code_hash` to match the script code." - } - }, - "required": [ - "args", - "code_hash", - "hash_type" - ], - "type": "object" - }, - "ScriptHashType": { - "description": "Specifies how the script `code_hash` is used to match the script code and how to run the code.\n\nAllowed kinds: \"data\", \"type\", \"data1\" and \"data2\"\n\nRefer to the section [Code Locating](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md#code-locating) and [Upgradable Script](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md#upgradable-script) in the RFC *CKB Transaction Structure*.\n\nThe hash type is split into the high 7 bits and the low 1 bit, when the low 1 bit is 1, it indicates the type, when the low 1 bit is 0, it indicates the data, and then it relies on the high 7 bits to indicate that the data actually corresponds to the version.", - "oneOf": [ - { - "description": "Type \"data\" matches script code via cell data hash, and run the script code in v0 CKB VM.", - "enum": [ - "data" - ], - "type": "string" - }, - { - "description": "Type \"type\" matches script code via cell type script hash.", - "enum": [ - "type" - ], - "type": "string" - }, - { - "description": "Type \"data1\" matches script code via cell data hash, and run the script code in v1 CKB VM.", - "enum": [ - "data1" - ], - "type": "string" - }, - { - "description": "Type \"data2\" matches script code via cell data hash, and run the script code in v2 CKB VM.", - "enum": [ - "data2" - ], - "type": "string" - } - ] - }, - "Transaction": { - "additionalProperties": false, - "description": "The transaction.\n\nRefer to RFC [CKB Transaction Structure](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md).", - "properties": { - "cell_deps": { - "description": "An array of cell deps.\n\nCKB locates lock script and type script code via cell deps. The script also can use syscalls to read the cells here.\n\nUnlike inputs, the live cells can be used as cell deps in multiple transactions.", - "items": { - "$ref": "#/components/schemas/CellDep" - }, - "type": "array" - }, - "header_deps": { - "description": "An array of header deps.\n\nThe block must already be in the canonical chain.\n\nLock script and type script can read the header information of blocks listed here.", - "items": { - "$ref": "#/components/schemas/H256" - }, - "type": "array" - }, - "inputs": { - "description": "An array of input cells.\n\nIn the canonical chain, any cell can only appear as an input once.", - "items": { - "$ref": "#/components/schemas/CellInput" - }, - "type": "array" - }, - "outputs": { - "description": "An array of output cells.", - "items": { - "$ref": "#/components/schemas/CellOutput" - }, - "type": "array" - }, - "outputs_data": { - "description": "Output cells data.\n\nThis is a parallel array of outputs. The cell capacity, lock, and type of the output i is `outputs[i]` and its data is `outputs_data[i]`.", - "items": { - "$ref": "#/components/schemas/JsonBytes" - }, - "type": "array" - }, - "version": { - "$ref": "#/components/schemas/Uint32", - "description": "Reserved for future usage. It must equal 0 in current version." - }, - "witnesses": { - "description": "An array of variable-length binaries.\n\nLock script and type script can read data here to verify the transaction.\n\nFor example, the bundled secp256k1 lock script requires storing the signature in `witnesses`.", - "items": { - "$ref": "#/components/schemas/JsonBytes" - }, - "type": "array" - } - }, - "required": [ - "cell_deps", - "header_deps", - "inputs", - "outputs", - "outputs_data", - "version", - "witnesses" - ], - "type": "object" - }, - "Uint32": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "Uint64": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - } - } - }, - "info": { - "description": " RPC Module Experiment for experimenting methods.\n\n **EXPERIMENTAL warning**\n\n The methods here may be removed or changed in future releases without prior notifications.", - "title": "experiment_rpc", - "version": "0.115.0-pre" - }, - "methods": [ - { - "description": " Dry run a transaction and return the execution cycles.\n\n This method will not check the transaction validity, but only run the lock script\n and type script and then return the execution cycles.\n\n It is used to debug transaction scripts and query how many cycles the scripts consume.\n\n ## Errors\n\n * [`TransactionFailedToResolve (-301)`](../enum.RPCError.html#variant.TransactionFailedToResolve) - Failed to resolve the referenced cells and headers used in the transaction, as inputs or dependencies.\n * [`TransactionFailedToVerify (-302)`](../enum.RPCError.html#variant.TransactionFailedToVerify) - There is a script returns with an error.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"dry_run_transaction\",\n \"params\": [\n {\n \"cell_deps\": [\n {\n \"dep_type\": \"code\",\n \"out_point\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\"\n }\n }\n ],\n \"header_deps\": [\n \"0x7978ec7ce5b507cfb52e149e36b1a23f6062ed150503c85bbf825da3599095ed\"\n ],\n \"inputs\": [\n {\n \"previous_output\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n },\n \"since\": \"0x0\"\n }\n ],\n \"outputs\": [\n {\n \"capacity\": \"0x2540be400\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n ],\n \"outputs_data\": [\n \"0x\"\n ],\n \"version\": \"0x0\",\n \"witnesses\": []\n }\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"cycles\": \"0x219\"\n }\n }\n ```", - "name": "dry_run_transaction", - "params": [ - { - "name": "tx", - "schema": { - "$ref": "#/components/schemas/Transaction" - } - } - ], - "result": { - "name": "dry_run_transaction", - "schema": { - "$ref": "#/components/schemas/EstimateCycles" - } - } - }, - { - "description": " Calculates the maximum withdrawal one can get, given a referenced DAO cell, and\n a withdrawing block hash.\n\n ## Params\n\n * `out_point` - Reference to the DAO cell, the depositing transaction's output.\n * `kind` - Two kinds of dao withdrawal amount calculation option.\n\n option 1, the assumed reference block hash for withdrawing phase 1 transaction, this block must be in the\n [canonical chain](trait.ChainRpc.html#canonical-chain), the calculation of occupied capacity will be based on the depositing transaction's output, assuming the output of phase 1 transaction is the same as the depositing transaction's output.\n\n option 2, the out point of the withdrawing phase 1 transaction, the calculation of occupied capacity will be based on corresponding phase 1 transaction's output.\n\n ## Returns\n\n The RPC returns the final capacity when the cell `out_point` is withdrawn using the block hash or withdrawing phase 1 transaction out point as the reference.\n\n In CKB, scripts cannot get the information about in which block the transaction is\n committed. A workaround is letting the transaction reference a block hash so the script\n knows that the transaction is committed at least after the reference block.\n\n ## Errors\n\n * [`DaoError (-5)`](../enum.RPCError.html#variant.DaoError) - The given out point is not a valid cell for DAO computation.\n * [`CKBInternalError (-1)`](../enum.RPCError.html#variant.CKBInternalError) - Mathematics overflow.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"calculate_dao_maximum_withdraw\",\n \"params\": [\n {\n \"index\": \"0x0\",\n \"tx_hash\": \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\"\n },\n \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0x4a8b4e8a4\"\n }\n ```", - "name": "calculate_dao_maximum_withdraw", - "params": [ - { - "name": "out_point", - "schema": { - "$ref": "#/components/schemas/OutPoint" - } - }, - { - "name": "kind", - "schema": { - "$ref": "#/components/schemas/DaoWithdrawingCalculationKind" - } - } - ], - "result": { - "name": "calculate_dao_maximum_withdraw", - "schema": { - "$ref": "#/components/schemas/Uint64" - } - } - } - ], - "openrpc": "1.2.6" -} \ No newline at end of file diff --git a/docs/ckb_rpc_openrpc/json/indexer_rpc_doc.json b/docs/ckb_rpc_openrpc/json/indexer_rpc_doc.json deleted file mode 100644 index b46a85299a3..00000000000 --- a/docs/ckb_rpc_openrpc/json/indexer_rpc_doc.json +++ /dev/null @@ -1,708 +0,0 @@ -{ - "components": { - "schemas": { - "CellOutput": { - "additionalProperties": false, - "description": "The fields of an output cell except the cell data.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"capacity\": \"0x2540be400\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n # \"#).unwrap();\n```", - "properties": { - "capacity": { - "$ref": "#/components/schemas/Uint64", - "description": "The cell capacity.\n\nThe capacity of a cell is the value of the cell in Shannons. It is also the upper limit of the cell occupied storage size where every 100,000,000 Shannons give 1-byte storage." - }, - "lock": { - "$ref": "#/components/schemas/Script", - "description": "The lock script." - }, - "type": { - "anyOf": [ - { - "$ref": "#/components/schemas/Script" - }, - { - "type": "null" - } - ], - "description": "The optional type script.\n\nThe JSON field name is \"type\"." - } - }, - "required": [ - "capacity", - "lock" - ], - "type": "object" - }, - "H256": { - "description": "The 32-byte fixed-length binary data.\n\nThe name comes from the number of bits in the data.\n\nIn JSONRPC, it is encoded as a 0x-prefixed hex string.", - "items": { - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "IndexerCell": { - "description": "Live cell", - "properties": { - "block_number": { - "$ref": "#/components/schemas/Uint64", - "description": "the number of the transaction committed in the block" - }, - "out_point": { - "$ref": "#/components/schemas/OutPoint", - "description": "reference to a cell via transaction hash and output index" - }, - "output": { - "$ref": "#/components/schemas/CellOutput", - "description": "the fields of an output cell" - }, - "output_data": { - "anyOf": [ - { - "$ref": "#/components/schemas/JsonBytes" - }, - { - "type": "null" - } - ], - "description": "the cell data" - }, - "tx_index": { - "$ref": "#/components/schemas/Uint32", - "description": "the position index of the transaction committed in the block" - } - }, - "required": [ - "block_number", - "out_point", - "output", - "tx_index" - ], - "type": "object" - }, - "IndexerCellType": { - "description": "Cell type", - "oneOf": [ - { - "description": "Input", - "enum": [ - "input" - ], - "type": "string" - }, - { - "description": "Output", - "enum": [ - "output" - ], - "type": "string" - } - ] - }, - "IndexerCellsCapacity": { - "description": "Cells capacity", - "properties": { - "block_hash": { - "$ref": "#/components/schemas/H256", - "description": "indexed tip block hash" - }, - "block_number": { - "$ref": "#/components/schemas/Uint64", - "description": "indexed tip block number" - }, - "capacity": { - "$ref": "#/components/schemas/Uint64", - "description": "total capacity" - } - }, - "required": [ - "block_hash", - "block_number", - "capacity" - ], - "type": "object" - }, - "IndexerOrder": { - "description": "Order Desc | Asc", - "oneOf": [ - { - "description": "Descending order", - "enum": [ - "desc" - ], - "type": "string" - }, - { - "description": "Ascending order", - "enum": [ - "asc" - ], - "type": "string" - } - ] - }, - "IndexerPagination_for_IndexerCell": { - "description": "IndexerPagination wraps objects array and last_cursor to provide paging", - "properties": { - "last_cursor": { - "$ref": "#/components/schemas/JsonBytes", - "description": "pagination parameter" - }, - "objects": { - "description": "objects collection", - "items": { - "$ref": "#/components/schemas/IndexerCell" - }, - "type": "array" - } - }, - "required": [ - "last_cursor", - "objects" - ], - "type": "object" - }, - "IndexerPagination_for_IndexerTx": { - "description": "IndexerPagination wraps objects array and last_cursor to provide paging", - "properties": { - "last_cursor": { - "$ref": "#/components/schemas/JsonBytes", - "description": "pagination parameter" - }, - "objects": { - "description": "objects collection", - "items": { - "$ref": "#/components/schemas/IndexerTx" - }, - "type": "array" - } - }, - "required": [ - "last_cursor", - "objects" - ], - "type": "object" - }, - "IndexerScriptType": { - "description": "ScriptType `Lock` | `Type`", - "oneOf": [ - { - "description": "Lock", - "enum": [ - "lock" - ], - "type": "string" - }, - { - "description": "Type", - "enum": [ - "type" - ], - "type": "string" - } - ] - }, - "IndexerSearchKey": { - "description": "SearchKey represent indexer support params", - "properties": { - "filter": { - "anyOf": [ - { - "$ref": "#/components/schemas/IndexerSearchKeyFilter" - }, - { - "type": "null" - } - ], - "description": "filter cells by following conditions, all conditions are optional" - }, - "group_by_transaction": { - "description": "bool, optional default is `false`, if group_by_transaction is set to true, the returning objects will be grouped by the tx hash", - "type": [ - "boolean", - "null" - ] - }, - "script": { - "$ref": "#/components/schemas/Script", - "description": "Script" - }, - "script_search_mode": { - "anyOf": [ - { - "$ref": "#/components/schemas/IndexerSearchMode" - }, - { - "type": "null" - } - ], - "description": "Script search mode, optional default is `prefix`, means search script with prefix" - }, - "script_type": { - "$ref": "#/components/schemas/IndexerScriptType", - "description": "Script Type" - }, - "with_data": { - "description": "bool, optional default is `true`, if with_data is set to false, the field of returning cell.output_data is null in the result", - "type": [ - "boolean", - "null" - ] - } - }, - "required": [ - "script", - "script_type" - ], - "type": "object" - }, - "IndexerSearchKeyFilter": { - "description": "IndexerSearchKeyFilter represent indexer params `filter`", - "properties": { - "block_range": { - "description": "filter cells by block number range", - "items": { - "$ref": "#/components/schemas/Uint64" - }, - "maxItems": 2, - "minItems": 2, - "type": [ - "array", - "null" - ] - }, - "output_capacity_range": { - "description": "filter cells by output capacity range", - "items": { - "$ref": "#/components/schemas/Uint64" - }, - "maxItems": 2, - "minItems": 2, - "type": [ - "array", - "null" - ] - }, - "output_data": { - "anyOf": [ - { - "$ref": "#/components/schemas/JsonBytes" - }, - { - "type": "null" - } - ], - "description": "filter cells by output data" - }, - "output_data_filter_mode": { - "anyOf": [ - { - "$ref": "#/components/schemas/IndexerSearchMode" - }, - { - "type": "null" - } - ], - "description": "output data filter mode, optional default is `prefix`" - }, - "output_data_len_range": { - "description": "filter cells by output data len range", - "items": { - "$ref": "#/components/schemas/Uint64" - }, - "maxItems": 2, - "minItems": 2, - "type": [ - "array", - "null" - ] - }, - "script": { - "anyOf": [ - { - "$ref": "#/components/schemas/Script" - }, - { - "type": "null" - } - ], - "description": "if search script type is lock, filter cells by type script prefix, and vice versa" - }, - "script_len_range": { - "description": "filter cells by script len range", - "items": { - "$ref": "#/components/schemas/Uint64" - }, - "maxItems": 2, - "minItems": 2, - "type": [ - "array", - "null" - ] - } - }, - "type": "object" - }, - "IndexerSearchMode": { - "description": "IndexerSearchMode represent search mode, default is prefix search", - "oneOf": [ - { - "description": "Mode `prefix` search with prefix", - "enum": [ - "prefix" - ], - "type": "string" - }, - { - "description": "Mode `exact` search with exact match", - "enum": [ - "exact" - ], - "type": "string" - }, - { - "description": "Mode `partial` search with partial match", - "enum": [ - "partial" - ], - "type": "string" - } - ] - }, - "IndexerTip": { - "description": "Indexer tip information", - "properties": { - "block_hash": { - "$ref": "#/components/schemas/H256", - "description": "indexed tip block hash" - }, - "block_number": { - "$ref": "#/components/schemas/Uint64", - "description": "indexed tip block number" - } - }, - "required": [ - "block_hash", - "block_number" - ], - "type": "object" - }, - "IndexerTx": { - "anyOf": [ - { - "$ref": "#/components/schemas/IndexerTxWithCell", - "description": "## Fields\n\n`IndexerCellType` is equivalent to `\"input\" | \"output\"`.\n\n`IndexerTxWithCell` is a JSON object with the following fields.\n* `tx_hash`: [`H256`] - transaction hash\n* `block_number`: [`BlockNumber`] - the number of the transaction committed in the block\n* `tx_index`: [`Uint32`] - the position index of the transaction committed in the block\n* `io_index`: [`Uint32`] - the position index of the cell in the transaction inputs or outputs\n* `io_type`: [`IndexerCellType`] - io type", - "title": "Ungrouped format represent as `IndexerTxWithCell`" - }, - { - "$ref": "#/components/schemas/IndexerTxWithCells", - "description": "## Fields\n\n`IndexerCellType` is equivalent to `\"input\" | \"output\"`.\n\n`IndexerTxWithCells` is a JSON object with the following fields.\n* `tx_hash`: [`H256`] - transaction hash\n* `block_number`: [`BlockNumber`] - the number of the transaction committed in the block\n* `tx_index`: [`Uint32`]- the position index of the transaction committed in the block\n* `cells`: Array <(IndexerCellType, Uint32)>", - "title": "Grouped format represent as `IndexerTxWithCells`" - } - ], - "description": "Indexer Transaction Object" - }, - "IndexerTxWithCell": { - "description": "Ungrouped Tx inner type", - "properties": { - "block_number": { - "$ref": "#/components/schemas/Uint64", - "description": "the number of the transaction committed in the block" - }, - "io_index": { - "$ref": "#/components/schemas/Uint32", - "description": "the position index of the cell in the transaction inputs or outputs" - }, - "io_type": { - "$ref": "#/components/schemas/IndexerCellType", - "description": "io type" - }, - "tx_hash": { - "$ref": "#/components/schemas/H256", - "description": "transaction hash" - }, - "tx_index": { - "$ref": "#/components/schemas/Uint32", - "description": "the position index of the transaction committed in the block" - } - }, - "required": [ - "block_number", - "io_index", - "io_type", - "tx_hash", - "tx_index" - ], - "type": "object" - }, - "IndexerTxWithCells": { - "description": "Grouped Tx inner type", - "properties": { - "block_number": { - "$ref": "#/components/schemas/Uint64", - "description": "the number of the transaction committed in the block" - }, - "cells": { - "description": "Array [(io_type, io_index)]", - "items": { - "items": [ - { - "$ref": "#/components/schemas/IndexerCellType" - }, - { - "$ref": "#/components/schemas/Uint32" - } - ], - "maxItems": 2, - "minItems": 2, - "type": "array" - }, - "type": "array" - }, - "tx_hash": { - "$ref": "#/components/schemas/H256", - "description": "transaction hash" - }, - "tx_index": { - "$ref": "#/components/schemas/Uint32", - "description": "the position index of the transaction committed in the block" - } - }, - "required": [ - "block_number", - "cells", - "tx_hash", - "tx_index" - ], - "type": "object" - }, - "JsonBytes": { - "type": "string" - }, - "OutPoint": { - "additionalProperties": false, - "description": "Reference to a cell via transaction hash and output index.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n }\n # \"#).unwrap();\n```", - "properties": { - "index": { - "$ref": "#/components/schemas/Uint32", - "description": "The output index of the cell in the transaction specified by `tx_hash`." - }, - "tx_hash": { - "$ref": "#/components/schemas/H256", - "description": "Transaction hash in which the cell is an output." - } - }, - "required": [ - "index", - "tx_hash" - ], - "type": "object" - }, - "Script": { - "additionalProperties": false, - "description": "Describes the lock script and type script for a cell.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n }\n # \"#).unwrap();\n```", - "properties": { - "args": { - "$ref": "#/components/schemas/JsonBytes", - "description": "Arguments for script." - }, - "code_hash": { - "$ref": "#/components/schemas/H256", - "description": "The hash used to match the script code." - }, - "hash_type": { - "$ref": "#/components/schemas/ScriptHashType", - "description": "Specifies how to use the `code_hash` to match the script code." - } - }, - "required": [ - "args", - "code_hash", - "hash_type" - ], - "type": "object" - }, - "ScriptHashType": { - "description": "Specifies how the script `code_hash` is used to match the script code and how to run the code.\n\nAllowed kinds: \"data\", \"type\", \"data1\" and \"data2\"\n\nRefer to the section [Code Locating](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md#code-locating) and [Upgradable Script](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md#upgradable-script) in the RFC *CKB Transaction Structure*.\n\nThe hash type is split into the high 7 bits and the low 1 bit, when the low 1 bit is 1, it indicates the type, when the low 1 bit is 0, it indicates the data, and then it relies on the high 7 bits to indicate that the data actually corresponds to the version.", - "oneOf": [ - { - "description": "Type \"data\" matches script code via cell data hash, and run the script code in v0 CKB VM.", - "enum": [ - "data" - ], - "type": "string" - }, - { - "description": "Type \"type\" matches script code via cell type script hash.", - "enum": [ - "type" - ], - "type": "string" - }, - { - "description": "Type \"data1\" matches script code via cell data hash, and run the script code in v1 CKB VM.", - "enum": [ - "data1" - ], - "type": "string" - }, - { - "description": "Type \"data2\" matches script code via cell data hash, and run the script code in v2 CKB VM.", - "enum": [ - "data2" - ], - "type": "string" - } - ] - }, - "Uint32": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "Uint64": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - } - } - }, - "info": { - "description": " RPC Module Indexer.", - "title": "indexer_rpc", - "version": "0.115.0-pre" - }, - "methods": [ - { - "description": " Returns the indexed tip\n\n ## Returns\n * block_hash - indexed tip block hash\n * block_number - indexed tip block number\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 2,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_indexer_tip\"\n }\n ```\n\n Response\n\n ```json\n {\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"block_hash\": \"0x4959d6e764a2edc6038dbf03d61ebcc99371115627b186fdcccb2161fbd26edc\",\n \"block_number\": \"0x5b513e\"\n },\n \"id\": 2\n }\n ```", - "name": "get_indexer_tip", - "params": [], - "result": { - "name": "get_indexer_tip", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/IndexerTip" - }, - { - "type": "null" - } - ] - } - } - }, - { - "description": " Returns the live cells collection by the lock or type script.\n\n ## Params\n\n * search_key:\n - script - Script, supports prefix search\n - script_type - enum, lock | type\n - script_search_mode - enum, prefix | exact\n - filter - filter cells by following conditions, all conditions are optional\n - script: if search script type is lock, filter cells by type script prefix, and vice versa\n - script_len_range: [u64; 2], filter cells by script len range, [inclusive, exclusive]\n - output_data: filter cells by output data\n - output_data_filter_mode: enum, prefix | exact | partial\n - output_data_len_range: [u64; 2], filter cells by output data len range, [inclusive, exclusive]\n - output_capacity_range: [u64; 2], filter cells by output capacity range, [inclusive, exclusive]\n - block_range: [u64; 2], filter cells by block number range, [inclusive, exclusive]\n - with_data - bool, optional default is `true`, if with_data is set to false, the field of returning cell.output_data is null in the result\n * order: enum, asc | desc\n * limit: result size limit\n * after: pagination parameter, optional\n\n ## Returns\n\n If the number of objects is less than the requested `limit`, it indicates that these are the last page of get_cells.\n\n * objects:\n - output: the fields of an output cell\n - output_data: the cell data\n - out_point: reference to a cell via transaction hash and output index\n - block_number: the number of the transaction committed in the block\n - tx_index: the position index of the transaction committed in the block\n * last_cursor: pagination parameter\n\n ## Examples\n\n * get cells by lock script\n\n Request\n\n ```json\n {\n \"id\": 2,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_cells\",\n \"params\": [\n {\n \"script\": {\n \"code_hash\": \"0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8\",\n \"hash_type\": \"type\",\n \"args\": \"0x5989ae415bb667931a99896e5fbbfad9ba53a223\"\n },\n \"script_type\": \"lock\"\n },\n \"asc\",\n \"0x64\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"last_cursor\": \"0x409bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8015989ae415bb667931a99896e5fbbfad9ba53a22300000000005b0f8c0000000100000000\",\n \"objects\": [\n {\n \"block_number\": \"0x5b0e6d\",\n \"out_point\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0xe8f2180dfba0cb15b45f771d520834515a5f8d7aa07f88894da88c22629b79e9\"\n },\n \"output\": {\n \"capacity\": \"0x189640200\",\n \"lock\": {\n \"args\": \"0x5989ae415bb667931a99896e5fbbfad9ba53a223\",\n \"code_hash\": \"0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8\",\n \"hash_type\": \"type\"\n },\n \"type\": null\n },\n \"output_data\": \"0x\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0e90\",\n \"out_point\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0xece3a27409bde2914fb7a1555d6bfca453ee46af73e665149ef549fd46ec1fc6\"\n },\n \"output\": {\n \"capacity\": \"0x189640200\",\n \"lock\": {\n \"args\": \"0x5989ae415bb667931a99896e5fbbfad9ba53a223\",\n \"code_hash\": \"0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8\",\n \"hash_type\": \"type\"\n },\n \"type\": null\n },\n \"output_data\": \"0x\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0ead\",\n \"out_point\": {\n \"index\": \"0x1\",\n \"tx_hash\": \"0x5c48768f91e3795b418c53211c76fd038c464a24c4aa7e35bbbb6ac5b219f581\"\n },\n \"output\": {\n \"capacity\": \"0xe36dceec20\",\n \"lock\": {\n \"args\": \"0x5989ae415bb667931a99896e5fbbfad9ba53a223\",\n \"code_hash\": \"0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8\",\n \"hash_type\": \"type\"\n },\n \"type\": null\n },\n \"output_data\": \"0x\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0eeb\",\n \"out_point\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x90e6981d6a5692d92e54344dc0e12d213447710fa069cc19ddea874619b9ba48\"\n },\n \"output\": {\n \"capacity\": \"0x174876e800\",\n \"lock\": {\n \"args\": \"0x5989ae415bb667931a99896e5fbbfad9ba53a223\",\n \"code_hash\": \"0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8\",\n \"hash_type\": \"type\"\n },\n \"type\": null\n },\n \"output_data\": \"0x\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0f8c\",\n \"out_point\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x9ea14510219ae97afa0275215fa77c3c015905281c953a3917a7fd036767429c\"\n },\n \"output\": {\n \"capacity\": \"0x189640200\",\n \"lock\": {\n \"args\": \"0x5989ae415bb667931a99896e5fbbfad9ba53a223\",\n \"code_hash\": \"0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8\",\n \"hash_type\": \"type\"\n },\n \"type\": null\n },\n \"output_data\": \"0x\",\n \"tx_index\": \"0x1\"\n }\n ]\n },\n \"id\": 2\n }\n ```\n\n * get cells by lock script and filter by type script\n\n Request\n\n ```json\n {\n \"id\": 2,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_cells\",\n \"params\": [\n {\n \"script\": {\n \"code_hash\": \"0x58c5f491aba6d61678b7cf7edf4910b1f5e00ec0cde2f42e0abb4fd9aff25a63\",\n \"hash_type\": \"type\",\n \"args\": \"0x2a49720e721553d0614dff29454ee4e1f07d0707\"\n },\n \"script_type\": \"lock\",\n \"filter\": {\n \"script\": {\n \"code_hash\": \"0xc5e5dcf215925f7ef4dfaf5f4b4f105bc321c02776d6e7d52a1db3fcd9d011a4\",\n \"hash_type\": \"type\",\n \"args\": \"0x8462b20277bcbaa30d821790b852fb322d55c2b12e750ea91ad7059bc98dda4b\"\n }\n }\n },\n \"asc\",\n \"0x64\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"last_cursor\": \"0x4058c5f491aba6d61678b7cf7edf4910b1f5e00ec0cde2f42e0abb4fd9aff25a63012a49720e721553d0614dff29454ee4e1f07d070700000000002adf870000000100000001\",\n \"objects\": [\n {\n \"block_number\": \"0x2adf87\",\n \"out_point\": {\n \"index\": \"0x1\",\n \"tx_hash\": \"0x04ecbc2df39e3682326a3b23c1bd2465e07eae2379ac0cc713834a1f79753779\"\n },\n \"output\": {\n \"capacity\": \"0x436d81500\",\n \"lock\": {\n \"args\": \"0x2a49720e721553d0614dff29454ee4e1f07d0707\",\n \"code_hash\": \"0x58c5f491aba6d61678b7cf7edf4910b1f5e00ec0cde2f42e0abb4fd9aff25a63\",\n \"hash_type\": \"type\"\n },\n \"type\": {\n \"args\": \"0x8462b20277bcbaa30d821790b852fb322d55c2b12e750ea91ad7059bc98dda4b\",\n \"code_hash\": \"0xc5e5dcf215925f7ef4dfaf5f4b4f105bc321c02776d6e7d52a1db3fcd9d011a4\",\n \"hash_type\": \"type\"\n }\n },\n \"output_data\": \"0x0040d20853d746000000000000000000\",\n \"tx_index\": \"0x1\"\n }\n ]\n },\n \"id\": 2\n }\n ```\n\n * get cells by lock script and filter empty type script by setting script_len_range to\n [0, 1), script_len is caculated by (code_hash + hash_type + args).len\n\n Request\n\n ```json\n {\n \"id\": 2,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_cells\",\n \"params\": [\n {\n \"script\": {\n \"code_hash\": \"0x58c5f491aba6d61678b7cf7edf4910b1f5e00ec0cde2f42e0abb4fd9aff25a63\",\n \"hash_type\": \"type\",\n \"args\": \"0x2a49720e721553d0614dff29454ee4e1f07d0707\"\n },\n \"script_type\": \"lock\",\n \"filter\": {\n \"script_len_range\": [\"0x0\", \"0x1\"]\n }\n },\n \"asc\",\n \"0x64\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"last_cursor\": \"0x4058c5f491aba6d61678b7cf7edf4910b1f5e00ec0cde2f42e0abb4fd9aff25a63012a49720e721553d0614dff29454ee4e1f07d070700000000002adf830000000200000001\",\n \"objects\": [\n {\n \"block_number\": \"0x2adf83\",\n \"out_point\": {\n \"index\": \"0x1\",\n \"tx_hash\": \"0x23ec897027c1d2a2b39e2446162bac182f18581be048cb3896ad695559b6839e\"\n },\n \"output\": {\n \"capacity\": \"0x54b42b70b4\",\n \"lock\": {\n \"args\": \"0x2a49720e721553d0614dff29454ee4e1f07d0707\",\n \"code_hash\": \"0x58c5f491aba6d61678b7cf7edf4910b1f5e00ec0cde2f42e0abb4fd9aff25a63\",\n \"hash_type\": \"type\"\n },\n \"type\": null\n },\n \"output_data\": \"0x\",\n \"tx_index\": \"0x2\"\n }\n ]\n },\n \"id\": 2\n }\n ```\n\n * get cells by lock script and filter capacity range\n\n Request\n\n ```json\n {\n \"id\": 2,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_cells\",\n \"params\": [\n {\n \"script\": {\n \"code_hash\": \"0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8\",\n \"hash_type\": \"type\",\n \"args\": \"0x5989ae415bb667931a99896e5fbbfad9ba53a223\"\n },\n \"script_type\": \"lock\",\n \"filter\": {\n \"output_capacity_range\": [\"0x0\", \"0x174876e801\"]\n }\n },\n \"asc\",\n \"0x64\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"last_cursor\": \"0x409bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8015989ae415bb667931a99896e5fbbfad9ba53a22300000000005b59df0000000100000001\",\n \"objects\": [\n {\n \"block_number\": \"0x5b59df\",\n \"out_point\": {\n \"index\": \"0x1\",\n \"tx_hash\": \"0x21c4632a41140b828e9347ff80480b3e07be4e0a0b8d577565e7421fd5473194\"\n },\n \"output\": {\n \"capacity\": \"0xe815b81c0\",\n \"lock\": {\n \"args\": \"0x5989ae415bb667931a99896e5fbbfad9ba53a223\",\n \"code_hash\": \"0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8\",\n \"hash_type\": \"type\"\n },\n \"type\": null\n },\n \"output_data\": \"0x\",\n \"tx_index\": \"0x1\"\n }\n ]\n },\n \"id\": 2\n }\n ```", - "name": "get_cells", - "params": [ - { - "name": "search_key", - "schema": { - "$ref": "#/components/schemas/IndexerSearchKey" - } - }, - { - "name": "order", - "schema": { - "$ref": "#/components/schemas/IndexerOrder" - } - }, - { - "name": "limit", - "schema": { - "$ref": "#/components/schemas/Uint32" - } - }, - { - "name": "after", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/JsonBytes" - }, - { - "type": "null" - } - ] - } - } - ], - "result": { - "name": "get_cells", - "schema": { - "$ref": "#/components/schemas/IndexerPagination_for_IndexerCell" - } - } - }, - { - "description": " Returns the transactions collection by the lock or type script.\n\n * search_key:\n - script - Script, supports prefix search when group_by_transaction is false\n - script_type - enum, lock | type\n - script_search_mode - enum, prefix | exact\n - filter - filter cells by following conditions, all conditions are optional\n - script: if search script type is lock, filter cells by type script, and vice versa\n - block_range: [u64; 2], filter cells by block number range, [inclusive, exclusive]\n - group_by_transaction - bool, optional default is `false`, if group_by_transaction is set to true, the returning objects will be grouped by the tx hash\n * order: enum, asc | desc\n * limit: result size limit\n * after: pagination parameter, optional\n\n ## Returns\n\n If the number of objects is less than the requested `limit`, it indicates that these are the last page of get_transactions.\n\n * objects - enum, ungrouped TxWithCell | grouped TxWithCells\n - TxWithCell:\n - tx_hash: transaction hash,\n - block_number: the number of the transaction committed in the block\n - tx_index: the position index of the transaction committed in the block\n - io_type: enum, input | output\n - io_index: the position index of the cell in the transaction inputs or outputs\n - TxWithCells:\n - tx_hash: transaction hash,\n - block_number: the number of the transaction committed in the block\n - tx_index: the position index of the transaction committed in the block\n - cells: Array [[io_type, io_index]]\n * last_cursor - pagination parameter\n\n ## Examples\n\n * get transactions by lock script\n\n Request\n\n ```json\n {\n \"id\": 2,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_transactions\",\n \"params\": [\n {\n \"script\": {\n \"code_hash\": \"0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8\",\n \"hash_type\": \"type\",\n \"args\": \"0x5989ae415bb667931a99896e5fbbfad9ba53a223\"\n },\n \"script_type\": \"lock\"\n },\n \"asc\",\n \"0x64\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"last_cursor\": \"0x809bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8015989ae415bb667931a99896e5fbbfad9ba53a22300000000005b59df000000010000000101\",\n \"objects\": [\n {\n \"block_number\": \"0x5b033a\",\n \"io_index\": \"0x0\",\n \"io_type\": \"output\",\n \"tx_hash\": \"0x556060b62d16386da53f8a4b458314dfa2d1988a7bcc5c96c3bb2a350a3453a1\",\n \"tx_index\": \"0x4\"\n },\n {\n \"block_number\": \"0x5b0671\",\n \"io_index\": \"0x0\",\n \"io_type\": \"input\",\n \"tx_hash\": \"0x8205b2b4cd6380d7e332c7a5b49bf776a0322ba19f46dc6ca1f8c59f7daee08d\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0671\",\n \"io_index\": \"0x1\",\n \"io_type\": \"output\",\n \"tx_hash\": \"0x8205b2b4cd6380d7e332c7a5b49bf776a0322ba19f46dc6ca1f8c59f7daee08d\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0e6d\",\n \"io_index\": \"0x0\",\n \"io_type\": \"output\",\n \"tx_hash\": \"0xe8f2180dfba0cb15b45f771d520834515a5f8d7aa07f88894da88c22629b79e9\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0e90\",\n \"io_index\": \"0x0\",\n \"io_type\": \"output\",\n \"tx_hash\": \"0xece3a27409bde2914fb7a1555d6bfca453ee46af73e665149ef549fd46ec1fc6\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0ead\",\n \"io_index\": \"0x0\",\n \"io_type\": \"input\",\n \"tx_hash\": \"0x5c48768f91e3795b418c53211c76fd038c464a24c4aa7e35bbbb6ac5b219f581\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0ead\",\n \"io_index\": \"0x1\",\n \"io_type\": \"output\",\n \"tx_hash\": \"0x5c48768f91e3795b418c53211c76fd038c464a24c4aa7e35bbbb6ac5b219f581\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0eeb\",\n \"io_index\": \"0x0\",\n \"io_type\": \"output\",\n \"tx_hash\": \"0x90e6981d6a5692d92e54344dc0e12d213447710fa069cc19ddea874619b9ba48\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0f8c\",\n \"io_index\": \"0x0\",\n \"io_type\": \"output\",\n \"tx_hash\": \"0x9ea14510219ae97afa0275215fa77c3c015905281c953a3917a7fd036767429c\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b5638\",\n \"io_index\": \"0x0\",\n \"io_type\": \"input\",\n \"tx_hash\": \"0x9346da4caa846cc035c182ecad0c17326a587983d25fb1e12a388f1a9c5c56b4\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b5638\",\n \"io_index\": \"0x1\",\n \"io_type\": \"input\",\n \"tx_hash\": \"0x9346da4caa846cc035c182ecad0c17326a587983d25fb1e12a388f1a9c5c56b4\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b5638\",\n \"io_index\": \"0x1\",\n \"io_type\": \"output\",\n \"tx_hash\": \"0x9346da4caa846cc035c182ecad0c17326a587983d25fb1e12a388f1a9c5c56b4\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b5638\",\n \"io_index\": \"0x2\",\n \"io_type\": \"input\",\n \"tx_hash\": \"0x9346da4caa846cc035c182ecad0c17326a587983d25fb1e12a388f1a9c5c56b4\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b59c2\",\n \"io_index\": \"0x0\",\n \"io_type\": \"input\",\n \"tx_hash\": \"0x5b58f90fb3309333bf0bec878f3a05038c7fe816747300ecdac37a9da76c4128\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b59c2\",\n \"io_index\": \"0x1\",\n \"io_type\": \"output\",\n \"tx_hash\": \"0x5b58f90fb3309333bf0bec878f3a05038c7fe816747300ecdac37a9da76c4128\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b59cc\",\n \"io_index\": \"0x0\",\n \"io_type\": \"input\",\n \"tx_hash\": \"0x57ca2822c28e02b199424a731b2efd2c9bf752f07b7309f555f2e71abe83ba26\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b59cc\",\n \"io_index\": \"0x1\",\n \"io_type\": \"input\",\n \"tx_hash\": \"0x57ca2822c28e02b199424a731b2efd2c9bf752f07b7309f555f2e71abe83ba26\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b59cc\",\n \"io_index\": \"0x1\",\n \"io_type\": \"output\",\n \"tx_hash\": \"0x57ca2822c28e02b199424a731b2efd2c9bf752f07b7309f555f2e71abe83ba26\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b59df\",\n \"io_index\": \"0x0\",\n \"io_type\": \"input\",\n \"tx_hash\": \"0x21c4632a41140b828e9347ff80480b3e07be4e0a0b8d577565e7421fd5473194\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b59df\",\n \"io_index\": \"0x1\",\n \"io_type\": \"output\",\n \"tx_hash\": \"0x21c4632a41140b828e9347ff80480b3e07be4e0a0b8d577565e7421fd5473194\",\n \"tx_index\": \"0x1\"\n }\n ]\n },\n \"id\": 2\n }\n ```\n\n * get transactions by lock script and group by tx hash\n\n Request\n\n ```json\n {\n \"id\": 2,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_transactions\",\n \"params\": [\n {\n \"script\": {\n \"code_hash\": \"0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8\",\n \"hash_type\": \"type\",\n \"args\": \"0x5989ae415bb667931a99896e5fbbfad9ba53a223\"\n },\n \"script_type\": \"lock\",\n \"group_by_transaction\": true\n },\n \"asc\",\n \"0x64\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"last_cursor\": \"0x809bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8015989ae415bb667931a99896e5fbbfad9ba53a22300000000005b59df000000010000000101\",\n \"objects\": [\n {\n \"block_number\": \"0x5b033a\",\n \"cells\": [\n [\n \"output\",\n \"0x0\"\n ]\n ],\n \"tx_hash\": \"0x556060b62d16386da53f8a4b458314dfa2d1988a7bcc5c96c3bb2a350a3453a1\",\n \"tx_index\": \"0x4\"\n },\n {\n \"block_number\": \"0x5b0671\",\n \"cells\": [\n [\n \"input\",\n \"0x0\"\n ],\n [\n \"output\",\n \"0x1\"\n ]\n ],\n \"tx_hash\": \"0x8205b2b4cd6380d7e332c7a5b49bf776a0322ba19f46dc6ca1f8c59f7daee08d\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0e6d\",\n \"cells\": [\n [\n \"output\",\n \"0x0\"\n ]\n ],\n \"tx_hash\": \"0xe8f2180dfba0cb15b45f771d520834515a5f8d7aa07f88894da88c22629b79e9\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0e90\",\n \"cells\": [\n [\n \"output\",\n \"0x0\"\n ]\n ],\n \"tx_hash\": \"0xece3a27409bde2914fb7a1555d6bfca453ee46af73e665149ef549fd46ec1fc6\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0ead\",\n \"cells\": [\n [\n \"input\",\n \"0x0\"\n ],\n [\n \"output\",\n \"0x1\"\n ]\n ],\n \"tx_hash\": \"0x5c48768f91e3795b418c53211c76fd038c464a24c4aa7e35bbbb6ac5b219f581\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0eeb\",\n \"cells\": [\n [\n \"output\",\n \"0x0\"\n ]\n ],\n \"tx_hash\": \"0x90e6981d6a5692d92e54344dc0e12d213447710fa069cc19ddea874619b9ba48\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b0f8c\",\n \"cells\": [\n [\n \"output\",\n \"0x0\"\n ]\n ],\n \"tx_hash\": \"0x9ea14510219ae97afa0275215fa77c3c015905281c953a3917a7fd036767429c\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b5638\",\n \"cells\": [\n [\n \"input\",\n \"0x0\"\n ],\n [\n \"input\",\n \"0x1\"\n ],\n [\n \"output\",\n \"0x1\"\n ],\n [\n \"input\",\n \"0x2\"\n ]\n ],\n \"tx_hash\": \"0x9346da4caa846cc035c182ecad0c17326a587983d25fb1e12a388f1a9c5c56b4\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b59c2\",\n \"cells\": [\n [\n \"input\",\n \"0x0\"\n ],\n [\n \"output\",\n \"0x1\"\n ]\n ],\n \"tx_hash\": \"0x5b58f90fb3309333bf0bec878f3a05038c7fe816747300ecdac37a9da76c4128\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b59cc\",\n \"cells\": [\n [\n \"input\",\n \"0x0\"\n ],\n [\n \"input\",\n \"0x1\"\n ],\n [\n \"output\",\n \"0x1\"\n ]\n ],\n \"tx_hash\": \"0x57ca2822c28e02b199424a731b2efd2c9bf752f07b7309f555f2e71abe83ba26\",\n \"tx_index\": \"0x1\"\n },\n {\n \"block_number\": \"0x5b59df\",\n \"cells\": [\n [\n \"input\",\n \"0x0\"\n ],\n [\n \"output\",\n \"0x1\"\n ]\n ],\n \"tx_hash\": \"0x21c4632a41140b828e9347ff80480b3e07be4e0a0b8d577565e7421fd5473194\",\n \"tx_index\": \"0x1\"\n }\n ]\n },\n \"id\": 2\n }\n ```", - "name": "get_transactions", - "params": [ - { - "name": "search_key", - "schema": { - "$ref": "#/components/schemas/IndexerSearchKey" - } - }, - { - "name": "order", - "schema": { - "$ref": "#/components/schemas/IndexerOrder" - } - }, - { - "name": "limit", - "schema": { - "$ref": "#/components/schemas/Uint32" - } - }, - { - "name": "after", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/JsonBytes" - }, - { - "type": "null" - } - ] - } - } - ], - "result": { - "name": "get_transactions", - "schema": { - "$ref": "#/components/schemas/IndexerPagination_for_IndexerTx" - } - } - }, - { - "description": " Returns the live cells capacity by the lock or type script.\n\n ## Parameters\n\n * search_key:\n - script - Script\n - script_type - enum, lock | type\n - script_search_mode - enum, prefix | exact\n - filter - filter cells by following conditions, all conditions are optional\n - script: if search script type is lock, filter cells by type script prefix, and vice versa\n - script_len_range: [u64; 2], filter cells by script len range, [inclusive, exclusive]\n - output_data: filter cells by output data\n - output_data_filter_mode: enum, prefix | exact | partial\n - output_data_len_range: [u64; 2], filter cells by output data len range, [inclusive, exclusive]\n - output_capacity_range: [u64; 2], filter cells by output capacity range, [inclusive, exclusive]\n - block_range: [u64; 2], filter cells by block number range, [inclusive, exclusive]\n\n ## Returns\n\n * capacity - total capacity\n * block_hash - indexed tip block hash\n * block_number - indexed tip block number\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 2,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_cells_capacity\",\n \"params\": [\n {\n \"script\": {\n \"code_hash\": \"0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8\",\n \"hash_type\": \"type\",\n \"args\": \"0x5989ae415bb667931a99896e5fbbfad9ba53a223\"\n },\n \"script_type\": \"lock\"\n }\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"block_hash\": \"0xbc52444952dc5eb01a7826aaf6bb1b660db01797414e259e7a6e6d636de8fc7c\",\n \"block_number\": \"0x5b727a\",\n \"capacity\": \"0xf0e8e4b4a0\"\n },\n \"id\": 2\n }\n ```", - "name": "get_cells_capacity", - "params": [ - { - "name": "search_key", - "schema": { - "$ref": "#/components/schemas/IndexerSearchKey" - } - } - ], - "result": { - "name": "get_cells_capacity", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/IndexerCellsCapacity" - }, - { - "type": "null" - } - ] - } - } - } - ], - "openrpc": "1.2.6" -} \ No newline at end of file diff --git a/docs/ckb_rpc_openrpc/json/integration_test_rpc_doc.json b/docs/ckb_rpc_openrpc/json/integration_test_rpc_doc.json deleted file mode 100644 index aa8da6ac25f..00000000000 --- a/docs/ckb_rpc_openrpc/json/integration_test_rpc_doc.json +++ /dev/null @@ -1,764 +0,0 @@ -{ - "components": { - "schemas": { - "Block": { - "additionalProperties": false, - "description": "The JSON view of a Block used as a parameter in the RPC.", - "properties": { - "extension": { - "anyOf": [ - { - "$ref": "#/components/schemas/JsonBytes" - }, - { - "type": "null" - } - ], - "description": "The extension in the block body.\n\nThis is a field introduced in [CKB RFC 0031]. Since the activation of [CKB RFC 0044], this field is at least 32 bytes, and at most 96 bytes. The consensus rule of first 32 bytes is defined in the RFC 0044.\n\n[CKB RFC 0031]: https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0031-variable-length-header-field/0031-variable-length-header-field.md\n[CKB RFC 0044]: https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0044-ckb-light-client/0044-ckb-light-client.md" - }, - "header": { - "$ref": "#/components/schemas/Header", - "description": "The block header." - }, - "proposals": { - "description": "The proposal IDs in the block body.", - "items": { - "$ref": "#/components/schemas/ProposalShortId" - }, - "type": "array" - }, - "transactions": { - "description": "The transactions in the block body.", - "items": { - "$ref": "#/components/schemas/Transaction" - }, - "type": "array" - }, - "uncles": { - "description": "The uncles blocks in the block body.", - "items": { - "$ref": "#/components/schemas/UncleBlock" - }, - "type": "array" - } - }, - "required": [ - "header", - "proposals", - "transactions", - "uncles" - ], - "type": "object" - }, - "BlockTemplate": { - "description": "A block template for miners.\n\nMiners optional pick transactions and then assemble the final block.", - "properties": { - "bytes_limit": { - "$ref": "#/components/schemas/Uint64", - "description": "The block serialized size limit.\n\nMiners must keep the block size below this limit, otherwise, the CKB node will reject the block submission.\n\nIt is guaranteed that the block does not exceed the limit if miners do not add new transaction commitments." - }, - "cellbase": { - "$ref": "#/components/schemas/CellbaseTemplate", - "description": "Provided cellbase transaction template.\n\nMiners must use it as the cellbase transaction without changes in the assembled block." - }, - "compact_target": { - "$ref": "#/components/schemas/Uint32", - "description": "The compacted difficulty target for the new block.\n\nMiners must use it unchanged in the assembled block." - }, - "current_time": { - "$ref": "#/components/schemas/Uint64", - "description": "The timestamp for the new block.\n\nCKB node guarantees that this timestamp is larger than the median of the previous 37 blocks.\n\nMiners can increase it to the current time. It is not recommended to decrease it, since it may violate the median block timestamp consensus rule." - }, - "cycles_limit": { - "$ref": "#/components/schemas/Uint64", - "description": "The cycles limit.\n\nMiners must keep the total cycles below this limit, otherwise, the CKB node will reject the block submission.\n\nIt is guaranteed that the block does not exceed the limit if miners do not add new transactions to the block." - }, - "dao": { - "$ref": "#/components/schemas/Byte32", - "description": "Reference DAO field.\n\nThis field is only valid when miners use all and only use the provided transactions in the template. Two fields must be updated when miners want to select transactions:\n\n* `S_i`, bytes 16 to 23\n* `U_i`, bytes 24 to 31\n\nSee 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)." - }, - "epoch": { - "$ref": "#/components/schemas/Uint64", - "description": "The epoch progress information for the new block.\n\nMiners must use it unchanged in the assembled block." - }, - "extension": { - "anyOf": [ - { - "$ref": "#/components/schemas/JsonBytes" - }, - { - "type": "null" - } - ], - "default": null, - "description": "The extension for the new block.\n\nThis is a field introduced in [CKB RFC 0031]. Since the activation of [CKB RFC 0044], this field is at least 32 bytes, and at most 96 bytes. The consensus rule of first 32 bytes is defined in the RFC 0044.\n\n[CKB RFC 0031]: https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0031-variable-length-header-field/0031-variable-length-header-field.md\n[CKB RFC 0044]: https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0044-ckb-light-client/0044-ckb-light-client.md" - }, - "number": { - "$ref": "#/components/schemas/Uint64", - "description": "The block number for the new block.\n\nMiners must use it unchanged in the assembled block." - }, - "parent_hash": { - "$ref": "#/components/schemas/H256", - "description": "The parent block hash of the new block.\n\nMiners must use it unchanged in the assembled block." - }, - "proposals": { - "description": "Provided proposal ids list of transactions for the new block.", - "items": { - "$ref": "#/components/schemas/ProposalShortId" - }, - "type": "array" - }, - "transactions": { - "description": "Provided valid transactions which can be committed in the new block.\n\nMiners must include the transactions marked as `required` in the assembled new block.", - "items": { - "$ref": "#/components/schemas/TransactionTemplate" - }, - "type": "array" - }, - "uncles": { - "description": "Provided valid uncle blocks candidates for the new block.\n\nMiners must include the uncles marked as `required` in the assembled new block.", - "items": { - "$ref": "#/components/schemas/UncleTemplate" - }, - "type": "array" - }, - "uncles_count_limit": { - "$ref": "#/components/schemas/Uint64", - "description": "The uncle count limit.\n\nMiners must keep the uncles count below this limit, otherwise, the CKB node will reject the block submission." - }, - "version": { - "$ref": "#/components/schemas/Uint32", - "description": "Block version.\n\nMiners must use it unchanged in the assembled block." - }, - "work_id": { - "$ref": "#/components/schemas/Uint64", - "description": "Work ID. The miner must submit the new assembled and resolved block using the same work ID." - } - }, - "required": [ - "bytes_limit", - "cellbase", - "compact_target", - "current_time", - "cycles_limit", - "dao", - "epoch", - "number", - "parent_hash", - "proposals", - "transactions", - "uncles", - "uncles_count_limit", - "version", - "work_id" - ], - "type": "object" - }, - "Byte32": { - "items": { - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "CellDep": { - "additionalProperties": false, - "description": "The cell dependency of a transaction.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"dep_type\": \"code\",\n \"out_point\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\"\n }\n }\n # \"#).unwrap();\n```", - "properties": { - "dep_type": { - "$ref": "#/components/schemas/DepType", - "description": "Dependency type." - }, - "out_point": { - "$ref": "#/components/schemas/OutPoint", - "description": "Reference to the cell." - } - }, - "required": [ - "dep_type", - "out_point" - ], - "type": "object" - }, - "CellInput": { - "additionalProperties": false, - "description": "The input cell of a transaction.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"previous_output\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n },\n \"since\": \"0x0\"\n }\n # \"#).unwrap();\n```", - "properties": { - "previous_output": { - "$ref": "#/components/schemas/OutPoint", - "description": "Reference to the input cell." - }, - "since": { - "$ref": "#/components/schemas/Uint64", - "description": "Restrict when the transaction can be committed into the chain.\n\nSee the RFC [Transaction valid since](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0017-tx-valid-since/0017-tx-valid-since.md)." - } - }, - "required": [ - "previous_output", - "since" - ], - "type": "object" - }, - "CellOutput": { - "additionalProperties": false, - "description": "The fields of an output cell except the cell data.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"capacity\": \"0x2540be400\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n # \"#).unwrap();\n```", - "properties": { - "capacity": { - "$ref": "#/components/schemas/Uint64", - "description": "The cell capacity.\n\nThe capacity of a cell is the value of the cell in Shannons. It is also the upper limit of the cell occupied storage size where every 100,000,000 Shannons give 1-byte storage." - }, - "lock": { - "$ref": "#/components/schemas/Script", - "description": "The lock script." - }, - "type": { - "anyOf": [ - { - "$ref": "#/components/schemas/Script" - }, - { - "type": "null" - } - ], - "description": "The optional type script.\n\nThe JSON field name is \"type\"." - } - }, - "required": [ - "capacity", - "lock" - ], - "type": "object" - }, - "CellbaseTemplate": { - "description": "The cellbase transaction template of the new block for miners.", - "properties": { - "cycles": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ], - "description": "The hint of how many cycles this transaction consumes.\n\nMiners can utilize this field to ensure that the total cycles do not exceed the limit while selecting transactions." - }, - "data": { - "$ref": "#/components/schemas/Transaction", - "description": "The cellbase transaction." - }, - "hash": { - "$ref": "#/components/schemas/H256", - "description": "The cellbase transaction hash." - } - }, - "required": [ - "data", - "hash" - ], - "type": "object" - }, - "DepType": { - "description": "The dep cell type. Allowed values: \"code\" and \"dep_group\".", - "oneOf": [ - { - "description": "Type \"code\".\n\nUse the cell itself as the dep cell.", - "enum": [ - "code" - ], - "type": "string" - }, - { - "description": "Type \"dep_group\".\n\nThe cell is a dep group which members are cells. These members are used as dep cells instead of the group itself.\n\nThe dep group stores the array of `OutPoint`s serialized via molecule in the cell data. Each `OutPoint` points to one cell member.", - "enum": [ - "dep_group" - ], - "type": "string" - } - ] - }, - "H256": { - "description": "The 32-byte fixed-length binary data.\n\nThe name comes from the number of bits in the data.\n\nIn JSONRPC, it is encoded as a 0x-prefixed hex string.", - "items": { - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "Header": { - "additionalProperties": false, - "description": "The block header.\n\nRefer to RFC [CKB Block Structure](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0027-block-structure/0027-block-structure.md).", - "properties": { - "compact_target": { - "$ref": "#/components/schemas/Uint32", - "description": "The block difficulty target.\n\nIt can be converted to a 256-bit target. Miners must ensure the Eaglesong of the header is within the target." - }, - "dao": { - "$ref": "#/components/schemas/Byte32", - "description": "DAO fields.\n\nSee 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)." - }, - "epoch": { - "$ref": "#/components/schemas/Uint64", - "description": "The epoch information of this block.\n\nSee `EpochNumberWithFraction` for details." - }, - "extra_hash": { - "$ref": "#/components/schemas/H256", - "description": "The hash on `uncles` and extension in the block body.\n\nThe 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.\n\n**Notice**\n\nThis field is renamed from `uncles_hash` since 0.100.0. More details can be found in [CKB RFC 0031].\n\n[CKB RFC 0031]: https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0031-variable-length-header-field/0031-variable-length-header-field.md" - }, - "nonce": { - "$ref": "#/components/schemas/Uint128", - "description": "Miner can modify this field to find a proper value such that the Eaglesong of the header is within the target encoded from `compact_target`." - }, - "number": { - "$ref": "#/components/schemas/Uint64", - "description": "The consecutive block number starting from 0." - }, - "parent_hash": { - "$ref": "#/components/schemas/H256", - "description": "The header hash of the parent block." - }, - "proposals_hash": { - "$ref": "#/components/schemas/H256", - "description": "The hash on `proposals` in the block body.\n\nIt is all zeros when `proposals` is empty, or the hash on all the bytes concatenated together." - }, - "timestamp": { - "$ref": "#/components/schemas/Uint64", - "description": "The block timestamp.\n\nIt is a Unix timestamp in milliseconds (1 second = 1000 milliseconds).\n\nMiners should put the time when the block is created in the header, however, the precision is not guaranteed. A block with a higher block number may even have a smaller timestamp." - }, - "transactions_root": { - "$ref": "#/components/schemas/H256", - "description": "The commitment to all the transactions in the block.\n\nIt is a hash on two Merkle Tree roots:\n\n* The root of a CKB Merkle Tree, which items are the transaction hashes of all the transactions in the block.\n* The root of a CKB Merkle Tree, but the items are the transaction witness hashes of all the transactions in the block." - }, - "version": { - "$ref": "#/components/schemas/Uint32", - "description": "The block version.\n\nIt must equal to 0 now and is reserved for future upgrades." - } - }, - "required": [ - "compact_target", - "dao", - "epoch", - "extra_hash", - "nonce", - "number", - "parent_hash", - "proposals_hash", - "timestamp", - "transactions_root", - "version" - ], - "type": "object" - }, - "JsonBytes": { - "type": "string" - }, - "OutPoint": { - "additionalProperties": false, - "description": "Reference to a cell via transaction hash and output index.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n }\n # \"#).unwrap();\n```", - "properties": { - "index": { - "$ref": "#/components/schemas/Uint32", - "description": "The output index of the cell in the transaction specified by `tx_hash`." - }, - "tx_hash": { - "$ref": "#/components/schemas/H256", - "description": "Transaction hash in which the cell is an output." - } - }, - "required": [ - "index", - "tx_hash" - ], - "type": "object" - }, - "ProposalShortId": { - "description": "The 10-byte fixed-length binary encoded as a 0x-prefixed hex string in JSON.\n\n## Example\n\n```text\n 0xa0ef4eb5f4ceeb08a4c8\n```", - "items": { - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "maxItems": 10, - "minItems": 10, - "type": "array" - }, - "Script": { - "additionalProperties": false, - "description": "Describes the lock script and type script for a cell.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n }\n # \"#).unwrap();\n```", - "properties": { - "args": { - "$ref": "#/components/schemas/JsonBytes", - "description": "Arguments for script." - }, - "code_hash": { - "$ref": "#/components/schemas/H256", - "description": "The hash used to match the script code." - }, - "hash_type": { - "$ref": "#/components/schemas/ScriptHashType", - "description": "Specifies how to use the `code_hash` to match the script code." - } - }, - "required": [ - "args", - "code_hash", - "hash_type" - ], - "type": "object" - }, - "ScriptHashType": { - "description": "Specifies how the script `code_hash` is used to match the script code and how to run the code.\n\nAllowed kinds: \"data\", \"type\", \"data1\" and \"data2\"\n\nRefer to the section [Code Locating](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md#code-locating) and [Upgradable Script](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md#upgradable-script) in the RFC *CKB Transaction Structure*.\n\nThe hash type is split into the high 7 bits and the low 1 bit, when the low 1 bit is 1, it indicates the type, when the low 1 bit is 0, it indicates the data, and then it relies on the high 7 bits to indicate that the data actually corresponds to the version.", - "oneOf": [ - { - "description": "Type \"data\" matches script code via cell data hash, and run the script code in v0 CKB VM.", - "enum": [ - "data" - ], - "type": "string" - }, - { - "description": "Type \"type\" matches script code via cell type script hash.", - "enum": [ - "type" - ], - "type": "string" - }, - { - "description": "Type \"data1\" matches script code via cell data hash, and run the script code in v1 CKB VM.", - "enum": [ - "data1" - ], - "type": "string" - }, - { - "description": "Type \"data2\" matches script code via cell data hash, and run the script code in v2 CKB VM.", - "enum": [ - "data2" - ], - "type": "string" - } - ] - }, - "Transaction": { - "additionalProperties": false, - "description": "The transaction.\n\nRefer to RFC [CKB Transaction Structure](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md).", - "properties": { - "cell_deps": { - "description": "An array of cell deps.\n\nCKB locates lock script and type script code via cell deps. The script also can use syscalls to read the cells here.\n\nUnlike inputs, the live cells can be used as cell deps in multiple transactions.", - "items": { - "$ref": "#/components/schemas/CellDep" - }, - "type": "array" - }, - "header_deps": { - "description": "An array of header deps.\n\nThe block must already be in the canonical chain.\n\nLock script and type script can read the header information of blocks listed here.", - "items": { - "$ref": "#/components/schemas/H256" - }, - "type": "array" - }, - "inputs": { - "description": "An array of input cells.\n\nIn the canonical chain, any cell can only appear as an input once.", - "items": { - "$ref": "#/components/schemas/CellInput" - }, - "type": "array" - }, - "outputs": { - "description": "An array of output cells.", - "items": { - "$ref": "#/components/schemas/CellOutput" - }, - "type": "array" - }, - "outputs_data": { - "description": "Output cells data.\n\nThis is a parallel array of outputs. The cell capacity, lock, and type of the output i is `outputs[i]` and its data is `outputs_data[i]`.", - "items": { - "$ref": "#/components/schemas/JsonBytes" - }, - "type": "array" - }, - "version": { - "$ref": "#/components/schemas/Uint32", - "description": "Reserved for future usage. It must equal 0 in current version." - }, - "witnesses": { - "description": "An array of variable-length binaries.\n\nLock script and type script can read data here to verify the transaction.\n\nFor example, the bundled secp256k1 lock script requires storing the signature in `witnesses`.", - "items": { - "$ref": "#/components/schemas/JsonBytes" - }, - "type": "array" - } - }, - "required": [ - "cell_deps", - "header_deps", - "inputs", - "outputs", - "outputs_data", - "version", - "witnesses" - ], - "type": "object" - }, - "TransactionTemplate": { - "description": "Transaction template which is ready to be committed in the new block.", - "properties": { - "cycles": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ], - "description": "The hint of how many cycles this transaction consumes.\n\nMiners can utilize this field to ensure that the total cycles do not exceed the limit while selecting transactions." - }, - "data": { - "$ref": "#/components/schemas/Transaction", - "description": "The transaction.\n\nMiners must keep it unchanged when including it in the new block." - }, - "depends": { - "description": "Transaction dependencies.\n\nThis is a hint to help miners selecting transactions.\n\nThis transaction can only be committed if its dependencies are also committed in the new block.\n\nThis field is a list of indices into the array `transactions` in the block template.\n\nFor example, `depends = [1, 2]` means this transaction depends on `block_template.transactions[1]` and `block_template.transactions[2]`.", - "items": { - "$ref": "#/components/schemas/Uint64" - }, - "type": [ - "array", - "null" - ] - }, - "hash": { - "$ref": "#/components/schemas/H256", - "description": "Transaction hash." - }, - "required": { - "description": "Whether miner must include this transaction in the new block.", - "type": "boolean" - } - }, - "required": [ - "data", - "hash", - "required" - ], - "type": "object" - }, - "Uint128": { - "format": "uint128", - "minimum": 0.0, - "type": "integer" - }, - "Uint32": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "Uint64": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "UncleBlock": { - "additionalProperties": false, - "description": "The uncle block used as a parameter in the RPC.\n\nThe chain stores only the uncle block header and proposal IDs. The header ensures the block is covered by PoW and can pass the consensus rules on uncle blocks. Proposal IDs are there because a block can commit transactions proposed in an uncle.\n\nA block B1 is considered to be the uncle of another block B2 if all the following conditions are met:\n\n1. They are in the same epoch, sharing the same difficulty;\n2. B2 block number is larger than B1;\n3. B1's parent is either B2's ancestor or an uncle embedded in B2 or any of B2's ancestors.\n4. B2 is the first block in its chain to refer to B1.", - "properties": { - "header": { - "$ref": "#/components/schemas/Header", - "description": "The uncle block header." - }, - "proposals": { - "description": "Proposal IDs in the uncle block body.", - "items": { - "$ref": "#/components/schemas/ProposalShortId" - }, - "type": "array" - } - }, - "required": [ - "header", - "proposals" - ], - "type": "object" - }, - "UncleTemplate": { - "description": "The uncle block template of the new block for miners.", - "properties": { - "hash": { - "$ref": "#/components/schemas/H256", - "description": "The uncle block hash." - }, - "header": { - "$ref": "#/components/schemas/Header", - "description": "The header of the uncle block.\n\nMiners must keep this unchanged when including this uncle in the new block." - }, - "proposals": { - "description": "The proposals of the uncle block.\n\nMiners must keep this unchanged when including this uncle in the new block.", - "items": { - "$ref": "#/components/schemas/ProposalShortId" - }, - "type": "array" - }, - "required": { - "description": "Whether miners must include this uncle in the submit block.", - "type": "boolean" - } - }, - "required": [ - "hash", - "header", - "proposals", - "required" - ], - "type": "object" - } - } - }, - "info": { - "description": " RPC for Integration Test.", - "title": "integration_test_rpc", - "version": "0.115.0-pre" - }, - "methods": [ - { - "description": " process block without any block verification.\n\n ## Params\n\n * `data` - block data(in binary).\n\n * `broadcast` - true to enable broadcast(relay) the block to other peers.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"process_block_without_verify\",\n \"params\": [\n {\n \t\"header\": {\n \t\t\"compact_target\": \"0x1e083126\",\n \t\t\"dao\": \"0xb5a3e047474401001bc476b9ee573000c0c387962a38000000febffacf030000\",\n \t\t\"epoch\": \"0x7080018000001\",\n \t\t\"extra_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \t\t\"nonce\": \"0x0\",\n \t\t\"number\": \"0x400\",\n \t\t\"parent_hash\": \"0xae003585fa15309b30b31aed3dcf385e9472c3c3e93746a6c4540629a6a1ed2d\",\n \t\t\"proposals_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \t\t\"timestamp\": \"0x5cd2b117\",\n \t\t\"transactions_root\": \"0xc47d5b78b3c4c4c853e2a32810818940d0ee403423bea9ec7b8e566d9595206c\",\n \t\t\"version\": \"0x0\"\n \t},\n \t\"proposals\": [],\n \t\"transactions\": [{\n \t\t\"cell_deps\": [],\n \t\t\"header_deps\": [],\n \t\t\"inputs\": [{\n \t\t\t\"previous_output\": {\n \t\t\t\t\"index\": \"0xffffffff\",\n \t\t\t\t\"tx_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n \t\t\t},\n \t\t\t\"since\": \"0x400\"\n \t\t}],\n \t\t\"outputs\": [{\n \t\t\t\"capacity\": \"0x18e64b61cf\",\n \t\t\t\"lock\": {\n \t\t\t\t\"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \t\t\t\t\"hash_type\": \"data\",\n \t\t\t\t\"args\": \"0x\"\n \t\t\t},\n \t\t\t\"type\": null\n \t\t}],\n \t\t\"outputs_data\": [\n \t\t\t\"0x\"\n \t\t],\n \t\t\"version\": \"0x0\",\n \t\t\"witnesses\": [\n \t\t\t\"0x450000000c000000410000003500000010000000300000003100000028e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5000000000000000000\"\n \t\t]\n \t}],\n \t\"uncles\": []\n },\n true\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\"\n }\n ```", - "name": "process_block_without_verify", - "params": [ - { - "name": "data", - "schema": { - "$ref": "#/components/schemas/Block" - } - }, - { - "name": "broadcast", - "schema": { - "type": "boolean" - } - } - ], - "result": { - "name": "process_block_without_verify", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/H256" - }, - { - "type": "null" - } - ] - } - } - }, - { - "description": " Truncate chain to specified tip hash, can only truncate less then 50000 blocks each time.\n\n ## Params\n\n * `target_tip_hash` - specified header hash\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"truncate\",\n \"params\": [\n \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": null\n }\n ```", - "name": "truncate", - "params": [ - { - "name": "target_tip_hash", - "schema": { - "$ref": "#/components/schemas/H256" - } - } - ], - "result": { - "name": "truncate", - "schema": { - "type": "null" - } - } - }, - { - "description": " Generate block(with verification) and broadcast the block.\n\n Note that if called concurrently, it may return the hash of the same block.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"generate_block\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0x60dd3fa0e81db3ee3ad41cf4ab956eae7e89eb71cd935101c26c4d0652db3029\"\n }\n ```", - "name": "generate_block", - "params": [], - "result": { - "name": "generate_block", - "schema": { - "$ref": "#/components/schemas/H256" - } - } - }, - { - "description": " Generate epochs during development, can be useful for scenarios\n like testing DAO-related functionalities.\n\n Returns the updated epoch number after generating the specified number of epochs.\n\n ## Params\n\n * `num_epochs` - The number of epochs to generate.\n\n ## Examples\n\n Request\n\n Generating 2 epochs:\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"generate_epochs\",\n \"params\": [\"0x2\"]\n }\n ```\n\n The input parameter \"0x2\" will be normalized to \"0x10000000002\"(the correct\n [`EpochNumberWithFraction`](#type-epochnumberwithfraction) type) within the method.\n Therefore, if you want to generate epochs as integers, you can simply pass an integer\n as long as it does not exceed 16777215 (24 bits).\n\n Generating 1/2 epoch:\n\n ```text\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"generate_epochs\",\n \"params\": [\"0x20001000000\"]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0xa0001000003\"\n }\n ```", - "name": "generate_epochs", - "params": [ - { - "name": "num_epochs", - "schema": { - "$ref": "#/components/schemas/Uint64" - } - } - ], - "result": { - "name": "generate_epochs", - "schema": { - "$ref": "#/components/schemas/Uint64" - } - } - }, - { - "description": " Add transaction to tx-pool.\n\n ## Params\n\n * `transaction` - specified transaction to add\n\n ## Examples\n\n Request\n\n ```json\n {\n \t\"id\": 42,\n \t\"jsonrpc\": \"2.0\",\n \t\"method\": \"notify_transaction\",\n \t\"params\":\n [\n {\n \t\t\t\"cell_deps\": [{\n \t\t\t\t\"dep_type\": \"code\",\n \t\t\t\t\"out_point\": {\n \t\t\t\t\t\"index\": \"0x0\",\n \t\t\t\t\t\"tx_hash\": \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\"\n \t\t\t\t}\n \t\t\t}],\n \t\t\t\"header_deps\": [\n \t\t\t\t\"0x7978ec7ce5b507cfb52e149e36b1a23f6062ed150503c85bbf825da3599095ed\"\n \t\t\t],\n \t\t\t\"inputs\": [{\n \t\t\t\t\"previous_output\": {\n \t\t\t\t\t\"index\": \"0x0\",\n \t\t\t\t\t\"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n \t\t\t\t},\n \t\t\t\t\"since\": \"0x0\"\n \t\t\t}],\n \t\t\t\"outputs\": [{\n \t\t\t\t\"capacity\": \"0x2540be400\",\n \t\t\t\t\"lock\": {\n \t\t\t\t\t\"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \t\t\t\t\t\"hash_type\": \"data\",\n \t\t\t\t\t\"args\": \"0x\"\n \t\t\t\t},\n \t\t\t\t\"type\": null\n \t\t\t}],\n \t\t\t\"outputs_data\": [\n \t\t\t\t\"0x\"\n \t\t\t],\n \t\t\t\"version\": \"0x0\",\n \t\t\t\"witnesses\": []\n \t\t}\n \t]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0xa0ef4eb5f4ceeb08a4c8524d84c5da95dce2f608e0ca2ec8091191b0f330c6e3\"\n }\n ```", - "name": "notify_transaction", - "params": [ - { - "name": "transaction", - "schema": { - "$ref": "#/components/schemas/Transaction" - } - } - ], - "result": { - "name": "notify_transaction", - "schema": { - "$ref": "#/components/schemas/H256" - } - } - }, - { - "description": " Generate block with block template, attach calculated dao field to build new block,\n\n then process block and broadcast the block.\n\n ## Params\n\n * `block_template` - specified transaction to add\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"generate_block_with_template\",\n \"params\": [\n {\n \"bytes_limit\": \"0x91c08\",\n \"cellbase\": {\n \"cycles\": null,\n \"data\": {\n \"cell_deps\": [],\n \"header_deps\": [],\n \"inputs\": [\n {\n \"previous_output\": {\n \"index\": \"0xffffffff\",\n \"tx_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"since\": \"0x401\"\n }\n ],\n \"outputs\": [\n {\n \"capacity\": \"0x18e64efc04\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n ],\n \"outputs_data\": [\n \"0x\"\n ],\n \"version\": \"0x0\",\n \"witnesses\": [\n \"0x650000000c00000055000000490000001000000030000000310000001892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df20114000000b2e61ff569acf041b3c2c17724e2379c581eeac30c00000054455354206d657373616765\"\n ]\n },\n \"hash\": \"0xbaf7e4db2fd002f19a597ca1a31dfe8cfe26ed8cebc91f52b75b16a7a5ec8bab\"\n },\n \"compact_target\": \"0x1e083126\",\n \"current_time\": \"0x174c45e17a3\",\n \"cycles_limit\": \"0xd09dc300\",\n \"dao\": \"0xd495a106684401001e47c0ae1d5930009449d26e32380000000721efd0030000\",\n \"epoch\": \"0x7080019000001\",\n \"extension\": null,\n \"number\": \"0x401\",\n \"parent_hash\": \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\",\n \"proposals\": [\"0xa0ef4eb5f4ceeb08a4c8\"],\n \"transactions\": [],\n \"uncles\": [\n {\n \"hash\": \"0xdca341a42890536551f99357612cef7148ed471e3b6419d0844a4e400be6ee94\",\n \"header\": {\n \"compact_target\": \"0x1e083126\",\n \"dao\": \"0xb5a3e047474401001bc476b9ee573000c0c387962a38000000febffacf030000\",\n \"epoch\": \"0x7080018000001\",\n \"extra_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"nonce\": \"0x0\",\n \"number\": \"0x400\",\n \"parent_hash\": \"0xae003585fa15309b30b31aed3dcf385e9472c3c3e93746a6c4540629a6a1ed2d\",\n \"proposals_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"timestamp\": \"0x5cd2b118\",\n \"transactions_root\": \"0xc47d5b78b3c4c4c853e2a32810818940d0ee403423bea9ec7b8e566d9595206c\",\n \"version\":\"0x0\"\n },\n \"proposals\": [],\n \"required\": false\n }\n ],\n \"uncles_count_limit\": \"0x2\",\n \"version\": \"0x0\",\n \"work_id\": \"0x0\"\n }\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0x899541646ae412a99fdbefc081e1a782605a7815998a096af16e51d4df352c75\"\n }\n ```", - "name": "generate_block_with_template", - "params": [ - { - "name": "block_template", - "schema": { - "$ref": "#/components/schemas/BlockTemplate" - } - } - ], - "result": { - "name": "generate_block_with_template", - "schema": { - "$ref": "#/components/schemas/H256" - } - } - }, - { - "description": " Return calculated dao field according to specified block template.\n\n ## Params\n\n * `block_template` - specified block template\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"calculate_dao_field\",\n \"params\": [\n {\n \"bytes_limit\": \"0x91c08\",\n \"cellbase\": {\n \"cycles\": null,\n \"data\": {\n \"cell_deps\": [],\n \"header_deps\": [],\n \"inputs\": [\n {\n \"previous_output\": {\n \"index\": \"0xffffffff\",\n \"tx_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"since\": \"0x401\"\n }\n ],\n \"outputs\": [\n {\n \"capacity\": \"0x18e64efc04\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n ],\n \"outputs_data\": [\n \"0x\"\n ],\n \"version\": \"0x0\",\n \"witnesses\": [\n \"0x650000000c00000055000000490000001000000030000000310000001892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df20114000000b2e61ff569acf041b3c2c17724e2379c581eeac30c00000054455354206d657373616765\"\n ]\n },\n \"hash\": \"0xbaf7e4db2fd002f19a597ca1a31dfe8cfe26ed8cebc91f52b75b16a7a5ec8bab\"\n },\n \"compact_target\": \"0x1e083126\",\n \"current_time\": \"0x174c45e17a3\",\n \"cycles_limit\": \"0xd09dc300\",\n \"dao\": \"0xd495a106684401001e47c0ae1d5930009449d26e32380000000721efd0030000\",\n \"epoch\": \"0x7080019000001\",\n \"extension\": null,\n \"number\": \"0x401\",\n \"parent_hash\": \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\",\n \"proposals\": [\"0xa0ef4eb5f4ceeb08a4c8\"],\n \"transactions\": [],\n \"uncles\": [\n {\n \"hash\": \"0xdca341a42890536551f99357612cef7148ed471e3b6419d0844a4e400be6ee94\",\n \"header\": {\n \"compact_target\": \"0x1e083126\",\n \"dao\": \"0xb5a3e047474401001bc476b9ee573000c0c387962a38000000febffacf030000\",\n \"epoch\": \"0x7080018000001\",\n \"extra_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"nonce\": \"0x0\",\n \"number\": \"0x400\",\n \"parent_hash\": \"0xae003585fa15309b30b31aed3dcf385e9472c3c3e93746a6c4540629a6a1ed2d\",\n \"proposals_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"timestamp\": \"0x5cd2b118\",\n \"transactions_root\": \"0xc47d5b78b3c4c4c853e2a32810818940d0ee403423bea9ec7b8e566d9595206c\",\n \"version\":\"0x0\"\n },\n \"proposals\": [],\n \"required\": false\n }\n ],\n \"uncles_count_limit\": \"0x2\",\n \"version\": \"0x0\",\n \"work_id\": \"0x0\"\n }\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0xd495a106684401001e47c0ae1d5930009449d26e32380000000721efd0030000\"\n }\n ```", - "name": "calculate_dao_field", - "params": [ - { - "name": "block_template", - "schema": { - "$ref": "#/components/schemas/BlockTemplate" - } - } - ], - "result": { - "name": "calculate_dao_field", - "schema": { - "$ref": "#/components/schemas/Byte32" - } - } - } - ], - "openrpc": "1.2.6" -} \ No newline at end of file diff --git a/docs/ckb_rpc_openrpc/json/miner_rpc_doc.json b/docs/ckb_rpc_openrpc/json/miner_rpc_doc.json deleted file mode 100644 index d402643df37..00000000000 --- a/docs/ckb_rpc_openrpc/json/miner_rpc_doc.json +++ /dev/null @@ -1,707 +0,0 @@ -{ - "components": { - "schemas": { - "Block": { - "additionalProperties": false, - "description": "The JSON view of a Block used as a parameter in the RPC.", - "properties": { - "extension": { - "anyOf": [ - { - "$ref": "#/components/schemas/JsonBytes" - }, - { - "type": "null" - } - ], - "description": "The extension in the block body.\n\nThis is a field introduced in [CKB RFC 0031]. Since the activation of [CKB RFC 0044], this field is at least 32 bytes, and at most 96 bytes. The consensus rule of first 32 bytes is defined in the RFC 0044.\n\n[CKB RFC 0031]: https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0031-variable-length-header-field/0031-variable-length-header-field.md\n[CKB RFC 0044]: https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0044-ckb-light-client/0044-ckb-light-client.md" - }, - "header": { - "$ref": "#/components/schemas/Header", - "description": "The block header." - }, - "proposals": { - "description": "The proposal IDs in the block body.", - "items": { - "$ref": "#/components/schemas/ProposalShortId" - }, - "type": "array" - }, - "transactions": { - "description": "The transactions in the block body.", - "items": { - "$ref": "#/components/schemas/Transaction" - }, - "type": "array" - }, - "uncles": { - "description": "The uncles blocks in the block body.", - "items": { - "$ref": "#/components/schemas/UncleBlock" - }, - "type": "array" - } - }, - "required": [ - "header", - "proposals", - "transactions", - "uncles" - ], - "type": "object" - }, - "BlockTemplate": { - "description": "A block template for miners.\n\nMiners optional pick transactions and then assemble the final block.", - "properties": { - "bytes_limit": { - "$ref": "#/components/schemas/Uint64", - "description": "The block serialized size limit.\n\nMiners must keep the block size below this limit, otherwise, the CKB node will reject the block submission.\n\nIt is guaranteed that the block does not exceed the limit if miners do not add new transaction commitments." - }, - "cellbase": { - "$ref": "#/components/schemas/CellbaseTemplate", - "description": "Provided cellbase transaction template.\n\nMiners must use it as the cellbase transaction without changes in the assembled block." - }, - "compact_target": { - "$ref": "#/components/schemas/Uint32", - "description": "The compacted difficulty target for the new block.\n\nMiners must use it unchanged in the assembled block." - }, - "current_time": { - "$ref": "#/components/schemas/Uint64", - "description": "The timestamp for the new block.\n\nCKB node guarantees that this timestamp is larger than the median of the previous 37 blocks.\n\nMiners can increase it to the current time. It is not recommended to decrease it, since it may violate the median block timestamp consensus rule." - }, - "cycles_limit": { - "$ref": "#/components/schemas/Uint64", - "description": "The cycles limit.\n\nMiners must keep the total cycles below this limit, otherwise, the CKB node will reject the block submission.\n\nIt is guaranteed that the block does not exceed the limit if miners do not add new transactions to the block." - }, - "dao": { - "$ref": "#/components/schemas/Byte32", - "description": "Reference DAO field.\n\nThis field is only valid when miners use all and only use the provided transactions in the template. Two fields must be updated when miners want to select transactions:\n\n* `S_i`, bytes 16 to 23\n* `U_i`, bytes 24 to 31\n\nSee 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)." - }, - "epoch": { - "$ref": "#/components/schemas/Uint64", - "description": "The epoch progress information for the new block.\n\nMiners must use it unchanged in the assembled block." - }, - "extension": { - "anyOf": [ - { - "$ref": "#/components/schemas/JsonBytes" - }, - { - "type": "null" - } - ], - "default": null, - "description": "The extension for the new block.\n\nThis is a field introduced in [CKB RFC 0031]. Since the activation of [CKB RFC 0044], this field is at least 32 bytes, and at most 96 bytes. The consensus rule of first 32 bytes is defined in the RFC 0044.\n\n[CKB RFC 0031]: https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0031-variable-length-header-field/0031-variable-length-header-field.md\n[CKB RFC 0044]: https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0044-ckb-light-client/0044-ckb-light-client.md" - }, - "number": { - "$ref": "#/components/schemas/Uint64", - "description": "The block number for the new block.\n\nMiners must use it unchanged in the assembled block." - }, - "parent_hash": { - "$ref": "#/components/schemas/H256", - "description": "The parent block hash of the new block.\n\nMiners must use it unchanged in the assembled block." - }, - "proposals": { - "description": "Provided proposal ids list of transactions for the new block.", - "items": { - "$ref": "#/components/schemas/ProposalShortId" - }, - "type": "array" - }, - "transactions": { - "description": "Provided valid transactions which can be committed in the new block.\n\nMiners must include the transactions marked as `required` in the assembled new block.", - "items": { - "$ref": "#/components/schemas/TransactionTemplate" - }, - "type": "array" - }, - "uncles": { - "description": "Provided valid uncle blocks candidates for the new block.\n\nMiners must include the uncles marked as `required` in the assembled new block.", - "items": { - "$ref": "#/components/schemas/UncleTemplate" - }, - "type": "array" - }, - "uncles_count_limit": { - "$ref": "#/components/schemas/Uint64", - "description": "The uncle count limit.\n\nMiners must keep the uncles count below this limit, otherwise, the CKB node will reject the block submission." - }, - "version": { - "$ref": "#/components/schemas/Uint32", - "description": "Block version.\n\nMiners must use it unchanged in the assembled block." - }, - "work_id": { - "$ref": "#/components/schemas/Uint64", - "description": "Work ID. The miner must submit the new assembled and resolved block using the same work ID." - } - }, - "required": [ - "bytes_limit", - "cellbase", - "compact_target", - "current_time", - "cycles_limit", - "dao", - "epoch", - "number", - "parent_hash", - "proposals", - "transactions", - "uncles", - "uncles_count_limit", - "version", - "work_id" - ], - "type": "object" - }, - "Byte32": { - "items": { - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "CellDep": { - "additionalProperties": false, - "description": "The cell dependency of a transaction.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"dep_type\": \"code\",\n \"out_point\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\"\n }\n }\n # \"#).unwrap();\n```", - "properties": { - "dep_type": { - "$ref": "#/components/schemas/DepType", - "description": "Dependency type." - }, - "out_point": { - "$ref": "#/components/schemas/OutPoint", - "description": "Reference to the cell." - } - }, - "required": [ - "dep_type", - "out_point" - ], - "type": "object" - }, - "CellInput": { - "additionalProperties": false, - "description": "The input cell of a transaction.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"previous_output\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n },\n \"since\": \"0x0\"\n }\n # \"#).unwrap();\n```", - "properties": { - "previous_output": { - "$ref": "#/components/schemas/OutPoint", - "description": "Reference to the input cell." - }, - "since": { - "$ref": "#/components/schemas/Uint64", - "description": "Restrict when the transaction can be committed into the chain.\n\nSee the RFC [Transaction valid since](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0017-tx-valid-since/0017-tx-valid-since.md)." - } - }, - "required": [ - "previous_output", - "since" - ], - "type": "object" - }, - "CellOutput": { - "additionalProperties": false, - "description": "The fields of an output cell except the cell data.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"capacity\": \"0x2540be400\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n # \"#).unwrap();\n```", - "properties": { - "capacity": { - "$ref": "#/components/schemas/Uint64", - "description": "The cell capacity.\n\nThe capacity of a cell is the value of the cell in Shannons. It is also the upper limit of the cell occupied storage size where every 100,000,000 Shannons give 1-byte storage." - }, - "lock": { - "$ref": "#/components/schemas/Script", - "description": "The lock script." - }, - "type": { - "anyOf": [ - { - "$ref": "#/components/schemas/Script" - }, - { - "type": "null" - } - ], - "description": "The optional type script.\n\nThe JSON field name is \"type\"." - } - }, - "required": [ - "capacity", - "lock" - ], - "type": "object" - }, - "CellbaseTemplate": { - "description": "The cellbase transaction template of the new block for miners.", - "properties": { - "cycles": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ], - "description": "The hint of how many cycles this transaction consumes.\n\nMiners can utilize this field to ensure that the total cycles do not exceed the limit while selecting transactions." - }, - "data": { - "$ref": "#/components/schemas/Transaction", - "description": "The cellbase transaction." - }, - "hash": { - "$ref": "#/components/schemas/H256", - "description": "The cellbase transaction hash." - } - }, - "required": [ - "data", - "hash" - ], - "type": "object" - }, - "DepType": { - "description": "The dep cell type. Allowed values: \"code\" and \"dep_group\".", - "oneOf": [ - { - "description": "Type \"code\".\n\nUse the cell itself as the dep cell.", - "enum": [ - "code" - ], - "type": "string" - }, - { - "description": "Type \"dep_group\".\n\nThe cell is a dep group which members are cells. These members are used as dep cells instead of the group itself.\n\nThe dep group stores the array of `OutPoint`s serialized via molecule in the cell data. Each `OutPoint` points to one cell member.", - "enum": [ - "dep_group" - ], - "type": "string" - } - ] - }, - "H256": { - "description": "The 32-byte fixed-length binary data.\n\nThe name comes from the number of bits in the data.\n\nIn JSONRPC, it is encoded as a 0x-prefixed hex string.", - "items": { - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "Header": { - "additionalProperties": false, - "description": "The block header.\n\nRefer to RFC [CKB Block Structure](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0027-block-structure/0027-block-structure.md).", - "properties": { - "compact_target": { - "$ref": "#/components/schemas/Uint32", - "description": "The block difficulty target.\n\nIt can be converted to a 256-bit target. Miners must ensure the Eaglesong of the header is within the target." - }, - "dao": { - "$ref": "#/components/schemas/Byte32", - "description": "DAO fields.\n\nSee 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)." - }, - "epoch": { - "$ref": "#/components/schemas/Uint64", - "description": "The epoch information of this block.\n\nSee `EpochNumberWithFraction` for details." - }, - "extra_hash": { - "$ref": "#/components/schemas/H256", - "description": "The hash on `uncles` and extension in the block body.\n\nThe 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.\n\n**Notice**\n\nThis field is renamed from `uncles_hash` since 0.100.0. More details can be found in [CKB RFC 0031].\n\n[CKB RFC 0031]: https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0031-variable-length-header-field/0031-variable-length-header-field.md" - }, - "nonce": { - "$ref": "#/components/schemas/Uint128", - "description": "Miner can modify this field to find a proper value such that the Eaglesong of the header is within the target encoded from `compact_target`." - }, - "number": { - "$ref": "#/components/schemas/Uint64", - "description": "The consecutive block number starting from 0." - }, - "parent_hash": { - "$ref": "#/components/schemas/H256", - "description": "The header hash of the parent block." - }, - "proposals_hash": { - "$ref": "#/components/schemas/H256", - "description": "The hash on `proposals` in the block body.\n\nIt is all zeros when `proposals` is empty, or the hash on all the bytes concatenated together." - }, - "timestamp": { - "$ref": "#/components/schemas/Uint64", - "description": "The block timestamp.\n\nIt is a Unix timestamp in milliseconds (1 second = 1000 milliseconds).\n\nMiners should put the time when the block is created in the header, however, the precision is not guaranteed. A block with a higher block number may even have a smaller timestamp." - }, - "transactions_root": { - "$ref": "#/components/schemas/H256", - "description": "The commitment to all the transactions in the block.\n\nIt is a hash on two Merkle Tree roots:\n\n* The root of a CKB Merkle Tree, which items are the transaction hashes of all the transactions in the block.\n* The root of a CKB Merkle Tree, but the items are the transaction witness hashes of all the transactions in the block." - }, - "version": { - "$ref": "#/components/schemas/Uint32", - "description": "The block version.\n\nIt must equal to 0 now and is reserved for future upgrades." - } - }, - "required": [ - "compact_target", - "dao", - "epoch", - "extra_hash", - "nonce", - "number", - "parent_hash", - "proposals_hash", - "timestamp", - "transactions_root", - "version" - ], - "type": "object" - }, - "JsonBytes": { - "type": "string" - }, - "OutPoint": { - "additionalProperties": false, - "description": "Reference to a cell via transaction hash and output index.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n }\n # \"#).unwrap();\n```", - "properties": { - "index": { - "$ref": "#/components/schemas/Uint32", - "description": "The output index of the cell in the transaction specified by `tx_hash`." - }, - "tx_hash": { - "$ref": "#/components/schemas/H256", - "description": "Transaction hash in which the cell is an output." - } - }, - "required": [ - "index", - "tx_hash" - ], - "type": "object" - }, - "ProposalShortId": { - "description": "The 10-byte fixed-length binary encoded as a 0x-prefixed hex string in JSON.\n\n## Example\n\n```text\n 0xa0ef4eb5f4ceeb08a4c8\n```", - "items": { - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "maxItems": 10, - "minItems": 10, - "type": "array" - }, - "Script": { - "additionalProperties": false, - "description": "Describes the lock script and type script for a cell.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n }\n # \"#).unwrap();\n```", - "properties": { - "args": { - "$ref": "#/components/schemas/JsonBytes", - "description": "Arguments for script." - }, - "code_hash": { - "$ref": "#/components/schemas/H256", - "description": "The hash used to match the script code." - }, - "hash_type": { - "$ref": "#/components/schemas/ScriptHashType", - "description": "Specifies how to use the `code_hash` to match the script code." - } - }, - "required": [ - "args", - "code_hash", - "hash_type" - ], - "type": "object" - }, - "ScriptHashType": { - "description": "Specifies how the script `code_hash` is used to match the script code and how to run the code.\n\nAllowed kinds: \"data\", \"type\", \"data1\" and \"data2\"\n\nRefer to the section [Code Locating](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md#code-locating) and [Upgradable Script](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md#upgradable-script) in the RFC *CKB Transaction Structure*.\n\nThe hash type is split into the high 7 bits and the low 1 bit, when the low 1 bit is 1, it indicates the type, when the low 1 bit is 0, it indicates the data, and then it relies on the high 7 bits to indicate that the data actually corresponds to the version.", - "oneOf": [ - { - "description": "Type \"data\" matches script code via cell data hash, and run the script code in v0 CKB VM.", - "enum": [ - "data" - ], - "type": "string" - }, - { - "description": "Type \"type\" matches script code via cell type script hash.", - "enum": [ - "type" - ], - "type": "string" - }, - { - "description": "Type \"data1\" matches script code via cell data hash, and run the script code in v1 CKB VM.", - "enum": [ - "data1" - ], - "type": "string" - }, - { - "description": "Type \"data2\" matches script code via cell data hash, and run the script code in v2 CKB VM.", - "enum": [ - "data2" - ], - "type": "string" - } - ] - }, - "Transaction": { - "additionalProperties": false, - "description": "The transaction.\n\nRefer to RFC [CKB Transaction Structure](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md).", - "properties": { - "cell_deps": { - "description": "An array of cell deps.\n\nCKB locates lock script and type script code via cell deps. The script also can use syscalls to read the cells here.\n\nUnlike inputs, the live cells can be used as cell deps in multiple transactions.", - "items": { - "$ref": "#/components/schemas/CellDep" - }, - "type": "array" - }, - "header_deps": { - "description": "An array of header deps.\n\nThe block must already be in the canonical chain.\n\nLock script and type script can read the header information of blocks listed here.", - "items": { - "$ref": "#/components/schemas/H256" - }, - "type": "array" - }, - "inputs": { - "description": "An array of input cells.\n\nIn the canonical chain, any cell can only appear as an input once.", - "items": { - "$ref": "#/components/schemas/CellInput" - }, - "type": "array" - }, - "outputs": { - "description": "An array of output cells.", - "items": { - "$ref": "#/components/schemas/CellOutput" - }, - "type": "array" - }, - "outputs_data": { - "description": "Output cells data.\n\nThis is a parallel array of outputs. The cell capacity, lock, and type of the output i is `outputs[i]` and its data is `outputs_data[i]`.", - "items": { - "$ref": "#/components/schemas/JsonBytes" - }, - "type": "array" - }, - "version": { - "$ref": "#/components/schemas/Uint32", - "description": "Reserved for future usage. It must equal 0 in current version." - }, - "witnesses": { - "description": "An array of variable-length binaries.\n\nLock script and type script can read data here to verify the transaction.\n\nFor example, the bundled secp256k1 lock script requires storing the signature in `witnesses`.", - "items": { - "$ref": "#/components/schemas/JsonBytes" - }, - "type": "array" - } - }, - "required": [ - "cell_deps", - "header_deps", - "inputs", - "outputs", - "outputs_data", - "version", - "witnesses" - ], - "type": "object" - }, - "TransactionTemplate": { - "description": "Transaction template which is ready to be committed in the new block.", - "properties": { - "cycles": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ], - "description": "The hint of how many cycles this transaction consumes.\n\nMiners can utilize this field to ensure that the total cycles do not exceed the limit while selecting transactions." - }, - "data": { - "$ref": "#/components/schemas/Transaction", - "description": "The transaction.\n\nMiners must keep it unchanged when including it in the new block." - }, - "depends": { - "description": "Transaction dependencies.\n\nThis is a hint to help miners selecting transactions.\n\nThis transaction can only be committed if its dependencies are also committed in the new block.\n\nThis field is a list of indices into the array `transactions` in the block template.\n\nFor example, `depends = [1, 2]` means this transaction depends on `block_template.transactions[1]` and `block_template.transactions[2]`.", - "items": { - "$ref": "#/components/schemas/Uint64" - }, - "type": [ - "array", - "null" - ] - }, - "hash": { - "$ref": "#/components/schemas/H256", - "description": "Transaction hash." - }, - "required": { - "description": "Whether miner must include this transaction in the new block.", - "type": "boolean" - } - }, - "required": [ - "data", - "hash", - "required" - ], - "type": "object" - }, - "Uint128": { - "format": "uint128", - "minimum": 0.0, - "type": "integer" - }, - "Uint32": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "Uint64": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "UncleBlock": { - "additionalProperties": false, - "description": "The uncle block used as a parameter in the RPC.\n\nThe chain stores only the uncle block header and proposal IDs. The header ensures the block is covered by PoW and can pass the consensus rules on uncle blocks. Proposal IDs are there because a block can commit transactions proposed in an uncle.\n\nA block B1 is considered to be the uncle of another block B2 if all the following conditions are met:\n\n1. They are in the same epoch, sharing the same difficulty;\n2. B2 block number is larger than B1;\n3. B1's parent is either B2's ancestor or an uncle embedded in B2 or any of B2's ancestors.\n4. B2 is the first block in its chain to refer to B1.", - "properties": { - "header": { - "$ref": "#/components/schemas/Header", - "description": "The uncle block header." - }, - "proposals": { - "description": "Proposal IDs in the uncle block body.", - "items": { - "$ref": "#/components/schemas/ProposalShortId" - }, - "type": "array" - } - }, - "required": [ - "header", - "proposals" - ], - "type": "object" - }, - "UncleTemplate": { - "description": "The uncle block template of the new block for miners.", - "properties": { - "hash": { - "$ref": "#/components/schemas/H256", - "description": "The uncle block hash." - }, - "header": { - "$ref": "#/components/schemas/Header", - "description": "The header of the uncle block.\n\nMiners must keep this unchanged when including this uncle in the new block." - }, - "proposals": { - "description": "The proposals of the uncle block.\n\nMiners must keep this unchanged when including this uncle in the new block.", - "items": { - "$ref": "#/components/schemas/ProposalShortId" - }, - "type": "array" - }, - "required": { - "description": "Whether miners must include this uncle in the submit block.", - "type": "boolean" - } - }, - "required": [ - "hash", - "header", - "proposals", - "required" - ], - "type": "object" - } - } - }, - "info": { - "description": " RPC Module Miner for miners.\n\n A miner gets a template from CKB, optionally selects transactions, resolves the PoW puzzle, and\n submits the found new block.", - "title": "miner_rpc", - "version": "0.115.0-pre" - }, - "methods": [ - { - "description": " Returns block template for miners.\n\n Miners can assemble the new block from the template. The RPC is designed to allow miners\n to remove transactions and adding new transactions to the block.\n\n ## Params\n\n * `bytes_limit` - the max serialization size in bytes of the block.\n (**Optional:** the default is the consensus limit.)\n * `proposals_limit` - the max count of proposals.\n (**Optional:** the default is the consensus limit.)\n * `max_version` - the max block version.\n (**Optional:** the default is one configured in the current client version.)\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_block_template\",\n \"params\": [\n null,\n null,\n null\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"bytes_limit\": \"0x91c08\",\n \"cellbase\": {\n \"cycles\": null,\n \"data\": {\n \"cell_deps\": [],\n \"header_deps\": [],\n \"inputs\": [\n {\n \"previous_output\": {\n \"index\": \"0xffffffff\",\n \"tx_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"since\": \"0x401\"\n }\n ],\n \"outputs\": [\n {\n \"capacity\": \"0x18e64efc04\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n ],\n \"outputs_data\": [\n \"0x\"\n ],\n \"version\": \"0x0\",\n \"witnesses\": [\n \"0x6a0000000c00000055000000490000001000000030000000310000001892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df20114000000b2e61ff569acf041b3c2c17724e2379c581eeac311000000000000002054455354206d657373616765\"\n ]\n },\n \"hash\": \"0xbaf7e4db2fd002f19a597ca1a31dfe8cfe26ed8cebc91f52b75b16a7a5ec8bab\"\n },\n \"compact_target\": \"0x1e083126\",\n \"current_time\": \"0x174c45e17a3\",\n \"cycles_limit\": \"0xd09dc300\",\n \"dao\": \"0xd495a106684401001e47c0ae1d5930009449d26e32380000000721efd0030000\",\n \"epoch\": \"0x7080019000001\",\n \"extension\": null,\n \"number\": \"0x401\",\n \"parent_hash\": \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\",\n \"proposals\": [\"0xa0ef4eb5f4ceeb08a4c8\"],\n \"transactions\": [],\n \"uncles\": [\n {\n \"hash\": \"0xdca341a42890536551f99357612cef7148ed471e3b6419d0844a4e400be6ee94\",\n \"header\": {\n \"compact_target\": \"0x1e083126\",\n \"dao\": \"0xb5a3e047474401001bc476b9ee573000c0c387962a38000000febffacf030000\",\n \"epoch\": \"0x7080018000001\",\n \"extra_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"nonce\": \"0x0\",\n \"number\": \"0x400\",\n \"parent_hash\": \"0xae003585fa15309b30b31aed3dcf385e9472c3c3e93746a6c4540629a6a1ed2d\",\n \"proposals_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"timestamp\": \"0x5cd2b118\",\n \"transactions_root\": \"0xc47d5b78b3c4c4c853e2a32810818940d0ee403423bea9ec7b8e566d9595206c\",\n \"version\":\"0x0\"\n },\n \"proposals\": [],\n \"required\": false\n }\n ],\n \"uncles_count_limit\": \"0x2\",\n \"version\": \"0x0\",\n \"work_id\": \"0x0\"\n }\n }\n ```", - "name": "get_block_template", - "params": [ - { - "name": "bytes_limit", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ] - } - }, - { - "name": "proposals_limit", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ] - } - }, - { - "name": "max_version", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint32" - }, - { - "type": "null" - } - ] - } - } - ], - "result": { - "name": "get_block_template", - "schema": { - "$ref": "#/components/schemas/BlockTemplate" - } - } - }, - { - "description": " Submit new block to the network.\n\n ## Params\n\n * `work_id` - The same work ID returned from [`get_block_template`](#tymethod.get_block_template).\n * `block` - The assembled block from the block template and which PoW puzzle has been resolved.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"submit_block\",\n \"params\": [\n \"work_id_example\",\n {\n \"header\": {\n \"compact_target\": \"0x1e083126\",\n \"dao\": \"0xb5a3e047474401001bc476b9ee573000c0c387962a38000000febffacf030000\",\n \"epoch\": \"0x7080018000001\",\n \"extra_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"nonce\": \"0x0\",\n \"number\": \"0x400\",\n \"parent_hash\": \"0xae003585fa15309b30b31aed3dcf385e9472c3c3e93746a6c4540629a6a1ed2d\",\n \"proposals_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"timestamp\": \"0x5cd2b117\",\n \"transactions_root\": \"0xc47d5b78b3c4c4c853e2a32810818940d0ee403423bea9ec7b8e566d9595206c\",\n \"version\": \"0x0\"\n },\n \"proposals\": [],\n \"transactions\": [\n {\n \"cell_deps\": [],\n \"header_deps\": [],\n \"inputs\": [\n {\n \"previous_output\": {\n \"index\": \"0xffffffff\",\n \"tx_hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"since\": \"0x400\"\n }\n ],\n \"outputs\": [\n {\n \"capacity\": \"0x18e64b61cf\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n ],\n \"outputs_data\": [\n \"0x\"\n ],\n \"version\": \"0x0\",\n \"witnesses\": [\n \"0x450000000c000000410000003500000010000000300000003100000028e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5000000000000000000\"\n ]\n }\n ],\n \"uncles\": []\n }\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\"\n }\n ```", - "name": "submit_block", - "params": [ - { - "name": "work_id", - "schema": { - "type": "string" - } - }, - { - "name": "block", - "schema": { - "$ref": "#/components/schemas/Block" - } - } - ], - "result": { - "name": "submit_block", - "schema": { - "$ref": "#/components/schemas/H256" - } - } - } - ], - "openrpc": "1.2.6" -} \ No newline at end of file diff --git a/docs/ckb_rpc_openrpc/json/net_rpc_doc.json b/docs/ckb_rpc_openrpc/json/net_rpc_doc.json deleted file mode 100644 index 9533bfbff97..00000000000 --- a/docs/ckb_rpc_openrpc/json/net_rpc_doc.json +++ /dev/null @@ -1,531 +0,0 @@ -{ - "components": { - "schemas": { - "BannedAddr": { - "description": "A banned P2P address.", - "properties": { - "address": { - "description": "The P2P address.\n\nExample: \"/ip4/192.168.0.2/tcp/8112/p2p/QmTRHCdrRtgUzYLNCin69zEvPvLYdxUZLLfLYyHVY3DZAS\"", - "type": "string" - }, - "ban_reason": { - "description": "The reason.", - "type": "string" - }, - "ban_until": { - "$ref": "#/components/schemas/Uint64", - "description": "The address is banned until this time." - }, - "created_at": { - "$ref": "#/components/schemas/Uint64", - "description": "When this address is banned." - } - }, - "required": [ - "address", - "ban_reason", - "ban_until", - "created_at" - ], - "type": "object" - }, - "Byte32": { - "items": { - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "LocalNode": { - "description": "The information of the node itself.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"active\": true,\n \"addresses\": [\n {\n \"address\": \"/ip4/192.168.0.2/tcp/8112/p2p/QmTRHCdrRtgUzYLNCin69zEvPvLYdxUZLLfLYyHVY3DZAS\",\n \"score\": \"0xff\"\n },\n {\n \"address\": \"/ip4/0.0.0.0/tcp/8112/p2p/QmTRHCdrRtgUzYLNCin69zEvPvLYdxUZLLfLYyHVY3DZAS\",\n \"score\": \"0x1\"\n }\n ],\n \"connections\": \"0xb\",\n \"node_id\": \"QmTRHCdrRtgUzYLNCin69zEvPvLYdxUZLLfLYyHVY3DZAS\",\n \"protocols\": [\n {\n \"id\": \"0x0\",\n \"name\": \"/ckb/ping\",\n \"support_versions\": [\n \"0.0.1\"\n ]\n },\n {\n \"id\": \"0x1\",\n \"name\": \"/ckb/discovery\",\n \"support_versions\": [\n \"0.0.1\"\n ]\n }\n ],\n \"version\": \"0.34.0 (f37f598 2020-07-17)\"\n }\n # \"#).unwrap();\n```", - "properties": { - "active": { - "description": "Whether this node is active.\n\nAn inactive node ignores incoming p2p messages and drops outgoing messages.", - "type": "boolean" - }, - "addresses": { - "description": "P2P addresses of this node.\n\nA node can have multiple addresses.", - "items": { - "$ref": "#/components/schemas/NodeAddress" - }, - "type": "array" - }, - "connections": { - "$ref": "#/components/schemas/Uint64", - "description": "Count of currently connected peers." - }, - "node_id": { - "description": "The unique node ID derived from the p2p private key.\n\nThe private key is generated randomly on the first boot.", - "type": "string" - }, - "protocols": { - "description": "Supported protocols.", - "items": { - "$ref": "#/components/schemas/LocalNodeProtocol" - }, - "type": "array" - }, - "version": { - "description": "CKB node version.\n\nExample: \"version\": \"0.34.0 (f37f598 2020-07-17)\"", - "type": "string" - } - }, - "required": [ - "active", - "addresses", - "connections", - "node_id", - "protocols", - "version" - ], - "type": "object" - }, - "LocalNodeProtocol": { - "description": "The information of a P2P protocol that is supported by the local node.", - "properties": { - "id": { - "$ref": "#/components/schemas/Uint64", - "description": "Unique protocol ID." - }, - "name": { - "description": "Readable protocol name.", - "type": "string" - }, - "support_versions": { - "description": "Supported versions.\n\nSee [Semantic Version](https://semver.org/) about how to specify a version.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "id", - "name", - "support_versions" - ], - "type": "object" - }, - "NodeAddress": { - "description": "Node P2P address and score.", - "properties": { - "address": { - "description": "P2P address.\n\nThis is the same address used in the whitelist in ckb.toml.\n\nExample: \"/ip4/192.168.0.2/tcp/8112/p2p/QmTRHCdrRtgUzYLNCin69zEvPvLYdxUZLLfLYyHVY3DZAS\"", - "type": "string" - }, - "score": { - "$ref": "#/components/schemas/Uint64", - "description": "Address score.\n\nA higher score means a higher probability of a successful connection." - } - }, - "required": [ - "address", - "score" - ], - "type": "object" - }, - "PeerSyncState": { - "description": "The chain synchronization state between the local node and a remote node.", - "properties": { - "best_known_header_hash": { - "anyOf": [ - { - "$ref": "#/components/schemas/Byte32" - }, - { - "type": "null" - } - ], - "description": "Best known header hash of remote peer.\n\nThis is the observed tip of the remote node's canonical chain." - }, - "best_known_header_number": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ], - "description": "Best known header number of remote peer\n\nThis is the block number of the block with the hash `best_known_header_hash`." - }, - "can_fetch_count": { - "$ref": "#/components/schemas/Uint64", - "description": "The count of blocks are available for concurrency download." - }, - "inflight_count": { - "$ref": "#/components/schemas/Uint64", - "description": "The count of concurrency downloading blocks." - }, - "last_common_header_hash": { - "anyOf": [ - { - "$ref": "#/components/schemas/Byte32" - }, - { - "type": "null" - } - ], - "description": "Last common header hash of remote peer.\n\nThis is the common ancestor of the local node canonical chain tip and the block `best_known_header_hash`." - }, - "last_common_header_number": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ], - "description": "Last common header number of remote peer.\n\nThis is the block number of the block with the hash `last_common_header_hash`." - }, - "unknown_header_list_size": { - "$ref": "#/components/schemas/Uint64", - "description": "The total size of unknown header list.\n\n**Deprecated**: this is an internal state and will be removed in a future release." - } - }, - "required": [ - "can_fetch_count", - "inflight_count", - "unknown_header_list_size" - ], - "type": "object" - }, - "RemoteNode": { - "description": "Information of a remote node.\n\nA remote node connects to the local node via the P2P network. It is often called a peer.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"addresses\": [\n {\n \"address\": \"/ip6/::ffff:18.185.102.19/tcp/8115/p2p/QmXwUgF48ULy6hkgfqrEwEfuHW7WyWyWauueRDAYQHNDfN\",\n \"score\": \"0x64\"\n },\n {\n \"address\": \"/ip4/18.185.102.19/tcp/8115/p2p/QmXwUgF48ULy6hkgfqrEwEfuHW7WyWyWauueRDAYQHNDfN\",\n \"score\": \"0x64\"\n }\n ],\n \"connected_duration\": \"0x2f\",\n \"is_outbound\": true,\n \"last_ping_duration\": \"0x1a\",\n \"node_id\": \"QmXwUgF48ULy6hkgfqrEwEfuHW7WyWyWauueRDAYQHNDfN\",\n \"protocols\": [\n {\n \"id\": \"0x4\",\n \"version\": \"0.0.1\"\n },\n {\n \"id\": \"0x2\",\n \"version\": \"0.0.1\"\n },\n {\n \"id\": \"0x1\",\n \"version\": \"0.0.1\"\n },\n {\n \"id\": \"0x64\",\n \"version\": \"1\"\n },\n {\n \"id\": \"0x6e\",\n \"version\": \"1\"\n },\n {\n \"id\": \"0x66\",\n \"version\": \"1\"\n },\n {\n \"id\": \"0x65\",\n \"version\": \"1\"\n },\n {\n \"id\": \"0x0\",\n \"version\": \"0.0.1\"\n }\n ],\n \"sync_state\": {\n \"best_known_header_hash\": null,\n \"best_known_header_number\": null,\n \"can_fetch_count\": \"0x80\",\n \"inflight_count\": \"0xa\",\n \"last_common_header_hash\": null,\n \"last_common_header_number\": null,\n \"unknown_header_list_size\": \"0x20\"\n },\n \"version\": \"0.34.0 (f37f598 2020-07-17)\"\n }\n # \"#).unwrap();\n```", - "properties": { - "addresses": { - "description": "The remote node addresses.", - "items": { - "$ref": "#/components/schemas/NodeAddress" - }, - "type": "array" - }, - "connected_duration": { - "$ref": "#/components/schemas/Uint64", - "description": "Elapsed time in milliseconds since the remote node is connected." - }, - "is_outbound": { - "description": "Whether this is an outbound remote node.\n\nIf the connection is established by the local node, `is_outbound` is true.", - "type": "boolean" - }, - "last_ping_duration": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ], - "description": "Elapsed time in milliseconds since receiving the ping response from this remote node.\n\nNull means no ping responses have been received yet." - }, - "node_id": { - "description": "The remote node ID which is derived from its P2P private key.", - "type": "string" - }, - "protocols": { - "description": "Active protocols.\n\nCKB uses Tentacle multiplexed network framework. Multiple protocols are running simultaneously in the connection.", - "items": { - "$ref": "#/components/schemas/RemoteNodeProtocol" - }, - "type": "array" - }, - "sync_state": { - "anyOf": [ - { - "$ref": "#/components/schemas/PeerSyncState" - }, - { - "type": "null" - } - ], - "description": "Chain synchronization state.\n\nNull means chain sync has not started with this remote node yet." - }, - "version": { - "description": "The remote node version.", - "type": "string" - } - }, - "required": [ - "addresses", - "connected_duration", - "is_outbound", - "node_id", - "protocols", - "version" - ], - "type": "object" - }, - "RemoteNodeProtocol": { - "description": "The information about an active running protocol.", - "properties": { - "id": { - "$ref": "#/components/schemas/Uint64", - "description": "Unique protocol ID." - }, - "version": { - "description": "Active protocol version.", - "type": "string" - } - }, - "required": [ - "id", - "version" - ], - "type": "object" - }, - "SyncState": { - "description": "The overall chain synchronization state of this local node.", - "properties": { - "best_known_block_number": { - "$ref": "#/components/schemas/Uint64", - "description": "This is the best known block number observed by the local node from the P2P network.\n\nThe best here means that the block leads a chain which has the best known accumulated difficulty.\n\nThis can be used to estimate the synchronization progress. If this RPC returns B, and the RPC `get_tip_block_number` returns T, the node has already synchronized T/B blocks." - }, - "best_known_block_timestamp": { - "$ref": "#/components/schemas/Uint64", - "description": "This is timestamp of the same block described in `best_known_block_number`." - }, - "fast_time": { - "$ref": "#/components/schemas/Uint64", - "description": "The download scheduler's time analysis data, the fast is the 1/3 of the cut-off point, unit ms" - }, - "ibd": { - "description": "Whether the local node is in IBD, Initial Block Download.\n\nWhen a node starts and its chain tip timestamp is far behind the wall clock, it will enter the IBD until it catches up the synchronization.\n\nDuring IBD, the local node only synchronizes the chain with one selected remote node and stops responding to most P2P requests.", - "type": "boolean" - }, - "inflight_blocks_count": { - "$ref": "#/components/schemas/Uint64", - "description": "Count of downloading blocks." - }, - "low_time": { - "$ref": "#/components/schemas/Uint64", - "description": "The download scheduler's time analysis data, the low is the 9/10 of the cut-off point, unit ms" - }, - "normal_time": { - "$ref": "#/components/schemas/Uint64", - "description": "The download scheduler's time analysis data, the normal is the 4/5 of the cut-off point, unit ms" - }, - "orphan_blocks_count": { - "$ref": "#/components/schemas/Uint64", - "description": "Count of orphan blocks the local node has downloaded.\n\nThe local node downloads multiple blocks simultaneously but blocks must be connected consecutively. If a descendant is downloaded before its ancestors, it becomes an orphan block.\n\nIf this number is too high, it indicates that block download has stuck at some block." - } - }, - "required": [ - "best_known_block_number", - "best_known_block_timestamp", - "fast_time", - "ibd", - "inflight_blocks_count", - "low_time", - "normal_time", - "orphan_blocks_count" - ], - "type": "object" - }, - "Uint64": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - } - } - }, - "info": { - "description": " RPC Module Net for P2P network.", - "title": "net_rpc", - "version": "0.115.0-pre" - }, - "methods": [ - { - "description": " Returns the local node information.\n\n The local node means the node itself which is serving the RPC.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"local_node_info\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"active\": true,\n \"addresses\": [\n {\n \"address\": \"/ip4/192.168.0.2/tcp/8112/p2p/QmTRHCdrRtgUzYLNCin69zEvPvLYdxUZLLfLYyHVY3DZAS\",\n \"score\": \"0xff\"\n },\n {\n \"address\": \"/ip4/0.0.0.0/tcp/8112/p2p/QmTRHCdrRtgUzYLNCin69zEvPvLYdxUZLLfLYyHVY3DZAS\",\n \"score\": \"0x1\"\n }\n ],\n \"connections\": \"0xb\",\n \"node_id\": \"QmTRHCdrRtgUzYLNCin69zEvPvLYdxUZLLfLYyHVY3DZAS\",\n \"protocols\": [\n {\n \"id\": \"0x0\",\n \"name\": \"/ckb/ping\",\n \"support_versions\": [\n \"0.0.1\"\n ]\n },\n {\n \"id\": \"0x1\",\n \"name\": \"/ckb/discovery\",\n \"support_versions\": [\n \"0.0.1\"\n ]\n }\n ],\n \"version\": \"0.34.0 (f37f598 2020-07-17)\"\n }\n }\n ```", - "name": "local_node_info", - "params": [], - "result": { - "name": "local_node_info", - "schema": { - "$ref": "#/components/schemas/LocalNode" - } - } - }, - { - "description": " Returns the connected peers' information.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_peers\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": [\n {\n \"addresses\": [\n {\n \"address\": \"/ip6/::ffff:18.185.102.19/tcp/8115/p2p/QmXwUgF48ULy6hkgfqrEwEfuHW7WyWyWauueRDAYQHNDfN\",\n \"score\": \"0x64\"\n },\n {\n \"address\": \"/ip4/18.185.102.19/tcp/8115/p2p/QmXwUgF48ULy6hkgfqrEwEfuHW7WyWyWauueRDAYQHNDfN\",\n \"score\": \"0x64\"\n }\n ],\n \"connected_duration\": \"0x2f\",\n \"is_outbound\": true,\n \"last_ping_duration\": \"0x1a\",\n \"node_id\": \"QmXwUgF48ULy6hkgfqrEwEfuHW7WyWyWauueRDAYQHNDfN\",\n \"protocols\": [\n {\n \"id\": \"0x4\",\n \"version\": \"0.0.1\"\n },\n {\n \"id\": \"0x2\",\n \"version\": \"0.0.1\"\n },\n {\n \"id\": \"0x1\",\n \"version\": \"0.0.1\"\n },\n {\n \"id\": \"0x64\",\n \"version\": \"1\"\n },\n {\n \"id\": \"0x6e\",\n \"version\": \"1\"\n },\n {\n \"id\": \"0x66\",\n \"version\": \"1\"\n },\n {\n \"id\": \"0x65\",\n \"version\": \"1\"\n },\n {\n \"id\": \"0x0\",\n \"version\": \"0.0.1\"\n }\n ],\n \"sync_state\": {\n \"best_known_header_hash\": null,\n \"best_known_header_number\": null,\n \"can_fetch_count\": \"0x80\",\n \"inflight_count\": \"0xa\",\n \"last_common_header_hash\": null,\n \"last_common_header_number\": null,\n \"unknown_header_list_size\": \"0x20\"\n },\n \"version\": \"0.34.0 (f37f598 2020-07-17)\"\n },\n {\n \"addresses\": [\n {\n \"address\": \"/ip4/174.80.182.60/tcp/52965/p2p/QmVTMd7SEXfxS5p4EEM5ykTe1DwWWVewEM3NwjLY242vr2\",\n \"score\": \"0x1\"\n }\n ],\n \"connected_duration\": \"0x95\",\n \"is_outbound\": true,\n \"last_ping_duration\": \"0x41\",\n \"node_id\": \"QmSrkzhdBMmfCGx8tQGwgXxzBg8kLtX8qMcqECMuKWsxDV\",\n \"protocols\": [\n {\n \"id\": \"0x0\",\n \"version\": \"0.0.1\"\n },\n {\n \"id\": \"0x2\",\n \"version\": \"0.0.1\"\n },\n {\n \"id\": \"0x6e\",\n \"version\": \"1\"\n },\n {\n \"id\": \"0x66\",\n \"version\": \"1\"\n },\n {\n \"id\": \"0x1\",\n \"version\": \"0.0.1\"\n },\n {\n \"id\": \"0x65\",\n \"version\": \"1\"\n },\n {\n \"id\": \"0x64\",\n \"version\": \"1\"\n },\n {\n \"id\": \"0x4\",\n \"version\": \"0.0.1\"\n }\n ],\n \"sync_state\": {\n \"best_known_header_hash\": \"0x2157c72b3eddd41a7a14c361173cd22ef27d7e0a29eda2e511ee0b3598c0b895\",\n \"best_known_header_number\": \"0xdb835\",\n \"can_fetch_count\": \"0x80\",\n \"inflight_count\": \"0xa\",\n \"last_common_header_hash\": \"0xc63026bd881d880bb142c855dc8153187543245f0a94391c831c75df31f263c4\",\n \"last_common_header_number\": \"0x4dc08\",\n \"unknown_header_list_size\": \"0x1f\"\n },\n \"version\": \"0.30.1 (5cc1b75 2020-03-23)\"\n }\n ]\n }\n ```", - "name": "get_peers", - "params": [], - "result": { - "name": "get_peers", - "schema": { - "items": { - "$ref": "#/components/schemas/RemoteNode" - }, - "type": "array" - } - } - }, - { - "description": " Returns all banned IPs/Subnets.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_banned_addresses\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": [\n {\n \"address\": \"192.168.0.2/32\",\n \"ban_reason\": \"\",\n \"ban_until\": \"0x1ac89236180\",\n \"created_at\": \"0x16bde533338\"\n }\n ]\n }\n ```", - "name": "get_banned_addresses", - "params": [], - "result": { - "name": "get_banned_addresses", - "schema": { - "items": { - "$ref": "#/components/schemas/BannedAddr" - }, - "type": "array" - } - } - }, - { - "description": " Clears all banned IPs/Subnets.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"clear_banned_addresses\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": null\n }\n ```", - "name": "clear_banned_addresses", - "params": [], - "result": { - "name": "clear_banned_addresses", - "schema": { - "type": "null" - } - } - }, - { - "description": " Inserts or deletes an IP/Subnet from the banned list\n\n ## Params\n\n * `address` - The IP/Subnet with an optional netmask (default is /32 = single IP). Examples:\n * \"192.168.0.2\" bans a single IP\n * \"192.168.0.0/24\" bans IP from \"192.168.0.0\" to \"192.168.0.255\".\n * `command` - `insert` to insert an IP/Subnet to the list, `delete` to delete an IP/Subnet from the list.\n * `ban_time` - Time in milliseconds how long (or until when if \\[absolute\\] is set) the IP is banned, optional parameter, null means using the default time of 24h\n * `absolute` - If set, the `ban_time` must be an absolute timestamp in milliseconds since epoch, optional parameter.\n * `reason` - Ban reason, optional parameter.\n\n ## Errors\n\n * [`InvalidParams (-32602)`](../enum.RPCError.html#variant.InvalidParams)\n * Expected `address` to be a valid IP address with an optional netmask.\n * Expected `command` to be in the list [insert, delete].\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"set_ban\",\n \"params\": [\n \"192.168.0.2\",\n \"insert\",\n \"0x1ac89236180\",\n true,\n \"set_ban example\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": null\n }\n ```", - "name": "set_ban", - "params": [ - { - "name": "address", - "schema": { - "type": "string" - } - }, - { - "name": "command", - "schema": { - "type": "string" - } - }, - { - "name": "ban_time", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Uint64" - }, - { - "type": "null" - } - ] - } - }, - { - "name": "absolute", - "schema": { - "type": [ - "boolean", - "null" - ] - } - }, - { - "name": "reason", - "schema": { - "type": [ - "string", - "null" - ] - } - } - ], - "result": { - "name": "set_ban", - "schema": { - "type": "null" - } - } - }, - { - "description": " Returns chain synchronization state of this node.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"sync_state\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"best_known_block_number\": \"0x400\",\n \"best_known_block_timestamp\": \"0x5cd2b117\",\n \"fast_time\": \"0x3e8\",\n \"ibd\": true,\n \"inflight_blocks_count\": \"0x0\",\n \"low_time\": \"0x5dc\",\n \"normal_time\": \"0x4e2\",\n \"orphan_blocks_count\": \"0x0\"\n }\n }\n ```", - "name": "sync_state", - "params": [], - "result": { - "name": "sync_state", - "schema": { - "$ref": "#/components/schemas/SyncState" - } - } - }, - { - "description": " Disable/enable all p2p network activity\n\n ## Params\n\n * `state` - true to enable networking, false to disable\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"set_network_active\",\n \"params\": [\n false\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": null\n }\n ```", - "name": "set_network_active", - "params": [ - { - "name": "state", - "schema": { - "type": "boolean" - } - } - ], - "result": { - "name": "set_network_active", - "schema": { - "type": "null" - } - } - }, - { - "description": " Attempts to add a node to the peers list and try connecting to it.\n\n ## Params\n\n * `peer_id` - The node id of the node.\n * `address` - The address of the node.\n\n The full P2P address is usually displayed as `address/peer_id`, for example in the log\n\n ```text\n 2020-09-16 15:31:35.191 +08:00 NetworkRuntime INFO ckb_network::network\n Listen on address: /ip4/192.168.2.100/tcp/8114/QmUsZHPbjjzU627UZFt4k8j6ycEcNvXRnVGxCPKqwbAfQS\n ```\n\n And in RPC `local_node_info`:\n\n ```json\n {\n \"addresses\": [\n {\n \"address\": \"/ip4/192.168.2.100/tcp/8114/QmUsZHPbjjzU627UZFt4k8j6ycEcNvXRnVGxCPKqwbAfQS\",\n \"score\": \"0xff\"\n }\n ]\n }\n ```\n\n In both of these examples,\n\n * `peer_id` is `QmUsZHPbjjzU627UZFt4k8j6ycEcNvXRnVGxCPKqwbAfQS`,\n * and `address` is `/ip4/192.168.2.100/tcp/8114`\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"add_node\",\n \"params\": [\n \"QmUsZHPbjjzU627UZFt4k8j6ycEcNvXRnVGxCPKqwbAfQS\",\n \"/ip4/192.168.2.100/tcp/8114\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": null\n }\n ```", - "name": "add_node", - "params": [ - { - "name": "peer_id", - "schema": { - "type": "string" - } - }, - { - "name": "address", - "schema": { - "type": "string" - } - } - ], - "result": { - "name": "add_node", - "schema": { - "type": "null" - } - } - }, - { - "description": " Attempts to remove a node from the peers list and try disconnecting from it.\n\n ## Params\n\n * `peer_id` - The peer id of the node.\n\n This is the last part of a full P2P address. For example, in address\n \"/ip4/192.168.2.100/tcp/8114/QmUsZHPbjjzU627UZFt4k8j6ycEcNvXRnVGxCPKqwbAfQS\", the `peer_id`\n is `QmUsZHPbjjzU627UZFt4k8j6ycEcNvXRnVGxCPKqwbAfQS`.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"remove_node\",\n \"params\": [\n \"QmUsZHPbjjzU627UZFt4k8j6ycEcNvXRnVGxCPKqwbAfQS\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": null\n }\n ```", - "name": "remove_node", - "params": [ - { - "name": "peer_id", - "schema": { - "type": "string" - } - } - ], - "result": { - "name": "remove_node", - "schema": { - "type": "null" - } - } - }, - { - "description": " Requests that a ping is sent to all connected peers, to measure ping time.\n\n ## Examples\n\n Requests\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"ping_peers\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": null\n }\n ```", - "name": "ping_peers", - "params": [], - "result": { - "name": "ping_peers", - "schema": { - "type": "null" - } - } - } - ], - "openrpc": "1.2.6" -} \ No newline at end of file diff --git a/docs/ckb_rpc_openrpc/json/pool_rpc_doc.json b/docs/ckb_rpc_openrpc/json/pool_rpc_doc.json deleted file mode 100644 index e3c53e3ba2b..00000000000 --- a/docs/ckb_rpc_openrpc/json/pool_rpc_doc.json +++ /dev/null @@ -1,659 +0,0 @@ -{ - "components": { - "schemas": { - "AncestorsScoreSortKey": { - "description": "A struct as a sorted key for tx-pool", - "properties": { - "ancestors_fee": { - "$ref": "#/components/schemas/Uint64", - "description": "Ancestors fee" - }, - "ancestors_weight": { - "$ref": "#/components/schemas/Uint64", - "description": "Ancestors weight" - }, - "fee": { - "$ref": "#/components/schemas/Uint64", - "description": "Fee" - }, - "weight": { - "$ref": "#/components/schemas/Uint64", - "description": "Weight" - } - }, - "required": [ - "ancestors_fee", - "ancestors_weight", - "fee", - "weight" - ], - "type": "object" - }, - "CellDep": { - "additionalProperties": false, - "description": "The cell dependency of a transaction.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"dep_type\": \"code\",\n \"out_point\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\"\n }\n }\n # \"#).unwrap();\n```", - "properties": { - "dep_type": { - "$ref": "#/components/schemas/DepType", - "description": "Dependency type." - }, - "out_point": { - "$ref": "#/components/schemas/OutPoint", - "description": "Reference to the cell." - } - }, - "required": [ - "dep_type", - "out_point" - ], - "type": "object" - }, - "CellInput": { - "additionalProperties": false, - "description": "The input cell of a transaction.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"previous_output\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n },\n \"since\": \"0x0\"\n }\n # \"#).unwrap();\n```", - "properties": { - "previous_output": { - "$ref": "#/components/schemas/OutPoint", - "description": "Reference to the input cell." - }, - "since": { - "$ref": "#/components/schemas/Uint64", - "description": "Restrict when the transaction can be committed into the chain.\n\nSee the RFC [Transaction valid since](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0017-tx-valid-since/0017-tx-valid-since.md)." - } - }, - "required": [ - "previous_output", - "since" - ], - "type": "object" - }, - "CellOutput": { - "additionalProperties": false, - "description": "The fields of an output cell except the cell data.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"capacity\": \"0x2540be400\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n # \"#).unwrap();\n```", - "properties": { - "capacity": { - "$ref": "#/components/schemas/Uint64", - "description": "The cell capacity.\n\nThe capacity of a cell is the value of the cell in Shannons. It is also the upper limit of the cell occupied storage size where every 100,000,000 Shannons give 1-byte storage." - }, - "lock": { - "$ref": "#/components/schemas/Script", - "description": "The lock script." - }, - "type": { - "anyOf": [ - { - "$ref": "#/components/schemas/Script" - }, - { - "type": "null" - } - ], - "description": "The optional type script.\n\nThe JSON field name is \"type\"." - } - }, - "required": [ - "capacity", - "lock" - ], - "type": "object" - }, - "DepType": { - "description": "The dep cell type. Allowed values: \"code\" and \"dep_group\".", - "oneOf": [ - { - "description": "Type \"code\".\n\nUse the cell itself as the dep cell.", - "enum": [ - "code" - ], - "type": "string" - }, - { - "description": "Type \"dep_group\".\n\nThe cell is a dep group which members are cells. These members are used as dep cells instead of the group itself.\n\nThe dep group stores the array of `OutPoint`s serialized via molecule in the cell data. Each `OutPoint` points to one cell member.", - "enum": [ - "dep_group" - ], - "type": "string" - } - ] - }, - "H256": { - "description": "The 32-byte fixed-length binary data.\n\nThe name comes from the number of bits in the data.\n\nIn JSONRPC, it is encoded as a 0x-prefixed hex string.", - "items": { - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "JsonBytes": { - "type": "string" - }, - "OutPoint": { - "additionalProperties": false, - "description": "Reference to a cell via transaction hash and output index.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n }\n # \"#).unwrap();\n```", - "properties": { - "index": { - "$ref": "#/components/schemas/Uint32", - "description": "The output index of the cell in the transaction specified by `tx_hash`." - }, - "tx_hash": { - "$ref": "#/components/schemas/H256", - "description": "Transaction hash in which the cell is an output." - } - }, - "required": [ - "index", - "tx_hash" - ], - "type": "object" - }, - "OutputsValidator": { - "description": "Transaction output validators that prevent common mistakes.", - "oneOf": [ - { - "description": "the default validator, bypass output checking, thus allow any kind of transaction outputs.", - "enum": [ - "passthrough" - ], - "type": "string" - }, - { - "description": "restricts the lock script and type script usage, see more information on ", - "enum": [ - "well_known_scripts_only" - ], - "type": "string" - } - ] - }, - "PoolTxDetailInfo": { - "description": "A Tx details info in tx-pool.", - "properties": { - "ancestors_count": { - "$ref": "#/components/schemas/Uint64", - "description": "The ancestors count of tx" - }, - "descendants_count": { - "$ref": "#/components/schemas/Uint64", - "description": "The descendants count of tx" - }, - "entry_status": { - "description": "The detailed status in tx-pool, `pending`, `gap`, `proposed`", - "type": "string" - }, - "pending_count": { - "$ref": "#/components/schemas/Uint64", - "description": "The pending(`pending` and `gap`) count" - }, - "proposed_count": { - "$ref": "#/components/schemas/Uint64", - "description": "The proposed count" - }, - "rank_in_pending": { - "$ref": "#/components/schemas/Uint64", - "description": "The rank in pending, starting from 0" - }, - "score_sortkey": { - "$ref": "#/components/schemas/AncestorsScoreSortKey", - "description": "The score key details, useful to debug" - }, - "timestamp": { - "$ref": "#/components/schemas/Uint64", - "description": "The time added into tx-pool" - } - }, - "required": [ - "ancestors_count", - "descendants_count", - "entry_status", - "pending_count", - "proposed_count", - "rank_in_pending", - "score_sortkey", - "timestamp" - ], - "type": "object" - }, - "RawTxPool": { - "anyOf": [ - { - "$ref": "#/components/schemas/TxPoolIds", - "description": "verbose = false" - }, - { - "$ref": "#/components/schemas/TxPoolEntries", - "description": "verbose = true" - } - ], - "description": "All transactions in tx-pool.\n\n`RawTxPool` is equivalent to [`TxPoolIds`][] `|` [`TxPoolEntries`][].\n\n[`TxPoolIds`]: struct.TxPoolIds.html\n[`TxPoolEntries`]: struct.TxPoolEntries.html" - }, - "Script": { - "additionalProperties": false, - "description": "Describes the lock script and type script for a cell.\n\n## Examples\n\n```\n # serde_json::from_str::(r#\"\n {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n }\n # \"#).unwrap();\n```", - "properties": { - "args": { - "$ref": "#/components/schemas/JsonBytes", - "description": "Arguments for script." - }, - "code_hash": { - "$ref": "#/components/schemas/H256", - "description": "The hash used to match the script code." - }, - "hash_type": { - "$ref": "#/components/schemas/ScriptHashType", - "description": "Specifies how to use the `code_hash` to match the script code." - } - }, - "required": [ - "args", - "code_hash", - "hash_type" - ], - "type": "object" - }, - "ScriptHashType": { - "description": "Specifies how the script `code_hash` is used to match the script code and how to run the code.\n\nAllowed kinds: \"data\", \"type\", \"data1\" and \"data2\"\n\nRefer to the section [Code Locating](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md#code-locating) and [Upgradable Script](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md#upgradable-script) in the RFC *CKB Transaction Structure*.\n\nThe hash type is split into the high 7 bits and the low 1 bit, when the low 1 bit is 1, it indicates the type, when the low 1 bit is 0, it indicates the data, and then it relies on the high 7 bits to indicate that the data actually corresponds to the version.", - "oneOf": [ - { - "description": "Type \"data\" matches script code via cell data hash, and run the script code in v0 CKB VM.", - "enum": [ - "data" - ], - "type": "string" - }, - { - "description": "Type \"type\" matches script code via cell type script hash.", - "enum": [ - "type" - ], - "type": "string" - }, - { - "description": "Type \"data1\" matches script code via cell data hash, and run the script code in v1 CKB VM.", - "enum": [ - "data1" - ], - "type": "string" - }, - { - "description": "Type \"data2\" matches script code via cell data hash, and run the script code in v2 CKB VM.", - "enum": [ - "data2" - ], - "type": "string" - } - ] - }, - "Transaction": { - "additionalProperties": false, - "description": "The transaction.\n\nRefer to RFC [CKB Transaction Structure](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md).", - "properties": { - "cell_deps": { - "description": "An array of cell deps.\n\nCKB locates lock script and type script code via cell deps. The script also can use syscalls to read the cells here.\n\nUnlike inputs, the live cells can be used as cell deps in multiple transactions.", - "items": { - "$ref": "#/components/schemas/CellDep" - }, - "type": "array" - }, - "header_deps": { - "description": "An array of header deps.\n\nThe block must already be in the canonical chain.\n\nLock script and type script can read the header information of blocks listed here.", - "items": { - "$ref": "#/components/schemas/H256" - }, - "type": "array" - }, - "inputs": { - "description": "An array of input cells.\n\nIn the canonical chain, any cell can only appear as an input once.", - "items": { - "$ref": "#/components/schemas/CellInput" - }, - "type": "array" - }, - "outputs": { - "description": "An array of output cells.", - "items": { - "$ref": "#/components/schemas/CellOutput" - }, - "type": "array" - }, - "outputs_data": { - "description": "Output cells data.\n\nThis is a parallel array of outputs. The cell capacity, lock, and type of the output i is `outputs[i]` and its data is `outputs_data[i]`.", - "items": { - "$ref": "#/components/schemas/JsonBytes" - }, - "type": "array" - }, - "version": { - "$ref": "#/components/schemas/Uint32", - "description": "Reserved for future usage. It must equal 0 in current version." - }, - "witnesses": { - "description": "An array of variable-length binaries.\n\nLock script and type script can read data here to verify the transaction.\n\nFor example, the bundled secp256k1 lock script requires storing the signature in `witnesses`.", - "items": { - "$ref": "#/components/schemas/JsonBytes" - }, - "type": "array" - } - }, - "required": [ - "cell_deps", - "header_deps", - "inputs", - "outputs", - "outputs_data", - "version", - "witnesses" - ], - "type": "object" - }, - "TxPoolEntries": { - "description": "Tx-pool entries object", - "properties": { - "conflicted": { - "description": "Conflicted tx hash vec", - "items": { - "$ref": "#/components/schemas/H256" - }, - "type": "array" - }, - "pending": { - "additionalProperties": { - "$ref": "#/components/schemas/TxPoolEntry" - }, - "description": "Pending tx verbose info", - "type": "object" - }, - "proposed": { - "additionalProperties": { - "$ref": "#/components/schemas/TxPoolEntry" - }, - "description": "Proposed tx verbose info", - "type": "object" - } - }, - "required": [ - "conflicted", - "pending", - "proposed" - ], - "type": "object" - }, - "TxPoolEntry": { - "description": "Transaction entry info", - "properties": { - "ancestors_count": { - "$ref": "#/components/schemas/Uint64", - "description": "Number of in-tx-pool ancestor transactions" - }, - "ancestors_cycles": { - "$ref": "#/components/schemas/Uint64", - "description": "Cycles of in-tx-pool ancestor transactions" - }, - "ancestors_size": { - "$ref": "#/components/schemas/Uint64", - "description": "Size of in-tx-pool ancestor transactions" - }, - "cycles": { - "$ref": "#/components/schemas/Uint64", - "description": "Consumed cycles." - }, - "fee": { - "$ref": "#/components/schemas/Uint64", - "description": "The transaction fee." - }, - "size": { - "$ref": "#/components/schemas/Uint64", - "description": "The transaction serialized size in block." - }, - "timestamp": { - "$ref": "#/components/schemas/Uint64", - "description": "The unix timestamp when entering the Txpool, unit: Millisecond" - } - }, - "required": [ - "ancestors_count", - "ancestors_cycles", - "ancestors_size", - "cycles", - "fee", - "size", - "timestamp" - ], - "type": "object" - }, - "TxPoolIds": { - "description": "Array of transaction ids", - "properties": { - "pending": { - "description": "Pending transaction ids", - "items": { - "$ref": "#/components/schemas/H256" - }, - "type": "array" - }, - "proposed": { - "description": "Proposed transaction ids", - "items": { - "$ref": "#/components/schemas/H256" - }, - "type": "array" - } - }, - "required": [ - "pending", - "proposed" - ], - "type": "object" - }, - "TxPoolInfo": { - "description": "Transaction pool information.", - "properties": { - "last_txs_updated_at": { - "$ref": "#/components/schemas/Uint64", - "description": "Last updated time. This is the Unix timestamp in milliseconds." - }, - "max_tx_pool_size": { - "$ref": "#/components/schemas/Uint64", - "description": "Total limit on the size of transactions in the tx-pool" - }, - "min_fee_rate": { - "$ref": "#/components/schemas/Uint64", - "description": "Fee rate threshold. The pool rejects transactions which fee rate is below this threshold.\n\nThe unit is Shannons per 1000 bytes transaction serialization size in the block." - }, - "min_rbf_rate": { - "$ref": "#/components/schemas/Uint64", - "description": "RBF rate threshold.\n\nThe pool reject to replace for transactions which fee rate is below this threshold. if min_rbf_rate > min_fee_rate then RBF is enabled on the node.\n\nThe unit is Shannons per 1000 bytes transaction serialization size in the block." - }, - "orphan": { - "$ref": "#/components/schemas/Uint64", - "description": "Count of orphan transactions.\n\nAn orphan transaction has an input cell from the transaction which is neither in the chain nor in the transaction pool." - }, - "pending": { - "$ref": "#/components/schemas/Uint64", - "description": "Count of transactions in the pending state.\n\nThe pending transactions must be proposed in a new block first." - }, - "proposed": { - "$ref": "#/components/schemas/Uint64", - "description": "Count of transactions in the proposed state.\n\nThe proposed transactions are ready to be committed in the new block after the block `tip_hash`." - }, - "tip_hash": { - "$ref": "#/components/schemas/H256", - "description": "The associated chain tip block hash.\n\nThe transaction pool is stateful. It manages the transactions which are valid to be committed after this block." - }, - "tip_number": { - "$ref": "#/components/schemas/Uint64", - "description": "The block number of the block `tip_hash`." - }, - "total_tx_cycles": { - "$ref": "#/components/schemas/Uint64", - "description": "Total consumed VM cycles of all the transactions in the pool (excluding orphan transactions)." - }, - "total_tx_size": { - "$ref": "#/components/schemas/Uint64", - "description": "Total count of transactions in the pool of all the different kinds of states (excluding orphan transactions)." - }, - "tx_size_limit": { - "$ref": "#/components/schemas/Uint64", - "description": "Limiting transactions to tx_size_limit\n\nTransactions with a large size close to the block size limit may not be packaged, because the block header and cellbase are occupied, so the tx-pool is limited to accepting transaction up to tx_size_limit." - } - }, - "required": [ - "last_txs_updated_at", - "max_tx_pool_size", - "min_fee_rate", - "min_rbf_rate", - "orphan", - "pending", - "proposed", - "tip_hash", - "tip_number", - "total_tx_cycles", - "total_tx_size", - "tx_size_limit" - ], - "type": "object" - }, - "Uint32": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "Uint64": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - } - } - }, - "info": { - "description": " RPC Module Pool for transaction memory pool.", - "title": "pool_rpc", - "version": "0.115.0-pre" - }, - "methods": [ - { - "description": " Submits a new transaction into the transaction pool. If the transaction is already in the\n pool, rebroadcast it to peers.\n\n Please note that `send_transaction` is an asynchronous process.\n The return of `send_transaction` does NOT indicate that the transaction have been fully verified.\n If you want to track the status of the transaction, please use the `get_transaction`rpc.\n\n ## Params\n\n * `transaction` - The transaction.\n * `outputs_validator` - Validates the transaction outputs before entering the tx-pool. (**Optional**, default is \"passthrough\").\n\n ## Errors\n\n * [`PoolRejectedTransactionByOutputsValidator (-1102)`](../enum.RPCError.html#variant.PoolRejectedTransactionByOutputsValidator) - The transaction is rejected by the validator specified by `outputs_validator`. If you really want to send transactions with advanced scripts, please set `outputs_validator` to \"passthrough\".\n * [`PoolRejectedTransactionByMinFeeRate (-1104)`](../enum.RPCError.html#variant.PoolRejectedTransactionByMinFeeRate) - The transaction fee rate must be greater than or equal to the config option `tx_pool.min_fee_rate`.\n * [`PoolRejectedTransactionByMaxAncestorsCountLimit (-1105)`](../enum.RPCError.html#variant.PoolRejectedTransactionByMaxAncestorsCountLimit) - The ancestors count must be greater than or equal to the config option `tx_pool.max_ancestors_count`.\n * [`PoolIsFull (-1106)`](../enum.RPCError.html#variant.PoolIsFull) - Pool is full.\n * [`PoolRejectedDuplicatedTransaction (-1107)`](../enum.RPCError.html#variant.PoolRejectedDuplicatedTransaction) - The transaction is already in the pool.\n * [`TransactionFailedToResolve (-301)`](../enum.RPCError.html#variant.TransactionFailedToResolve) - Failed to resolve the referenced cells and headers used in the transaction, as inputs or dependencies.\n * [`TransactionFailedToVerify (-302)`](../enum.RPCError.html#variant.TransactionFailedToVerify) - Failed to verify the transaction.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"send_transaction\",\n \"params\": [\n {\n \"cell_deps\": [\n {\n \"dep_type\": \"code\",\n \"out_point\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3\"\n }\n }\n ],\n \"header_deps\": [\n \"0x7978ec7ce5b507cfb52e149e36b1a23f6062ed150503c85bbf825da3599095ed\"\n ],\n \"inputs\": [\n {\n \"previous_output\": {\n \"index\": \"0x0\",\n \"tx_hash\": \"0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17\"\n },\n \"since\": \"0x0\"\n }\n ],\n \"outputs\": [\n {\n \"capacity\": \"0x2540be400\",\n \"lock\": {\n \"code_hash\": \"0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5\",\n \"hash_type\": \"data\",\n \"args\": \"0x\"\n },\n \"type\": null\n }\n ],\n \"outputs_data\": [\n \"0x\"\n ],\n \"version\": \"0x0\",\n \"witnesses\": []\n },\n \"passthrough\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": \"0xa0ef4eb5f4ceeb08a4c8524d84c5da95dce2f608e0ca2ec8091191b0f330c6e3\"\n }\n ```", - "name": "send_transaction", - "params": [ - { - "name": "tx", - "schema": { - "$ref": "#/components/schemas/Transaction" - } - }, - { - "name": "outputs_validator", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/OutputsValidator" - }, - { - "type": "null" - } - ] - } - } - ], - "result": { - "name": "send_transaction", - "schema": { - "$ref": "#/components/schemas/H256" - } - } - }, - { - "description": " Removes a transaction and all transactions which depends on it from tx pool if it exists.\n\n ## Params\n\n * `tx_hash` - Hash of a transaction.\n\n ## Returns\n\n If the transaction exists, return true; otherwise, return false.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"remove_transaction\",\n \"params\": [\n \"0xa0ef4eb5f4ceeb08a4c8524d84c5da95dce2f608e0ca2ec8091191b0f330c6e3\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": true\n }\n ```", - "name": "remove_transaction", - "params": [ - { - "name": "tx_hash", - "schema": { - "$ref": "#/components/schemas/H256" - } - } - ], - "result": { - "name": "remove_transaction", - "schema": { - "type": "boolean" - } - } - }, - { - "description": " Returns the transaction pool information.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"tx_pool_info\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"last_txs_updated_at\": \"0x0\",\n \"min_fee_rate\": \"0x3e8\",\n \"min_rbf_rate\": \"0x5dc\",\n \"max_tx_pool_size\": \"0xaba9500\",\n \"orphan\": \"0x0\",\n \"pending\": \"0x1\",\n \"proposed\": \"0x0\",\n \"tip_hash\": \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\",\n \"tip_number\": \"0x400\",\n \"total_tx_cycles\": \"0x219\",\n \"total_tx_size\": \"0x112\",\n \"tx_size_limit\": \"0x7d000\"\n }\n }\n ```", - "name": "tx_pool_info", - "params": [], - "result": { - "name": "tx_pool_info", - "schema": { - "$ref": "#/components/schemas/TxPoolInfo" - } - } - }, - { - "description": " Removes all transactions from the transaction pool.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"clear_tx_pool\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": null\n }\n ```", - "name": "clear_tx_pool", - "params": [], - "result": { - "name": "clear_tx_pool", - "schema": { - "type": "null" - } - } - }, - { - "description": " Returns all transaction ids in tx pool as a json array of string transaction ids.\n ## Params\n\n * `verbose` - True for a json object, false for array of transaction ids, default=false\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_raw_tx_pool\",\n \"params\": [true]\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\":\n {\n \"pending\": {\n \"0xa0ef4eb5f4ceeb08a4c8524d84c5da95dce2f608e0ca2ec8091191b0f330c6e3\": {\n \"cycles\": \"0x219\",\n \"size\": \"0x112\",\n \"fee\": \"0x16923f7dcf\",\n \"ancestors_size\": \"0x112\",\n \"ancestors_cycles\": \"0x219\",\n \"ancestors_count\": \"0x1\",\n \"timestamp\": \"0x17c983e6e44\"\n }\n },\n \"conflicted\": [],\n \"proposed\": {}\n }\n }\n ```", - "name": "get_raw_tx_pool", - "params": [ - { - "name": "verbose", - "schema": { - "type": [ - "boolean", - "null" - ] - } - } - ], - "result": { - "name": "get_raw_tx_pool", - "schema": { - "$ref": "#/components/schemas/RawTxPool" - } - } - }, - { - "description": " Query and returns the details of a transaction in the pool, only for trouble shooting\n ## Params\n\n * `tx_hash` - Hash of a transaction\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_pool_tx_detail_info\",\n \"params\": [\n \"0xa0ef4eb5f4ceeb08a4c8524d84c5da95dce2f608e0ca2ec8091191b0f330c6e3\"\n ]\n }\n ```\n\n Response\n\n ```json\n {\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"ancestors_count\": \"0x0\",\n \"descendants_count\": \"0x0\",\n \"entry_status\": \"pending\",\n \"pending_count\": \"0x1\",\n \"proposed_count\": \"0x0\",\n \"rank_in_pending\": \"0x1\",\n \"score_sortkey\": {\n \"ancestors_fee\": \"0x16923f7dcf\",\n \"ancestors_weight\": \"0x112\",\n \"fee\": \"0x16923f7dcf\",\n \"weight\": \"0x112\"\n },\n \"timestamp\": \"0x18aa1baa54c\"\n },\n \"id\": 42\n }\n ```", - "name": "get_pool_tx_detail_info", - "params": [ - { - "name": "tx_hash", - "schema": { - "$ref": "#/components/schemas/H256" - } - } - ], - "result": { - "name": "get_pool_tx_detail_info", - "schema": { - "$ref": "#/components/schemas/PoolTxDetailInfo" - } - } - }, - { - "description": " Returns whether tx-pool service is started, ready for request.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"tx_pool_ready\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": true\n }\n ```", - "name": "tx_pool_ready", - "params": [], - "result": { - "name": "tx_pool_ready", - "schema": { - "type": "boolean" - } - } - } - ], - "openrpc": "1.2.6" -} \ No newline at end of file diff --git a/docs/ckb_rpc_openrpc/json/stats_rpc_doc.json b/docs/ckb_rpc_openrpc/json/stats_rpc_doc.json deleted file mode 100644 index 0fbd3832829..00000000000 --- a/docs/ckb_rpc_openrpc/json/stats_rpc_doc.json +++ /dev/null @@ -1,261 +0,0 @@ -{ - "components": { - "schemas": { - "AlertMessage": { - "description": "An alert sent by RPC `send_alert`.", - "properties": { - "id": { - "$ref": "#/components/schemas/Uint32", - "description": "The unique alert ID." - }, - "message": { - "description": "Alert message.", - "type": "string" - }, - "notice_until": { - "$ref": "#/components/schemas/Uint64", - "description": "The alert is expired after this timestamp." - }, - "priority": { - "$ref": "#/components/schemas/Uint32", - "description": "Alerts are sorted by priority, highest first." - } - }, - "required": [ - "id", - "message", - "notice_until", - "priority" - ], - "type": "object" - }, - "ChainInfo": { - "description": "Chain information.", - "properties": { - "alerts": { - "description": "Active alerts stored in the local node.", - "items": { - "$ref": "#/components/schemas/AlertMessage" - }, - "type": "array" - }, - "chain": { - "description": "The network name.\n\nExamples:\n\n* \"ckb\" - Mirana the mainnet.\n* \"ckb_testnet\" - Pudge the testnet.", - "type": "string" - }, - "difficulty": { - "description": "Current difficulty.\n\nDecoded from the epoch `compact_target`.", - "format": "uint256", - "type": "string" - }, - "epoch": { - "$ref": "#/components/schemas/Uint64", - "description": "The epoch information of tip block in the chain." - }, - "is_initial_block_download": { - "description": "Whether the local node is in IBD, Initial Block Download.\n\nWhen a node starts and its chain tip timestamp is far behind the wall clock, it will enter the IBD until it catches up the synchronization.\n\nDuring IBD, the local node only synchronizes the chain with one selected remote node and stops responding the most P2P requests.", - "type": "boolean" - }, - "median_time": { - "$ref": "#/components/schemas/Uint64", - "description": "The median time of the last 37 blocks, including the tip block." - } - }, - "required": [ - "alerts", - "chain", - "difficulty", - "epoch", - "is_initial_block_download", - "median_time" - ], - "type": "object" - }, - "DeploymentInfo": { - "description": "An object containing various state info regarding deployments of consensus changes", - "properties": { - "bit": { - "description": "determines which bit in the `version` field of the block is to be used to signal the softfork lock-in and activation. It is chosen from the set {0,1,2,...,28}.", - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "min_activation_epoch": { - "$ref": "#/components/schemas/Uint64", - "description": "specifies the epoch at which the softfork is allowed to become active." - }, - "period": { - "$ref": "#/components/schemas/Uint64", - "description": "the length in epochs of the signalling period" - }, - "since": { - "$ref": "#/components/schemas/Uint64", - "description": "The first epoch which the current state applies" - }, - "start": { - "$ref": "#/components/schemas/Uint64", - "description": "specifies the first epoch in which the bit gains meaning." - }, - "state": { - "$ref": "#/components/schemas/DeploymentState", - "description": "With each epoch and softfork, we associate a deployment state. The possible states are:\n\n* `DEFINED` is the first state that each softfork starts. The blocks of 0 epoch is by definition in this state for each deployment.\n* `STARTED` for all blocks reach or past the start_epoch.\n* `LOCKED_IN` for one period after the first period with STARTED blocks of which at least threshold has the associated bit set in version.\n* `ACTIVE` for all blocks after the LOCKED_IN period.\n* `FAILED` for all blocks after the timeout_epoch, if LOCKED_IN was not reached." - }, - "threshold": { - "$ref": "#/components/schemas/Ratio", - "description": "the ratio of blocks with the version bit set required to activate the feature" - }, - "timeout": { - "$ref": "#/components/schemas/Uint64", - "description": "specifies an epoch at which the miner signaling ends. Once this epoch has been reached, if the softfork has not yet locked_in (excluding this epoch block's bit state), the deployment is considered failed on all descendants of the block." - } - }, - "required": [ - "bit", - "min_activation_epoch", - "period", - "since", - "start", - "state", - "threshold", - "timeout" - ], - "type": "object" - }, - "DeploymentState": { - "description": "The possible softfork deployment state", - "oneOf": [ - { - "description": "First state that each softfork starts. The 0 epoch is by definition in this state for each deployment.", - "enum": [ - "defined" - ], - "type": "string" - }, - { - "description": "For epochs past the `start` epoch.", - "enum": [ - "started" - ], - "type": "string" - }, - { - "description": "For one epoch after the first epoch period with STARTED epochs of which at least `threshold` has the associated bit set in `version`.", - "enum": [ - "locked_in" - ], - "type": "string" - }, - { - "description": "For all epochs after the LOCKED_IN epoch.", - "enum": [ - "active" - ], - "type": "string" - }, - { - "description": "For one epoch period past the `timeout_epoch`, if LOCKED_IN was not reached.", - "enum": [ - "failed" - ], - "type": "string" - } - ] - }, - "DeploymentsInfo": { - "description": "Chain information.", - "properties": { - "deployments": { - "additionalProperties": { - "$ref": "#/components/schemas/DeploymentInfo" - }, - "description": "`{ [ key:` [`DeploymentPos`](#type-deploymentpos) `]: ` [`DeploymentInfo`](#type-deploymentinfo) `}` deployments info", - "type": "object" - }, - "epoch": { - "$ref": "#/components/schemas/Uint64", - "description": "requested block epoch" - }, - "hash": { - "$ref": "#/components/schemas/H256", - "description": "requested block hash" - } - }, - "required": [ - "deployments", - "epoch", - "hash" - ], - "type": "object" - }, - "H256": { - "description": "The 32-byte fixed-length binary data.\n\nThe name comes from the number of bits in the data.\n\nIn JSONRPC, it is encoded as a 0x-prefixed hex string.", - "items": { - "format": "uint8", - "minimum": 0.0, - "type": "integer" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "Ratio": { - "description": "Represents the ratio `numerator / denominator`, where `numerator` and `denominator` are both unsigned 64-bit integers.", - "properties": { - "denom": { - "$ref": "#/components/schemas/Uint64", - "description": "Denominator." - }, - "numer": { - "$ref": "#/components/schemas/Uint64", - "description": "Numerator." - } - }, - "required": [ - "denom", - "numer" - ], - "type": "object" - }, - "Uint32": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "Uint64": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - } - } - }, - "info": { - "description": " RPC Module Stats for getting various statistic data.", - "title": "stats_rpc", - "version": "0.115.0-pre" - }, - "methods": [ - { - "description": " Returns statistics about the chain.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_blockchain_info\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"alerts\": [\n {\n \"id\": \"0x2a\",\n \"message\": \"An example alert message!\",\n \"notice_until\": \"0x24bcca57c00\",\n \"priority\": \"0x1\"\n }\n ],\n \"chain\": \"ckb\",\n \"difficulty\": \"0x1f4003\",\n \"epoch\": \"0x7080018000001\",\n \"is_initial_block_download\": true,\n \"median_time\": \"0x5cd2b105\"\n }\n }\n ```", - "name": "get_blockchain_info", - "params": [], - "result": { - "name": "get_blockchain_info", - "schema": { - "$ref": "#/components/schemas/ChainInfo" - } - } - }, - { - "description": " Returns statistics about the chain.\n\n ## Examples\n\n Request\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"method\": \"get_deployments_info\",\n \"params\": []\n }\n ```\n\n Response\n\n ```json\n {\n \"id\": 42,\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"epoch\": \"0x1\",\n \"hash\": \"0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40\",\n \"deployments\": {\n \"testdummy\": {\n \"bit\": 1,\n \"min_activation_epoch\": \"0x0\",\n \"period\": \"0xa\",\n \"since\": \"0x0\",\n \"start\": \"0x0\",\n \"state\": \"failed\",\n \"timeout\": \"0x0\",\n \"threshold\": {\n \"numer\": \"0x3\",\n \"denom\": \"0x4\"\n }\n }\n }\n }\n }\n ```", - "name": "get_deployments_info", - "params": [], - "result": { - "name": "get_deployments_info", - "schema": { - "$ref": "#/components/schemas/DeploymentsInfo" - } - } - } - ], - "openrpc": "1.2.6" -} \ No newline at end of file diff --git a/docs/ckb_rpc_openrpc/json/subscription_rpc_doc.json b/docs/ckb_rpc_openrpc/json/subscription_rpc_doc.json deleted file mode 100644 index e15e9bd3768..00000000000 --- a/docs/ckb_rpc_openrpc/json/subscription_rpc_doc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "components": { - "schemas": {} - }, - "info": { - "description": " RPC Module Subscription that CKB node will push new messages to subscribers, support with WebSocket or TCP.\n\n RPC subscriptions require a full duplex connection. CKB offers such connections in the form of\n TCP (enable with `rpc.tcp_listen_address` configuration option) and WebSocket (enable with\n `rpc.ws_listen_address`).\n\n ###### Examples\n\n TCP RPC subscription:\n\n ```bash\n telnet localhost 18114\n > {\"id\": 2, \"jsonrpc\": \"2.0\", \"method\": \"subscribe\", \"params\": [\"new_tip_header\"]}\n < {\"jsonrpc\":\"2.0\",\"result\":\"0x0\",\"id\":2}\n < {\"jsonrpc\":\"2.0\",\"method\":\"subscribe\",\"params\":{\"result\":\"...block header json...\",\n\"subscription\":0}}\n < {\"jsonrpc\":\"2.0\",\"method\":\"subscribe\",\"params\":{\"result\":\"...block header json...\",\n\"subscription\":0}}\n < ...\n > {\"id\": 2, \"jsonrpc\": \"2.0\", \"method\": \"unsubscribe\", \"params\": [\"0x0\"]}\n < {\"jsonrpc\":\"2.0\",\"result\":true,\"id\":2}\n ```\n\n WebSocket RPC subscription:\n\n ```javascript\n let socket = new WebSocket(\"ws://localhost:28114\")\n\n socket.onmessage = function(event) {\n console.log(`Data received from server: ${event.data}`);\n }\n\n socket.send(`{\"id\": 2, \"jsonrpc\": \"2.0\", \"method\": \"subscribe\", \"params\": [\"new_tip_header\"]}`)\n\n socket.send(`{\"id\": 2, \"jsonrpc\": \"2.0\", \"method\": \"unsubscribe\", \"params\": [\"0x0\"]}`)\n ```", - "title": "subscription_rpc", - "version": "0.115.0-pre" - }, - "methods": [], - "openrpc": "1.2.6" -} \ No newline at end of file diff --git a/rpc/README.md b/rpc/README.md index 90221e582ed..777eebe4b67 100644 --- a/rpc/README.md +++ b/rpc/README.md @@ -31,28 +31,11 @@ The crate `ckb-rpc`'s minimum supported rustc version is 1.71.1. * [RPC Methods](#rpc-methods) -<<<<<<< HEAD -<<<<<<< HEAD * [Module Alert](#module-alert) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Alert&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/alert_rpc_doc.json) * [Method `send_alert`](#alert-send_alert) * [Module Chain](#module-chain) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Chain&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/chain_rpc_doc.json) -======= - * [Module Alert](#module-alert) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Alert&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/alert_rpc_doc.json) - * [Method `send_alert`](#alert-send_alert) - * [Module Chain](#module-chain) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Chain&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/chain_rpc_doc.json) ->>>>>>> ec3613cbb (updat readme) -======= - * [Module Alert](#module-alert) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Alert&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/alert_rpc_doc.json) - * [Method `send_alert`](#alert-send_alert) - * [Module Chain](#module-chain) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Chain&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/chain_rpc_doc.json) -======= - * [Module Alert](#module-alert) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Alert&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/alert_rpc_doc.json) - * [Method `send_alert`](#alert-send_alert) - * [Module Chain](#module-chain) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Chain&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/chain_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) * [Method `get_block`](#chain-get_block) * [Method `get_block_by_number`](#chain-get_block_by_number) * [Method `get_header`](#chain-get_header) @@ -76,8 +59,6 @@ The crate `ckb-rpc`'s minimum supported rustc version is 1.71.1. * [Method `estimate_cycles`](#chain-estimate_cycles) * [Method `get_fee_rate_statics`](#chain-get_fee_rate_statics) * [Method `get_fee_rate_statistics`](#chain-get_fee_rate_statistics) -<<<<<<< HEAD -<<<<<<< HEAD * [Module Debug](#module-debug) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Debug&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/debug_rpc_doc.json) * [Method `jemalloc_profiling_dump`](#debug-jemalloc_profiling_dump) @@ -89,48 +70,12 @@ The crate `ckb-rpc`'s minimum supported rustc version is 1.71.1. * [Method `calculate_dao_maximum_withdraw`](#experiment-calculate_dao_maximum_withdraw) * [Module Indexer](#module-indexer) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Indexer&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/indexer_rpc_doc.json) -======= -======= ->>>>>>> ca27e40c7 (clean up logs) - * [Module Debug](#module-debug) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Debug&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/debug_rpc_doc.json) - * [Method `jemalloc_profiling_dump`](#debug-jemalloc_profiling_dump) - * [Method `update_main_logger`](#debug-update_main_logger) - * [Method `set_extra_logger`](#debug-set_extra_logger) - * [Module Experiment](#module-experiment) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Experiment&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/experiment_rpc_doc.json) - * [Method `dry_run_transaction`](#experiment-dry_run_transaction) - * [Method `calculate_dao_maximum_withdraw`](#experiment-calculate_dao_maximum_withdraw) - * [Module Indexer](#module-indexer) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Indexer&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/indexer_rpc_doc.json) -<<<<<<< HEAD ->>>>>>> ec3613cbb (updat readme) -======= -======= - * [Module Debug](#module-debug) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Debug&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/debug_rpc_doc.json) - * [Method `jemalloc_profiling_dump`](#debug-jemalloc_profiling_dump) - * [Method `update_main_logger`](#debug-update_main_logger) - * [Method `set_extra_logger`](#debug-set_extra_logger) - * [Module Experiment](#module-experiment) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Experiment&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/experiment_rpc_doc.json) - * [Method `dry_run_transaction`](#experiment-dry_run_transaction) - * [Method `calculate_dao_maximum_withdraw`](#experiment-calculate_dao_maximum_withdraw) - * [Module Indexer](#module-indexer) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Indexer&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/indexer_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) * [Method `get_indexer_tip`](#indexer-get_indexer_tip) * [Method `get_cells`](#indexer-get_cells) * [Method `get_transactions`](#indexer-get_transactions) * [Method `get_cells_capacity`](#indexer-get_cells_capacity) -<<<<<<< HEAD -<<<<<<< HEAD * [Module Integration_test](#module-integration_test) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Integration_test&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/integration_test_rpc_doc.json) -======= - * [Module Integration_test](#module-integration_test) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Integration_test&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/integration_test_rpc_doc.json) ->>>>>>> ec3613cbb (updat readme) -======= - * [Module Integration_test](#module-integration_test) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Integration_test&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/integration_test_rpc_doc.json) -======= - * [Module Integration_test](#module-integration_test) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Integration_test&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/integration_test_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) * [Method `process_block_without_verify`](#integration_test-process_block_without_verify) * [Method `truncate`](#integration_test-truncate) * [Method `generate_block`](#integration_test-generate_block) @@ -138,31 +83,12 @@ The crate `ckb-rpc`'s minimum supported rustc version is 1.71.1. * [Method `notify_transaction`](#integration_test-notify_transaction) * [Method `generate_block_with_template`](#integration_test-generate_block_with_template) * [Method `calculate_dao_field`](#integration_test-calculate_dao_field) -<<<<<<< HEAD -<<<<<<< HEAD * [Module Miner](#module-miner) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Miner&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/miner_rpc_doc.json) * [Method `get_block_template`](#miner-get_block_template) * [Method `submit_block`](#miner-submit_block) * [Module Net](#module-net) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Net&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/net_rpc_doc.json) -======= -======= ->>>>>>> ca27e40c7 (clean up logs) - * [Module Miner](#module-miner) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Miner&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/miner_rpc_doc.json) - * [Method `get_block_template`](#miner-get_block_template) - * [Method `submit_block`](#miner-submit_block) - * [Module Net](#module-net) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Net&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/net_rpc_doc.json) -<<<<<<< HEAD ->>>>>>> ec3613cbb (updat readme) -======= -======= - * [Module Miner](#module-miner) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Miner&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/miner_rpc_doc.json) - * [Method `get_block_template`](#miner-get_block_template) - * [Method `submit_block`](#miner-submit_block) - * [Module Net](#module-net) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Net&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/net_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) * [Method `local_node_info`](#net-local_node_info) * [Method `get_peers`](#net-get_peers) * [Method `get_banned_addresses`](#net-get_banned_addresses) @@ -173,19 +99,8 @@ The crate `ckb-rpc`'s minimum supported rustc version is 1.71.1. * [Method `add_node`](#net-add_node) * [Method `remove_node`](#net-remove_node) * [Method `ping_peers`](#net-ping_peers) -<<<<<<< HEAD -<<<<<<< HEAD * [Module Pool](#module-pool) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Pool&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/pool_rpc_doc.json) -======= - * [Module Pool](#module-pool) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Pool&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/pool_rpc_doc.json) ->>>>>>> ec3613cbb (updat readme) -======= - * [Module Pool](#module-pool) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Pool&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/pool_rpc_doc.json) -======= - * [Module Pool](#module-pool) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Pool&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/pool_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) * [Method `send_transaction`](#pool-send_transaction) * [Method `remove_transaction`](#pool-remove_transaction) * [Method `tx_pool_info`](#pool-tx_pool_info) @@ -193,31 +108,12 @@ The crate `ckb-rpc`'s minimum supported rustc version is 1.71.1. * [Method `get_raw_tx_pool`](#pool-get_raw_tx_pool) * [Method `get_pool_tx_detail_info`](#pool-get_pool_tx_detail_info) * [Method `tx_pool_ready`](#pool-tx_pool_ready) -<<<<<<< HEAD -<<<<<<< HEAD * [Module Stats](#module-stats) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Stats&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/stats_rpc_doc.json) * [Method `get_blockchain_info`](#stats-get_blockchain_info) * [Method `get_deployments_info`](#stats-get_deployments_info) * [Module Subscription](#module-subscription) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Subscription&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/subscription_rpc_doc.json) -======= -======= ->>>>>>> ca27e40c7 (clean up logs) - * [Module Stats](#module-stats) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Stats&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/stats_rpc_doc.json) - * [Method `get_blockchain_info`](#stats-get_blockchain_info) - * [Method `get_deployments_info`](#stats-get_deployments_info) - * [Module Subscription](#module-subscription) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Subscription&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/subscription_rpc_doc.json) -<<<<<<< HEAD ->>>>>>> ec3613cbb (updat readme) -======= -======= - * [Module Stats](#module-stats) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Stats&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/stats_rpc_doc.json) - * [Method `get_blockchain_info`](#stats-get_blockchain_info) - * [Method `get_deployments_info`](#stats-get_deployments_info) - * [Module Subscription](#module-subscription) [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Subscription&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/subscription_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) * [Method `subscribe`](#subscription-subscribe) * [Method `unsubscribe`](#subscription-unsubscribe) * [RPC Types](#rpc-types) @@ -337,19 +233,8 @@ The crate `ckb-rpc`'s minimum supported rustc version is 1.71.1. ## RPC Modules ### Module `Alert` -<<<<<<< HEAD -<<<<<<< HEAD - [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Alert&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/alert_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Alert&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/alert_rpc_doc.json) ->>>>>>> ec3613cbb (updat readme) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Alert&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/alert_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Alert&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/alert_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) RPC Module Alert for network alerts. @@ -415,19 +300,8 @@ Response ``` ### Module `Chain` -<<<<<<< HEAD -<<<<<<< HEAD - [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Chain&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/chain_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Chain&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/chain_rpc_doc.json) ->>>>>>> ec3613cbb (updat readme) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Chain&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/chain_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Chain&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/chain_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) RPC Module Chain for methods related to the canonical chain. @@ -2067,19 +1941,8 @@ Response ``` ### Module `Debug` -<<<<<<< HEAD -<<<<<<< HEAD - [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Debug&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/debug_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Debug&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/debug_rpc_doc.json) ->>>>>>> ec3613cbb (updat readme) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Debug&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/debug_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Debug&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/debug_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) RPC Module Debug for internal RPC methods. @@ -2125,19 +1988,8 @@ they only append logs to their log files. Removes the logger when this is null. ### Module `Experiment` -<<<<<<< HEAD -<<<<<<< HEAD - [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Experiment&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/experiment_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Experiment&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/experiment_rpc_doc.json) ->>>>>>> ec3613cbb (updat readme) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Experiment&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/experiment_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Experiment&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/experiment_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) RPC Module Experiment for experimenting methods. @@ -2291,19 +2143,8 @@ Response ``` ### Module `Indexer` -<<<<<<< HEAD -<<<<<<< HEAD - [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Indexer&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/indexer_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Indexer&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/indexer_rpc_doc.json) ->>>>>>> ec3613cbb (updat readme) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Indexer&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/indexer_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Indexer&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/indexer_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) RPC Module Indexer. @@ -3185,19 +3026,8 @@ Response ``` ### Module `Integration_test` -<<<<<<< HEAD -<<<<<<< HEAD - [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Integration_test&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/integration_test_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Integration_test&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/integration_test_rpc_doc.json) ->>>>>>> ec3613cbb (updat readme) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Integration_test&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/integration_test_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Integration_test&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/integration_test_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) RPC for Integration Test. @@ -3698,19 +3528,8 @@ Response ``` ### Module `Miner` -<<<<<<< HEAD -<<<<<<< HEAD - [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Miner&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/miner_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Miner&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/miner_rpc_doc.json) ->>>>>>> ec3613cbb (updat readme) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Miner&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/miner_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Miner&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/miner_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) RPC Module Miner for miners. @@ -3926,19 +3745,8 @@ Response ``` ### Module `Net` -<<<<<<< HEAD -<<<<<<< HEAD - [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Net&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/net_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Net&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/net_rpc_doc.json) ->>>>>>> ec3613cbb (updat readme) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Net&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/net_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Net&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/net_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) RPC Module Net for P2P network. @@ -4495,19 +4303,8 @@ Response ``` ### Module `Pool` -<<<<<<< HEAD -<<<<<<< HEAD - [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Pool&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/pool_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Pool&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/pool_rpc_doc.json) ->>>>>>> ec3613cbb (updat readme) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Pool&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/pool_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Pool&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/pool_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) RPC Module Pool for transaction memory pool. @@ -4851,19 +4648,8 @@ Response ``` ### Module `Stats` -<<<<<<< HEAD -<<<<<<< HEAD - [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Stats&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/nervosnetwork/ckb-rpc-resources/develop/json/stats_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Stats&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/stats_rpc_doc.json) ->>>>>>> ec3613cbb (updat readme) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Stats&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/41c1485f11ead077048ee13886dc95b31a7b27c2/json/stats_rpc_doc.json) -======= -- [👉 OpenRPC spec](http://playground.open-rpc.org/?uiSchema[appBar][ui:title]=CKB-Stats&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:logoUrl]=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/main/ckb-logo.jpg&schemaUrl=https://raw.githubusercontent.com/cryptape/ckb-rpc-resources/be5a07a27084208fd54d6d188380f24ca9a25678/json/stats_rpc_doc.json) ->>>>>>> 9f5bd7d29 (clean up logs) ->>>>>>> ca27e40c7 (clean up logs) RPC Module Stats for getting various statistic data.