Skip to content

Commit f29ff56

Browse files
committed
feat: add exact search mode
1 parent 4b6ed58 commit f29ff56

File tree

4 files changed

+323
-11
lines changed

4 files changed

+323
-11
lines changed

rpc/README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ The crate `ckb-rpc`'s minimum supported rustc version is 1.67.1.
144144
* [Type `IndexerCellsCapacity`](#type-indexercellscapacity)
145145
* [Type `IndexerOrder`](#type-indexerorder)
146146
* [Type `IndexerRange`](#type-indexerrange)
147+
* [Type `IndexerScriptSearchMode`](#type-indexerscriptsearchmode)
147148
* [Type `IndexerScriptType`](#type-indexerscripttype)
148149
* [Type `IndexerSearchKey`](#type-indexersearchkey)
149150
* [Type `IndexerSearchKeyFilter`](#type-indexersearchkeyfilter)
@@ -5961,6 +5962,16 @@ A array represent (half-open) range bounded inclusively below and exclusively ab
59615962

59625963

59635964

5965+
### Type `IndexerScriptSearchMode`
5966+
5967+
IndexerScriptSearchMode represent script search mode, default is prefix search
5968+
5969+
`IndexerScriptSearchMode` is equivalent to `"prefix" | "exact"`.
5970+
5971+
* Mode `prefix` search script with prefix
5972+
* Mode `exact` search script with exact match
5973+
5974+
59645975
### Type `IndexerScriptType`
59655976

59665977
ScriptType `Lock` | `Type`
@@ -5979,10 +5990,12 @@ SearchKey represent indexer support params
59795990

59805991
`IndexerSearchKey` is a JSON object with the following fields.
59815992

5982-
* `script`: [`Script`](#type-script) - Script, supports prefix search
5993+
* `script`: [`Script`](#type-script) - Script
59835994

59845995
* `script_type`: [`IndexerScriptType`](#type-indexerscripttype) - Script Type
59855996

5997+
* `script_search_mode`: [`IndexerScriptSearchMode`](#type-indexerscriptsearchmode) `|` `null` - Script search mode, optional default is `prefix`, means search script with prefix
5998+
59865999
* `filter`: [`IndexerSearchKeyFilter`](#type-indexersearchkeyfilter) `|` `null` - filter cells by following conditions, all conditions are optional
59876000

59886001
* `with_data`: `boolean` `|` `null` - bool, optional default is `true`, if with_data is set to false, the field of returning cell.output_data is null in the result

0 commit comments

Comments
 (0)