Skip to content

Commit

Permalink
add more types
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Feb 26, 2024
1 parent 264de22 commit 4160c36
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion devtools/doc/rpc-gen/src/syn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ pub(crate) fn visit_for_types() -> Vec<(String, String)> {
let mut finder = CommentFinder {
type_comments: Default::default(),
current_type: None,
types: vec!["JsonBytes".to_string()],
types: vec!["JsonBytes", "IndexerRange"]
.iter()
.map(|&s| s.to_owned())
.collect(),
};
let dir = "util/jsonrpc-types";
for entry in WalkDir::new(dir).follow_links(true).into_iter() {
Expand Down
12 changes: 12 additions & 0 deletions rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ The crate `ckb-rpc`'s minimum supported rustc version is 1.71.1.
* [Type `IndexerOrder`](#type-indexerorder)
* [Type `IndexerPagination_for_IndexerCell`](#type-indexerpagination_for_indexercell)
* [Type `IndexerPagination_for_IndexerTx`](#type-indexerpagination_for_indexertx)
* [Type `IndexerRange`](#type-indexerrange)
* [Type `IndexerScriptType`](#type-indexerscripttype)
* [Type `IndexerSearchKey`](#type-indexersearchkey)
* [Type `IndexerSearchKeyFilter`](#type-indexersearchkeyfilter)
Expand Down Expand Up @@ -5857,6 +5858,17 @@ IndexerPagination wraps objects array and last_cursor to provide paging

* `objects`: `Array<` [`IndexerTx`](#type-indexertx) `>` - objects collection

### Type `IndexerRange`

A array represent (half-open) range bounded inclusively below and exclusively above [start, end).

###### Examples

| JSON | range |
| -------------------------| ---------------------------- |
| ["0x0", "0x2"] | [0, 2) |
| ["0x0", "0x174876e801"] | [0, 100000000001) |

### Type `IndexerScriptType`
ScriptType `Lock` | `Type`

Expand Down

0 comments on commit 4160c36

Please sign in to comment.