@@ -50,6 +50,8 @@ The crate `ckb-rpc`'s minimum supported rustc version is 1.67.1.
50
50
* [ Method ` verify_transaction_proof ` ] ( #method-verify_transaction_proof )
51
51
* [ Method ` get_transaction_and_witness_proof ` ] ( #method-get_transaction_and_witness_proof )
52
52
* [ Method ` verify_transaction_and_witness_proof ` ] ( #method-verify_transaction_and_witness_proof )
53
+ * [ Method ` get_cells_status_proof ` ] ( #method-get_cells_status_proof )
54
+ * [ Method ` verify_cells_status_proof ` ] ( #method-verify_cells_status_proof )
53
55
* [ Method ` get_fork_block ` ] ( #method-get_fork_block )
54
56
* [ Method ` get_consensus ` ] ( #method-get_consensus )
55
57
* [ Method ` get_block_median_time ` ] ( #method-get_block_median_time )
@@ -120,8 +122,10 @@ The crate `ckb-rpc`'s minimum supported rustc version is 1.67.1.
120
122
* [ Type ` CellInfo ` ] ( #type-cellinfo )
121
123
* [ Type ` CellInput ` ] ( #type-cellinput )
122
124
* [ Type ` CellOutput ` ] ( #type-celloutput )
125
+ * [ Type ` CellStatus ` ] ( #type-cellstatus )
123
126
* [ Type ` CellWithStatus ` ] ( #type-cellwithstatus )
124
127
* [ Type ` CellbaseTemplate ` ] ( #type-cellbasetemplate )
128
+ * [ Type ` CellsStatusProof ` ] ( #type-cellsstatusproof )
125
129
* [ Type ` ChainInfo ` ] ( #type-chaininfo )
126
130
* [ Type ` Consensus ` ] ( #type-consensus )
127
131
* [ Type ` Cycle ` ] ( #type-cycle )
@@ -1502,6 +1506,146 @@ Response
1502
1506
```
1503
1507
1504
1508
1509
+ #### Method ` get_cells_status_proof `
1510
+ * ` get_cells_status_proof(out_points, block_hash) `
1511
+ * ` out_points ` : ` Array< ` [ ` OutPoint ` ] ( #type-outpoint ) ` > `
1512
+ * ` block_hash ` : [ ` H256 ` ] ( #type-h256 ) ` | ` ` null `
1513
+ * result: [ ` CellsStatusProof ` ] ( #type-cellsstatusproof )
1514
+
1515
+ Returns a proof of the cells status in the specified block.
1516
+
1517
+ ###### Params
1518
+
1519
+ * ` out_points ` - Cells’ out points to prove
1520
+
1521
+ * ` block_hash ` - An optional parameter, if specified, generate proof for the block with this hash, otherwise use the tip block
1522
+
1523
+ ###### Examples
1524
+
1525
+ Request
1526
+
1527
+
1528
+ ```
1529
+ {
1530
+ "id": 42,
1531
+ "jsonrpc": "2.0",
1532
+ "method": "get_cells_status_proof",
1533
+ "params": [
1534
+ [
1535
+ {
1536
+ "tx_hash": "0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3",
1537
+ "index": "0x0"
1538
+ }
1539
+ ]
1540
+ ]
1541
+ }
1542
+ ```
1543
+
1544
+
1545
+ Response
1546
+
1547
+
1548
+ ```
1549
+ {
1550
+ "id": 42,
1551
+ "jsonrpc": "2.0",
1552
+ "result": {
1553
+ "block_hash": "0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40",
1554
+ "cells_count": "0x3f6",
1555
+ "cells_status": [
1556
+ {
1557
+ "mmr_position": "0x0",
1558
+ "out_point": {
1559
+ "tx_hash": "0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3",
1560
+ "index": "0x0"
1561
+ },
1562
+ "created_by": "0x0",
1563
+ "consumed_by": null
1564
+ }
1565
+ ],
1566
+ "merkle_proof": [
1567
+ "0xdeb75ce5f1a45df88aca9370c01224fcbba5e996b190a8a6ca4b7b3df18b5d42",
1568
+ "0x29deb32dfc73c95d62be24915c5edafc2c0c8e61eda94e6abed78e18f6e1af1b",
1569
+ "0xa936c971f5c59b1a200a6b3f2cc8d11ef099fa7a7b18e5faa5792d8aab3ef6a8",
1570
+ "0x3b98c55e5a8d274c0c5558de7f1c9c2427fddd291ff961b95e3f5e0deffbd717",
1571
+ "0x384b248b63348edc3466016c73cb8657feeccc181c5d73f318dd16b2d59e0305",
1572
+ "0xa173912a34b254a2ebc921f7559c0a777fa556362a6761522a2204bd7b524c7e",
1573
+ "0xaa6a62aa7388c1df92c16d605233e13ed861234bb803cd37ee1112cfe244b94a",
1574
+ "0x9819e43079dad6302e80cc6f0db90cd55aff16dd5380fc461aa02cab19af2d4c",
1575
+ "0x944db3a79017c60da31dddb33f796d196dd5c0209ddb738398f489ac3c2b7159",
1576
+ "0xe4e6bb25e72c3ce034aa02231e42b2c05030495c37e29530ed7c8fc429f902f9"
1577
+ ]
1578
+ }
1579
+ }
1580
+ ```
1581
+
1582
+
1583
+ #### Method ` verify_cells_status_proof `
1584
+ * ` verify_cells_status_proof(proof) `
1585
+ * ` proof ` : [ ` CellsStatusProof ` ] ( #type-cellsstatusproof )
1586
+ * result: ` boolean `
1587
+
1588
+ Verifies that a cells status proof is valid or not.
1589
+
1590
+ ###### Params
1591
+
1592
+ * ` out_points ` - Cells’ out points to prove
1593
+
1594
+ * ` block_hash ` - An optional parameter, if specified, generate proof for the block with this hash, otherwise use the tip block
1595
+
1596
+ ###### Examples
1597
+
1598
+ Request
1599
+
1600
+
1601
+ ```
1602
+ {
1603
+ "id": 42,
1604
+ "jsonrpc": "2.0",
1605
+ "method": "verify_cells_status_proof",
1606
+ "params": [{
1607
+ "block_hash": "0xa5f5c85987a15de25661e5a214f2c1449cd803f071acc7999820f25246471f40",
1608
+ "cells_count": "0x3f6",
1609
+ "cells_status": [
1610
+ {
1611
+ "mmr_position": "0x0",
1612
+ "out_point": {
1613
+ "tx_hash": "0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3",
1614
+ "index": "0x0"
1615
+ },
1616
+ "created_by": "0x0",
1617
+ "consumed_by": null
1618
+ }
1619
+ ],
1620
+ "merkle_proof": [
1621
+ "0xdeb75ce5f1a45df88aca9370c01224fcbba5e996b190a8a6ca4b7b3df18b5d42",
1622
+ "0x29deb32dfc73c95d62be24915c5edafc2c0c8e61eda94e6abed78e18f6e1af1b",
1623
+ "0xa936c971f5c59b1a200a6b3f2cc8d11ef099fa7a7b18e5faa5792d8aab3ef6a8",
1624
+ "0x3b98c55e5a8d274c0c5558de7f1c9c2427fddd291ff961b95e3f5e0deffbd717",
1625
+ "0x384b248b63348edc3466016c73cb8657feeccc181c5d73f318dd16b2d59e0305",
1626
+ "0xa173912a34b254a2ebc921f7559c0a777fa556362a6761522a2204bd7b524c7e",
1627
+ "0xaa6a62aa7388c1df92c16d605233e13ed861234bb803cd37ee1112cfe244b94a",
1628
+ "0x9819e43079dad6302e80cc6f0db90cd55aff16dd5380fc461aa02cab19af2d4c",
1629
+ "0x944db3a79017c60da31dddb33f796d196dd5c0209ddb738398f489ac3c2b7159",
1630
+ "0xe4e6bb25e72c3ce034aa02231e42b2c05030495c37e29530ed7c8fc429f902f9"
1631
+ ]
1632
+ }]
1633
+ }
1634
+ ```
1635
+
1636
+
1637
+ Response
1638
+
1639
+
1640
+ ```
1641
+ {
1642
+ "id": 42,
1643
+ "jsonrpc": "2.0",
1644
+ "result": true
1645
+ }
1646
+ ```
1647
+
1648
+
1505
1649
#### Method ` get_fork_block `
1506
1650
* ` get_fork_block(block_hash, verbosity) `
1507
1651
* ` block_hash ` : [ ` H256 ` ] ( #type-h256 )
@@ -5525,6 +5669,23 @@ The fields of an output cell except the cell data.
5525
5669
The JSON field name is “type”.
5526
5670
5527
5671
5672
+ ### Type ` CellStatus `
5673
+
5674
+ Cell status.
5675
+
5676
+ #### Fields
5677
+
5678
+ ` CellStatus ` is a JSON object with the following fields.
5679
+
5680
+ * ` mmr_position ` : [ ` Uint64 ` ] ( #type-uint64 ) - The position of the leaf node in the MMR.
5681
+
5682
+ * ` out_point ` : [ ` OutPoint ` ] ( #type-outpoint ) - The cell’s out point.
5683
+
5684
+ * ` created_by ` : [ ` BlockNumber ` ] ( #type-blocknumber ) - The block number when the cell was created.
5685
+
5686
+ * ` consumed_by ` : [ ` BlockNumber ` ] ( #type-blocknumber ) ` | ` ` null ` - The block number when the cell was consumed, optional, none if the cell is live.
5687
+
5688
+
5528
5689
### Type ` CellWithStatus `
5529
5690
5530
5691
The JSON view of a cell with its status information.
@@ -5599,6 +5760,23 @@ The cellbase transaction template of the new block for miners.
5599
5760
* ` data ` : [ ` Transaction ` ] ( #type-transaction ) - The cellbase transaction.
5600
5761
5601
5762
5763
+ ### Type ` CellsStatusProof `
5764
+
5765
+ Proof of cells status.
5766
+
5767
+ #### Fields
5768
+
5769
+ ` CellsStatusProof ` is a JSON object with the following fields.
5770
+
5771
+ * ` block_hash ` : [ ` H256 ` ] ( #type-h256 ) - The block hash of the specified block.
5772
+
5773
+ * ` cells_count ` : [ ` Uint64 ` ] ( #type-uint64 ) - The total number of generated cells from genesis block to the specified block, including consumed cells.
5774
+
5775
+ * ` cells_status ` : ` Array< ` [ ` CellStatus ` ] ( #type-cellstatus ) ` > ` - An array of cell status.
5776
+
5777
+ * ` merkle_proof ` : ` Array< ` [ ` H256 ` ] ( #type-h256 ) ` > ` - The merkle proof of the MMR, it is an array of hash digests.
5778
+
5779
+
5602
5780
### Type ` ChainInfo `
5603
5781
5604
5782
Chain information.
@@ -5762,10 +5940,11 @@ An object containing various state info regarding deployments of consensus chang
5762
5940
5763
5941
Deployment name
5764
5942
5765
- ` DeploymentPos ` is equivalent to ` "testdummy" | "light_client" ` .
5943
+ ` DeploymentPos ` is equivalent to ` "testdummy" | "light_client" | "cells_commitments" ` .
5766
5944
5767
5945
* Dummy
5768
5946
* light client protocol
5947
+ * Tranaction output commitments
5769
5948
5770
5949
5771
5950
### Type ` DeploymentState `
0 commit comments