diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 0966c69e631..05719c311e4 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -59,6 +59,8 @@ - [Batch Operations](drive/batch-operations.md) - [Cost Tracking](drive/cost-tracking.md) - [Finalize Tasks](drive/finalize-tasks.md) +- [Indexes](drive/indexes.md) +- [Document Count Trees](drive/document-count-trees.md) # Testing diff --git a/book/src/drive/document-count-trees.md b/book/src/drive/document-count-trees.md new file mode 100644 index 00000000000..7efaac29eb9 --- /dev/null +++ b/book/src/drive/document-count-trees.md @@ -0,0 +1,395 @@ +# Document Count Trees + +Counting the documents that match a query used to mean fetching them and calling `.len()`. From protocol v12 (Platform 3.1) onward, document types can opt into a different primary-key tree variant that maintains a running count inside the tree itself, turning `count(*)`-style queries into an O(1) lookup. This chapter explains the three tree variants, how a document type selects one, and the two query endpoints that expose the feature. + +## Why Count Trees Exist + +The default primary-key tree for a document type is a `NormalTree`. To count the documents in it, Drive walks the subtree, deserializes every record, and returns the length of the resulting collection. That is fine for small types but becomes painful as soon as a UI needs "how many widgets are there?" on a contract with millions of widgets. + +GroveDB has two count-aware tree variants. **Both are provable** — the count is committed to the Merkle root in each case — but they differ in *where* counts are stored inside the tree, and that controls which kinds of count queries can be answered without enumerating leaves: + +- `CountTree` — stores a single `u64` count, at the root of the tree. The total document count is one read; any per-subtree count requires walking down to that subtree's root and reading its (separate) tree element. +- `ProvableCountTree` — stores a `u64` count at *every* internal node, not just the root. Each node's count covers everything in the subtree below it, so range queries like "how many items between key A and key B?" or "how many items per value of an indexed property?" can be answered by walking the boundary nodes and summing their pre-computed counts, without touching any leaf. + +GroveDB merk trees are binary — each internal node has exactly a left and a right child: + +*The dashed box is the wrapping `Element` (the "tree" in grovedb terms) and contains the root node of the merk tree. Both variants store the total count on the wrapping element — that's the O(1) field Drive reads for total counts. The difference is what's inside: in a `CountTree` the merk root and the rest of the tree don't carry the count, so only the wrapper has it. In a `ProvableCountTree` the count is *also* stored on the root node itself and on every internal merk-tree node, so it's committed into the merk root hash and provable per-subtree.* + +```mermaid +flowchart LR + subgraph CT ["CountTree"] + direction TB + subgraph CT_ELEM ["Tree element c=3"] + direction TB + A["root"]:::node + end + A --> B["·"]:::node + A --> C["x"]:::leaf + B --> D["x"]:::leaf + B --> E["x"]:::leaf + end + + subgraph PCT ["ProvableCountTree"] + direction TB + subgraph PCT_ELEM ["Tree element c=3"] + direction TB + H["root c=3"]:::countnode + end + H --> I["c=2"]:::countnode + H --> J["c=1"]:::leaf + I --> K["c=1"]:::leaf + I --> L["c=1"]:::leaf + end + + CT ~~~ PCT + + classDef node fill:#6e7681,color:#fff,stroke:#6e7681; + classDef countnode fill:#3fb950,color:#0d1117,stroke:#3fb950,stroke-width:2px; + classDef leaf fill:#21262d,color:#c9d1d9,stroke:#484f58; + + style CT_ELEM fill:none,stroke:#1f6feb,stroke-width:2px,stroke-dasharray: 6 4,color:#1f6feb + style PCT_ELEM fill:none,stroke:#1f6feb,stroke-width:2px,stroke-dasharray: 6 4,color:#1f6feb +``` + +In a `CountTree`, the only count-bearing node is the root. To compute "how many items per value of property `P`?" you'd have to navigate to each value-keyed *subtree* (a separate grovedb tree, not a child node of the binary structure above), read its root count, and pay for a separate proof per read — *N* reads for *N* distinct values. In a `ProvableCountTree`, every internal node along the binary path already carries the count of its left and right subtrees, so a range query like "items in [a, b]" or "items per value of P" walks only the boundary path and sums the pre-committed sub-counts in a single traversal and a single proof. + +A document type opts in via two schema flags: + +- `documentsCountable: true` → primary-key tree is a `CountTree`. Enables O(1) total-count for the document type; sufficient for `GetDocumentsCount`. +- `rangeCountable: true` → primary-key tree is a `ProvableCountTree`. Implies `documentsCountable`. Required for `GetDocumentsSplitCount` to be answerable without enumerating documents (the sub-counts at the split-property level are read from internal nodes). + +## How a Document Type Picks Its Tree Variant + +Selection lives in [`packages/rs-drive/src/drive/document/primary_key_tree_type.rs`](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-drive/src/drive/document/primary_key_tree_type.rs): + +```rust +impl DocumentTypePrimaryKeyTreeType for DocumentTypeRef<'_> { + fn primary_key_tree_type( + &self, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive + .methods + .document + .primary_key_tree_type + { + 0 => { + if self.range_countable() { + Ok(TreeType::ProvableCountTree) + } else if self.documents_countable() { + Ok(TreeType::CountTree) + } else { + Ok(TreeType::NormalTree) + } + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "DocumentTypeRef::primary_key_tree_type".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} +``` + +`primary_key_tree_type()` is the single source of truth — every Drive code path that needs to know which tree variant to read from or write to routes through this helper, including: + +- Contract insert and update (to `CREATE` the right tree element when the document type is added). +- Document insert / delete (to know how to update the count alongside the document). +- Cost estimation (so fees match the variant that will actually be used). + +The contract insert/update paths use three thin `Drive` helpers parallel to the existing `batch_insert_empty_tree` / `batch_insert_empty_sum_tree`: + +- `batch_insert_empty_tree` — NormalTree. +- `batch_insert_empty_count_tree` — CountTree, used when `documents_countable() && !range_countable()`. +- `batch_insert_empty_provable_count_tree` — ProvableCountTree, used when `range_countable()`. + +Each helper goes through `LowLevelDriveOperation::for_known_path_key_empty_*_tree` (or its `_estimated_path_key_*` cousin in cost-estimation paths), so the contract setup, document operations, and proof generation all see the same on-disk shape. + +## Storage-Layout Invariants + +Because the tree variant is fixed at contract-creation time and baked into how the tree element is laid out on disk, two flags are *immutable* across a contract update: + +- Changing `documents_countable` from any state to any other state on a `validate_config` update returns `DocumentTypeUpdateError`. +- Same for `range_countable`. + +Tests pinning these guards live in `packages/rs-dpp/src/data_contract/document_type/methods/validate_update/v0/mod.rs`. Don't relax them: if a `NormalTree`-backed document type were silently switched to `CountTree` mid-contract, every subsequent insert or delete would update a count value attached to a tree element that physically isn't a count tree, leading to grovedb element-shape errors at best and consensus drift at worst. + +## Counting Documents at Query Time + +Two gRPC endpoints expose the feature: + +- `GetDocumentsCount` — total count of documents matching a query, optionally with proof. +- `GetDocumentsSplitCount` — counts split by an index property, again optionally with proof. + +Both endpoints have two underlying paths: + +### No-Prove (Server-Side O(1)) + +When `prove=false`, drive-abci calls into `DriveDocumentCountQuery` (in [`packages/rs-drive/src/query/drive_document_count_query.rs`](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-drive/src/query/drive_document_count_query.rs)). For total counts the path is roughly: + +1. Pick a `CountTree`-typed primary-key index whose properties cover all `Equal` / `In` `WhereClause` predicates (a covering index — see the supported-operators note below). +2. Walk the tree from the root down to the deepest covered level, pushing `prop_name` and `serialize_value_for_key(prop_name, value)` at each step. `Equal` extends one path; `In` clones the current path once per value in its array (a cartesian fork) and the per-branch counts are summed. +3. If every index property was covered: read the `CountTree` element at the resulting path and return its built-in `u64` count. O(1) per branch. +4. If only a prefix was covered: sum the counts of all `CountTree` children at the deepest covered level. + +For split counts the path is similar, but stops at the level *before* the split property, then for each value subtree under the split-property level reads its sub-count and emits a `(key_bytes, count)` entry. The result is wire-formatted as `repeated SplitCountEntry { bytes key; uint64 count }`. + +### Prove (Client-Side Verify-Then-Aggregate) + +When `prove=true`, drive-abci returns a standard `DriveDocumentQuery` proof of the matching documents themselves — there is no signed-count primitive on the wire today. The client then verifies the proof, deserializes the documents, and aggregates locally: + +- For total counts the aggregation is `documents.len() as u64` ([`packages/rs-drive-proof-verifier/src/proof/document_count.rs`](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-drive-proof-verifier/src/proof/document_count.rs)). +- For split counts the aggregation walks each verified document, reads `properties.get(split_property)`, encodes the value via `document_type.serialize_value_for_key(split_property, value, platform_version)` so the byte keys line up with what the no-prove path produces, and increments the per-key counter ([`packages/rs-drive-proof-verifier/src/proof/document_split_count.rs`](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-drive-proof-verifier/src/proof/document_split_count.rs)). + +Because the prove path materializes documents, drive-abci caps it at `u16::MAX` matching documents per request as a defensive bound on response size; result sets larger than that need a covering countable index and `prove=false`. The SDK side (`DocumentCountQuery`/`DocumentSplitCountQuery` → `DriveDocumentQuery`) explicitly clears the underlying `DocumentQuery.limit` so the verifier counts every document in the proof rather than truncating at the caller's pagination limit. + +Aggregation needs the split-property name, but `DriveDocumentQuery` does not carry it. The proof verifier exposes a dedicated entry point that takes it explicitly: + +```rust +DocumentSplitCounts::maybe_from_proof_with_split_property( + drive_query, + split_property, + response, + network, + platform_version, + provider, +) +``` + +The generic `FromProof` impl on `DocumentSplitCounts` is intentionally *not* the way to reach split counts under proof — calling it returns an explicit error. This is a load-bearing design choice: an earlier version of this code silently returned `Some(BTreeMap::new())` from the generic path, so any caller using `prove=true` got a valid-looking but empty result. Erroring loudly forces every caller to thread the split property through. + +### Supported Where Operators + +The no-prove fast path covers two operator shapes today: + +- **`Equal` (`==`)** — single point lookup against the count tree at a fully-resolved index path. +- **`In` (`in`)** — cartesian fork. Each value in the `In` array becomes its own index path; their counts are summed (or, for split counts, merged by split key). An `In` clause with `k` values costs `k` point lookups, not a tree walk. + +Both `find_countable_index_for_where_clauses` (total count) and `find_countable_index_for_split` (split count) accept either operator on any prefix property of a countable index, mixed freely with `Equal` clauses on other prefix properties. + +Range operators (`>`, `<`, `>=`, `<=`, `between*`, `startsWith`) require a boundary walk that the current count `PathQuery` model cannot express. The handlers detect those upfront and return a clear `InvalidArgument` error rather than silently returning a wrong count. Callers that need counts under range predicates should use `prove=true` and aggregate client-side, or pre-aggregate via a separate countable index whose leading columns are the equality / `In` fields. + +## Range Queries and ProvableCountTree + +> Provable count trees will later be able to answer offset-style queries (e.g. "the next 50 items starting after item 7") in O(log n). That capability isn't released yet — if you want offsets in the future, pick a `ProvableCountTree` (`rangeCountable: true`) for that document type now. + +### Why Internal-Node Counts Make Range Counts O(log n) + +In a sorted merk tree the keys partition into a left (smaller) and right (larger) subtree at every internal node. To answer a question like "how many items have a key strictly greater than 7?" you walk the boundary between "below 7" and "above 7" from the root down, and at each step you can decide what to do with the *other* subtree — the one not on the boundary path — based on a single read: + +- If a subtree lies entirely above the cutoff, add its full count and don't descend into it. +- If it lies entirely below, ignore it (contributes 0) and don't descend. +- If it straddles the cutoff, recurse into it (it is then the next step on the boundary path). + +On a `ProvableCountTree` every internal node carries the count of its left and right subtrees, so the "add the full count" step is a single O(1) read of the node we're already touching. The whole walk visits one node per tree level — O(log n) — and every visited node is on the boundary path. The total ends up as a sum of pre-committed sub-counts plus zero or one straddle leaf at the bottom. + +Concretely, picture a `ProvableCountTree` of 8 items with sorted integer keys 1, 3, 5, 7, 9, 11, 13, 15 — three full levels of internal nodes plus a leaf row: + +```mermaid +flowchart TB + R["root c=8"]:::countroot + R --> L1["c=4"]:::countnode + R --> R1["c=4"]:::countnode + L1 --> LL["c=2"]:::countnode + L1 --> LR["c=2"]:::countnode + R1 --> RL["c=2"]:::countnode + R1 --> RR["c=2"]:::countnode + LL --> x1["key=1, c=1"]:::leaf + LL --> x3["key=3, c=1"]:::leaf + LR --> x5["key=5, c=1"]:::leaf + LR --> x7["key=7, c=1"]:::leaf + RL --> x9["key=9, c=1"]:::leaf + RL --> x11["key=11, c=1"]:::leaf + RR --> x13["key=13, c=1"]:::leaf + RR --> x15["key=15, c=1"]:::leaf + + classDef countroot fill:#1f6feb,color:#fff,stroke:#1f6feb,stroke-width:2px; + classDef countnode fill:#3fb950,color:#0d1117,stroke:#3fb950,stroke-width:2px; + classDef leaf fill:#21262d,color:#c9d1d9,stroke:#484f58; +``` + +For "give me the count of items with key > 6": + +- **root (c=8)**: 6 falls inside the left subtree (which holds 1–7). Read both children's sub-counts. Right subtree's keys are all > 6 → take its full `c=4` and don't descend. Recurse into left. +- **left (c=4)**: 6 falls inside its right subtree (which holds 5,7). Read both children. Left-left's keys (1,3) are both ≤ 6 → contribute 0 and don't descend. Recurse into left-right. +- **left-right (c=2)**: 6 splits this leaf-pair. Read both leaves. Key 5 ≤ 6 → contribute 0. Key 7 > 6 → contribute 1. +- Total = 4 (right of root) + 0 (left-left) + 0 (key=5) + 1 (key=7) = **5**. + +We visited 4 internal nodes on the boundary path (root → left → left-right → key=7) and read sub-counts off 3 siblings (right, left-left, key=5) without descending into them. Six of the eight items were never enumerated: their counts were summed straight out of the committed sub-count fields. The walk is O(log n) in tree depth regardless of how many items live under each skipped subtree. + +### Why This Is Provable + +A merk proof of the same boundary walk includes: + +1. The boundary path from root to the leaf adjacent to the cutoff. +2. The siblings of every node on the boundary path (so the verifier can recompute hashes up to the merk root). + +Each sibling node, on a `ProvableCountTree`, ships its committed sub-count alongside its hash. The verifier walks the same logic the server did — "this sibling lies entirely above 7, add its `c=…` value" — and ends up with the same total without enumerating the sibling subtrees. Verification is also O(log n). + +The same primitive answers any range query of the form `[A, B]`: walk to the cutoff at A, then to the cutoff at B, and combine sub-counts along the way. `[A, ∞)` and `(-∞, B]` are special cases. + +## Authoring a Contract That Uses Count Trees + +There are two opt-in surfaces in the document meta-schema. They're independent and can be used together: + +1. **Top-level flags on the document type** control the *primary-key* tree variant — the tree that stores documents keyed by document ID. This is what `GetDocumentsCount` (with no equality predicates) reads. +2. **A per-index `countable: true` flag** controls whether *that specific index's* tree carries counts. This is what enables the no-prove fast path for queries that filter by the index's leading equality columns. + +### Primary-Key Tree Flags + +Set at the same level as `type` / `properties` / `indices` on a document type: + +```json +{ + "widget": { + "type": "object", + "documentsCountable": true, + "properties": { + "name": { "type": "string", "position": 0, "maxLength": 64 }, + "color": { "type": "string", "position": 1, "maxLength": 16 } + }, + "additionalProperties": false + } +} +``` + +That contract gets a `CountTree` for the `widget` primary-key tree. `GetDocumentsCount` for `widget` with no `where` filter is now an O(1) lookup of the tree element's count value. + +To opt into a `ProvableCountTree` instead — required if you want today's `GetDocumentsSplitCount` over an index property, and what you'd pick today if you want offset-style range queries to work later — set `rangeCountable: true`. It implies `documentsCountable`, so you don't need both: + +```json +{ + "widget": { + "type": "object", + "rangeCountable": true, + "properties": { + "name": { "type": "string", "position": 0, "maxLength": 64 }, + "color": { "type": "string", "position": 1, "maxLength": 16 } + }, + "additionalProperties": false + } +} +``` + +These two flags are *immutable* across a contract update. You pick the tree variant at contract creation; you can't switch to a different one later without creating a new document type. (See **Storage-Layout Invariants** above.) + +### Per-Index Countable Flag + +Set on a single entry in the document type's `indices` array: + +```json +{ + "widget": { + "type": "object", + "documentsCountable": true, + "properties": { + "name": { "type": "string", "position": 0, "maxLength": 64 }, + "color": { "type": "string", "position": 1, "maxLength": 16 } + }, + "indices": [ + { + "name": "byColor", + "properties": [{ "color": "asc" }], + "countable": true + } + ], + "additionalProperties": false + } +} +``` + +With `byColor.countable: true` the `byColor` index's tree carries counts, so `GetDocumentsCount` with `where: [["color", "==", "red"]]` reaches the count via that index in O(1) instead of falling back to a scan. Without the flag, `find_countable_index_for_where_clauses` will skip this index and the count won't take the fast path. + +The `countable` field accepts three forms: + +| JSON value | Tree variant | Capabilities | +|---|---|---| +| `false` (or omitted, or `"notCountable"`) | `NormalTree` | No count fast path | +| `true` (or `"countable"`) | `CountTree` | O(1) totals at the root | +| `"countableAllowingOffset"` | `ProvableCountTree` | O(1) totals **plus** per-node counts that will enable future O(log n) range / offset queries on this index | + +The boolean `true` / `false` form is kept for back-compat with contracts written before the enum form was introduced; new contracts should prefer the explicit string variants for clarity, especially `"countableAllowingOffset"` when range/offset queries are wanted. + +A few notes about the index-level flag: + +- Setting any countable variant increases storage cost — every insert and delete updates the index tree's count alongside the document. `"countableAllowingOffset"` costs more than plain `"countable"` (every internal node carries count metadata, not just the root). Don't sprinkle it on every index; opt in for the ones you'll actually count by, and use the cheaper variant unless you specifically need the offset capability. +- The flag is on the *whole* index, not per-property. The index handles `count(*)` queries whose equality `where` clauses cover the index's properties **exactly**, in order. A `["color", "size"]` countable index gives you O(1) counts for `WHERE color = X AND size = Y` — but for `WHERE color = X` alone (only the leading prefix matched) the count is computed by walking every distinct-`size` bucket under `color = X` and summing their counts. That works and avoids document enumeration, but it scales with the cardinality of `size`, not constant time. If single-column `WHERE color = X` counts are a hot path, add a separate `["color"]` countable index. +- Index-level countable is independent of the primary-key flags. You can have `documentsCountable: true` on the document type AND `countable: true` on a specific index — the first gives you fast totals, the second gives you fast filtered counts that match that index. +- **`countable` on a `unique` index is mostly a no-op, but not always.** A unique index stores its terminal as a bare reference at key `[0]` rather than wrapping it in a count tree, so for documents whose indexed fields are *all* non-null the flag has no storage effect — insertion bypasses the count-tree code entirely. It does still do meaningful work for **null-bearing** entries: when a document has any null value among the indexed properties, insertion takes the same count-tree branch a non-unique index uses (because uniqueness can't be enforced on null), and the count tree at that path aggregates them. So `countable` on a unique index is worth setting when at least one of the indexed properties is optional in the schema and you expect null values; otherwise it's an inert flag. Counts on all-non-null exact matches still return correctly (1 if present, 0 if not) because the on-disk reference reads as count 1 via grovedb's default-aggregate semantics. + +### Choosing What to Set + +| You want | Set | +|---|---| +| Fast `count(*)` for the whole document type | `documentsCountable: true` on the document type | +| O(1) filtered count: `count(*) WHERE col = X` | `documentsCountable: true` (or `rangeCountable: true`) at the type level **plus** `countable: true` on an index whose properties are exactly `["col"]`. A composite index whose leading column is `col` (e.g. `["col", "other"]`) still answers the query, but as O(distinct values of `other`) instead of O(1). | +| Per-distinct-value sub-counts via `GetDocumentsSplitCount` | `rangeCountable: true` on the document type **plus** an index whose leading columns cover any equality `where` predicates and whose next column is the split property | +| Future offset-style range queries (not yet released — see above) | `rangeCountable: true` on the document type | +| Nothing count-aware (default) | Don't set any of these flags. Primary-key tree stays a `NormalTree`. | + +A migration check from `dapi-grpc` server logic: if you ask for `GetDocumentsCount` with a `where` clause, the no-prove path needs a covering countable index. If no such index exists for that document type, the call falls back to `prove=true` semantics or returns an error depending on the path you took. Pick your indexes deliberately; a `countable: true` flag is cheap to add at contract creation time and impossible to add later. + +## SDK Access at Three Layers + +### `rs-sdk` (native Rust) + +Both endpoints land on the standard `Fetch` trait: + +```rust +use dash_sdk::platform::documents::document_count_query::DocumentCountQuery; +use dash_sdk::platform::documents::document_split_count_query::DocumentSplitCountQuery; +use dash_sdk::platform::Fetch; +use drive_proof_verifier::{DocumentCount, DocumentSplitCounts}; + +let DocumentCount(count) = DocumentCount::fetch( + &sdk, + DocumentCountQuery::new(contract.clone(), "widget")?, +) +.await? +.expect("DocumentCount::fetch always returns a value on success"); + +let DocumentSplitCounts(splits) = DocumentSplitCounts::fetch( + &sdk, + DocumentSplitCountQuery::new(contract, "widget", "color")?, +) +.await? +.expect("DocumentSplitCounts::fetch always returns a value on success"); +``` + +`DocumentCountQuery` and `DocumentSplitCountQuery` wrap an internal `DocumentQuery` (so they reuse where-clause / order-by / contract-id machinery) and expose a `with_where(WhereClause)` builder for filters. Their `TransportRequest` impls target `GetDocumentsCountRequest` / `GetDocumentsSplitCountRequest`; their `FromProof` impls go through the dedicated proof-verifier entry points described above. + +### `wasm-sdk` (browser) + +Four methods on the `WasmSdk` JS class: + +```typescript +sdk.getDocumentsCount(query: DocumentsQuery): Promise; +sdk.getDocumentsCountWithProofInfo( + query: DocumentsQuery, +): Promise>; + +sdk.getDocumentsSplitCount( + query: DocumentsQuery, + splitProperty: string, +): Promise>; +sdk.getDocumentsSplitCountWithProofInfo( + query: DocumentsQuery, + splitProperty: string, +): Promise>>; +``` + +The split-count map's keys are *hex-encoded bytes*. They correspond to the canonical `serialize_value_for_key` encoding of each property value, so callers that need a typed key (`"red"`, `42`, etc.) need to hex-decode and interpret per the contract's index-property type. This shape matches the no-prove server response too, so a caller that wants to merge or compare count maps from both paths doesn't need a transformation step. + +### `rs-sdk-ffi` (iOS / native bindings) + +```rust +dash_sdk_document_count(sdk, data_contract, document_type, where_json) + -> JSON {"count": } + +dash_sdk_document_split_count(sdk, data_contract, document_type, split_property, where_json) + -> JSON {"counts": {"": , ...}} +``` + +`where_json` is the same JSON shape `dash_sdk_document_search` already accepts (`[{field, operator, value}]`), so iOS callers can reuse their where-clause encoding. Both endpoints return their results as a JSON-encoded C string allocated on the heap — caller frees it via the standard SDK string-free routine. diff --git a/book/src/drive/indexes.md b/book/src/drive/indexes.md new file mode 100644 index 00000000000..d0372b4ab47 --- /dev/null +++ b/book/src/drive/indexes.md @@ -0,0 +1,525 @@ +# Indexes + +Drive stores documents in GroveDB. Every document type has a **primary-key tree** (documents keyed by document ID), plus zero or more **secondary indexes** the contract author declares in the document schema. This chapter is a reference for the `Index` struct's fields, what they mean for the on-disk layout, and how Drive walks indexes during inserts and queries. + +## What an Index Is + +A document type's `indices` array tells Drive: "for queries that filter or sort by these properties, build a sorted lookup so they don't have to enumerate every document." Each entry in `indices` becomes one secondary index; Drive maintains it on every insert/update/delete so that queries which match the index prefix are O(prefix walk) rather than O(documents). + +Concrete example. Given: + +```json +{ + "person": { + "type": "object", + "indices": [ + { + "name": "byLastName", + "properties": [{ "lastName": "asc" }] + } + ], + "properties": { + "firstName": { "type": "string", "position": 0 }, + "lastName": { "type": "string", "position": 1 } + }, + "required": ["firstName", "lastName"], + "additionalProperties": false + } +} +``` + +— a query like `where lastName = "Smith"` reaches the matching documents through the `byLastName` index in O(log n) plus the per-result IO. Without that index it would be a full document-type scan. + +## The `Index` Struct + +The compiled-Rust shape — the JSON schema fields are deserialized into this — lives in [`packages/rs-dpp/src/data_contract/document_type/index/mod.rs`](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/data_contract/document_type/index/mod.rs): + +```rust +pub struct Index { + pub name: String, + pub properties: Vec, + pub unique: bool, + pub null_searchable: bool, + pub contested_index: Option, + pub countable: IndexCountability, +} + +pub struct IndexProperty { + pub name: String, + pub ascending: bool, +} +``` + +### `name` + +A short, human-readable identifier for the index (e.g. `"byOwnerAndType"`). It shows up in error messages and is the key used in `document_type.indexes()` (`BTreeMap`). If omitted in the schema, a random alphanumeric name is generated. Two indexes within the same document type cannot share a name. + +### `properties: Vec` + +The ordered list of columns this index covers. Each `IndexProperty` is a `(name, ascending)` pair. Order matters: a query has to match a *prefix* of these properties for the index to be useful. An index `[lastName, firstName]` answers `where lastName = X` and `where lastName = X AND firstName = Y` but **not** `where firstName = Y` alone. + +The schema form is: + +```json +"properties": [ + { "lastName": "asc" }, + { "firstName": "asc" } +] +``` + +`asc` / `desc` controls sort order on result enumeration. Drive currently only uses ascending storage, but the field is preserved through the contract. + +### `unique: bool` + +If `true`, no two documents may share the same combination of values for the indexed properties. The platform enforces this on insert: a duplicate trips a `DuplicateUniqueIndexError` consensus error. + +A unique index changes the on-disk layout at the terminal level: instead of a sub-tree of document references keyed by document ID, the terminal stores a single bare `Reference` element pointing at the one document that matched. See [Tree Type at the Terminal Level](#tree-type-at-the-terminal-level) below. + +Uniqueness can't be enforced when an indexed property is null, so a document with any null in the index path falls back to the non-unique storage shape for that document. See [Null Handling](#null-handling). + +### `null_searchable: bool` + +Defaults to `true`. Controls what happens when **all** indexed properties of a document are null: + +- `null_searchable: true` — the document is still indexed at the all-null path, so a query against the all-null prefix can find it. +- `null_searchable: false` — Drive skips the index insertion entirely. Documents with all-null index values exist (in the primary-key tree) but are not reachable via this index. + +The flag only affects the all-null case. A document with *some* null values gets indexed regardless. + +### `contested_index: Option` + +When set, this index identifies a **scarce, contested resource** (the canonical example is a DPNS name like `dash`). Documents trying to register the same value under a contested index don't auto-fail with a uniqueness error — they enter a masternode-vote resolution where each contender's claim is held until voting concludes. Contested indexes must also be `unique: true`; the parser rejects the combination otherwise. + +Out of scope for this chapter; see DPNS / contested-resource docs for the full lifecycle. + +### `countable: IndexCountability` + +Controls whether the terminal tree under each indexed value carries a count, and which count-tree variant. Three variants: + +| Value | Tree variant | Capabilities | +|---|---|---| +| `NotCountable` (default) | `NormalTree` | No count fast path | +| `Countable` | `CountTree` | O(1) totals at the root | +| `CountableAllowingOffset` | `ProvableCountTree` | O(1) totals **plus** per-node counts that will enable future O(log n) range / offset queries | + +The schema accepts both the legacy boolean form (`true` → `Countable`, `false` → `NotCountable`) and the camelCase string form (`"notCountable"` / `"countable"` / `"countableAllowingOffset"`). For the full design rationale see [Document Count Trees](document-count-trees.md). + +## How Drive Builds the IndexLevel Trie + +The flat list of `Index`es declared on a document type is compiled, at contract-load time, into an `IndexLevel` trie ([`packages/rs-dpp/src/data_contract/document_type/index_level/mod.rs`](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/data_contract/document_type/index_level/mod.rs)): + +```rust +pub struct IndexLevel { + sub_index_levels: BTreeMap, + has_index_with_type: Option, + level_identifier: u64, +} +``` + +Each property name in any index becomes an edge in this trie; indexes that share a prefix share their initial path. An index "terminates" at a level by setting `has_index_with_type = Some(...)` — that's how the recursive insert / lookup code knows it's at the last property of a defined index, vs. just walking through a shared prefix. + +Given two indexes: +- `byOwnerAndType = [ownerId, docType]` +- `byOwnerAndStatus = [ownerId, status]` + +the trie that gets built is: + +```mermaid +flowchart TD + Root["(root)"] + Owner["ownerId
shared prefix"] + DocType["docType
terminates byOwnerAndType
has_index_with_type = Some(...)"] + Status["status
terminates byOwnerAndStatus
has_index_with_type = Some(...)"] + + Root --> Owner + Owner --> DocType + Owner --> Status + + style DocType fill:#e0f7fa,stroke:#006064,color:#000 + style Status fill:#e0f7fa,stroke:#006064,color:#000 +``` + +The `ownerId` level is shared between both indexes. The `docType` and `status` levels each set `has_index_with_type` on themselves with their own `unique` / `countable` / `null_searchable` flags. A third index that *also* started with `ownerId` would attach further sub-levels under `ownerId` instead of duplicating it. + +This trie shape directly mirrors the GroveDB path shape used at insert / query time. + +## GroveDB Layout + +A document under contract `C` of type `T` with index property `propA = vA, propB = vB` lives at the grove path: + +``` +[ DataContractDocuments, contract_id, 1, doc_type_name, + propA_name, vA, propB_name, vB, 0 → ] +``` + +Let's break that down: + +- **`DataContractDocuments`** — root tree byte (`u8` constant) for "this is a document index, not a contract definition or identity record". +- **`contract_id`** — 32-byte contract identifier. +- **`1`** — separator distinguishing the document storage area from the contract definition area within `contract_id`. +- **`doc_type_name`** — UTF-8 bytes of the document type (`"person"`, `"contactRequest"`, etc.). +- **`propA_name, vA, propB_name, vB`** — alternating property key and serialized value, one pair per index property, in declaration order. +- **`0`** — the conventional "terminal slot" byte under each value level; it's where the actual reference (or sub-tree-of-references) lives. + +The intermediate levels (`propA_name`, `vA`, `propB_name`, `vB`) are all `NormalTree`s. The terminal element at `[0]` varies — see the next section. + +Concretely, suppose a `widget-store` contract has document type `widget` with a non-unique countable index `byColor = [color]`, and three documents stored: `A` and `B` with `color = "red"`, `C` with `color = "blue"`. Then drive lays out: + +```mermaid +flowchart TD + R["DataContractDocuments
(root tree byte)"] + CID["widget-store-id
(32 bytes)"] + Sep["1
(documents area)"] + DT["'widget'
(document type)"] + PK["primary-key tree
(docs keyed by ID)
not shown — own subtree"] + Color["'color'
(index property name)"] + Red["'red'
(serialized value)"] + Blue["'blue'"] + RedT["[0]: CountTree
count = 2"] + BlueT["[0]: CountTree
count = 1"] + RA(["doc_id_A
Reference"]) + RB(["doc_id_B
Reference"]) + RC(["doc_id_C
Reference"]) + + R --> CID --> Sep --> DT + DT --> PK + DT --> Color + Color --> Red --> RedT + Color --> Blue --> BlueT + RedT --> RA + RedT --> RB + BlueT --> RC + + classDef countTree fill:#fff4e5,stroke:#bf6900,color:#000 + classDef reference fill:#e8f5e9,stroke:#1b5e20,color:#000 + classDef placeholder fill:#f5f5f5,stroke:#888,color:#000 + class RedT,BlueT countTree + class RA,RB,RC reference + class PK placeholder +``` + +**Legend**: rectangles are tree-type elements (intermediate `NormalTree`s holding sub-keys, terminal `CountTree`s holding per-doc refs); rounded green nodes are `Reference` elements (leaf pointers to documents). Amber highlight marks count-bearing trees specifically. + +A query like `where color = "red"` walks the path down to the `red` value, opens the `[0]` `CountTree`, and either reads `count_value` (for `GetDocumentsCount`) or enumerates the inner references (for `GetDocuments`). Because the count is stored on the wrapping element, the count read is O(1) regardless of how many docs are inside. + +### Shared-Prefix Indexes + +Now extend the same `widget` document type with a `shape` property and a second, compound, countable index `byColorShape = [color, shape]`. The `IndexLevel` trie is: + +```mermaid +flowchart TD + Root["(root)"] + ColorLevel["color
terminates byColor
has_index_with_type = Some(...)
+ sub-level shape"] + ShapeLevel["shape
terminates byColorShape
has_index_with_type = Some(...)"] + + Root --> ColorLevel --> ShapeLevel + + style ColorLevel fill:#e0f7fa,stroke:#006064,color:#000 + style ShapeLevel fill:#e0f7fa,stroke:#006064,color:#000 +``` + +Importantly, `color` is a level that *both* terminates an index (`byColor`) **and** has a sub-level (`shape`) continuing past it. That dual role shows up directly in the on-disk path: at every `[..., color, ]` subtree, key `[0]` (the `byColor` terminal) and key `'shape'` (the continuation into `byColorShape`) live as siblings. + +With three documents — A: `(red, circle)`, B: `(red, square)`, C: `(blue, square)` — the layout is: + +```mermaid +flowchart TD + DT["'widget'
(document type)"] + ColorKey["'color'
(index property)"] + Red["'red'"] + Blue["'blue'"] + + %% byColor terminals (at the color-value level) + RedColorT["[0]: CountTree
count = 2
byColor"] + BlueColorT["[0]: CountTree
count = 1
byColor"] + + %% byColorShape continuation (sibling to [0] under each color value) + RedShape["'shape'"] + BlueShape["'shape'"] + RedCircle["'circle'"] + RedSquare["'square'"] + BlueSquare["'square'"] + + %% byColorShape terminals + RCT["[0]: CountTree
count = 1
byColorShape"] + RST["[0]: CountTree
count = 1
byColorShape"] + BST["[0]: CountTree
count = 1
byColorShape"] + + %% References — each indexed path stores its own reference, so docs appear + %% multiple times across the diagram (same key, same doc id, but a separate + %% Reference element under each terminal that matches the document). + RA1(["doc_id_A
Reference"]) + RB1(["doc_id_B
Reference"]) + RC1(["doc_id_C
Reference"]) + RA2(["doc_id_A
Reference"]) + RB2(["doc_id_B
Reference"]) + RC2(["doc_id_C
Reference"]) + + DT --> ColorKey + ColorKey --> Red + ColorKey --> Blue + + Red --> RedColorT + Red --> RedShape + Blue --> BlueColorT + Blue --> BlueShape + + RedColorT --> RA1 + RedColorT --> RB1 + BlueColorT --> RC1 + + RedShape --> RedCircle + RedShape --> RedSquare + BlueShape --> BlueSquare + + RedCircle --> RCT --> RA2 + RedSquare --> RST --> RB2 + BlueSquare --> BST --> RC2 + + classDef countTree fill:#fff4e5,stroke:#bf6900,color:#000 + classDef reference fill:#e8f5e9,stroke:#1b5e20,color:#000 + class RedColorT,BlueColorT,RCT,RST,BST countTree + class RA1,RB1,RC1,RA2,RB2,RC2 reference +``` + +Two things to notice: + +- **`[0]` and the sub-property name (`'shape'`) are siblings under each color value.** The `[0]` count tree is the `byColor` terminal at that color value; the `'shape'` subtree is the continuation that `byColorShape` walks past for the next index property. Drive descends one or the other depending on which index covers the query. +- **The same document is stored as a separate `Reference` under every index path that matches it.** Doc A appears under `byColor[red]` and under `byColorShape[red, circle]`; doc B under `byColor[red]` and `byColorShape[red, square]`; doc C under `byColor[blue]` and `byColorShape[blue, square]`. That's why each of A, B, C shows up twice in the diagram — once per index that covers the document. Insert/delete touches all of them; queries walk only the one path their picker selected. + +A query like `where color = "red"` resolves through the `byColor` terminal (`[0]` under `red`) — count = 2, O(1). A query like `where color = "red" AND shape = "circle"` resolves through `byColorShape` instead, taking the `'shape'` sub-tree past `red` and reading the terminal under `circle` — count = 1, also O(1). Both queries are served by the same shared-prefix layout, just descending different branches at the `red` node. + +### Range-Countable Indexes + +> **Status: design.** Not yet implemented at the time of writing. Depends on a parallel grovedb change that adds `NonCounted` element variants — element types that behave exactly like their counterparts except that **their count value is not propagated to the parent count tree**, and which are only insertable inside a `CountTree` / `ProvableCountTree` / `CountSumTree` / `ProvableCountSumTree`. + +`range_countable` is a *separate* per-index property from `countable`. Where `countable` makes the count of docs at *one specific value* O(1), `range_countable` makes the count of docs *between two values* O(log n) — answering queries like "how many widgets have a color between `red` and `tomato` alphabetically" without enumerating every distinct color value. + +#### Constraints + +- `range_countable: true` requires `countable` to be `Countable` or `CountableAllowingOffset`. It is additive to countability, not a replacement: range queries are useful only on indexes you'd already want to count by. +- The combination is meaningful only on **non-unique** indexes (or unique indexes whose entries can be null-bearing), for the same reason `countable` is mostly inert on unique-with-required-fields: a unique non-null terminal is a bare `Reference`, with no tree to hang per-node counts off of. +- Sibling sub-trees that share a prefix with a range-countable index — e.g., the `'shape'` continuation when `byColor` is range-countable but `byColorShape` shares its `color` prefix — must use `NonCounted<*>` variants so their counts do not pollute the range-countable value tree's count. + +#### Mechanism + +Where today's `countable` upgrades only the terminal `[0]` element under each indexed value to a count tree, `range_countable` additionally upgrades two more levels: + +| Level | Without `range_countable` | With `range_countable` | +|---|---|---| +| Property-name tree (e.g. `'color'`) | `NormalTree` | `ProvableCountTree` | +| Value tree (e.g. `'red'`, `'blue'`) | `NormalTree` | `CountTree` | +| Terminal at `[0]` under each value | `NormalTree` / `CountTree` / `ProvableCountTree` (per `countable`) | unchanged — still driven by `countable` | +| Sibling continuations inside the value tree (e.g. `'shape'` for a compound index sharing the prefix) | `NormalTree` | `NonCounted` | + +The property-name tree is a `ProvableCountTree` rather than a plain `CountTree` because the merk-tree internal-node counts are exactly what makes range queries O(log n): walk the boundary path between the lower and upper bound, sum sub-counts at each internal node along the way. (See [Document Count Trees](document-count-trees.md) for the underlying mechanic.) + +The value trees become `CountTree`s because the property-name `ProvableCountTree`'s aggregate is computed by summing each value tree's `count_value`. For that aggregate to mean "total docs at this property" rather than "number of distinct values", each value tree's `count_value` must equal "docs at this exact value" — which is only true if (a) the terminal `[0]` `CountTree` contributes its doc count, and (b) every sibling under the value tree (continuation sub-property names like `'shape'`, etc.) contributes **zero** rather than the default 1-per-Tree. That's what `NonCounted` is for. + +#### Layout + +Same `byColor` + `byColorShape` example as before, with the same three documents (A: `(red, circle)`, B: `(red, square)`, C: `(blue, square)`), but now `byColor.range_countable: true`: + +```mermaid +flowchart TD + DT["'widget'
(document type)
NormalTree"] + ColorKey["'color'
ProvableCountTree
count = 3"] + Red["'red'
CountTree
count = 2"] + Blue["'blue'
CountTree
count = 1"] + + %% byColor terminals (unchanged shape — same as before) + RedColorT["[0]: CountTree
count = 2
byColor terminal"] + BlueColorT["[0]: CountTree
count = 1
byColor terminal"] + + %% byColorShape continuation — now NonCounted to avoid double-counting + RedShape["'shape'
NonCounted<NormalTree>"] + BlueShape["'shape'
NonCounted<NormalTree>"] + RedCircle["'circle'
NormalTree"] + RedSquare["'square'
NormalTree"] + BlueSquare["'square'
NormalTree"] + + %% byColorShape terminals + RCT["[0]: CountTree
count = 1
byColorShape"] + RST["[0]: CountTree
count = 1
byColorShape"] + BST["[0]: CountTree
count = 1
byColorShape"] + + %% References (one per matching index path, per the earlier section) + RA1(["doc_id_A
Reference"]) + RB1(["doc_id_B
Reference"]) + RC1(["doc_id_C
Reference"]) + RA2(["doc_id_A
Reference"]) + RB2(["doc_id_B
Reference"]) + RC2(["doc_id_C
Reference"]) + + DT --> ColorKey + ColorKey --> Red + ColorKey --> Blue + + Red --> RedColorT + Red --> RedShape + Blue --> BlueColorT + Blue --> BlueShape + + RedColorT --> RA1 + RedColorT --> RB1 + BlueColorT --> RC1 + + RedShape --> RedCircle + RedShape --> RedSquare + BlueShape --> BlueSquare + + RedCircle --> RCT --> RA2 + RedSquare --> RST --> RB2 + BlueSquare --> BST --> RC2 + + classDef provableCount fill:#ede7f6,stroke:#311b92,color:#000 + classDef countTree fill:#fff4e5,stroke:#bf6900,color:#000 + classDef nonCounted fill:#f3e5f5,stroke:#6a1b9a,color:#000,stroke-dasharray:5 5 + classDef reference fill:#e8f5e9,stroke:#1b5e20,color:#000 + class ColorKey provableCount + class Red,Blue,RedColorT,BlueColorT,RCT,RST,BST countTree + class RedShape,BlueShape nonCounted + class RA1,RB1,RC1,RA2,RB2,RC2 reference +``` + +**Legend additions for this diagram**: purple = `ProvableCountTree`; amber = `CountTree`; dashed lavender = `NonCounted<*>` (the new grovedb variants); rounded green = `Reference`. + +Walking through how the counts add up: + +- **`'red'` (CountTree, count=2)** — its children are `[0]` (`CountTree`, contributes its `count_value` = 2) and `'shape'` (`NonCounted`, contributes **0** — that's the whole point of the new variant). Aggregate = 2. ✓ +- **`'blue'` (CountTree, count=1)** — same shape, 1 doc + 0. ✓ +- **`'color'` (ProvableCountTree, count=3)** — its children are `'red'` (CountTree, contributes 2) and `'blue'` (CountTree, contributes 1). Aggregate = 3. The provable variant additionally stores per-internal-node counts inside its merk structure, which is what enables the range walk. + +If `'shape'` were a plain `NormalTree` instead of `NonCounted`, it would contribute 1 to `'red'` (every non-count-tree element contributes 1 by default — see [Document Count Trees § How Counts Aggregate](document-count-trees.md)). Then `'red'` would read as 3, `'blue'` as 2, `'color'` as 5 — a count of "docs + sub-property-trees", not "docs". The `NonCounted<*>` variant exists exactly to fix this. + +#### Query — "count between two values" + +With the layout above, a query like `WHERE color BETWEEN 'red' AND 'tomato'` resolves at the `'color'` `ProvableCountTree` level: + +1. Walk the merk tree from `'color'`'s root, finding the boundary node between `'red'` (lower bound) and `'tomato'` (upper bound) — O(log distinct color values). +2. At each step, decide what to do with the *off-boundary* subtree using its pre-computed count: include its full `count_value` (subtree fully inside the range), exclude (fully outside), or recurse (straddles the boundary). +3. Sum the contributions; the result is the count of all docs whose color falls in `[red, tomato]`. + +No leaf-level enumeration of distinct color values, no enumeration of individual documents — the count is computed entirely from the tree's pre-aggregated structure. + +#### Compound indexes (open question) + +What `range_countable` means on a compound index — e.g., `byColorShape = [color, shape]` with `range_countable: true` — is left for later design. The natural reading is "the parent of the *terminating* level of this index", i.e., the `'shape'` tree under each color value, which would itself become a `ProvableCountTree` (and `'circle'` / `'square'` would become `CountTree`s). When that compound's leading prefix is itself another index (`byColor`), the layering of `NonCounted` and counted variants needs to be worked out so neither index's counts pollute the other. We'll cross that bridge when we actually need range queries on a compound index. + +## Tree Type at the Terminal Level + +The decision happens in [`add_reference_for_index_level_for_contract_operations/v0/mod.rs`](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-drive/src/drive/document/insert/add_reference_for_index_level_for_contract_operations/v0/mod.rs): + +```rust +if !index_type.index_type.is_unique() || any_fields_null { + // Non-unique branch: insert an empty tree at [0], then put + // each document's reference inside that tree. The tree's variant + // is governed by `countable`: + // NotCountable → NormalTree + // Countable → CountTree + // CountableAllowingOffset → ProvableCountTree +} else { + // Unique branch: store a single Reference element at [0] directly. +} +``` + +So the matrix: + +| `unique` | `any_fields_null` | `countable` | What lives at `[0]` | +|---|---|---|---| +| false | (any) | NotCountable | empty `NormalTree` containing per-doc references | +| false | (any) | Countable | empty `CountTree` containing per-doc references | +| false | (any) | CountableAllowingOffset | empty `ProvableCountTree` containing per-doc references | +| true | false | (any) | bare `Reference` to the one matching document | +| true | true | NotCountable | empty `NormalTree` containing per-doc references | +| true | true | Countable | empty `CountTree` containing per-doc references | +| true | true | CountableAllowingOffset | empty `ProvableCountTree` containing per-doc references | + +Note the last three rows: a unique index *does* go through the count-tree branch when any indexed field is null. That's why `countable` on a unique index is meaningful exactly when at least one of the indexed properties is optional in the schema. + +Visualizing the three terminal shapes side by side: + +```mermaid +flowchart TD + subgraph SA["Non-unique, countable"] + direction TB + A1["[..., color, 'red']"] + A2["[0]: CountTree
count = 2"] + A3(["doc_id_A
Reference"]) + A4(["doc_id_B
Reference"]) + A1 --> A2 --> A3 + A2 --> A4 + end + + subgraph SB["Unique, all fields non-null"] + direction TB + B1["[..., email, 'alice@x']"] + B2(["[0]: Reference
→ doc_id_X"]) + B1 --> B2 + end + + subgraph SC["Unique with null in path"] + direction TB + C1["[..., a, 'X', b, <empty>]"] + C2["[0]: CountTree
count = 1"] + C3(["doc_id_W
Reference"]) + C1 --> C2 --> C3 + end + + classDef countTree fill:#fff4e5,stroke:#bf6900,color:#000 + classDef reference fill:#e8f5e9,stroke:#1b5e20,color:#000 + class A2,C2 countTree + class A3,A4,B2,C3 reference +``` + +Same convention as the layout diagram above: rectangles are tree-type elements, rounded green nodes are `Reference` elements. Same key (`[0]`) at the terminal in all three panels — **what** lives there is what differs. The middle case is the one that's "special" — a bare `Reference` directly at `[0]` instead of a sub-tree containing references — and it's specifically scoped to the unique-and-no-nulls scenario. + +## Null Handling + +The `any_fields_null` and `all_fields_null` flags are accumulated as Drive descends the index property list during insertion ([`add_indices_for_index_level_for_contract_operations/v0/mod.rs:170-171`](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-drive/src/drive/document/insert/add_indices_for_index_level_for_contract_operations/v0/mod.rs#L170-L171)): + +```rust +any_fields_null |= document_index_field.is_empty(); +all_fields_null &= document_index_field.is_empty(); +``` + +`any_fields_null` becomes `true` the moment the walker hits any null/empty value at any level (first, middle, or last) and stays true for the rest of the descent. `all_fields_null` only stays true if every value seen so far is null. + +By the time the recursion reaches the terminal: + +- `any_fields_null = false` and the index is unique → unique branch (bare Reference). +- `any_fields_null = true` (regardless of unique) → non-unique-style branch (sub-tree containing references). +- `all_fields_null = true` AND `null_searchable = false` → the terminal call returns early without inserting anything; this document is not findable through this index. + +This means *different documents under the same unique index can land in different storage shapes* depending on which of their indexed fields are null. A document with all required fields populated takes the bare-Reference shape; a document with a null in an optional indexed property takes the sub-tree shape, side by side under the same index. + +## Insert Flow Summary + +Putting it together, when Drive inserts a document into a contract `C` of type `T`: + +1. **`add_indices_for_top_index_level_for_contract_operations`** — for each top-level entry in the document type's index trie (each first-property of any declared index), pushes the property name and the document's value for that property onto the path, computes the initial `any_fields_null` / `all_fields_null` for that single value, and recurses. +2. **`add_indices_for_index_level_for_contract_operations`** (recursive) — for each sub-level of the trie, pushes the property name and value onto the path, OR-accumulates `any_fields_null`, AND-accumulates `all_fields_null`, and recurses. If the current level has `has_index_with_type = Some(...)`, it also calls into step 3 *before* recursing further (because an index can terminate at a non-leaf trie level when another index continues past it). +3. **`add_reference_for_index_level_for_contract_operations`** — the terminal call. Decides between unique and non-unique-style storage using the matrix above; for the non-unique-style path it picks a `NormalTree` / `CountTree` / `ProvableCountTree` based on `countable`; finally inserts the document reference (or sub-tree containing it). + +Deletion mirrors the same walk in reverse — see [`packages/rs-drive/src/drive/document/delete/`](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-drive/src/drive/document/delete/). + +## Query Traversal + +When a query arrives at drive-abci, the document-query construction path picks one of the document type's indexes that "covers" the query — i.e., whose property prefix matches the query's equality clauses, in order. The picker is in [`packages/rs-drive/src/query/mod.rs`](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-drive/src/query/mod.rs) (look for `fn construct_path_query` and the index-selection helpers it calls). For count queries specifically there's a separate, count-tree-aware picker ([`drive_document_count_query/mod.rs`](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-drive/src/query/drive_document_count_query/mod.rs)) — see [Document Count Trees](document-count-trees.md) for that path. + +Once an index is picked, the query-engine builds a `PathQuery` whose path is exactly the prefix shape the insert code produced: `[DataContractDocuments, contract_id, 1, doc_type, prop, value, prop, value, …]`. GroveDB then walks the path in O(log n per level), reading the terminal sub-tree (or single reference) and returning matching documents. + +A query whose where-clauses don't form a *prefix* of any index can't take this fast path and falls back to a full-scan plan — which dapi-grpc surfaces as an error in most cases, since unbounded scans are deliberately discouraged. + +## Choosing Index Settings + +Quick checklist for contract authors: + +- **Don't index what you won't query.** Each index costs storage on every insert/delete and counts against the per-document-type index limit (10 indexes per type currently). +- **Order index properties from most-selective to least-selective.** A `[country, city]` index is more useful than `[city, country]` for queries like `where country = "FR"`. +- **`unique: true`** when the platform should reject duplicates at the consensus layer. This is the right place for "this should be unique" invariants — don't enforce them application-side. +- **`countable: "countable"`** when you'll regularly call `GetDocumentsCount` filtered by this index's leading columns. Adds a constant-factor overhead on insert/delete; reads become O(1). +- **`countable: "countableAllowingOffset"`** when you'll *also* want offset / range queries on this index in a future release. Strictly more expensive than plain `"countable"`; only worth it if you need the capability. +- **`null_searchable: true`** (the default) is right for almost all cases. Set to `false` only when documents with all-null indexed values shouldn't be findable through this index — typically a niche optimization to avoid a hot all-null prefix. + +For specifically count-related concerns — primary-key-tree flags (`documentsCountable` / `rangeCountable`), the no-prove-vs-prove paths, and the operator restrictions — see the dedicated [Document Count Trees](document-count-trees.md) chapter. diff --git a/packages/dapi-grpc/build.rs b/packages/dapi-grpc/build.rs index e0ea14fb1c2..4f2f728b091 100644 --- a/packages/dapi-grpc/build.rs +++ b/packages/dapi-grpc/build.rs @@ -84,11 +84,13 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig { // Derive features for versioned messages // // "GetConsensusParamsRequest" is excluded as this message does not support proofs - const VERSIONED_REQUESTS: [&str; 56] = [ + const VERSIONED_REQUESTS: [&str; 58] = [ "GetDataContractHistoryRequest", "GetDataContractRequest", "GetDataContractsRequest", "GetDocumentsRequest", + "GetDocumentsCountRequest", + "GetDocumentsSplitCountRequest", "GetIdentitiesByPublicKeyHashesRequest", "GetIdentitiesRequest", "GetIdentitiesBalancesRequest", @@ -161,11 +163,13 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig { // - "GetIdentityByNonUniquePublicKeyHashResponse" // // "GetEvonodesProposedEpochBlocksResponse" is used for 2 Requests - const VERSIONED_RESPONSES: [&str; 54] = [ + const VERSIONED_RESPONSES: [&str; 56] = [ "GetDataContractHistoryResponse", "GetDataContractResponse", "GetDataContractsResponse", "GetDocumentsResponse", + "GetDocumentsCountResponse", + "GetDocumentsSplitCountResponse", "GetIdentitiesByPublicKeyHashesResponse", "GetIdentitiesResponse", "GetIdentitiesBalancesResponse", diff --git a/packages/dapi-grpc/clients/drive/v0/nodejs/drive_pbjs.js b/packages/dapi-grpc/clients/drive/v0/nodejs/drive_pbjs.js index 7a1f996a247..cf3978e3d7d 100644 --- a/packages/dapi-grpc/clients/drive/v0/nodejs/drive_pbjs.js +++ b/packages/dapi-grpc/clients/drive/v0/nodejs/drive_pbjs.js @@ -1089,6 +1089,72 @@ $root.org = (function() { * @variation 2 */ + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getDocumentsCount}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getDocumentsCountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetDocumentsCountResponse} [response] GetDocumentsCountResponse + */ + + /** + * Calls getDocumentsCount. + * @function getDocumentsCount + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountRequest} request GetDocumentsCountRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getDocumentsCountCallback} callback Node-style callback called with the error, if any, and GetDocumentsCountResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getDocumentsCount = function getDocumentsCount(request, callback) { + return this.rpcCall(getDocumentsCount, $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest, $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse, request, callback); + }, "name", { value: "getDocumentsCount" }); + + /** + * Calls getDocumentsCount. + * @function getDocumentsCount + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountRequest} request GetDocumentsCountRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getDocumentsSplitCount}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getDocumentsSplitCountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} [response] GetDocumentsSplitCountResponse + */ + + /** + * Calls getDocumentsSplitCount. + * @function getDocumentsSplitCount + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountRequest} request GetDocumentsSplitCountRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getDocumentsSplitCountCallback} callback Node-style callback called with the error, if any, and GetDocumentsSplitCountResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getDocumentsSplitCount = function getDocumentsSplitCount(request, callback) { + return this.rpcCall(getDocumentsSplitCount, $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest, $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse, request, callback); + }, "name", { value: "getDocumentsSplitCount" }); + + /** + * Calls getDocumentsSplitCount. + * @function getDocumentsSplitCount + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountRequest} request GetDocumentsSplitCountRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getIdentityByPublicKeyHash}. * @memberof org.dash.platform.dapi.v0.Platform @@ -21149,6 +21215,2407 @@ $root.org = (function() { return GetDocumentsResponse; })(); + v0.GetDocumentsCountRequest = (function() { + + /** + * Properties of a GetDocumentsCountRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetDocumentsCountRequest + * @property {org.dash.platform.dapi.v0.GetDocumentsCountRequest.IGetDocumentsCountRequestV0|null} [v0] GetDocumentsCountRequest v0 + */ + + /** + * Constructs a new GetDocumentsCountRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetDocumentsCountRequest. + * @implements IGetDocumentsCountRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountRequest=} [properties] Properties to set + */ + function GetDocumentsCountRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsCountRequest v0. + * @member {org.dash.platform.dapi.v0.GetDocumentsCountRequest.IGetDocumentsCountRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @instance + */ + GetDocumentsCountRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetDocumentsCountRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @instance + */ + Object.defineProperty(GetDocumentsCountRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetDocumentsCountRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest} GetDocumentsCountRequest instance + */ + GetDocumentsCountRequest.create = function create(properties) { + return new GetDocumentsCountRequest(properties); + }; + + /** + * Encodes the specified GetDocumentsCountRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountRequest} message GetDocumentsCountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.v0 != null && Object.hasOwnProperty.call(message, "v0")) + $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetDocumentsCountRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountRequest} message GetDocumentsCountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsCountRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest} GetDocumentsCountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsCountRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest} GetDocumentsCountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsCountRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsCountRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + properties.version = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetDocumentsCountRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest} GetDocumentsCountRequest + */ + GetDocumentsCountRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsCountRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetDocumentsCountRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountRequest} message GetDocumentsCountRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsCountRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + object.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetDocumentsCountRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsCountRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetDocumentsCountRequest.GetDocumentsCountRequestV0 = (function() { + + /** + * Properties of a GetDocumentsCountRequestV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @interface IGetDocumentsCountRequestV0 + * @property {Uint8Array|null} [dataContractId] GetDocumentsCountRequestV0 dataContractId + * @property {string|null} [documentType] GetDocumentsCountRequestV0 documentType + * @property {Uint8Array|null} [where] GetDocumentsCountRequestV0 where + * @property {boolean|null} [prove] GetDocumentsCountRequestV0 prove + */ + + /** + * Constructs a new GetDocumentsCountRequestV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @classdesc Represents a GetDocumentsCountRequestV0. + * @implements IGetDocumentsCountRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsCountRequest.IGetDocumentsCountRequestV0=} [properties] Properties to set + */ + function GetDocumentsCountRequestV0(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsCountRequestV0 dataContractId. + * @member {Uint8Array} dataContractId + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @instance + */ + GetDocumentsCountRequestV0.prototype.dataContractId = $util.newBuffer([]); + + /** + * GetDocumentsCountRequestV0 documentType. + * @member {string} documentType + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @instance + */ + GetDocumentsCountRequestV0.prototype.documentType = ""; + + /** + * GetDocumentsCountRequestV0 where. + * @member {Uint8Array} where + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @instance + */ + GetDocumentsCountRequestV0.prototype.where = $util.newBuffer([]); + + /** + * GetDocumentsCountRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @instance + */ + GetDocumentsCountRequestV0.prototype.prove = false; + + /** + * Creates a new GetDocumentsCountRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountRequest.IGetDocumentsCountRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} GetDocumentsCountRequestV0 instance + */ + GetDocumentsCountRequestV0.create = function create(properties) { + return new GetDocumentsCountRequestV0(properties); + }; + + /** + * Encodes the specified GetDocumentsCountRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountRequest.IGetDocumentsCountRequestV0} message GetDocumentsCountRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataContractId != null && Object.hasOwnProperty.call(message, "dataContractId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.dataContractId); + if (message.documentType != null && Object.hasOwnProperty.call(message, "documentType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.documentType); + if (message.where != null && Object.hasOwnProperty.call(message, "where")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.where); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetDocumentsCountRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountRequest.IGetDocumentsCountRequestV0} message GetDocumentsCountRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsCountRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} GetDocumentsCountRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountRequestV0.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dataContractId = reader.bytes(); + break; + case 2: + message.documentType = reader.string(); + break; + case 3: + message.where = reader.bytes(); + break; + case 4: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsCountRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} GetDocumentsCountRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsCountRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsCountRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataContractId != null && message.hasOwnProperty("dataContractId")) + if (!(message.dataContractId && typeof message.dataContractId.length === "number" || $util.isString(message.dataContractId))) + return "dataContractId: buffer expected"; + if (message.documentType != null && message.hasOwnProperty("documentType")) + if (!$util.isString(message.documentType)) + return "documentType: string expected"; + if (message.where != null && message.hasOwnProperty("where")) + if (!(message.where && typeof message.where.length === "number" || $util.isString(message.where))) + return "where: buffer expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetDocumentsCountRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} GetDocumentsCountRequestV0 + */ + GetDocumentsCountRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0(); + if (object.dataContractId != null) + if (typeof object.dataContractId === "string") + $util.base64.decode(object.dataContractId, message.dataContractId = $util.newBuffer($util.base64.length(object.dataContractId)), 0); + else if (object.dataContractId.length >= 0) + message.dataContractId = object.dataContractId; + if (object.documentType != null) + message.documentType = String(object.documentType); + if (object.where != null) + if (typeof object.where === "string") + $util.base64.decode(object.where, message.where = $util.newBuffer($util.base64.length(object.where)), 0); + else if (object.where.length >= 0) + message.where = object.where; + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetDocumentsCountRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} message GetDocumentsCountRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsCountRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.dataContractId = ""; + else { + object.dataContractId = []; + if (options.bytes !== Array) + object.dataContractId = $util.newBuffer(object.dataContractId); + } + object.documentType = ""; + if (options.bytes === String) + object.where = ""; + else { + object.where = []; + if (options.bytes !== Array) + object.where = $util.newBuffer(object.where); + } + object.prove = false; + } + if (message.dataContractId != null && message.hasOwnProperty("dataContractId")) + object.dataContractId = options.bytes === String ? $util.base64.encode(message.dataContractId, 0, message.dataContractId.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataContractId) : message.dataContractId; + if (message.documentType != null && message.hasOwnProperty("documentType")) + object.documentType = message.documentType; + if (message.where != null && message.hasOwnProperty("where")) + object.where = options.bytes === String ? $util.base64.encode(message.where, 0, message.where.length) : options.bytes === Array ? Array.prototype.slice.call(message.where) : message.where; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetDocumentsCountRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsCountRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetDocumentsCountRequestV0; + })(); + + return GetDocumentsCountRequest; + })(); + + v0.GetDocumentsCountResponse = (function() { + + /** + * Properties of a GetDocumentsCountResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetDocumentsCountResponse + * @property {org.dash.platform.dapi.v0.GetDocumentsCountResponse.IGetDocumentsCountResponseV0|null} [v0] GetDocumentsCountResponse v0 + */ + + /** + * Constructs a new GetDocumentsCountResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetDocumentsCountResponse. + * @implements IGetDocumentsCountResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountResponse=} [properties] Properties to set + */ + function GetDocumentsCountResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsCountResponse v0. + * @member {org.dash.platform.dapi.v0.GetDocumentsCountResponse.IGetDocumentsCountResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @instance + */ + GetDocumentsCountResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetDocumentsCountResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @instance + */ + Object.defineProperty(GetDocumentsCountResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetDocumentsCountResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse} GetDocumentsCountResponse instance + */ + GetDocumentsCountResponse.create = function create(properties) { + return new GetDocumentsCountResponse(properties); + }; + + /** + * Encodes the specified GetDocumentsCountResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountResponse} message GetDocumentsCountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.v0 != null && Object.hasOwnProperty.call(message, "v0")) + $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetDocumentsCountResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountResponse} message GetDocumentsCountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsCountResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse} GetDocumentsCountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsCountResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse} GetDocumentsCountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsCountResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsCountResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + properties.version = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetDocumentsCountResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse} GetDocumentsCountResponse + */ + GetDocumentsCountResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsCountResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetDocumentsCountResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountResponse} message GetDocumentsCountResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsCountResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + object.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetDocumentsCountResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsCountResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetDocumentsCountResponse.GetDocumentsCountResponseV0 = (function() { + + /** + * Properties of a GetDocumentsCountResponseV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @interface IGetDocumentsCountResponseV0 + * @property {number|Long|null} [count] GetDocumentsCountResponseV0 count + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetDocumentsCountResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetDocumentsCountResponseV0 metadata + */ + + /** + * Constructs a new GetDocumentsCountResponseV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @classdesc Represents a GetDocumentsCountResponseV0. + * @implements IGetDocumentsCountResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsCountResponse.IGetDocumentsCountResponseV0=} [properties] Properties to set + */ + function GetDocumentsCountResponseV0(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsCountResponseV0 count. + * @member {number|Long} count + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @instance + */ + GetDocumentsCountResponseV0.prototype.count = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GetDocumentsCountResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @instance + */ + GetDocumentsCountResponseV0.prototype.proof = null; + + /** + * GetDocumentsCountResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @instance + */ + GetDocumentsCountResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetDocumentsCountResponseV0 result. + * @member {"count"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @instance + */ + Object.defineProperty(GetDocumentsCountResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["count", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetDocumentsCountResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountResponse.IGetDocumentsCountResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} GetDocumentsCountResponseV0 instance + */ + GetDocumentsCountResponseV0.create = function create(properties) { + return new GetDocumentsCountResponseV0(properties); + }; + + /** + * Encodes the specified GetDocumentsCountResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountResponse.IGetDocumentsCountResponseV0} message GetDocumentsCountResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.count); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.org.dash.platform.dapi.v0.ResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetDocumentsCountResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountResponse.IGetDocumentsCountResponseV0} message GetDocumentsCountResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsCountResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} GetDocumentsCountResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountResponseV0.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.count = reader.uint64(); + break; + case 2: + message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32()); + break; + case 3: + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsCountResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} GetDocumentsCountResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsCountResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsCountResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.count != null && message.hasOwnProperty("count")) { + properties.result = 1; + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + } + if (message.proof != null && message.hasOwnProperty("proof")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a GetDocumentsCountResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} GetDocumentsCountResponseV0 + */ + GetDocumentsCountResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = true; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(true); + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.proof: object expected"); + message.proof = $root.org.dash.platform.dapi.v0.Proof.fromObject(object.proof); + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetDocumentsCountResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} message GetDocumentsCountResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsCountResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.count != null && message.hasOwnProperty("count")) { + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber(true) : message.count; + if (options.oneofs) + object.result = "count"; + } + if (message.proof != null && message.hasOwnProperty("proof")) { + object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options); + if (options.oneofs) + object.result = "proof"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this GetDocumentsCountResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsCountResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetDocumentsCountResponseV0; + })(); + + return GetDocumentsCountResponse; + })(); + + v0.GetDocumentsSplitCountRequest = (function() { + + /** + * Properties of a GetDocumentsSplitCountRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetDocumentsSplitCountRequest + * @property {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.IGetDocumentsSplitCountRequestV0|null} [v0] GetDocumentsSplitCountRequest v0 + */ + + /** + * Constructs a new GetDocumentsSplitCountRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetDocumentsSplitCountRequest. + * @implements IGetDocumentsSplitCountRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountRequest=} [properties] Properties to set + */ + function GetDocumentsSplitCountRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsSplitCountRequest v0. + * @member {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.IGetDocumentsSplitCountRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @instance + */ + GetDocumentsSplitCountRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetDocumentsSplitCountRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @instance + */ + Object.defineProperty(GetDocumentsSplitCountRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetDocumentsSplitCountRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} GetDocumentsSplitCountRequest instance + */ + GetDocumentsSplitCountRequest.create = function create(properties) { + return new GetDocumentsSplitCountRequest(properties); + }; + + /** + * Encodes the specified GetDocumentsSplitCountRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountRequest} message GetDocumentsSplitCountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.v0 != null && Object.hasOwnProperty.call(message, "v0")) + $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetDocumentsSplitCountRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountRequest} message GetDocumentsSplitCountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsSplitCountRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} GetDocumentsSplitCountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsSplitCountRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} GetDocumentsSplitCountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsSplitCountRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsSplitCountRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + properties.version = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetDocumentsSplitCountRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} GetDocumentsSplitCountRequest + */ + GetDocumentsSplitCountRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetDocumentsSplitCountRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} message GetDocumentsSplitCountRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsSplitCountRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + object.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetDocumentsSplitCountRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsSplitCountRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 = (function() { + + /** + * Properties of a GetDocumentsSplitCountRequestV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @interface IGetDocumentsSplitCountRequestV0 + * @property {Uint8Array|null} [dataContractId] GetDocumentsSplitCountRequestV0 dataContractId + * @property {string|null} [documentType] GetDocumentsSplitCountRequestV0 documentType + * @property {Uint8Array|null} [where] GetDocumentsSplitCountRequestV0 where + * @property {string|null} [splitCountByIndexProperty] GetDocumentsSplitCountRequestV0 splitCountByIndexProperty + * @property {boolean|null} [prove] GetDocumentsSplitCountRequestV0 prove + */ + + /** + * Constructs a new GetDocumentsSplitCountRequestV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @classdesc Represents a GetDocumentsSplitCountRequestV0. + * @implements IGetDocumentsSplitCountRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.IGetDocumentsSplitCountRequestV0=} [properties] Properties to set + */ + function GetDocumentsSplitCountRequestV0(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsSplitCountRequestV0 dataContractId. + * @member {Uint8Array} dataContractId + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @instance + */ + GetDocumentsSplitCountRequestV0.prototype.dataContractId = $util.newBuffer([]); + + /** + * GetDocumentsSplitCountRequestV0 documentType. + * @member {string} documentType + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @instance + */ + GetDocumentsSplitCountRequestV0.prototype.documentType = ""; + + /** + * GetDocumentsSplitCountRequestV0 where. + * @member {Uint8Array} where + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @instance + */ + GetDocumentsSplitCountRequestV0.prototype.where = $util.newBuffer([]); + + /** + * GetDocumentsSplitCountRequestV0 splitCountByIndexProperty. + * @member {string} splitCountByIndexProperty + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @instance + */ + GetDocumentsSplitCountRequestV0.prototype.splitCountByIndexProperty = ""; + + /** + * GetDocumentsSplitCountRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @instance + */ + GetDocumentsSplitCountRequestV0.prototype.prove = false; + + /** + * Creates a new GetDocumentsSplitCountRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.IGetDocumentsSplitCountRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} GetDocumentsSplitCountRequestV0 instance + */ + GetDocumentsSplitCountRequestV0.create = function create(properties) { + return new GetDocumentsSplitCountRequestV0(properties); + }; + + /** + * Encodes the specified GetDocumentsSplitCountRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.IGetDocumentsSplitCountRequestV0} message GetDocumentsSplitCountRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataContractId != null && Object.hasOwnProperty.call(message, "dataContractId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.dataContractId); + if (message.documentType != null && Object.hasOwnProperty.call(message, "documentType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.documentType); + if (message.where != null && Object.hasOwnProperty.call(message, "where")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.where); + if (message.splitCountByIndexProperty != null && Object.hasOwnProperty.call(message, "splitCountByIndexProperty")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.splitCountByIndexProperty); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetDocumentsSplitCountRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.IGetDocumentsSplitCountRequestV0} message GetDocumentsSplitCountRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsSplitCountRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} GetDocumentsSplitCountRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountRequestV0.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dataContractId = reader.bytes(); + break; + case 2: + message.documentType = reader.string(); + break; + case 3: + message.where = reader.bytes(); + break; + case 4: + message.splitCountByIndexProperty = reader.string(); + break; + case 5: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsSplitCountRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} GetDocumentsSplitCountRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsSplitCountRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsSplitCountRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataContractId != null && message.hasOwnProperty("dataContractId")) + if (!(message.dataContractId && typeof message.dataContractId.length === "number" || $util.isString(message.dataContractId))) + return "dataContractId: buffer expected"; + if (message.documentType != null && message.hasOwnProperty("documentType")) + if (!$util.isString(message.documentType)) + return "documentType: string expected"; + if (message.where != null && message.hasOwnProperty("where")) + if (!(message.where && typeof message.where.length === "number" || $util.isString(message.where))) + return "where: buffer expected"; + if (message.splitCountByIndexProperty != null && message.hasOwnProperty("splitCountByIndexProperty")) + if (!$util.isString(message.splitCountByIndexProperty)) + return "splitCountByIndexProperty: string expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetDocumentsSplitCountRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} GetDocumentsSplitCountRequestV0 + */ + GetDocumentsSplitCountRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0(); + if (object.dataContractId != null) + if (typeof object.dataContractId === "string") + $util.base64.decode(object.dataContractId, message.dataContractId = $util.newBuffer($util.base64.length(object.dataContractId)), 0); + else if (object.dataContractId.length >= 0) + message.dataContractId = object.dataContractId; + if (object.documentType != null) + message.documentType = String(object.documentType); + if (object.where != null) + if (typeof object.where === "string") + $util.base64.decode(object.where, message.where = $util.newBuffer($util.base64.length(object.where)), 0); + else if (object.where.length >= 0) + message.where = object.where; + if (object.splitCountByIndexProperty != null) + message.splitCountByIndexProperty = String(object.splitCountByIndexProperty); + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetDocumentsSplitCountRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} message GetDocumentsSplitCountRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsSplitCountRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.dataContractId = ""; + else { + object.dataContractId = []; + if (options.bytes !== Array) + object.dataContractId = $util.newBuffer(object.dataContractId); + } + object.documentType = ""; + if (options.bytes === String) + object.where = ""; + else { + object.where = []; + if (options.bytes !== Array) + object.where = $util.newBuffer(object.where); + } + object.splitCountByIndexProperty = ""; + object.prove = false; + } + if (message.dataContractId != null && message.hasOwnProperty("dataContractId")) + object.dataContractId = options.bytes === String ? $util.base64.encode(message.dataContractId, 0, message.dataContractId.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataContractId) : message.dataContractId; + if (message.documentType != null && message.hasOwnProperty("documentType")) + object.documentType = message.documentType; + if (message.where != null && message.hasOwnProperty("where")) + object.where = options.bytes === String ? $util.base64.encode(message.where, 0, message.where.length) : options.bytes === Array ? Array.prototype.slice.call(message.where) : message.where; + if (message.splitCountByIndexProperty != null && message.hasOwnProperty("splitCountByIndexProperty")) + object.splitCountByIndexProperty = message.splitCountByIndexProperty; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetDocumentsSplitCountRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsSplitCountRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetDocumentsSplitCountRequestV0; + })(); + + return GetDocumentsSplitCountRequest; + })(); + + v0.GetDocumentsSplitCountResponse = (function() { + + /** + * Properties of a GetDocumentsSplitCountResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetDocumentsSplitCountResponse + * @property {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.IGetDocumentsSplitCountResponseV0|null} [v0] GetDocumentsSplitCountResponse v0 + */ + + /** + * Constructs a new GetDocumentsSplitCountResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetDocumentsSplitCountResponse. + * @implements IGetDocumentsSplitCountResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountResponse=} [properties] Properties to set + */ + function GetDocumentsSplitCountResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsSplitCountResponse v0. + * @member {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.IGetDocumentsSplitCountResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @instance + */ + GetDocumentsSplitCountResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetDocumentsSplitCountResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @instance + */ + Object.defineProperty(GetDocumentsSplitCountResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetDocumentsSplitCountResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} GetDocumentsSplitCountResponse instance + */ + GetDocumentsSplitCountResponse.create = function create(properties) { + return new GetDocumentsSplitCountResponse(properties); + }; + + /** + * Encodes the specified GetDocumentsSplitCountResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountResponse} message GetDocumentsSplitCountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.v0 != null && Object.hasOwnProperty.call(message, "v0")) + $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetDocumentsSplitCountResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountResponse} message GetDocumentsSplitCountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsSplitCountResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} GetDocumentsSplitCountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsSplitCountResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} GetDocumentsSplitCountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsSplitCountResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsSplitCountResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + properties.version = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetDocumentsSplitCountResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} GetDocumentsSplitCountResponse + */ + GetDocumentsSplitCountResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetDocumentsSplitCountResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} message GetDocumentsSplitCountResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsSplitCountResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + object.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetDocumentsSplitCountResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsSplitCountResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 = (function() { + + /** + * Properties of a GetDocumentsSplitCountResponseV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @interface IGetDocumentsSplitCountResponseV0 + * @property {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCounts|null} [splitCounts] GetDocumentsSplitCountResponseV0 splitCounts + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetDocumentsSplitCountResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetDocumentsSplitCountResponseV0 metadata + */ + + /** + * Constructs a new GetDocumentsSplitCountResponseV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @classdesc Represents a GetDocumentsSplitCountResponseV0. + * @implements IGetDocumentsSplitCountResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.IGetDocumentsSplitCountResponseV0=} [properties] Properties to set + */ + function GetDocumentsSplitCountResponseV0(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsSplitCountResponseV0 splitCounts. + * @member {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCounts|null|undefined} splitCounts + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @instance + */ + GetDocumentsSplitCountResponseV0.prototype.splitCounts = null; + + /** + * GetDocumentsSplitCountResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @instance + */ + GetDocumentsSplitCountResponseV0.prototype.proof = null; + + /** + * GetDocumentsSplitCountResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @instance + */ + GetDocumentsSplitCountResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetDocumentsSplitCountResponseV0 result. + * @member {"splitCounts"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @instance + */ + Object.defineProperty(GetDocumentsSplitCountResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["splitCounts", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetDocumentsSplitCountResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.IGetDocumentsSplitCountResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} GetDocumentsSplitCountResponseV0 instance + */ + GetDocumentsSplitCountResponseV0.create = function create(properties) { + return new GetDocumentsSplitCountResponseV0(properties); + }; + + /** + * Encodes the specified GetDocumentsSplitCountResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.IGetDocumentsSplitCountResponseV0} message GetDocumentsSplitCountResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.splitCounts != null && Object.hasOwnProperty.call(message, "splitCounts")) + $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.encode(message.splitCounts, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.org.dash.platform.dapi.v0.ResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetDocumentsSplitCountResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.IGetDocumentsSplitCountResponseV0} message GetDocumentsSplitCountResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsSplitCountResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} GetDocumentsSplitCountResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountResponseV0.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.splitCounts = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.decode(reader, reader.uint32()); + break; + case 2: + message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32()); + break; + case 3: + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsSplitCountResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} GetDocumentsSplitCountResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsSplitCountResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsSplitCountResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.splitCounts != null && message.hasOwnProperty("splitCounts")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.verify(message.splitCounts); + if (error) + return "splitCounts." + error; + } + } + if (message.proof != null && message.hasOwnProperty("proof")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a GetDocumentsSplitCountResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} GetDocumentsSplitCountResponseV0 + */ + GetDocumentsSplitCountResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0(); + if (object.splitCounts != null) { + if (typeof object.splitCounts !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.splitCounts: object expected"); + message.splitCounts = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.fromObject(object.splitCounts); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.proof: object expected"); + message.proof = $root.org.dash.platform.dapi.v0.Proof.fromObject(object.proof); + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetDocumentsSplitCountResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} message GetDocumentsSplitCountResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsSplitCountResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.splitCounts != null && message.hasOwnProperty("splitCounts")) { + object.splitCounts = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.toObject(message.splitCounts, options); + if (options.oneofs) + object.result = "splitCounts"; + } + if (message.proof != null && message.hasOwnProperty("proof")) { + object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options); + if (options.oneofs) + object.result = "proof"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this GetDocumentsSplitCountResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsSplitCountResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetDocumentsSplitCountResponseV0.SplitCountEntry = (function() { + + /** + * Properties of a SplitCountEntry. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @interface ISplitCountEntry + * @property {Uint8Array|null} [key] SplitCountEntry key + * @property {number|Long|null} [count] SplitCountEntry count + */ + + /** + * Constructs a new SplitCountEntry. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @classdesc Represents a SplitCountEntry. + * @implements ISplitCountEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCountEntry=} [properties] Properties to set + */ + function SplitCountEntry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SplitCountEntry key. + * @member {Uint8Array} key + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @instance + */ + SplitCountEntry.prototype.key = $util.newBuffer([]); + + /** + * SplitCountEntry count. + * @member {number|Long} count + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @instance + */ + SplitCountEntry.prototype.count = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new SplitCountEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCountEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} SplitCountEntry instance + */ + SplitCountEntry.create = function create(properties) { + return new SplitCountEntry(properties); + }; + + /** + * Encodes the specified SplitCountEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCountEntry} message SplitCountEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SplitCountEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.count); + return writer; + }; + + /** + * Encodes the specified SplitCountEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCountEntry} message SplitCountEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SplitCountEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SplitCountEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} SplitCountEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SplitCountEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.count = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SplitCountEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} SplitCountEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SplitCountEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SplitCountEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SplitCountEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + return null; + }; + + /** + * Creates a SplitCountEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} SplitCountEntry + */ + SplitCountEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length >= 0) + message.key = object.key; + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = true; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a SplitCountEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} message SplitCountEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SplitCountEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber(true) : message.count; + return object; + }; + + /** + * Converts this SplitCountEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @instance + * @returns {Object.} JSON object + */ + SplitCountEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SplitCountEntry; + })(); + + GetDocumentsSplitCountResponseV0.SplitCounts = (function() { + + /** + * Properties of a SplitCounts. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @interface ISplitCounts + * @property {Array.|null} [entries] SplitCounts entries + */ + + /** + * Constructs a new SplitCounts. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @classdesc Represents a SplitCounts. + * @implements ISplitCounts + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCounts=} [properties] Properties to set + */ + function SplitCounts(properties) { + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SplitCounts entries. + * @member {Array.} entries + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @instance + */ + SplitCounts.prototype.entries = $util.emptyArray; + + /** + * Creates a new SplitCounts instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCounts=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} SplitCounts instance + */ + SplitCounts.create = function create(properties) { + return new SplitCounts(properties); + }; + + /** + * Encodes the specified SplitCounts message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCounts} message SplitCounts message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SplitCounts.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SplitCounts message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCounts} message SplitCounts message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SplitCounts.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SplitCounts message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} SplitCounts + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SplitCounts.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SplitCounts message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} SplitCounts + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SplitCounts.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SplitCounts message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SplitCounts.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates a SplitCounts message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} SplitCounts + */ + SplitCounts.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.entries: object expected"); + message.entries[i] = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.fromObject(object.entries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SplitCounts message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} message SplitCounts + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SplitCounts.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.toObject(message.entries[j], options); + } + return object; + }; + + /** + * Converts this SplitCounts to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @instance + * @returns {Object.} JSON object + */ + SplitCounts.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SplitCounts; + })(); + + return GetDocumentsSplitCountResponseV0; + })(); + + return GetDocumentsSplitCountResponse; + })(); + v0.GetIdentityByPublicKeyHashRequest = (function() { /** diff --git a/packages/dapi-grpc/clients/platform/v0/java/org/dash/platform/dapi/v0/PlatformGrpc.java b/packages/dapi-grpc/clients/platform/v0/java/org/dash/platform/dapi/v0/PlatformGrpc.java index 472dcf8f1b4..e35b3783ab0 100644 --- a/packages/dapi-grpc/clients/platform/v0/java/org/dash/platform/dapi/v0/PlatformGrpc.java +++ b/packages/dapi-grpc/clients/platform/v0/java/org/dash/platform/dapi/v0/PlatformGrpc.java @@ -480,6 +480,68 @@ org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsResponse> getGetDocumen return getGetDocumentsMethod; } + private static volatile io.grpc.MethodDescriptor getGetDocumentsCountMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getDocumentsCount", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsCountRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsCountResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetDocumentsCountMethod() { + io.grpc.MethodDescriptor getGetDocumentsCountMethod; + if ((getGetDocumentsCountMethod = PlatformGrpc.getGetDocumentsCountMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetDocumentsCountMethod = PlatformGrpc.getGetDocumentsCountMethod) == null) { + PlatformGrpc.getGetDocumentsCountMethod = getGetDocumentsCountMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getDocumentsCount")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsCountRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsCountResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getDocumentsCount")) + .build(); + } + } + } + return getGetDocumentsCountMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetDocumentsSplitCountMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getDocumentsSplitCount", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsSplitCountRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsSplitCountResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetDocumentsSplitCountMethod() { + io.grpc.MethodDescriptor getGetDocumentsSplitCountMethod; + if ((getGetDocumentsSplitCountMethod = PlatformGrpc.getGetDocumentsSplitCountMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetDocumentsSplitCountMethod = PlatformGrpc.getGetDocumentsSplitCountMethod) == null) { + PlatformGrpc.getGetDocumentsSplitCountMethod = getGetDocumentsSplitCountMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getDocumentsSplitCount")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsSplitCountRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsSplitCountResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getDocumentsSplitCount")) + .build(); + } + } + } + return getGetDocumentsSplitCountMethod; + } + private static volatile io.grpc.MethodDescriptor getGetIdentityByPublicKeyHashMethod; @@ -2093,6 +2155,20 @@ public void getDocuments(org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumen io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDocumentsMethod(), responseObserver); } + /** + */ + public void getDocumentsCount(org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsCountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDocumentsCountMethod(), responseObserver); + } + + /** + */ + public void getDocumentsSplitCount(org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsSplitCountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDocumentsSplitCountMethod(), responseObserver); + } + /** */ public void getIdentityByPublicKeyHash(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityByPublicKeyHashRequest request, @@ -2547,6 +2623,20 @@ public void getRecentCompactedNullifierChanges(org.dash.platform.dapi.v0.Platfor org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsRequest, org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsResponse>( this, METHODID_GET_DOCUMENTS))) + .addMethod( + getGetDocumentsCountMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsCountRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsCountResponse>( + this, METHODID_GET_DOCUMENTS_COUNT))) + .addMethod( + getGetDocumentsSplitCountMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsSplitCountRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsSplitCountResponse>( + this, METHODID_GET_DOCUMENTS_SPLIT_COUNT))) .addMethod( getGetIdentityByPublicKeyHashMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -3017,6 +3107,22 @@ public void getDocuments(org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumen getChannel().newCall(getGetDocumentsMethod(), getCallOptions()), request, responseObserver); } + /** + */ + public void getDocumentsCount(org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsCountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDocumentsCountMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getDocumentsSplitCount(org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsSplitCountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDocumentsSplitCountMethod(), getCallOptions()), request, responseObserver); + } + /** */ public void getIdentityByPublicKeyHash(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityByPublicKeyHashRequest request, @@ -3534,6 +3640,20 @@ public org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsResponse getDocu getChannel(), getGetDocumentsMethod(), getCallOptions(), request); } + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsCountResponse getDocumentsCount(org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsCountRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDocumentsCountMethod(), getCallOptions(), request); + } + + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsSplitCountResponse getDocumentsSplitCount(org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsSplitCountRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDocumentsSplitCountMethod(), getCallOptions(), request); + } + /** */ public org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityByPublicKeyHashResponse getIdentityByPublicKeyHash(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityByPublicKeyHashRequest request) { @@ -4019,6 +4139,22 @@ public com.google.common.util.concurrent.ListenableFuture getDocumentsCount( + org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsCountRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDocumentsCountMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getDocumentsSplitCount( + org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsSplitCountRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDocumentsSplitCountMethod(), getCallOptions()), request); + } + /** */ public com.google.common.util.concurrent.ListenableFuture getIdentityByPublicKeyHash( @@ -4429,53 +4565,55 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -4554,6 +4692,14 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv serviceImpl.getDocuments((org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_DOCUMENTS_COUNT: + serviceImpl.getDocumentsCount((org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsCountRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_DOCUMENTS_SPLIT_COUNT: + serviceImpl.getDocumentsSplitCount((org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsSplitCountRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_GET_IDENTITY_BY_PUBLIC_KEY_HASH: serviceImpl.getIdentityByPublicKeyHash((org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityByPublicKeyHashRequest) request, (io.grpc.stub.StreamObserver) responseObserver); @@ -4818,6 +4964,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetDataContractHistoryMethod()) .addMethod(getGetDataContractsMethod()) .addMethod(getGetDocumentsMethod()) + .addMethod(getGetDocumentsCountMethod()) + .addMethod(getGetDocumentsSplitCountMethod()) .addMethod(getGetIdentityByPublicKeyHashMethod()) .addMethod(getGetIdentityByNonUniquePublicKeyHashMethod()) .addMethod(getWaitForStateTransitionResultMethod()) diff --git a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js index 5512864d915..98ff6239af1 100644 --- a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js +++ b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js @@ -581,6 +581,72 @@ $root.org = (function() { * @variation 2 */ + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getDocumentsCount}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getDocumentsCountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetDocumentsCountResponse} [response] GetDocumentsCountResponse + */ + + /** + * Calls getDocumentsCount. + * @function getDocumentsCount + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountRequest} request GetDocumentsCountRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getDocumentsCountCallback} callback Node-style callback called with the error, if any, and GetDocumentsCountResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getDocumentsCount = function getDocumentsCount(request, callback) { + return this.rpcCall(getDocumentsCount, $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest, $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse, request, callback); + }, "name", { value: "getDocumentsCount" }); + + /** + * Calls getDocumentsCount. + * @function getDocumentsCount + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountRequest} request GetDocumentsCountRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getDocumentsSplitCount}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getDocumentsSplitCountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} [response] GetDocumentsSplitCountResponse + */ + + /** + * Calls getDocumentsSplitCount. + * @function getDocumentsSplitCount + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountRequest} request GetDocumentsSplitCountRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getDocumentsSplitCountCallback} callback Node-style callback called with the error, if any, and GetDocumentsSplitCountResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getDocumentsSplitCount = function getDocumentsSplitCount(request, callback) { + return this.rpcCall(getDocumentsSplitCount, $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest, $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse, request, callback); + }, "name", { value: "getDocumentsSplitCount" }); + + /** + * Calls getDocumentsSplitCount. + * @function getDocumentsSplitCount + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountRequest} request GetDocumentsSplitCountRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getIdentityByPublicKeyHash}. * @memberof org.dash.platform.dapi.v0.Platform @@ -20641,6 +20707,2407 @@ $root.org = (function() { return GetDocumentsResponse; })(); + v0.GetDocumentsCountRequest = (function() { + + /** + * Properties of a GetDocumentsCountRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetDocumentsCountRequest + * @property {org.dash.platform.dapi.v0.GetDocumentsCountRequest.IGetDocumentsCountRequestV0|null} [v0] GetDocumentsCountRequest v0 + */ + + /** + * Constructs a new GetDocumentsCountRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetDocumentsCountRequest. + * @implements IGetDocumentsCountRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountRequest=} [properties] Properties to set + */ + function GetDocumentsCountRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsCountRequest v0. + * @member {org.dash.platform.dapi.v0.GetDocumentsCountRequest.IGetDocumentsCountRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @instance + */ + GetDocumentsCountRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetDocumentsCountRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @instance + */ + Object.defineProperty(GetDocumentsCountRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetDocumentsCountRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest} GetDocumentsCountRequest instance + */ + GetDocumentsCountRequest.create = function create(properties) { + return new GetDocumentsCountRequest(properties); + }; + + /** + * Encodes the specified GetDocumentsCountRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountRequest} message GetDocumentsCountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.v0 != null && Object.hasOwnProperty.call(message, "v0")) + $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetDocumentsCountRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountRequest} message GetDocumentsCountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsCountRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest} GetDocumentsCountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsCountRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest} GetDocumentsCountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsCountRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsCountRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + properties.version = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetDocumentsCountRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest} GetDocumentsCountRequest + */ + GetDocumentsCountRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsCountRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetDocumentsCountRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountRequest} message GetDocumentsCountRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsCountRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + object.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetDocumentsCountRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsCountRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetDocumentsCountRequest.GetDocumentsCountRequestV0 = (function() { + + /** + * Properties of a GetDocumentsCountRequestV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @interface IGetDocumentsCountRequestV0 + * @property {Uint8Array|null} [dataContractId] GetDocumentsCountRequestV0 dataContractId + * @property {string|null} [documentType] GetDocumentsCountRequestV0 documentType + * @property {Uint8Array|null} [where] GetDocumentsCountRequestV0 where + * @property {boolean|null} [prove] GetDocumentsCountRequestV0 prove + */ + + /** + * Constructs a new GetDocumentsCountRequestV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest + * @classdesc Represents a GetDocumentsCountRequestV0. + * @implements IGetDocumentsCountRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsCountRequest.IGetDocumentsCountRequestV0=} [properties] Properties to set + */ + function GetDocumentsCountRequestV0(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsCountRequestV0 dataContractId. + * @member {Uint8Array} dataContractId + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @instance + */ + GetDocumentsCountRequestV0.prototype.dataContractId = $util.newBuffer([]); + + /** + * GetDocumentsCountRequestV0 documentType. + * @member {string} documentType + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @instance + */ + GetDocumentsCountRequestV0.prototype.documentType = ""; + + /** + * GetDocumentsCountRequestV0 where. + * @member {Uint8Array} where + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @instance + */ + GetDocumentsCountRequestV0.prototype.where = $util.newBuffer([]); + + /** + * GetDocumentsCountRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @instance + */ + GetDocumentsCountRequestV0.prototype.prove = false; + + /** + * Creates a new GetDocumentsCountRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountRequest.IGetDocumentsCountRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} GetDocumentsCountRequestV0 instance + */ + GetDocumentsCountRequestV0.create = function create(properties) { + return new GetDocumentsCountRequestV0(properties); + }; + + /** + * Encodes the specified GetDocumentsCountRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountRequest.IGetDocumentsCountRequestV0} message GetDocumentsCountRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataContractId != null && Object.hasOwnProperty.call(message, "dataContractId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.dataContractId); + if (message.documentType != null && Object.hasOwnProperty.call(message, "documentType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.documentType); + if (message.where != null && Object.hasOwnProperty.call(message, "where")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.where); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetDocumentsCountRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountRequest.IGetDocumentsCountRequestV0} message GetDocumentsCountRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsCountRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} GetDocumentsCountRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountRequestV0.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dataContractId = reader.bytes(); + break; + case 2: + message.documentType = reader.string(); + break; + case 3: + message.where = reader.bytes(); + break; + case 4: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsCountRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} GetDocumentsCountRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsCountRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsCountRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataContractId != null && message.hasOwnProperty("dataContractId")) + if (!(message.dataContractId && typeof message.dataContractId.length === "number" || $util.isString(message.dataContractId))) + return "dataContractId: buffer expected"; + if (message.documentType != null && message.hasOwnProperty("documentType")) + if (!$util.isString(message.documentType)) + return "documentType: string expected"; + if (message.where != null && message.hasOwnProperty("where")) + if (!(message.where && typeof message.where.length === "number" || $util.isString(message.where))) + return "where: buffer expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetDocumentsCountRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} GetDocumentsCountRequestV0 + */ + GetDocumentsCountRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0(); + if (object.dataContractId != null) + if (typeof object.dataContractId === "string") + $util.base64.decode(object.dataContractId, message.dataContractId = $util.newBuffer($util.base64.length(object.dataContractId)), 0); + else if (object.dataContractId.length >= 0) + message.dataContractId = object.dataContractId; + if (object.documentType != null) + message.documentType = String(object.documentType); + if (object.where != null) + if (typeof object.where === "string") + $util.base64.decode(object.where, message.where = $util.newBuffer($util.base64.length(object.where)), 0); + else if (object.where.length >= 0) + message.where = object.where; + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetDocumentsCountRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} message GetDocumentsCountRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsCountRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.dataContractId = ""; + else { + object.dataContractId = []; + if (options.bytes !== Array) + object.dataContractId = $util.newBuffer(object.dataContractId); + } + object.documentType = ""; + if (options.bytes === String) + object.where = ""; + else { + object.where = []; + if (options.bytes !== Array) + object.where = $util.newBuffer(object.where); + } + object.prove = false; + } + if (message.dataContractId != null && message.hasOwnProperty("dataContractId")) + object.dataContractId = options.bytes === String ? $util.base64.encode(message.dataContractId, 0, message.dataContractId.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataContractId) : message.dataContractId; + if (message.documentType != null && message.hasOwnProperty("documentType")) + object.documentType = message.documentType; + if (message.where != null && message.hasOwnProperty("where")) + object.where = options.bytes === String ? $util.base64.encode(message.where, 0, message.where.length) : options.bytes === Array ? Array.prototype.slice.call(message.where) : message.where; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetDocumentsCountRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsCountRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetDocumentsCountRequestV0; + })(); + + return GetDocumentsCountRequest; + })(); + + v0.GetDocumentsCountResponse = (function() { + + /** + * Properties of a GetDocumentsCountResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetDocumentsCountResponse + * @property {org.dash.platform.dapi.v0.GetDocumentsCountResponse.IGetDocumentsCountResponseV0|null} [v0] GetDocumentsCountResponse v0 + */ + + /** + * Constructs a new GetDocumentsCountResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetDocumentsCountResponse. + * @implements IGetDocumentsCountResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountResponse=} [properties] Properties to set + */ + function GetDocumentsCountResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsCountResponse v0. + * @member {org.dash.platform.dapi.v0.GetDocumentsCountResponse.IGetDocumentsCountResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @instance + */ + GetDocumentsCountResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetDocumentsCountResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @instance + */ + Object.defineProperty(GetDocumentsCountResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetDocumentsCountResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse} GetDocumentsCountResponse instance + */ + GetDocumentsCountResponse.create = function create(properties) { + return new GetDocumentsCountResponse(properties); + }; + + /** + * Encodes the specified GetDocumentsCountResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountResponse} message GetDocumentsCountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.v0 != null && Object.hasOwnProperty.call(message, "v0")) + $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetDocumentsCountResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsCountResponse} message GetDocumentsCountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsCountResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse} GetDocumentsCountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsCountResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse} GetDocumentsCountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsCountResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsCountResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + properties.version = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetDocumentsCountResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse} GetDocumentsCountResponse + */ + GetDocumentsCountResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsCountResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetDocumentsCountResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountResponse} message GetDocumentsCountResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsCountResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + object.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetDocumentsCountResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsCountResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetDocumentsCountResponse.GetDocumentsCountResponseV0 = (function() { + + /** + * Properties of a GetDocumentsCountResponseV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @interface IGetDocumentsCountResponseV0 + * @property {number|Long|null} [count] GetDocumentsCountResponseV0 count + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetDocumentsCountResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetDocumentsCountResponseV0 metadata + */ + + /** + * Constructs a new GetDocumentsCountResponseV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse + * @classdesc Represents a GetDocumentsCountResponseV0. + * @implements IGetDocumentsCountResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsCountResponse.IGetDocumentsCountResponseV0=} [properties] Properties to set + */ + function GetDocumentsCountResponseV0(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsCountResponseV0 count. + * @member {number|Long} count + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @instance + */ + GetDocumentsCountResponseV0.prototype.count = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GetDocumentsCountResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @instance + */ + GetDocumentsCountResponseV0.prototype.proof = null; + + /** + * GetDocumentsCountResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @instance + */ + GetDocumentsCountResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetDocumentsCountResponseV0 result. + * @member {"count"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @instance + */ + Object.defineProperty(GetDocumentsCountResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["count", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetDocumentsCountResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountResponse.IGetDocumentsCountResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} GetDocumentsCountResponseV0 instance + */ + GetDocumentsCountResponseV0.create = function create(properties) { + return new GetDocumentsCountResponseV0(properties); + }; + + /** + * Encodes the specified GetDocumentsCountResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountResponse.IGetDocumentsCountResponseV0} message GetDocumentsCountResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.count); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.org.dash.platform.dapi.v0.ResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetDocumentsCountResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountResponse.IGetDocumentsCountResponseV0} message GetDocumentsCountResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsCountResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsCountResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} GetDocumentsCountResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountResponseV0.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.count = reader.uint64(); + break; + case 2: + message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32()); + break; + case 3: + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsCountResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} GetDocumentsCountResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsCountResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsCountResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsCountResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.count != null && message.hasOwnProperty("count")) { + properties.result = 1; + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + } + if (message.proof != null && message.hasOwnProperty("proof")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a GetDocumentsCountResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} GetDocumentsCountResponseV0 + */ + GetDocumentsCountResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = true; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(true); + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.proof: object expected"); + message.proof = $root.org.dash.platform.dapi.v0.Proof.fromObject(object.proof); + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetDocumentsCountResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} message GetDocumentsCountResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsCountResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.count != null && message.hasOwnProperty("count")) { + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber(true) : message.count; + if (options.oneofs) + object.result = "count"; + } + if (message.proof != null && message.hasOwnProperty("proof")) { + object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options); + if (options.oneofs) + object.result = "proof"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this GetDocumentsCountResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsCountResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetDocumentsCountResponseV0; + })(); + + return GetDocumentsCountResponse; + })(); + + v0.GetDocumentsSplitCountRequest = (function() { + + /** + * Properties of a GetDocumentsSplitCountRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetDocumentsSplitCountRequest + * @property {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.IGetDocumentsSplitCountRequestV0|null} [v0] GetDocumentsSplitCountRequest v0 + */ + + /** + * Constructs a new GetDocumentsSplitCountRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetDocumentsSplitCountRequest. + * @implements IGetDocumentsSplitCountRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountRequest=} [properties] Properties to set + */ + function GetDocumentsSplitCountRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsSplitCountRequest v0. + * @member {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.IGetDocumentsSplitCountRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @instance + */ + GetDocumentsSplitCountRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetDocumentsSplitCountRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @instance + */ + Object.defineProperty(GetDocumentsSplitCountRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetDocumentsSplitCountRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} GetDocumentsSplitCountRequest instance + */ + GetDocumentsSplitCountRequest.create = function create(properties) { + return new GetDocumentsSplitCountRequest(properties); + }; + + /** + * Encodes the specified GetDocumentsSplitCountRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountRequest} message GetDocumentsSplitCountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.v0 != null && Object.hasOwnProperty.call(message, "v0")) + $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetDocumentsSplitCountRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountRequest} message GetDocumentsSplitCountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsSplitCountRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} GetDocumentsSplitCountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsSplitCountRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} GetDocumentsSplitCountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsSplitCountRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsSplitCountRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + properties.version = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetDocumentsSplitCountRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} GetDocumentsSplitCountRequest + */ + GetDocumentsSplitCountRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetDocumentsSplitCountRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} message GetDocumentsSplitCountRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsSplitCountRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + object.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetDocumentsSplitCountRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsSplitCountRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 = (function() { + + /** + * Properties of a GetDocumentsSplitCountRequestV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @interface IGetDocumentsSplitCountRequestV0 + * @property {Uint8Array|null} [dataContractId] GetDocumentsSplitCountRequestV0 dataContractId + * @property {string|null} [documentType] GetDocumentsSplitCountRequestV0 documentType + * @property {Uint8Array|null} [where] GetDocumentsSplitCountRequestV0 where + * @property {string|null} [splitCountByIndexProperty] GetDocumentsSplitCountRequestV0 splitCountByIndexProperty + * @property {boolean|null} [prove] GetDocumentsSplitCountRequestV0 prove + */ + + /** + * Constructs a new GetDocumentsSplitCountRequestV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest + * @classdesc Represents a GetDocumentsSplitCountRequestV0. + * @implements IGetDocumentsSplitCountRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.IGetDocumentsSplitCountRequestV0=} [properties] Properties to set + */ + function GetDocumentsSplitCountRequestV0(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsSplitCountRequestV0 dataContractId. + * @member {Uint8Array} dataContractId + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @instance + */ + GetDocumentsSplitCountRequestV0.prototype.dataContractId = $util.newBuffer([]); + + /** + * GetDocumentsSplitCountRequestV0 documentType. + * @member {string} documentType + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @instance + */ + GetDocumentsSplitCountRequestV0.prototype.documentType = ""; + + /** + * GetDocumentsSplitCountRequestV0 where. + * @member {Uint8Array} where + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @instance + */ + GetDocumentsSplitCountRequestV0.prototype.where = $util.newBuffer([]); + + /** + * GetDocumentsSplitCountRequestV0 splitCountByIndexProperty. + * @member {string} splitCountByIndexProperty + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @instance + */ + GetDocumentsSplitCountRequestV0.prototype.splitCountByIndexProperty = ""; + + /** + * GetDocumentsSplitCountRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @instance + */ + GetDocumentsSplitCountRequestV0.prototype.prove = false; + + /** + * Creates a new GetDocumentsSplitCountRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.IGetDocumentsSplitCountRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} GetDocumentsSplitCountRequestV0 instance + */ + GetDocumentsSplitCountRequestV0.create = function create(properties) { + return new GetDocumentsSplitCountRequestV0(properties); + }; + + /** + * Encodes the specified GetDocumentsSplitCountRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.IGetDocumentsSplitCountRequestV0} message GetDocumentsSplitCountRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataContractId != null && Object.hasOwnProperty.call(message, "dataContractId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.dataContractId); + if (message.documentType != null && Object.hasOwnProperty.call(message, "documentType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.documentType); + if (message.where != null && Object.hasOwnProperty.call(message, "where")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.where); + if (message.splitCountByIndexProperty != null && Object.hasOwnProperty.call(message, "splitCountByIndexProperty")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.splitCountByIndexProperty); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetDocumentsSplitCountRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.IGetDocumentsSplitCountRequestV0} message GetDocumentsSplitCountRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsSplitCountRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} GetDocumentsSplitCountRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountRequestV0.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dataContractId = reader.bytes(); + break; + case 2: + message.documentType = reader.string(); + break; + case 3: + message.where = reader.bytes(); + break; + case 4: + message.splitCountByIndexProperty = reader.string(); + break; + case 5: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsSplitCountRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} GetDocumentsSplitCountRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsSplitCountRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsSplitCountRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataContractId != null && message.hasOwnProperty("dataContractId")) + if (!(message.dataContractId && typeof message.dataContractId.length === "number" || $util.isString(message.dataContractId))) + return "dataContractId: buffer expected"; + if (message.documentType != null && message.hasOwnProperty("documentType")) + if (!$util.isString(message.documentType)) + return "documentType: string expected"; + if (message.where != null && message.hasOwnProperty("where")) + if (!(message.where && typeof message.where.length === "number" || $util.isString(message.where))) + return "where: buffer expected"; + if (message.splitCountByIndexProperty != null && message.hasOwnProperty("splitCountByIndexProperty")) + if (!$util.isString(message.splitCountByIndexProperty)) + return "splitCountByIndexProperty: string expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetDocumentsSplitCountRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} GetDocumentsSplitCountRequestV0 + */ + GetDocumentsSplitCountRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0(); + if (object.dataContractId != null) + if (typeof object.dataContractId === "string") + $util.base64.decode(object.dataContractId, message.dataContractId = $util.newBuffer($util.base64.length(object.dataContractId)), 0); + else if (object.dataContractId.length >= 0) + message.dataContractId = object.dataContractId; + if (object.documentType != null) + message.documentType = String(object.documentType); + if (object.where != null) + if (typeof object.where === "string") + $util.base64.decode(object.where, message.where = $util.newBuffer($util.base64.length(object.where)), 0); + else if (object.where.length >= 0) + message.where = object.where; + if (object.splitCountByIndexProperty != null) + message.splitCountByIndexProperty = String(object.splitCountByIndexProperty); + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetDocumentsSplitCountRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} message GetDocumentsSplitCountRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsSplitCountRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.dataContractId = ""; + else { + object.dataContractId = []; + if (options.bytes !== Array) + object.dataContractId = $util.newBuffer(object.dataContractId); + } + object.documentType = ""; + if (options.bytes === String) + object.where = ""; + else { + object.where = []; + if (options.bytes !== Array) + object.where = $util.newBuffer(object.where); + } + object.splitCountByIndexProperty = ""; + object.prove = false; + } + if (message.dataContractId != null && message.hasOwnProperty("dataContractId")) + object.dataContractId = options.bytes === String ? $util.base64.encode(message.dataContractId, 0, message.dataContractId.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataContractId) : message.dataContractId; + if (message.documentType != null && message.hasOwnProperty("documentType")) + object.documentType = message.documentType; + if (message.where != null && message.hasOwnProperty("where")) + object.where = options.bytes === String ? $util.base64.encode(message.where, 0, message.where.length) : options.bytes === Array ? Array.prototype.slice.call(message.where) : message.where; + if (message.splitCountByIndexProperty != null && message.hasOwnProperty("splitCountByIndexProperty")) + object.splitCountByIndexProperty = message.splitCountByIndexProperty; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetDocumentsSplitCountRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsSplitCountRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetDocumentsSplitCountRequestV0; + })(); + + return GetDocumentsSplitCountRequest; + })(); + + v0.GetDocumentsSplitCountResponse = (function() { + + /** + * Properties of a GetDocumentsSplitCountResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetDocumentsSplitCountResponse + * @property {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.IGetDocumentsSplitCountResponseV0|null} [v0] GetDocumentsSplitCountResponse v0 + */ + + /** + * Constructs a new GetDocumentsSplitCountResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetDocumentsSplitCountResponse. + * @implements IGetDocumentsSplitCountResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountResponse=} [properties] Properties to set + */ + function GetDocumentsSplitCountResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsSplitCountResponse v0. + * @member {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.IGetDocumentsSplitCountResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @instance + */ + GetDocumentsSplitCountResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetDocumentsSplitCountResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @instance + */ + Object.defineProperty(GetDocumentsSplitCountResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetDocumentsSplitCountResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} GetDocumentsSplitCountResponse instance + */ + GetDocumentsSplitCountResponse.create = function create(properties) { + return new GetDocumentsSplitCountResponse(properties); + }; + + /** + * Encodes the specified GetDocumentsSplitCountResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountResponse} message GetDocumentsSplitCountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.v0 != null && Object.hasOwnProperty.call(message, "v0")) + $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetDocumentsSplitCountResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetDocumentsSplitCountResponse} message GetDocumentsSplitCountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsSplitCountResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} GetDocumentsSplitCountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsSplitCountResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} GetDocumentsSplitCountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsSplitCountResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsSplitCountResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + properties.version = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetDocumentsSplitCountResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} GetDocumentsSplitCountResponse + */ + GetDocumentsSplitCountResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetDocumentsSplitCountResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} message GetDocumentsSplitCountResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsSplitCountResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + object.v0 = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetDocumentsSplitCountResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsSplitCountResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 = (function() { + + /** + * Properties of a GetDocumentsSplitCountResponseV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @interface IGetDocumentsSplitCountResponseV0 + * @property {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCounts|null} [splitCounts] GetDocumentsSplitCountResponseV0 splitCounts + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetDocumentsSplitCountResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetDocumentsSplitCountResponseV0 metadata + */ + + /** + * Constructs a new GetDocumentsSplitCountResponseV0. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse + * @classdesc Represents a GetDocumentsSplitCountResponseV0. + * @implements IGetDocumentsSplitCountResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.IGetDocumentsSplitCountResponseV0=} [properties] Properties to set + */ + function GetDocumentsSplitCountResponseV0(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDocumentsSplitCountResponseV0 splitCounts. + * @member {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCounts|null|undefined} splitCounts + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @instance + */ + GetDocumentsSplitCountResponseV0.prototype.splitCounts = null; + + /** + * GetDocumentsSplitCountResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @instance + */ + GetDocumentsSplitCountResponseV0.prototype.proof = null; + + /** + * GetDocumentsSplitCountResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @instance + */ + GetDocumentsSplitCountResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetDocumentsSplitCountResponseV0 result. + * @member {"splitCounts"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @instance + */ + Object.defineProperty(GetDocumentsSplitCountResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["splitCounts", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetDocumentsSplitCountResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.IGetDocumentsSplitCountResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} GetDocumentsSplitCountResponseV0 instance + */ + GetDocumentsSplitCountResponseV0.create = function create(properties) { + return new GetDocumentsSplitCountResponseV0(properties); + }; + + /** + * Encodes the specified GetDocumentsSplitCountResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.IGetDocumentsSplitCountResponseV0} message GetDocumentsSplitCountResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.splitCounts != null && Object.hasOwnProperty.call(message, "splitCounts")) + $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.encode(message.splitCounts, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.org.dash.platform.dapi.v0.ResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetDocumentsSplitCountResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.IGetDocumentsSplitCountResponseV0} message GetDocumentsSplitCountResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentsSplitCountResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDocumentsSplitCountResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} GetDocumentsSplitCountResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountResponseV0.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.splitCounts = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.decode(reader, reader.uint32()); + break; + case 2: + message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32()); + break; + case 3: + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDocumentsSplitCountResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} GetDocumentsSplitCountResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentsSplitCountResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDocumentsSplitCountResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentsSplitCountResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.splitCounts != null && message.hasOwnProperty("splitCounts")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.verify(message.splitCounts); + if (error) + return "splitCounts." + error; + } + } + if (message.proof != null && message.hasOwnProperty("proof")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a GetDocumentsSplitCountResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} GetDocumentsSplitCountResponseV0 + */ + GetDocumentsSplitCountResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0(); + if (object.splitCounts != null) { + if (typeof object.splitCounts !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.splitCounts: object expected"); + message.splitCounts = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.fromObject(object.splitCounts); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.proof: object expected"); + message.proof = $root.org.dash.platform.dapi.v0.Proof.fromObject(object.proof); + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetDocumentsSplitCountResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} message GetDocumentsSplitCountResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentsSplitCountResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.splitCounts != null && message.hasOwnProperty("splitCounts")) { + object.splitCounts = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.toObject(message.splitCounts, options); + if (options.oneofs) + object.result = "splitCounts"; + } + if (message.proof != null && message.hasOwnProperty("proof")) { + object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options); + if (options.oneofs) + object.result = "proof"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this GetDocumentsSplitCountResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetDocumentsSplitCountResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetDocumentsSplitCountResponseV0.SplitCountEntry = (function() { + + /** + * Properties of a SplitCountEntry. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @interface ISplitCountEntry + * @property {Uint8Array|null} [key] SplitCountEntry key + * @property {number|Long|null} [count] SplitCountEntry count + */ + + /** + * Constructs a new SplitCountEntry. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @classdesc Represents a SplitCountEntry. + * @implements ISplitCountEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCountEntry=} [properties] Properties to set + */ + function SplitCountEntry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SplitCountEntry key. + * @member {Uint8Array} key + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @instance + */ + SplitCountEntry.prototype.key = $util.newBuffer([]); + + /** + * SplitCountEntry count. + * @member {number|Long} count + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @instance + */ + SplitCountEntry.prototype.count = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new SplitCountEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCountEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} SplitCountEntry instance + */ + SplitCountEntry.create = function create(properties) { + return new SplitCountEntry(properties); + }; + + /** + * Encodes the specified SplitCountEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCountEntry} message SplitCountEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SplitCountEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.count); + return writer; + }; + + /** + * Encodes the specified SplitCountEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCountEntry} message SplitCountEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SplitCountEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SplitCountEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} SplitCountEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SplitCountEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.count = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SplitCountEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} SplitCountEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SplitCountEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SplitCountEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SplitCountEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + return null; + }; + + /** + * Creates a SplitCountEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} SplitCountEntry + */ + SplitCountEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length >= 0) + message.key = object.key; + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = true; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a SplitCountEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} message SplitCountEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SplitCountEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber(true) : message.count; + return object; + }; + + /** + * Converts this SplitCountEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry + * @instance + * @returns {Object.} JSON object + */ + SplitCountEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SplitCountEntry; + })(); + + GetDocumentsSplitCountResponseV0.SplitCounts = (function() { + + /** + * Properties of a SplitCounts. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @interface ISplitCounts + * @property {Array.|null} [entries] SplitCounts entries + */ + + /** + * Constructs a new SplitCounts. + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 + * @classdesc Represents a SplitCounts. + * @implements ISplitCounts + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCounts=} [properties] Properties to set + */ + function SplitCounts(properties) { + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SplitCounts entries. + * @member {Array.} entries + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @instance + */ + SplitCounts.prototype.entries = $util.emptyArray; + + /** + * Creates a new SplitCounts instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCounts=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} SplitCounts instance + */ + SplitCounts.create = function create(properties) { + return new SplitCounts(properties); + }; + + /** + * Encodes the specified SplitCounts message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCounts} message SplitCounts message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SplitCounts.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SplitCounts message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ISplitCounts} message SplitCounts message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SplitCounts.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SplitCounts message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} SplitCounts + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SplitCounts.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SplitCounts message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} SplitCounts + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SplitCounts.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SplitCounts message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SplitCounts.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates a SplitCounts message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} SplitCounts + */ + SplitCounts.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.entries: object expected"); + message.entries[i] = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.fromObject(object.entries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SplitCounts message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} message SplitCounts + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SplitCounts.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.toObject(message.entries[j], options); + } + return object; + }; + + /** + * Converts this SplitCounts to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts + * @instance + * @returns {Object.} JSON object + */ + SplitCounts.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SplitCounts; + })(); + + return GetDocumentsSplitCountResponseV0; + })(); + + return GetDocumentsSplitCountResponse; + })(); + v0.GetIdentityByPublicKeyHashRequest = (function() { /** diff --git a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js index 4dcf181afe7..b670f84bcc7 100644 --- a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js +++ b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js @@ -150,6 +150,13 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractsResponse.Data goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase', null, { proto }); @@ -159,6 +166,15 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocum goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.ResultCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.VersionCase', null, { proto }); @@ -2235,6 +2251,216 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -25259,6 +25485,2175 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.hasV0 = function( +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest; + return proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + dataContractId: msg.getDataContractId_asB64(), + documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), + where: msg.getWhere_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0; + return proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDataContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentType(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setWhere(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDocumentType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getWhere_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional bytes data_contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getDataContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data_contract_id = 1; + * This is a type-conversion wrapper around `getDataContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getDataContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDataContractId())); +}; + + +/** + * optional bytes data_contract_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDataContractId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getDataContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDataContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.setDataContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string document_type = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getDocumentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.setDocumentType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes where = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getWhere = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes where = 3; + * This is a type-conversion wrapper around `getWhere()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getWhere_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getWhere())); +}; + + +/** + * optional bytes where = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getWhere()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getWhere_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getWhere())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.setWhere = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional bool prove = 4; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional GetDocumentsCountRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse; + return proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.serializeBinaryToWriter + ); + } +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + COUNT: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + count: jspb.Message.getFieldWithDefault(msg, 1, 0), + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0; + return proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCount(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.Proof; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.ResponseMetadata; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 count = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.setCount = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.clearCount = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.hasCount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetDocumentsCountResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest; + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + dataContractId: msg.getDataContractId_asB64(), + documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), + where: msg.getWhere_asB64(), + splitCountByIndexProperty: jspb.Message.getFieldWithDefault(msg, 4, ""), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0; + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDataContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentType(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setWhere(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSplitCountByIndexProperty(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDocumentType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getWhere_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getSplitCountByIndexProperty(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional bytes data_contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getDataContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data_contract_id = 1; + * This is a type-conversion wrapper around `getDataContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getDataContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDataContractId())); +}; + + +/** + * optional bytes data_contract_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDataContractId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getDataContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDataContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.setDataContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string document_type = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getDocumentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.setDocumentType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes where = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getWhere = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes where = 3; + * This is a type-conversion wrapper around `getWhere()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getWhere_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getWhere())); +}; + + +/** + * optional bytes where = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getWhere()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getWhere_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getWhere())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.setWhere = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional string split_count_by_index_property = 4; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getSplitCountByIndexProperty = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.setSplitCountByIndexProperty = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bool prove = 5; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional GetDocumentsSplitCountRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse; + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.serializeBinaryToWriter + ); + } +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + SPLIT_COUNTS: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + splitCounts: (f = msg.getSplitCounts()) && proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.toObject(includeInstance, f), + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0; + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.deserializeBinaryFromReader); + msg.setSplitCounts(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.Proof; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.ResponseMetadata; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSplitCounts(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.serializeBinaryToWriter + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64(), + count: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry; + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getCount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes key = 1; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 count = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.setCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.toObject = function(includeInstance, msg) { + var f, obj = { + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts; + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SplitCountEntry entries = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + +/** + * optional SplitCounts split_counts = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.getSplitCounts = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.setSplitCounts = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.clearSplitCounts = function() { + return this.setSplitCounts(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.hasSplitCounts = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetDocumentsSplitCountResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all diff --git a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.h b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.h index f33838280de..69ec8ea3eb3 100644 --- a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.h +++ b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.h @@ -90,9 +90,15 @@ CF_EXTERN_C_BEGIN @class GetDataContractsResponse_DataContractEntry; @class GetDataContractsResponse_DataContracts; @class GetDataContractsResponse_GetDataContractsResponseV0; +@class GetDocumentsCountRequest_GetDocumentsCountRequestV0; +@class GetDocumentsCountResponse_GetDocumentsCountResponseV0; @class GetDocumentsRequest_GetDocumentsRequestV0; @class GetDocumentsResponse_GetDocumentsResponseV0; @class GetDocumentsResponse_GetDocumentsResponseV0_Documents; +@class GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0; +@class GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0; +@class GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry; +@class GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts; @class GetEpochsInfoRequest_GetEpochsInfoRequestV0; @class GetEpochsInfoResponse_GetEpochsInfoResponseV0; @class GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo; @@ -2405,6 +2411,262 @@ GPB_FINAL @interface GetDocumentsResponse_GetDocumentsResponseV0_Documents : GPB @end +#pragma mark - GetDocumentsCountRequest + +typedef GPB_ENUM(GetDocumentsCountRequest_FieldNumber) { + GetDocumentsCountRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetDocumentsCountRequest_Version_OneOfCase) { + GetDocumentsCountRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetDocumentsCountRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetDocumentsCountRequest : GPBMessage + +@property(nonatomic, readonly) GetDocumentsCountRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetDocumentsCountRequest_GetDocumentsCountRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetDocumentsCountRequest_ClearVersionOneOfCase(GetDocumentsCountRequest *message); + +#pragma mark - GetDocumentsCountRequest_GetDocumentsCountRequestV0 + +typedef GPB_ENUM(GetDocumentsCountRequest_GetDocumentsCountRequestV0_FieldNumber) { + GetDocumentsCountRequest_GetDocumentsCountRequestV0_FieldNumber_DataContractId = 1, + GetDocumentsCountRequest_GetDocumentsCountRequestV0_FieldNumber_DocumentType = 2, + GetDocumentsCountRequest_GetDocumentsCountRequestV0_FieldNumber_Where = 3, + GetDocumentsCountRequest_GetDocumentsCountRequestV0_FieldNumber_Prove = 4, +}; + +GPB_FINAL @interface GetDocumentsCountRequest_GetDocumentsCountRequestV0 : GPBMessage + +/** The ID of the data contract containing the documents */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *dataContractId; + +/** The type of document being requested */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *documentType; + +/** CBOR-encoded where clauses for filtering */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *where; + +/** Flag to request a proof as the response */ +@property(nonatomic, readwrite) BOOL prove; + +@end + +#pragma mark - GetDocumentsCountResponse + +typedef GPB_ENUM(GetDocumentsCountResponse_FieldNumber) { + GetDocumentsCountResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetDocumentsCountResponse_Version_OneOfCase) { + GetDocumentsCountResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetDocumentsCountResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetDocumentsCountResponse : GPBMessage + +@property(nonatomic, readonly) GetDocumentsCountResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetDocumentsCountResponse_GetDocumentsCountResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetDocumentsCountResponse_ClearVersionOneOfCase(GetDocumentsCountResponse *message); + +#pragma mark - GetDocumentsCountResponse_GetDocumentsCountResponseV0 + +typedef GPB_ENUM(GetDocumentsCountResponse_GetDocumentsCountResponseV0_FieldNumber) { + GetDocumentsCountResponse_GetDocumentsCountResponseV0_FieldNumber_Count = 1, + GetDocumentsCountResponse_GetDocumentsCountResponseV0_FieldNumber_Proof = 2, + GetDocumentsCountResponse_GetDocumentsCountResponseV0_FieldNumber_Metadata = 3, +}; + +typedef GPB_ENUM(GetDocumentsCountResponse_GetDocumentsCountResponseV0_Result_OneOfCase) { + GetDocumentsCountResponse_GetDocumentsCountResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetDocumentsCountResponse_GetDocumentsCountResponseV0_Result_OneOfCase_Count = 1, + GetDocumentsCountResponse_GetDocumentsCountResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetDocumentsCountResponse_GetDocumentsCountResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetDocumentsCountResponse_GetDocumentsCountResponseV0_Result_OneOfCase resultOneOfCase; + +/** Total document count matching the query */ +@property(nonatomic, readwrite) uint64_t count; + +/** Cryptographic proof, if requested */ +@property(nonatomic, readwrite, strong, null_resettable) Proof *proof; + +/** Metadata about the blockchain state */ +@property(nonatomic, readwrite, strong, null_resettable) ResponseMetadata *metadata; +/** Test to see if @c metadata has been set. */ +@property(nonatomic, readwrite) BOOL hasMetadata; + +@end + +/** + * Clears whatever value was set for the oneof 'result'. + **/ +void GetDocumentsCountResponse_GetDocumentsCountResponseV0_ClearResultOneOfCase(GetDocumentsCountResponse_GetDocumentsCountResponseV0 *message); + +#pragma mark - GetDocumentsSplitCountRequest + +typedef GPB_ENUM(GetDocumentsSplitCountRequest_FieldNumber) { + GetDocumentsSplitCountRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetDocumentsSplitCountRequest_Version_OneOfCase) { + GetDocumentsSplitCountRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetDocumentsSplitCountRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetDocumentsSplitCountRequest : GPBMessage + +@property(nonatomic, readonly) GetDocumentsSplitCountRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetDocumentsSplitCountRequest_ClearVersionOneOfCase(GetDocumentsSplitCountRequest *message); + +#pragma mark - GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0 + +typedef GPB_ENUM(GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0_FieldNumber) { + GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0_FieldNumber_DataContractId = 1, + GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0_FieldNumber_DocumentType = 2, + GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0_FieldNumber_Where = 3, + GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0_FieldNumber_SplitCountByIndexProperty = 4, + GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0_FieldNumber_Prove = 5, +}; + +GPB_FINAL @interface GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0 : GPBMessage + +/** The ID of the data contract containing the documents */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *dataContractId; + +/** The type of document being requested */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *documentType; + +/** CBOR-encoded where clauses for filtering */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *where; + +/** The index property to split counts by */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *splitCountByIndexProperty; + +/** Flag to request a proof as the response */ +@property(nonatomic, readwrite) BOOL prove; + +@end + +#pragma mark - GetDocumentsSplitCountResponse + +typedef GPB_ENUM(GetDocumentsSplitCountResponse_FieldNumber) { + GetDocumentsSplitCountResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetDocumentsSplitCountResponse_Version_OneOfCase) { + GetDocumentsSplitCountResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetDocumentsSplitCountResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetDocumentsSplitCountResponse : GPBMessage + +@property(nonatomic, readonly) GetDocumentsSplitCountResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetDocumentsSplitCountResponse_ClearVersionOneOfCase(GetDocumentsSplitCountResponse *message); + +#pragma mark - GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0 + +typedef GPB_ENUM(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_FieldNumber) { + GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_FieldNumber_SplitCounts = 1, + GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_FieldNumber_Proof = 2, + GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_FieldNumber_Metadata = 3, +}; + +typedef GPB_ENUM(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_Result_OneOfCase) { + GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_Result_OneOfCase_SplitCounts = 1, + GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_Result_OneOfCase resultOneOfCase; + +/** Per-key counts */ +@property(nonatomic, readwrite, strong, null_resettable) GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts *splitCounts; + +/** Cryptographic proof, if requested */ +@property(nonatomic, readwrite, strong, null_resettable) Proof *proof; + +/** Metadata about the blockchain state */ +@property(nonatomic, readwrite, strong, null_resettable) ResponseMetadata *metadata; +/** Test to see if @c metadata has been set. */ +@property(nonatomic, readwrite) BOOL hasMetadata; + +@end + +/** + * Clears whatever value was set for the oneof 'result'. + **/ +void GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_ClearResultOneOfCase(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0 *message); + +#pragma mark - GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry + +typedef GPB_ENUM(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry_FieldNumber) { + GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry_FieldNumber_Key = 1, + GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry_FieldNumber_Count = 2, +}; + +/** + * A single entry: the key value and how many documents match + **/ +GPB_FINAL @interface GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry : GPBMessage + +/** The index property value */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *key; + +/** Number of documents with this key value */ +@property(nonatomic, readwrite) uint64_t count; + +@end + +#pragma mark - GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts + +typedef GPB_ENUM(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts_FieldNumber) { + GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts_FieldNumber_EntriesArray = 1, +}; + +GPB_FINAL @interface GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *entriesArray; +/** The number of items in @c entriesArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger entriesArray_Count; + +@end + #pragma mark - GetIdentityByPublicKeyHashRequest typedef GPB_ENUM(GetIdentityByPublicKeyHashRequest_FieldNumber) { diff --git a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.m b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.m index cb913c5347e..dc79f030c9d 100644 --- a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.m +++ b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.m @@ -116,11 +116,21 @@ GPBObjCClassDeclaration(GetDataContractsResponse_DataContractEntry); GPBObjCClassDeclaration(GetDataContractsResponse_DataContracts); GPBObjCClassDeclaration(GetDataContractsResponse_GetDataContractsResponseV0); +GPBObjCClassDeclaration(GetDocumentsCountRequest); +GPBObjCClassDeclaration(GetDocumentsCountRequest_GetDocumentsCountRequestV0); +GPBObjCClassDeclaration(GetDocumentsCountResponse); +GPBObjCClassDeclaration(GetDocumentsCountResponse_GetDocumentsCountResponseV0); GPBObjCClassDeclaration(GetDocumentsRequest); GPBObjCClassDeclaration(GetDocumentsRequest_GetDocumentsRequestV0); GPBObjCClassDeclaration(GetDocumentsResponse); GPBObjCClassDeclaration(GetDocumentsResponse_GetDocumentsResponseV0); GPBObjCClassDeclaration(GetDocumentsResponse_GetDocumentsResponseV0_Documents); +GPBObjCClassDeclaration(GetDocumentsSplitCountRequest); +GPBObjCClassDeclaration(GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0); +GPBObjCClassDeclaration(GetDocumentsSplitCountResponse); +GPBObjCClassDeclaration(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0); +GPBObjCClassDeclaration(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry); +GPBObjCClassDeclaration(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts); GPBObjCClassDeclaration(GetEpochsInfoRequest); GPBObjCClassDeclaration(GetEpochsInfoRequest_GetEpochsInfoRequestV0); GPBObjCClassDeclaration(GetEpochsInfoResponse); @@ -5439,6 +5449,664 @@ + (GPBDescriptor *)descriptor { @end +#pragma mark - GetDocumentsCountRequest + +@implementation GetDocumentsCountRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetDocumentsCountRequest__storage_ { + uint32_t _has_storage_[2]; + GetDocumentsCountRequest_GetDocumentsCountRequestV0 *v0; +} GetDocumentsCountRequest__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "v0", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsCountRequest_GetDocumentsCountRequestV0), + .number = GetDocumentsCountRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsCountRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsCountRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsCountRequest__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "version", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetDocumentsCountRequest_ClearVersionOneOfCase(GetDocumentsCountRequest *message) { + GPBDescriptor *descriptor = [GetDocumentsCountRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetDocumentsCountRequest_GetDocumentsCountRequestV0 + +@implementation GetDocumentsCountRequest_GetDocumentsCountRequestV0 + +@dynamic dataContractId; +@dynamic documentType; +@dynamic where; +@dynamic prove; + +typedef struct GetDocumentsCountRequest_GetDocumentsCountRequestV0__storage_ { + uint32_t _has_storage_[1]; + NSData *dataContractId; + NSString *documentType; + NSData *where; +} GetDocumentsCountRequest_GetDocumentsCountRequestV0__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "dataContractId", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsCountRequest_GetDocumentsCountRequestV0_FieldNumber_DataContractId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetDocumentsCountRequest_GetDocumentsCountRequestV0__storage_, dataContractId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "documentType", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsCountRequest_GetDocumentsCountRequestV0_FieldNumber_DocumentType, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetDocumentsCountRequest_GetDocumentsCountRequestV0__storage_, documentType), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeString, + }, + { + .name = "where", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsCountRequest_GetDocumentsCountRequestV0_FieldNumber_Where, + .hasIndex = 2, + .offset = (uint32_t)offsetof(GetDocumentsCountRequest_GetDocumentsCountRequestV0__storage_, where), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsCountRequest_GetDocumentsCountRequestV0_FieldNumber_Prove, + .hasIndex = 3, + .offset = 4, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsCountRequest_GetDocumentsCountRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsCountRequest_GetDocumentsCountRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetDocumentsCountRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetDocumentsCountResponse + +@implementation GetDocumentsCountResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetDocumentsCountResponse__storage_ { + uint32_t _has_storage_[2]; + GetDocumentsCountResponse_GetDocumentsCountResponseV0 *v0; +} GetDocumentsCountResponse__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "v0", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsCountResponse_GetDocumentsCountResponseV0), + .number = GetDocumentsCountResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsCountResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsCountResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsCountResponse__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "version", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetDocumentsCountResponse_ClearVersionOneOfCase(GetDocumentsCountResponse *message) { + GPBDescriptor *descriptor = [GetDocumentsCountResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetDocumentsCountResponse_GetDocumentsCountResponseV0 + +@implementation GetDocumentsCountResponse_GetDocumentsCountResponseV0 + +@dynamic resultOneOfCase; +@dynamic count; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetDocumentsCountResponse_GetDocumentsCountResponseV0__storage_ { + uint32_t _has_storage_[2]; + Proof *proof; + ResponseMetadata *metadata; + uint64_t count; +} GetDocumentsCountResponse_GetDocumentsCountResponseV0__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "count", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsCountResponse_GetDocumentsCountResponseV0_FieldNumber_Count, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsCountResponse_GetDocumentsCountResponseV0__storage_, count), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeUInt64, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetDocumentsCountResponse_GetDocumentsCountResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsCountResponse_GetDocumentsCountResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetDocumentsCountResponse_GetDocumentsCountResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetDocumentsCountResponse_GetDocumentsCountResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsCountResponse_GetDocumentsCountResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsCountResponse_GetDocumentsCountResponseV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "result", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetDocumentsCountResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetDocumentsCountResponse_GetDocumentsCountResponseV0_ClearResultOneOfCase(GetDocumentsCountResponse_GetDocumentsCountResponseV0 *message) { + GPBDescriptor *descriptor = [GetDocumentsCountResponse_GetDocumentsCountResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetDocumentsSplitCountRequest + +@implementation GetDocumentsSplitCountRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetDocumentsSplitCountRequest__storage_ { + uint32_t _has_storage_[2]; + GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0 *v0; +} GetDocumentsSplitCountRequest__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "v0", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0), + .number = GetDocumentsSplitCountRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsSplitCountRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsSplitCountRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsSplitCountRequest__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "version", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetDocumentsSplitCountRequest_ClearVersionOneOfCase(GetDocumentsSplitCountRequest *message) { + GPBDescriptor *descriptor = [GetDocumentsSplitCountRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0 + +@implementation GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0 + +@dynamic dataContractId; +@dynamic documentType; +@dynamic where; +@dynamic splitCountByIndexProperty; +@dynamic prove; + +typedef struct GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0__storage_ { + uint32_t _has_storage_[1]; + NSData *dataContractId; + NSString *documentType; + NSData *where; + NSString *splitCountByIndexProperty; +} GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "dataContractId", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0_FieldNumber_DataContractId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0__storage_, dataContractId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "documentType", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0_FieldNumber_DocumentType, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0__storage_, documentType), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeString, + }, + { + .name = "where", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0_FieldNumber_Where, + .hasIndex = 2, + .offset = (uint32_t)offsetof(GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0__storage_, where), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "splitCountByIndexProperty", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0_FieldNumber_SplitCountByIndexProperty, + .hasIndex = 3, + .offset = (uint32_t)offsetof(GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0__storage_, splitCountByIndexProperty), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeString, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0_FieldNumber_Prove, + .hasIndex = 4, + .offset = 5, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsSplitCountRequest_GetDocumentsSplitCountRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetDocumentsSplitCountRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetDocumentsSplitCountResponse + +@implementation GetDocumentsSplitCountResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetDocumentsSplitCountResponse__storage_ { + uint32_t _has_storage_[2]; + GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0 *v0; +} GetDocumentsSplitCountResponse__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "v0", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0), + .number = GetDocumentsSplitCountResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsSplitCountResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsSplitCountResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsSplitCountResponse__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "version", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetDocumentsSplitCountResponse_ClearVersionOneOfCase(GetDocumentsSplitCountResponse *message) { + GPBDescriptor *descriptor = [GetDocumentsSplitCountResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0 + +@implementation GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0 + +@dynamic resultOneOfCase; +@dynamic splitCounts; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0__storage_ { + uint32_t _has_storage_[2]; + GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts *splitCounts; + Proof *proof; + ResponseMetadata *metadata; +} GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "splitCounts", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts), + .number = GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_FieldNumber_SplitCounts, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0__storage_, splitCounts), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "result", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetDocumentsSplitCountResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_ClearResultOneOfCase(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0 *message) { + GPBDescriptor *descriptor = [GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry + +@implementation GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry + +@dynamic key; +@dynamic count; + +typedef struct GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry__storage_ { + uint32_t _has_storage_[1]; + NSData *key; + uint64_t count; +} GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "key", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry_FieldNumber_Key, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry__storage_, key), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "count", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry_FieldNumber_Count, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry__storage_, count), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts + +@implementation GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts + +@dynamic entriesArray, entriesArray_Count; + +typedef struct GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *entriesArray; +} GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "entriesArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCountEntry), + .number = GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts_FieldNumber_EntriesArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts__storage_, entriesArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0_SplitCounts__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetDocumentsSplitCountResponse_GetDocumentsSplitCountResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + #pragma mark - GetIdentityByPublicKeyHashRequest @implementation GetIdentityByPublicKeyHashRequest diff --git a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.h b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.h index 113d8bdbf33..f0b6902be5c 100644 --- a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.h +++ b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.h @@ -42,8 +42,12 @@ @class GetDataContractResponse; @class GetDataContractsRequest; @class GetDataContractsResponse; +@class GetDocumentsCountRequest; +@class GetDocumentsCountResponse; @class GetDocumentsRequest; @class GetDocumentsResponse; +@class GetDocumentsSplitCountRequest; +@class GetDocumentsSplitCountResponse; @class GetEpochsInfoRequest; @class GetEpochsInfoResponse; @class GetEvonodesProposedEpochBlocksByIdsRequest; @@ -230,6 +234,14 @@ NS_ASSUME_NONNULL_BEGIN - (GRPCUnaryProtoCall *)getDocumentsWithMessage:(GetDocumentsRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; +#pragma mark getDocumentsCount(GetDocumentsCountRequest) returns (GetDocumentsCountResponse) + +- (GRPCUnaryProtoCall *)getDocumentsCountWithMessage:(GetDocumentsCountRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + +#pragma mark getDocumentsSplitCount(GetDocumentsSplitCountRequest) returns (GetDocumentsSplitCountResponse) + +- (GRPCUnaryProtoCall *)getDocumentsSplitCountWithMessage:(GetDocumentsSplitCountRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + #pragma mark getIdentityByPublicKeyHash(GetIdentityByPublicKeyHashRequest) returns (GetIdentityByPublicKeyHashResponse) - (GRPCUnaryProtoCall *)getIdentityByPublicKeyHashWithMessage:(GetIdentityByPublicKeyHashRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; @@ -559,6 +571,20 @@ NS_ASSUME_NONNULL_BEGIN - (GRPCProtoCall *)RPCTogetDocumentsWithRequest:(GetDocumentsRequest *)request handler:(void(^)(GetDocumentsResponse *_Nullable response, NSError *_Nullable error))handler; +#pragma mark getDocumentsCount(GetDocumentsCountRequest) returns (GetDocumentsCountResponse) + +- (void)getDocumentsCountWithRequest:(GetDocumentsCountRequest *)request handler:(void(^)(GetDocumentsCountResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetDocumentsCountWithRequest:(GetDocumentsCountRequest *)request handler:(void(^)(GetDocumentsCountResponse *_Nullable response, NSError *_Nullable error))handler; + + +#pragma mark getDocumentsSplitCount(GetDocumentsSplitCountRequest) returns (GetDocumentsSplitCountResponse) + +- (void)getDocumentsSplitCountWithRequest:(GetDocumentsSplitCountRequest *)request handler:(void(^)(GetDocumentsSplitCountResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetDocumentsSplitCountWithRequest:(GetDocumentsSplitCountRequest *)request handler:(void(^)(GetDocumentsSplitCountResponse *_Nullable response, NSError *_Nullable error))handler; + + #pragma mark getIdentityByPublicKeyHash(GetIdentityByPublicKeyHashRequest) returns (GetIdentityByPublicKeyHashResponse) - (void)getIdentityByPublicKeyHashWithRequest:(GetIdentityByPublicKeyHashRequest *)request handler:(void(^)(GetIdentityByPublicKeyHashResponse *_Nullable response, NSError *_Nullable error))handler; diff --git a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.m b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.m index cb8f4ecbc61..4a440188fd1 100644 --- a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.m +++ b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.m @@ -383,6 +383,46 @@ - (GRPCUnaryProtoCall *)getDocumentsWithMessage:(GetDocumentsRequest *)message r responseClass:[GetDocumentsResponse class]]; } +#pragma mark getDocumentsCount(GetDocumentsCountRequest) returns (GetDocumentsCountResponse) + +- (void)getDocumentsCountWithRequest:(GetDocumentsCountRequest *)request handler:(void(^)(GetDocumentsCountResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetDocumentsCountWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetDocumentsCountWithRequest:(GetDocumentsCountRequest *)request handler:(void(^)(GetDocumentsCountResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getDocumentsCount" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetDocumentsCountResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getDocumentsCountWithMessage:(GetDocumentsCountRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getDocumentsCount" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetDocumentsCountResponse class]]; +} + +#pragma mark getDocumentsSplitCount(GetDocumentsSplitCountRequest) returns (GetDocumentsSplitCountResponse) + +- (void)getDocumentsSplitCountWithRequest:(GetDocumentsSplitCountRequest *)request handler:(void(^)(GetDocumentsSplitCountResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetDocumentsSplitCountWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetDocumentsSplitCountWithRequest:(GetDocumentsSplitCountRequest *)request handler:(void(^)(GetDocumentsSplitCountResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getDocumentsSplitCount" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetDocumentsSplitCountResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getDocumentsSplitCountWithMessage:(GetDocumentsSplitCountRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getDocumentsSplitCount" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetDocumentsSplitCountResponse class]]; +} + #pragma mark getIdentityByPublicKeyHash(GetIdentityByPublicKeyHashRequest) returns (GetIdentityByPublicKeyHashResponse) - (void)getIdentityByPublicKeyHashWithRequest:(GetIdentityByPublicKeyHashRequest *)request handler:(void(^)(GetIdentityByPublicKeyHashResponse *_Nullable response, NSError *_Nullable error))handler{ diff --git a/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py b/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py index 1941e585c3c..fad9590a2c3 100644 --- a/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py +++ b/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py @@ -23,7 +23,7 @@ syntax='proto3', serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x0eplatform.proto\x12\x19org.dash.platform.dapi.v0\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x01\n\x05Proof\x12\x15\n\rgrovedb_proof\x18\x01 \x01(\x0c\x12\x13\n\x0bquorum_hash\x18\x02 \x01(\x0c\x12\x11\n\tsignature\x18\x03 \x01(\x0c\x12\r\n\x05round\x18\x04 \x01(\r\x12\x15\n\rblock_id_hash\x18\x05 \x01(\x0c\x12\x13\n\x0bquorum_type\x18\x06 \x01(\r\"\x98\x01\n\x10ResponseMetadata\x12\x12\n\x06height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12 \n\x18\x63ore_chain_locked_height\x18\x02 \x01(\r\x12\r\n\x05\x65poch\x18\x03 \x01(\r\x12\x13\n\x07time_ms\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x18\n\x10protocol_version\x18\x05 \x01(\r\x12\x10\n\x08\x63hain_id\x18\x06 \x01(\t\"L\n\x1dStateTransitionBroadcastError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\";\n\x1f\x42roadcastStateTransitionRequest\x12\x18\n\x10state_transition\x18\x01 \x01(\x0c\"\"\n BroadcastStateTransitionResponse\"\xa4\x01\n\x12GetIdentityRequest\x12P\n\x02v0\x18\x01 \x01(\x0b\x32\x42.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0H\x00\x1a\x31\n\x14GetIdentityRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xc1\x01\n\x17GetIdentityNonceRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0H\x00\x1a?\n\x19GetIdentityNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf6\x01\n\x1fGetIdentityContractNonceRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0H\x00\x1a\\\n!GetIdentityContractNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xc0\x01\n\x19GetIdentityBalanceRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0H\x00\x1a\x38\n\x1bGetIdentityBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xec\x01\n$GetIdentityBalanceAndRevisionRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0H\x00\x1a\x43\n&GetIdentityBalanceAndRevisionRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9e\x02\n\x13GetIdentityResponse\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0H\x00\x1a\xa7\x01\n\x15GetIdentityResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbc\x02\n\x18GetIdentityNonceResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0H\x00\x1a\xb6\x01\n\x1aGetIdentityNonceResponseV0\x12\x1c\n\x0eidentity_nonce\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xe5\x02\n GetIdentityContractNonceResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0H\x00\x1a\xc7\x01\n\"GetIdentityContractNonceResponseV0\x12%\n\x17identity_contract_nonce\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbd\x02\n\x1aGetIdentityBalanceResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0H\x00\x1a\xb1\x01\n\x1cGetIdentityBalanceResponseV0\x12\x15\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb1\x04\n%GetIdentityBalanceAndRevisionResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0H\x00\x1a\x84\x03\n\'GetIdentityBalanceAndRevisionResponseV0\x12\x9b\x01\n\x14\x62\x61lance_and_revision\x18\x01 \x01(\x0b\x32{.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevisionH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a?\n\x12\x42\x61lanceAndRevision\x12\x13\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x14\n\x08revision\x18\x02 \x01(\x04\x42\x02\x30\x01\x42\x08\n\x06resultB\t\n\x07version\"\xd1\x01\n\x0eKeyRequestType\x12\x36\n\x08\x61ll_keys\x18\x01 \x01(\x0b\x32\".org.dash.platform.dapi.v0.AllKeysH\x00\x12@\n\rspecific_keys\x18\x02 \x01(\x0b\x32\'.org.dash.platform.dapi.v0.SpecificKeysH\x00\x12:\n\nsearch_key\x18\x03 \x01(\x0b\x32$.org.dash.platform.dapi.v0.SearchKeyH\x00\x42\t\n\x07request\"\t\n\x07\x41llKeys\"\x1f\n\x0cSpecificKeys\x12\x0f\n\x07key_ids\x18\x01 \x03(\r\"\xb6\x01\n\tSearchKey\x12I\n\x0bpurpose_map\x18\x01 \x03(\x0b\x32\x34.org.dash.platform.dapi.v0.SearchKey.PurposeMapEntry\x1a^\n\x0fPurposeMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.org.dash.platform.dapi.v0.SecurityLevelMap:\x02\x38\x01\"\xbf\x02\n\x10SecurityLevelMap\x12]\n\x12security_level_map\x18\x01 \x03(\x0b\x32\x41.org.dash.platform.dapi.v0.SecurityLevelMap.SecurityLevelMapEntry\x1aw\n\x15SecurityLevelMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12M\n\x05value\x18\x02 \x01(\x0e\x32>.org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType:\x02\x38\x01\"S\n\x12KeyKindRequestType\x12\x1f\n\x1b\x43URRENT_KEY_OF_KIND_REQUEST\x10\x00\x12\x1c\n\x18\x41LL_KEYS_OF_KIND_REQUEST\x10\x01\"\xda\x02\n\x16GetIdentityKeysRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0H\x00\x1a\xda\x01\n\x18GetIdentityKeysRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12?\n\x0crequest_type\x18\x02 \x01(\x0b\x32).org.dash.platform.dapi.v0.KeyRequestType\x12+\n\x05limit\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x04 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\x99\x03\n\x17GetIdentityKeysResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0H\x00\x1a\x96\x02\n\x19GetIdentityKeysResponseV0\x12\x61\n\x04keys\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.KeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1a\n\x04Keys\x12\x12\n\nkeys_bytes\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xef\x02\n GetIdentitiesContractKeysRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0H\x00\x1a\xd1\x01\n\"GetIdentitiesContractKeysRequestV0\x12\x16\n\x0eidentities_ids\x18\x01 \x03(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\x1f\n\x12\x64ocument_type_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x08purposes\x18\x04 \x03(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x15\n\x13_document_type_nameB\t\n\x07version\"\xdf\x06\n!GetIdentitiesContractKeysResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0H\x00\x1a\xbe\x05\n#GetIdentitiesContractKeysResponseV0\x12\x8a\x01\n\x0fidentities_keys\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aY\n\x0bPurposeKeys\x12\x36\n\x07purpose\x18\x01 \x01(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\x12\n\nkeys_bytes\x18\x02 \x03(\x0c\x1a\x9f\x01\n\x0cIdentityKeys\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12z\n\x04keys\x18\x02 \x03(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys\x1a\x90\x01\n\x0eIdentitiesKeys\x12~\n\x07\x65ntries\x18\x01 \x03(\x0b\x32m.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeysB\x08\n\x06resultB\t\n\x07version\"\xa4\x02\n*GetEvonodesProposedEpochBlocksByIdsRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0H\x00\x1ah\n,GetEvonodesProposedEpochBlocksByIdsRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x0b\n\x03ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x08\n\x06_epochB\t\n\x07version\"\x92\x06\n&GetEvonodesProposedEpochBlocksResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0H\x00\x1a\xe2\x04\n(GetEvonodesProposedEpochBlocksResponseV0\x12\xb1\x01\n#evonodes_proposed_block_counts_info\x18\x01 \x01(\x0b\x32\x81\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocksH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a?\n\x15\x45vonodeProposedBlocks\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x11\n\x05\x63ount\x18\x02 \x01(\x04\x42\x02\x30\x01\x1a\xc4\x01\n\x16\x45vonodesProposedBlocks\x12\xa9\x01\n\x1e\x65vonodes_proposed_block_counts\x18\x01 \x03(\x0b\x32\x80\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocksB\x08\n\x06resultB\t\n\x07version\"\xf2\x02\n,GetEvonodesProposedEpochBlocksByRangeRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0H\x00\x1a\xaf\x01\n.GetEvonodesProposedEpochBlocksByRangeRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x02 \x01(\rH\x02\x88\x01\x01\x12\x15\n\x0bstart_after\x18\x03 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x04 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x07\n\x05startB\x08\n\x06_epochB\x08\n\x06_limitB\t\n\x07version\"\xcd\x01\n\x1cGetIdentitiesBalancesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0H\x00\x1a<\n\x1eGetIdentitiesBalancesRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9f\x05\n\x1dGetIdentitiesBalancesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0H\x00\x1a\x8a\x04\n\x1fGetIdentitiesBalancesResponseV0\x12\x8a\x01\n\x13identities_balances\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aL\n\x0fIdentityBalance\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x18\n\x07\x62\x61lance\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x8f\x01\n\x12IdentitiesBalances\x12y\n\x07\x65ntries\x18\x01 \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalanceB\x08\n\x06resultB\t\n\x07version\"\xb4\x01\n\x16GetDataContractRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0H\x00\x1a\x35\n\x18GetDataContractRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xb3\x02\n\x17GetDataContractResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0H\x00\x1a\xb0\x01\n\x19GetDataContractResponseV0\x12\x17\n\rdata_contract\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb9\x01\n\x17GetDataContractsRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0H\x00\x1a\x37\n\x19GetDataContractsRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xcf\x04\n\x18GetDataContractsResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0H\x00\x1a[\n\x11\x44\x61taContractEntry\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x32\n\rdata_contract\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x1au\n\rDataContracts\x12\x64\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32\x45.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry\x1a\xf5\x01\n\x1aGetDataContractsResponseV0\x12[\n\x0e\x64\x61ta_contracts\x18\x01 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc5\x02\n\x1dGetDataContractHistoryRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0H\x00\x1a\xb0\x01\n\x1fGetDataContractHistoryRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x17\n\x0bstart_at_ms\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xb2\x05\n\x1eGetDataContractHistoryResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0H\x00\x1a\x9a\x04\n GetDataContractHistoryResponseV0\x12\x8f\x01\n\x15\x64\x61ta_contract_history\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a;\n\x18\x44\x61taContractHistoryEntry\x12\x10\n\x04\x64\x61te\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05value\x18\x02 \x01(\x0c\x1a\xaa\x01\n\x13\x44\x61taContractHistory\x12\x92\x01\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32s.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntryB\x08\n\x06resultB\t\n\x07version\"\xb2\x02\n\x13GetDocumentsRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0H\x00\x1a\xbb\x01\n\x15GetDocumentsRequestV0\x12\x18\n\x10\x64\x61ta_contract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12\r\n\x05where\x18\x03 \x01(\x0c\x12\x10\n\x08order_by\x18\x04 \x01(\x0c\x12\r\n\x05limit\x18\x05 \x01(\r\x12\x15\n\x0bstart_after\x18\x06 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x07 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x08 \x01(\x08\x42\x07\n\x05startB\t\n\x07version\"\x95\x03\n\x14GetDocumentsResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0H\x00\x1a\x9b\x02\n\x16GetDocumentsResponseV0\x12\x65\n\tdocuments\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.DocumentsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1e\n\tDocuments\x12\x11\n\tdocuments\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xed\x01\n!GetIdentityByPublicKeyHashRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0H\x00\x1aM\n#GetIdentityByPublicKeyHashRequestV0\x12\x17\n\x0fpublic_key_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xda\x02\n\"GetIdentityByPublicKeyHashResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0H\x00\x1a\xb6\x01\n$GetIdentityByPublicKeyHashResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbd\x02\n*GetIdentityByNonUniquePublicKeyHashRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashRequest.GetIdentityByNonUniquePublicKeyHashRequestV0H\x00\x1a\x80\x01\n,GetIdentityByNonUniquePublicKeyHashRequestV0\x12\x17\n\x0fpublic_key_hash\x18\x01 \x01(\x0c\x12\x18\n\x0bstart_after\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x0e\n\x0c_start_afterB\t\n\x07version\"\xd6\x06\n+GetIdentityByNonUniquePublicKeyHashResponse\x12\x82\x01\n\x02v0\x18\x01 \x01(\x0b\x32t.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0H\x00\x1a\x96\x05\n-GetIdentityByNonUniquePublicKeyHashResponseV0\x12\x9a\x01\n\x08identity\x18\x01 \x01(\x0b\x32\x85\x01.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityResponseH\x00\x12\x9d\x01\n\x05proof\x18\x02 \x01(\x0b\x32\x8b\x01.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponseH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x36\n\x10IdentityResponse\x12\x15\n\x08identity\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\x0b\n\t_identity\x1a\xa6\x01\n\x16IdentityProvedResponse\x12P\n&grovedb_identity_public_key_hash_proof\x18\x01 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12!\n\x14identity_proof_bytes\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x42\x17\n\x15_identity_proof_bytesB\x08\n\x06resultB\t\n\x07version\"\xfb\x01\n#WaitForStateTransitionResultRequest\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0H\x00\x1aU\n%WaitForStateTransitionResultRequestV0\x12\x1d\n\x15state_transition_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x99\x03\n$WaitForStateTransitionResultResponse\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0H\x00\x1a\xef\x01\n&WaitForStateTransitionResultResponseV0\x12I\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x38.org.dash.platform.dapi.v0.StateTransitionBroadcastErrorH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x19GetConsensusParamsRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0H\x00\x1a<\n\x1bGetConsensusParamsRequestV0\x12\x0e\n\x06height\x18\x01 \x01(\x05\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9c\x04\n\x1aGetConsensusParamsResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0H\x00\x1aP\n\x14\x43onsensusParamsBlock\x12\x11\n\tmax_bytes\x18\x01 \x01(\t\x12\x0f\n\x07max_gas\x18\x02 \x01(\t\x12\x14\n\x0ctime_iota_ms\x18\x03 \x01(\t\x1a\x62\n\x17\x43onsensusParamsEvidence\x12\x1a\n\x12max_age_num_blocks\x18\x01 \x01(\t\x12\x18\n\x10max_age_duration\x18\x02 \x01(\t\x12\x11\n\tmax_bytes\x18\x03 \x01(\t\x1a\xda\x01\n\x1cGetConsensusParamsResponseV0\x12Y\n\x05\x62lock\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock\x12_\n\x08\x65vidence\x18\x02 \x01(\x0b\x32M.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidenceB\t\n\x07version\"\xe4\x01\n%GetProtocolVersionUpgradeStateRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0H\x00\x1a\x38\n\'GetProtocolVersionUpgradeStateRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xb5\x05\n&GetProtocolVersionUpgradeStateResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0H\x00\x1a\x85\x04\n(GetProtocolVersionUpgradeStateResponseV0\x12\x87\x01\n\x08versions\x18\x01 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x96\x01\n\x08Versions\x12\x89\x01\n\x08versions\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry\x1a:\n\x0cVersionEntry\x12\x16\n\x0eversion_number\x18\x01 \x01(\r\x12\x12\n\nvote_count\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xa3\x02\n*GetProtocolVersionUpgradeVoteStatusRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0H\x00\x1ag\n,GetProtocolVersionUpgradeVoteStatusRequestV0\x12\x19\n\x11start_pro_tx_hash\x18\x01 \x01(\x0c\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xef\x05\n+GetProtocolVersionUpgradeVoteStatusResponse\x12\x82\x01\n\x02v0\x18\x01 \x01(\x0b\x32t.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0H\x00\x1a\xaf\x04\n-GetProtocolVersionUpgradeVoteStatusResponseV0\x12\x98\x01\n\x08versions\x18\x01 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignalsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xaf\x01\n\x0eVersionSignals\x12\x9c\x01\n\x0fversion_signals\x18\x01 \x03(\x0b\x32\x82\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal\x1a\x35\n\rVersionSignal\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07version\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xf5\x01\n\x14GetEpochsInfoRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0H\x00\x1a|\n\x16GetEpochsInfoRequestV0\x12\x31\n\x0bstart_epoch\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\x11\n\tascending\x18\x03 \x01(\x08\x12\r\n\x05prove\x18\x04 \x01(\x08\x42\t\n\x07version\"\x99\x05\n\x15GetEpochsInfoResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0H\x00\x1a\x9c\x04\n\x17GetEpochsInfoResponseV0\x12\x65\n\x06\x65pochs\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1au\n\nEpochInfos\x12g\n\x0b\x65poch_infos\x18\x01 \x03(\x0b\x32R.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo\x1a\xa6\x01\n\tEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1e\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x16\n\nstart_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x0e\x66\x65\x65_multiplier\x18\x05 \x01(\x01\x12\x18\n\x10protocol_version\x18\x06 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xbf\x02\n\x1dGetFinalizedEpochInfosRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0H\x00\x1a\xaa\x01\n\x1fGetFinalizedEpochInfosRequestV0\x12\x19\n\x11start_epoch_index\x18\x01 \x01(\r\x12\"\n\x1astart_epoch_index_included\x18\x02 \x01(\x08\x12\x17\n\x0f\x65nd_epoch_index\x18\x03 \x01(\r\x12 \n\x18\x65nd_epoch_index_included\x18\x04 \x01(\x08\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xbd\t\n\x1eGetFinalizedEpochInfosResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0H\x00\x1a\xa5\x08\n GetFinalizedEpochInfosResponseV0\x12\x80\x01\n\x06\x65pochs\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xa4\x01\n\x13\x46inalizedEpochInfos\x12\x8c\x01\n\x15\x66inalized_epoch_infos\x18\x01 \x03(\x0b\x32m.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo\x1a\x9f\x04\n\x12\x46inalizedEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1e\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x1c\n\x10\x66irst_block_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x0e\x66\x65\x65_multiplier\x18\x05 \x01(\x01\x12\x18\n\x10protocol_version\x18\x06 \x01(\r\x12!\n\x15total_blocks_in_epoch\x18\x07 \x01(\x04\x42\x02\x30\x01\x12*\n\"next_epoch_start_core_block_height\x18\x08 \x01(\r\x12!\n\x15total_processing_fees\x18\t \x01(\x04\x42\x02\x30\x01\x12*\n\x1etotal_distributed_storage_fees\x18\n \x01(\x04\x42\x02\x30\x01\x12&\n\x1atotal_created_storage_fees\x18\x0b \x01(\x04\x42\x02\x30\x01\x12\x1e\n\x12\x63ore_block_rewards\x18\x0c \x01(\x04\x42\x02\x30\x01\x12\x81\x01\n\x0f\x62lock_proposers\x18\r \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer\x1a\x39\n\rBlockProposer\x12\x13\n\x0bproposer_id\x18\x01 \x01(\x0c\x12\x13\n\x0b\x62lock_count\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xde\x04\n\x1cGetContestedResourcesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0H\x00\x1a\xcc\x03\n\x1eGetContestedResourcesRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x1a\n\x12start_index_values\x18\x04 \x03(\x0c\x12\x18\n\x10\x65nd_index_values\x18\x05 \x03(\x0c\x12\x89\x01\n\x13start_at_value_info\x18\x06 \x01(\x0b\x32g.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1a\x45\n\x10StartAtValueInfo\x12\x13\n\x0bstart_value\x18\x01 \x01(\x0c\x12\x1c\n\x14start_value_included\x18\x02 \x01(\x08\x42\x16\n\x14_start_at_value_infoB\x08\n\x06_countB\t\n\x07version\"\x88\x04\n\x1dGetContestedResourcesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0H\x00\x1a\xf3\x02\n\x1fGetContestedResourcesResponseV0\x12\x95\x01\n\x19\x63ontested_resource_values\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValuesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a<\n\x17\x43ontestedResourceValues\x12!\n\x19\x63ontested_resource_values\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xd2\x05\n\x1cGetVotePollsByEndDateRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0H\x00\x1a\xc0\x04\n\x1eGetVotePollsByEndDateRequestV0\x12\x84\x01\n\x0fstart_time_info\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfoH\x00\x88\x01\x01\x12\x80\x01\n\rend_time_info\x18\x02 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfoH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x13\n\x06offset\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x11\n\tascending\x18\x05 \x01(\x08\x12\r\n\x05prove\x18\x06 \x01(\x08\x1aI\n\x0fStartAtTimeInfo\x12\x19\n\rstart_time_ms\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x13start_time_included\x18\x02 \x01(\x08\x1a\x43\n\rEndAtTimeInfo\x12\x17\n\x0b\x65nd_time_ms\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x19\n\x11\x65nd_time_included\x18\x02 \x01(\x08\x42\x12\n\x10_start_time_infoB\x10\n\x0e_end_time_infoB\x08\n\x06_limitB\t\n\x07_offsetB\t\n\x07version\"\x83\x06\n\x1dGetVotePollsByEndDateResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0H\x00\x1a\xee\x04\n\x1fGetVotePollsByEndDateResponseV0\x12\x9c\x01\n\x18vote_polls_by_timestamps\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestampsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aV\n\x1eSerializedVotePollsByTimestamp\x12\x15\n\ttimestamp\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1d\n\x15serialized_vote_polls\x18\x02 \x03(\x0c\x1a\xd7\x01\n\x1fSerializedVotePollsByTimestamps\x12\x99\x01\n\x18vote_polls_by_timestamps\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xff\x06\n$GetContestedResourceVoteStateRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0H\x00\x1a\xd5\x05\n&GetContestedResourceVoteStateRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x86\x01\n\x0bresult_type\x18\x05 \x01(\x0e\x32q.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType\x12\x36\n.allow_include_locked_and_abstaining_vote_tally\x18\x06 \x01(\x08\x12\xa3\x01\n\x18start_at_identifier_info\x18\x07 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x08 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\"I\n\nResultType\x12\r\n\tDOCUMENTS\x10\x00\x12\x0e\n\nVOTE_TALLY\x10\x01\x12\x1c\n\x18\x44OCUMENTS_AND_VOTE_TALLY\x10\x02\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\x94\x0c\n%GetContestedResourceVoteStateResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0H\x00\x1a\xe7\n\n\'GetContestedResourceVoteStateResponseV0\x12\xae\x01\n\x1d\x63ontested_resource_contenders\x18\x01 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContendersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xda\x03\n\x10\x46inishedVoteInfo\x12\xad\x01\n\x15\x66inished_vote_outcome\x18\x01 \x01(\x0e\x32\x8d\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome\x12\x1f\n\x12won_by_identity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12$\n\x18\x66inished_at_block_height\x18\x03 \x01(\x04\x42\x02\x30\x01\x12%\n\x1d\x66inished_at_core_block_height\x18\x04 \x01(\r\x12%\n\x19\x66inished_at_block_time_ms\x18\x05 \x01(\x04\x42\x02\x30\x01\x12\x19\n\x11\x66inished_at_epoch\x18\x06 \x01(\r\"O\n\x13\x46inishedVoteOutcome\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\n\n\x06LOCKED\x10\x01\x12\x16\n\x12NO_PREVIOUS_WINNER\x10\x02\x42\x15\n\x13_won_by_identity_id\x1a\xc4\x03\n\x1b\x43ontestedResourceContenders\x12\x86\x01\n\ncontenders\x18\x01 \x03(\x0b\x32r.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender\x12\x1f\n\x12\x61\x62stain_vote_tally\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1c\n\x0flock_vote_tally\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x9a\x01\n\x12\x66inished_vote_info\x18\x04 \x01(\x0b\x32y.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfoH\x02\x88\x01\x01\x42\x15\n\x13_abstain_vote_tallyB\x12\n\x10_lock_vote_tallyB\x15\n\x13_finished_vote_info\x1ak\n\tContender\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x17\n\nvote_count\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x15\n\x08\x64ocument\x18\x03 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_vote_countB\x0b\n\t_documentB\x08\n\x06resultB\t\n\x07version\"\xd5\x05\n,GetContestedResourceVotersForIdentityRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0H\x00\x1a\x92\x04\n.GetContestedResourceVotersForIdentityRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x15\n\rcontestant_id\x18\x05 \x01(\x0c\x12\xb4\x01\n\x18start_at_identifier_info\x18\x06 \x01(\x0b\x32\x8c\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\xf1\x04\n-GetContestedResourceVotersForIdentityResponse\x12\x86\x01\n\x02v0\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0H\x00\x1a\xab\x03\n/GetContestedResourceVotersForIdentityResponseV0\x12\xb6\x01\n\x19\x63ontested_resource_voters\x18\x01 \x01(\x0b\x32\x90\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVotersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x43\n\x17\x43ontestedResourceVoters\x12\x0e\n\x06voters\x18\x01 \x03(\x0c\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xad\x05\n(GetContestedResourceIdentityVotesRequest\x12|\n\x02v0\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0H\x00\x1a\xf7\x03\n*GetContestedResourceIdentityVotesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x17\n\x0forder_ascending\x18\x04 \x01(\x08\x12\xae\x01\n\x1astart_at_vote_poll_id_info\x18\x05 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfoH\x00\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x1a\x61\n\x15StartAtVotePollIdInfo\x12 \n\x18start_at_poll_identifier\x18\x01 \x01(\x0c\x12&\n\x1estart_poll_identifier_included\x18\x02 \x01(\x08\x42\x1d\n\x1b_start_at_vote_poll_id_infoB\t\n\x07version\"\xc8\n\n)GetContestedResourceIdentityVotesResponse\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0H\x00\x1a\x8f\t\n+GetContestedResourceIdentityVotesResponseV0\x12\xa1\x01\n\x05votes\x18\x01 \x01(\x0b\x32\x8f\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xf7\x01\n\x1e\x43ontestedResourceIdentityVotes\x12\xba\x01\n!contested_resource_identity_votes\x18\x01 \x03(\x0b\x32\x8e\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x1a\xad\x02\n\x12ResourceVoteChoice\x12\xad\x01\n\x10vote_choice_type\x18\x01 \x01(\x0e\x32\x92\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType\x12\x18\n\x0bidentity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\"=\n\x0eVoteChoiceType\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\x0b\n\x07\x41\x42STAIN\x10\x01\x12\x08\n\x04LOCK\x10\x02\x42\x0e\n\x0c_identity_id\x1a\x95\x02\n\x1d\x43ontestedResourceIdentityVote\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\'\n\x1fserialized_index_storage_values\x18\x03 \x03(\x0c\x12\x99\x01\n\x0bvote_choice\x18\x04 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoiceB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n%GetPrefundedSpecializedBalanceRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0H\x00\x1a\x44\n\'GetPrefundedSpecializedBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xed\x02\n&GetPrefundedSpecializedBalanceResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0H\x00\x1a\xbd\x01\n(GetPrefundedSpecializedBalanceResponseV0\x12\x15\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xd0\x01\n GetTotalCreditsInPlatformRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0H\x00\x1a\x33\n\"GetTotalCreditsInPlatformRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xd9\x02\n!GetTotalCreditsInPlatformResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0H\x00\x1a\xb8\x01\n#GetTotalCreditsInPlatformResponseV0\x12\x15\n\x07\x63redits\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x16GetPathElementsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0H\x00\x1a\x45\n\x18GetPathElementsRequestV0\x12\x0c\n\x04path\x18\x01 \x03(\x0c\x12\x0c\n\x04keys\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xa3\x03\n\x17GetPathElementsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0H\x00\x1a\xa0\x02\n\x19GetPathElementsResponseV0\x12i\n\x08\x65lements\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ElementsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1c\n\x08\x45lements\x12\x10\n\x08\x65lements\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\x81\x01\n\x10GetStatusRequest\x12L\n\x02v0\x18\x01 \x01(\x0b\x32>.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0H\x00\x1a\x14\n\x12GetStatusRequestV0B\t\n\x07version\"\xe4\x10\n\x11GetStatusResponse\x12N\n\x02v0\x18\x01 \x01(\x0b\x32@.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0H\x00\x1a\xf3\x0f\n\x13GetStatusResponseV0\x12Y\n\x07version\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version\x12S\n\x04node\x18\x02 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node\x12U\n\x05\x63hain\x18\x03 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain\x12Y\n\x07network\x18\x04 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network\x12^\n\nstate_sync\x18\x05 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync\x12S\n\x04time\x18\x06 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time\x1a\x82\x05\n\x07Version\x12\x63\n\x08software\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software\x12\x63\n\x08protocol\x18\x02 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol\x1a^\n\x08Software\x12\x0c\n\x04\x64\x61pi\x18\x01 \x01(\t\x12\x12\n\x05\x64rive\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntenderdash\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_driveB\r\n\x0b_tenderdash\x1a\xcc\x02\n\x08Protocol\x12p\n\ntenderdash\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash\x12\x66\n\x05\x64rive\x18\x02 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive\x1a(\n\nTenderdash\x12\x0b\n\x03p2p\x18\x01 \x01(\r\x12\r\n\x05\x62lock\x18\x02 \x01(\r\x1a<\n\x05\x44rive\x12\x0e\n\x06latest\x18\x03 \x01(\r\x12\x0f\n\x07\x63urrent\x18\x04 \x01(\r\x12\x12\n\nnext_epoch\x18\x05 \x01(\r\x1a\x7f\n\x04Time\x12\x11\n\x05local\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x05\x62lock\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x88\x01\x01\x12\x18\n\x07genesis\x18\x03 \x01(\x04\x42\x02\x30\x01H\x01\x88\x01\x01\x12\x12\n\x05\x65poch\x18\x04 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_blockB\n\n\x08_genesisB\x08\n\x06_epoch\x1a<\n\x04Node\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\x18\n\x0bpro_tx_hash\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x42\x0e\n\x0c_pro_tx_hash\x1a\xb3\x02\n\x05\x43hain\x12\x13\n\x0b\x63\x61tching_up\x18\x01 \x01(\x08\x12\x19\n\x11latest_block_hash\x18\x02 \x01(\x0c\x12\x17\n\x0flatest_app_hash\x18\x03 \x01(\x0c\x12\x1f\n\x13latest_block_height\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x13\x65\x61rliest_block_hash\x18\x05 \x01(\x0c\x12\x19\n\x11\x65\x61rliest_app_hash\x18\x06 \x01(\x0c\x12!\n\x15\x65\x61rliest_block_height\x18\x07 \x01(\x04\x42\x02\x30\x01\x12!\n\x15max_peer_block_height\x18\t \x01(\x04\x42\x02\x30\x01\x12%\n\x18\x63ore_chain_locked_height\x18\n \x01(\rH\x00\x88\x01\x01\x42\x1b\n\x19_core_chain_locked_height\x1a\x43\n\x07Network\x12\x10\n\x08\x63hain_id\x18\x01 \x01(\t\x12\x13\n\x0bpeers_count\x18\x02 \x01(\r\x12\x11\n\tlistening\x18\x03 \x01(\x08\x1a\x85\x02\n\tStateSync\x12\x1d\n\x11total_synced_time\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1a\n\x0eremaining_time\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x17\n\x0ftotal_snapshots\x18\x03 \x01(\r\x12\"\n\x16\x63hunk_process_avg_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x0fsnapshot_height\x18\x05 \x01(\x04\x42\x02\x30\x01\x12!\n\x15snapshot_chunks_count\x18\x06 \x01(\x04\x42\x02\x30\x01\x12\x1d\n\x11\x62\x61\x63kfilled_blocks\x18\x07 \x01(\x04\x42\x02\x30\x01\x12!\n\x15\x62\x61\x63kfill_blocks_total\x18\x08 \x01(\x04\x42\x02\x30\x01\x42\t\n\x07version\"\xb1\x01\n\x1cGetCurrentQuorumsInfoRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0H\x00\x1a \n\x1eGetCurrentQuorumsInfoRequestV0B\t\n\x07version\"\xa1\x05\n\x1dGetCurrentQuorumsInfoResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0H\x00\x1a\x46\n\x0bValidatorV0\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07node_ip\x18\x02 \x01(\t\x12\x11\n\tis_banned\x18\x03 \x01(\x08\x1a\xaf\x01\n\x0eValidatorSetV0\x12\x13\n\x0bquorum_hash\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ore_height\x18\x02 \x01(\r\x12U\n\x07members\x18\x03 \x03(\x0b\x32\x44.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0\x12\x1c\n\x14threshold_public_key\x18\x04 \x01(\x0c\x1a\x92\x02\n\x1fGetCurrentQuorumsInfoResponseV0\x12\x15\n\rquorum_hashes\x18\x01 \x03(\x0c\x12\x1b\n\x13\x63urrent_quorum_hash\x18\x02 \x01(\x0c\x12_\n\x0evalidator_sets\x18\x03 \x03(\x0b\x32G.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0\x12\x1b\n\x13last_block_proposer\x18\x04 \x01(\x0c\x12=\n\x08metadata\x18\x05 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xf4\x01\n\x1fGetIdentityTokenBalancesRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0H\x00\x1aZ\n!GetIdentityTokenBalancesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xad\x05\n GetIdentityTokenBalancesResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0H\x00\x1a\x8f\x04\n\"GetIdentityTokenBalancesResponseV0\x12\x86\x01\n\x0etoken_balances\x18\x01 \x01(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aG\n\x11TokenBalanceEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x9a\x01\n\rTokenBalances\x12\x88\x01\n\x0etoken_balances\x18\x01 \x03(\x0b\x32p.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xfc\x01\n!GetIdentitiesTokenBalancesRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0H\x00\x1a\\\n#GetIdentitiesTokenBalancesRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xf2\x05\n\"GetIdentitiesTokenBalancesResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0H\x00\x1a\xce\x04\n$GetIdentitiesTokenBalancesResponseV0\x12\x9b\x01\n\x17identity_token_balances\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aR\n\x19IdentityTokenBalanceEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\xb7\x01\n\x15IdentityTokenBalances\x12\x9d\x01\n\x17identity_token_balances\x18\x01 \x03(\x0b\x32|.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xe8\x01\n\x1cGetIdentityTokenInfosRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0H\x00\x1aW\n\x1eGetIdentityTokenInfosRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\x98\x06\n\x1dGetIdentityTokenInfosResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0H\x00\x1a\x83\x05\n\x1fGetIdentityTokenInfosResponseV0\x12z\n\x0btoken_infos\x18\x01 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb0\x01\n\x0eTokenInfoEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x82\x01\n\x04info\x18\x02 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x8a\x01\n\nTokenInfos\x12|\n\x0btoken_infos\x18\x01 \x03(\x0b\x32g.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n\x1eGetIdentitiesTokenInfosRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0H\x00\x1aY\n GetIdentitiesTokenInfosRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xca\x06\n\x1fGetIdentitiesTokenInfosResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0H\x00\x1a\xaf\x05\n!GetIdentitiesTokenInfosResponseV0\x12\x8f\x01\n\x14identity_token_infos\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb7\x01\n\x0eTokenInfoEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x86\x01\n\x04info\x18\x02 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x97\x01\n\x12IdentityTokenInfos\x12\x80\x01\n\x0btoken_infos\x18\x01 \x03(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbf\x01\n\x17GetTokenStatusesRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0H\x00\x1a=\n\x19GetTokenStatusesRequestV0\x12\x11\n\ttoken_ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xe7\x04\n\x18GetTokenStatusesResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0H\x00\x1a\xe1\x03\n\x1aGetTokenStatusesResponseV0\x12v\n\x0etoken_statuses\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x44\n\x10TokenStatusEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x13\n\x06paused\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\t\n\x07_paused\x1a\x88\x01\n\rTokenStatuses\x12w\n\x0etoken_statuses\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntryB\x08\n\x06resultB\t\n\x07version\"\xef\x01\n#GetTokenDirectPurchasePricesRequest\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesRequest.GetTokenDirectPurchasePricesRequestV0H\x00\x1aI\n%GetTokenDirectPurchasePricesRequestV0\x12\x11\n\ttoken_ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x8b\t\n$GetTokenDirectPurchasePricesResponse\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0H\x00\x1a\xe1\x07\n&GetTokenDirectPurchasePricesResponseV0\x12\xa9\x01\n\x1ctoken_direct_purchase_prices\x18\x01 \x01(\x0b\x32\x80\x01.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.TokenDirectPurchasePricesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x33\n\x10PriceForQuantity\x12\x10\n\x08quantity\x18\x01 \x01(\x04\x12\r\n\x05price\x18\x02 \x01(\x04\x1a\xa7\x01\n\x0fPricingSchedule\x12\x93\x01\n\x12price_for_quantity\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PriceForQuantity\x1a\xe4\x01\n\x1dTokenDirectPurchasePriceEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x15\n\x0b\x66ixed_price\x18\x02 \x01(\x04H\x00\x12\x90\x01\n\x0evariable_price\x18\x03 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PricingScheduleH\x00\x42\x07\n\x05price\x1a\xc8\x01\n\x19TokenDirectPurchasePrices\x12\xaa\x01\n\x1btoken_direct_purchase_price\x18\x01 \x03(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.TokenDirectPurchasePriceEntryB\x08\n\x06resultB\t\n\x07version\"\xce\x01\n\x1bGetTokenContractInfoRequest\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetTokenContractInfoRequest.GetTokenContractInfoRequestV0H\x00\x1a@\n\x1dGetTokenContractInfoRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xfb\x03\n\x1cGetTokenContractInfoResponse\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetTokenContractInfoResponse.GetTokenContractInfoResponseV0H\x00\x1a\xe9\x02\n\x1eGetTokenContractInfoResponseV0\x12|\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32l.org.dash.platform.dapi.v0.GetTokenContractInfoResponse.GetTokenContractInfoResponseV0.TokenContractInfoDataH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aM\n\x15TokenContractInfoData\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17token_contract_position\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xef\x04\n)GetTokenPreProgrammedDistributionsRequest\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0H\x00\x1a\xb6\x03\n+GetTokenPreProgrammedDistributionsRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x98\x01\n\rstart_at_info\x18\x02 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfoH\x00\x88\x01\x01\x12\x12\n\x05limit\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x1a\x9a\x01\n\x0bStartAtInfo\x12\x15\n\rstart_time_ms\x18\x01 \x01(\x04\x12\x1c\n\x0fstart_recipient\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12%\n\x18start_recipient_included\x18\x03 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_start_recipientB\x1b\n\x19_start_recipient_includedB\x10\n\x0e_start_at_infoB\x08\n\x06_limitB\t\n\x07version\"\xec\x07\n*GetTokenPreProgrammedDistributionsResponse\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0H\x00\x1a\xaf\x06\n,GetTokenPreProgrammedDistributionsResponseV0\x12\xa5\x01\n\x13token_distributions\x18\x01 \x01(\x0b\x32\x85\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a>\n\x16TokenDistributionEntry\x12\x14\n\x0crecipient_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x1a\xd4\x01\n\x1bTokenTimedDistributionEntry\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12\xa1\x01\n\rdistributions\x18\x02 \x03(\x0b\x32\x89\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry\x1a\xc3\x01\n\x12TokenDistributions\x12\xac\x01\n\x13token_distributions\x18\x01 \x03(\x0b\x32\x8e\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntryB\x08\n\x06resultB\t\n\x07version\"\x82\x04\n-GetTokenPerpetualDistributionLastClaimRequest\x12\x86\x01\n\x02v0\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest.GetTokenPerpetualDistributionLastClaimRequestV0H\x00\x1aI\n\x11\x43ontractTokenInfo\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17token_contract_position\x18\x02 \x01(\r\x1a\xf1\x01\n/GetTokenPerpetualDistributionLastClaimRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12v\n\rcontract_info\x18\x02 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest.ContractTokenInfoH\x00\x88\x01\x01\x12\x13\n\x0bidentity_id\x18\x04 \x01(\x0c\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x10\n\x0e_contract_infoB\t\n\x07version\"\x93\x05\n.GetTokenPerpetualDistributionLastClaimResponse\x12\x88\x01\n\x02v0\x18\x01 \x01(\x0b\x32z.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse.GetTokenPerpetualDistributionLastClaimResponseV0H\x00\x1a\xca\x03\n0GetTokenPerpetualDistributionLastClaimResponseV0\x12\x9f\x01\n\nlast_claim\x18\x01 \x01(\x0b\x32\x88\x01.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse.GetTokenPerpetualDistributionLastClaimResponseV0.LastClaimInfoH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1ax\n\rLastClaimInfo\x12\x1a\n\x0ctimestamp_ms\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x1a\n\x0c\x62lock_height\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x12\x0f\n\x05\x65poch\x18\x03 \x01(\rH\x00\x12\x13\n\traw_bytes\x18\x04 \x01(\x0cH\x00\x42\t\n\x07paid_atB\x08\n\x06resultB\t\n\x07version\"\xca\x01\n\x1aGetTokenTotalSupplyRequest\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0H\x00\x1a?\n\x1cGetTokenTotalSupplyRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xaf\x04\n\x1bGetTokenTotalSupplyResponse\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0H\x00\x1a\xa0\x03\n\x1dGetTokenTotalSupplyResponseV0\x12\x88\x01\n\x12token_total_supply\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1ax\n\x15TokenTotalSupplyEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x30\n(total_aggregated_amount_in_user_accounts\x18\x02 \x01(\x04\x12\x1b\n\x13total_system_amount\x18\x03 \x01(\x04\x42\x08\n\x06resultB\t\n\x07version\"\xd2\x01\n\x13GetGroupInfoRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0H\x00\x1a\\\n\x15GetGroupInfoRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xd4\x05\n\x14GetGroupInfoResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0H\x00\x1a\xda\x04\n\x16GetGroupInfoResponseV0\x12\x66\n\ngroup_info\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x98\x01\n\x0eGroupInfoEntry\x12h\n\x07members\x18\x01 \x03(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x02 \x01(\r\x1a\x8a\x01\n\tGroupInfo\x12n\n\ngroup_info\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntryH\x00\x88\x01\x01\x42\r\n\x0b_group_infoB\x08\n\x06resultB\t\n\x07version\"\xed\x03\n\x14GetGroupInfosRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0H\x00\x1au\n\x1cStartAtGroupContractPosition\x12%\n\x1dstart_group_contract_position\x18\x01 \x01(\r\x12.\n&start_group_contract_position_included\x18\x02 \x01(\x08\x1a\xfc\x01\n\x16GetGroupInfosRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12{\n start_at_group_contract_position\x18\x02 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPositionH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x42#\n!_start_at_group_contract_positionB\x08\n\x06_countB\t\n\x07version\"\xff\x05\n\x15GetGroupInfosResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0H\x00\x1a\x82\x05\n\x17GetGroupInfosResponseV0\x12j\n\x0bgroup_infos\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\xc3\x01\n\x16GroupPositionInfoEntry\x12\x1f\n\x17group_contract_position\x18\x01 \x01(\r\x12j\n\x07members\x18\x02 \x03(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x03 \x01(\r\x1a\x82\x01\n\nGroupInfos\x12t\n\x0bgroup_infos\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbe\x04\n\x16GetGroupActionsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0H\x00\x1aL\n\x0fStartAtActionId\x12\x17\n\x0fstart_action_id\x18\x01 \x01(\x0c\x12 \n\x18start_action_id_included\x18\x02 \x01(\x08\x1a\xc8\x02\n\x18GetGroupActionsRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12N\n\x06status\x18\x03 \x01(\x0e\x32>.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus\x12\x62\n\x12start_at_action_id\x18\x04 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionIdH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x05 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x42\x15\n\x13_start_at_action_idB\x08\n\x06_count\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\xd6\x1e\n\x17GetGroupActionsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0H\x00\x1a\xd3\x1d\n\x19GetGroupActionsResponseV0\x12r\n\rgroup_actions\x18\x01 \x01(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a[\n\tMintEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x14\n\x0crecipient_id\x18\x02 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a[\n\tBurnEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x14\n\x0c\x62urn_from_id\x18\x02 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aJ\n\x0b\x46reezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aL\n\rUnfreezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x66\n\x17\x44\x65stroyFrozenFundsEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x13SharedEncryptedNote\x12\x18\n\x10sender_key_index\x18\x01 \x01(\r\x12\x1b\n\x13recipient_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a{\n\x15PersonalEncryptedNote\x12!\n\x19root_encryption_key_index\x18\x01 \x01(\r\x12\'\n\x1f\x64\x65rivation_encryption_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a\xe9\x01\n\x14\x45mergencyActionEvent\x12\x81\x01\n\x0b\x61\x63tion_type\x18\x01 \x01(\x0e\x32l.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\"#\n\nActionType\x12\t\n\x05PAUSE\x10\x00\x12\n\n\x06RESUME\x10\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x16TokenConfigUpdateEvent\x12 \n\x18token_config_update_item\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\xe6\x03\n\x1eUpdateDirectPurchasePriceEvent\x12\x15\n\x0b\x66ixed_price\x18\x01 \x01(\x04H\x00\x12\x95\x01\n\x0evariable_price\x18\x02 \x01(\x0b\x32{.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEvent.PricingScheduleH\x00\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x01\x88\x01\x01\x1a\x33\n\x10PriceForQuantity\x12\x10\n\x08quantity\x18\x01 \x01(\x04\x12\r\n\x05price\x18\x02 \x01(\x04\x1a\xac\x01\n\x0fPricingSchedule\x12\x98\x01\n\x12price_for_quantity\x18\x01 \x03(\x0b\x32|.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEvent.PriceForQuantityB\x07\n\x05priceB\x0e\n\x0c_public_note\x1a\xfc\x02\n\x10GroupActionEvent\x12n\n\x0btoken_event\x18\x01 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEventH\x00\x12t\n\x0e\x64ocument_event\x18\x02 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEventH\x00\x12t\n\x0e\x63ontract_event\x18\x03 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEventH\x00\x42\x0c\n\nevent_type\x1a\x8b\x01\n\rDocumentEvent\x12r\n\x06\x63reate\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEventH\x00\x42\x06\n\x04type\x1a/\n\x13\x44ocumentCreateEvent\x12\x18\n\x10\x63reated_document\x18\x01 \x01(\x0c\x1a/\n\x13\x43ontractUpdateEvent\x12\x18\n\x10updated_contract\x18\x01 \x01(\x0c\x1a\x8b\x01\n\rContractEvent\x12r\n\x06update\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEventH\x00\x42\x06\n\x04type\x1a\xd1\x07\n\nTokenEvent\x12\x66\n\x04mint\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEventH\x00\x12\x66\n\x04\x62urn\x18\x02 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEventH\x00\x12j\n\x06\x66reeze\x18\x03 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEventH\x00\x12n\n\x08unfreeze\x18\x04 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEventH\x00\x12\x84\x01\n\x14\x64\x65stroy_frozen_funds\x18\x05 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEventH\x00\x12}\n\x10\x65mergency_action\x18\x06 \x01(\x0b\x32\x61.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEventH\x00\x12\x82\x01\n\x13token_config_update\x18\x07 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEventH\x00\x12\x83\x01\n\x0cupdate_price\x18\x08 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEventH\x00\x42\x06\n\x04type\x1a\x93\x01\n\x10GroupActionEntry\x12\x11\n\taction_id\x18\x01 \x01(\x0c\x12l\n\x05\x65vent\x18\x02 \x01(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent\x1a\x84\x01\n\x0cGroupActions\x12t\n\rgroup_actions\x18\x01 \x03(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntryB\x08\n\x06resultB\t\n\x07version\"\x88\x03\n\x1cGetGroupActionSignersRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0H\x00\x1a\xce\x01\n\x1eGetGroupActionSignersRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12T\n\x06status\x18\x03 \x01(\x0e\x32\x44.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus\x12\x11\n\taction_id\x18\x04 \x01(\x0c\x12\r\n\x05prove\x18\x05 \x01(\x08\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\x8b\x05\n\x1dGetGroupActionSignersResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0H\x00\x1a\xf6\x03\n\x1fGetGroupActionSignersResponseV0\x12\x8b\x01\n\x14group_action_signers\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x35\n\x11GroupActionSigner\x12\x11\n\tsigner_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x91\x01\n\x12GroupActionSigners\x12{\n\x07signers\x18\x01 \x03(\x0b\x32j.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignerB\x08\n\x06resultB\t\n\x07version\"\xb5\x01\n\x15GetAddressInfoRequest\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetAddressInfoRequest.GetAddressInfoRequestV0H\x00\x1a\x39\n\x17GetAddressInfoRequestV0\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x85\x01\n\x10\x41\x64\x64ressInfoEntry\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12J\n\x11\x62\x61lance_and_nonce\x18\x02 \x01(\x0b\x32*.org.dash.platform.dapi.v0.BalanceAndNonceH\x00\x88\x01\x01\x42\x14\n\x12_balance_and_nonce\"1\n\x0f\x42\x61lanceAndNonce\x12\x0f\n\x07\x62\x61lance\x18\x01 \x01(\x04\x12\r\n\x05nonce\x18\x02 \x01(\r\"_\n\x12\x41\x64\x64ressInfoEntries\x12I\n\x14\x61\x64\x64ress_info_entries\x18\x01 \x03(\x0b\x32+.org.dash.platform.dapi.v0.AddressInfoEntry\"m\n\x14\x41\x64\x64ressBalanceChange\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12\x19\n\x0bset_balance\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x12\x1c\n\x0e\x61\x64\x64_to_balance\x18\x03 \x01(\x04\x42\x02\x30\x01H\x00\x42\x0b\n\toperation\"x\n\x1a\x42lockAddressBalanceChanges\x12\x18\n\x0c\x62lock_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12@\n\x07\x63hanges\x18\x02 \x03(\x0b\x32/.org.dash.platform.dapi.v0.AddressBalanceChange\"k\n\x1b\x41\x64\x64ressBalanceUpdateEntries\x12L\n\rblock_changes\x18\x01 \x03(\x0b\x32\x35.org.dash.platform.dapi.v0.BlockAddressBalanceChanges\"\xe1\x02\n\x16GetAddressInfoResponse\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0H\x00\x1a\xe1\x01\n\x18GetAddressInfoResponseV0\x12I\n\x12\x61\x64\x64ress_info_entry\x18\x01 \x01(\x0b\x32+.org.dash.platform.dapi.v0.AddressInfoEntryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc3\x01\n\x18GetAddressesInfosRequest\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetAddressesInfosRequest.GetAddressesInfosRequestV0H\x00\x1a>\n\x1aGetAddressesInfosRequestV0\x12\x11\n\taddresses\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf1\x02\n\x19GetAddressesInfosResponse\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetAddressesInfosResponse.GetAddressesInfosResponseV0H\x00\x1a\xe8\x01\n\x1bGetAddressesInfosResponseV0\x12M\n\x14\x61\x64\x64ress_info_entries\x18\x01 \x01(\x0b\x32-.org.dash.platform.dapi.v0.AddressInfoEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb5\x01\n\x1dGetAddressesTrunkStateRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetAddressesTrunkStateRequest.GetAddressesTrunkStateRequestV0H\x00\x1a!\n\x1fGetAddressesTrunkStateRequestV0B\t\n\x07version\"\xaa\x02\n\x1eGetAddressesTrunkStateResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetAddressesTrunkStateResponse.GetAddressesTrunkStateResponseV0H\x00\x1a\x92\x01\n GetAddressesTrunkStateResponseV0\x12/\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xf0\x01\n\x1eGetAddressesBranchStateRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0H\x00\x1aY\n GetAddressesBranchStateRequestV0\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05\x64\x65pth\x18\x02 \x01(\r\x12\x19\n\x11\x63heckpoint_height\x18\x03 \x01(\x04\x42\t\n\x07version\"\xd1\x01\n\x1fGetAddressesBranchStateResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse.GetAddressesBranchStateResponseV0H\x00\x1a\x37\n!GetAddressesBranchStateResponseV0\x12\x12\n\nmerk_proof\x18\x02 \x01(\x0c\x42\t\n\x07version\"\x9e\x02\n%GetRecentAddressBalanceChangesRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0H\x00\x1ar\n\'GetRecentAddressBalanceChangesRequestV0\x12\x18\n\x0cstart_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x12\x1e\n\x16start_height_exclusive\x18\x03 \x01(\x08\x42\t\n\x07version\"\xb8\x03\n&GetRecentAddressBalanceChangesResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0H\x00\x1a\x88\x02\n(GetRecentAddressBalanceChangesResponseV0\x12`\n\x1e\x61\x64\x64ress_balance_update_entries\x18\x01 \x01(\x0b\x32\x36.org.dash.platform.dapi.v0.AddressBalanceUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"G\n\x16\x42lockHeightCreditEntry\x12\x18\n\x0c\x62lock_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x13\n\x07\x63redits\x18\x02 \x01(\x04\x42\x02\x30\x01\"\xb0\x01\n\x1d\x43ompactedAddressBalanceChange\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12\x19\n\x0bset_credits\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x12V\n\x19\x61\x64\x64_to_credits_operations\x18\x03 \x01(\x0b\x32\x31.org.dash.platform.dapi.v0.AddToCreditsOperationsH\x00\x42\x0b\n\toperation\"\\\n\x16\x41\x64\x64ToCreditsOperations\x12\x42\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x31.org.dash.platform.dapi.v0.BlockHeightCreditEntry\"\xae\x01\n#CompactedBlockAddressBalanceChanges\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1c\n\x10\x65nd_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12I\n\x07\x63hanges\x18\x03 \x03(\x0b\x32\x38.org.dash.platform.dapi.v0.CompactedAddressBalanceChange\"\x87\x01\n$CompactedAddressBalanceUpdateEntries\x12_\n\x17\x63ompacted_block_changes\x18\x01 \x03(\x0b\x32>.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges\"\xa9\x02\n.GetRecentCompactedAddressBalanceChangesRequest\x12\x88\x01\n\x02v0\x18\x01 \x01(\x0b\x32z.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0H\x00\x1a\x61\n0GetRecentCompactedAddressBalanceChangesRequestV0\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf0\x03\n/GetRecentCompactedAddressBalanceChangesResponse\x12\x8a\x01\n\x02v0\x18\x01 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0H\x00\x1a\xa4\x02\n1GetRecentCompactedAddressBalanceChangesResponseV0\x12s\n(compacted_address_balance_update_entries\x18\x01 \x01(\x0b\x32?.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xf4\x01\n GetShieldedEncryptedNotesRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesRequest.GetShieldedEncryptedNotesRequestV0H\x00\x1aW\n\"GetShieldedEncryptedNotesRequestV0\x12\x13\n\x0bstart_index\x18\x01 \x01(\x04\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xac\x05\n!GetShieldedEncryptedNotesResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse.GetShieldedEncryptedNotesResponseV0H\x00\x1a\x8b\x04\n#GetShieldedEncryptedNotesResponseV0\x12\x8a\x01\n\x0f\x65ncrypted_notes\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse.GetShieldedEncryptedNotesResponseV0.EncryptedNotesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aG\n\rEncryptedNote\x12\x11\n\tnullifier\x18\x01 \x01(\x0c\x12\x0b\n\x03\x63mx\x18\x02 \x01(\x0c\x12\x16\n\x0e\x65ncrypted_note\x18\x03 \x01(\x0c\x1a\x91\x01\n\x0e\x45ncryptedNotes\x12\x7f\n\x07\x65ntries\x18\x01 \x03(\x0b\x32n.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse.GetShieldedEncryptedNotesResponseV0.EncryptedNoteB\x08\n\x06resultB\t\n\x07version\"\xb4\x01\n\x19GetShieldedAnchorsRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetShieldedAnchorsRequest.GetShieldedAnchorsRequestV0H\x00\x1a,\n\x1bGetShieldedAnchorsRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xb1\x03\n\x1aGetShieldedAnchorsResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetShieldedAnchorsResponse.GetShieldedAnchorsResponseV0H\x00\x1a\xa5\x02\n\x1cGetShieldedAnchorsResponseV0\x12m\n\x07\x61nchors\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetShieldedAnchorsResponse.GetShieldedAnchorsResponseV0.AnchorsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1a\n\x07\x41nchors\x12\x0f\n\x07\x61nchors\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xd8\x01\n\"GetMostRecentShieldedAnchorRequest\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorRequest.GetMostRecentShieldedAnchorRequestV0H\x00\x1a\x35\n$GetMostRecentShieldedAnchorRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xdc\x02\n#GetMostRecentShieldedAnchorResponse\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorResponse.GetMostRecentShieldedAnchorResponseV0H\x00\x1a\xb5\x01\n%GetMostRecentShieldedAnchorResponseV0\x12\x10\n\x06\x61nchor\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbc\x01\n\x1bGetShieldedPoolStateRequest\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetShieldedPoolStateRequest.GetShieldedPoolStateRequestV0H\x00\x1a.\n\x1dGetShieldedPoolStateRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xcb\x02\n\x1cGetShieldedPoolStateResponse\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetShieldedPoolStateResponse.GetShieldedPoolStateResponseV0H\x00\x1a\xb9\x01\n\x1eGetShieldedPoolStateResponseV0\x12\x1b\n\rtotal_balance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xd4\x01\n\x1cGetShieldedNullifiersRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetShieldedNullifiersRequest.GetShieldedNullifiersRequestV0H\x00\x1a\x43\n\x1eGetShieldedNullifiersRequestV0\x12\x12\n\nnullifiers\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x86\x05\n\x1dGetShieldedNullifiersResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse.GetShieldedNullifiersResponseV0H\x00\x1a\xf1\x03\n\x1fGetShieldedNullifiersResponseV0\x12\x88\x01\n\x12nullifier_statuses\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse.GetShieldedNullifiersResponseV0.NullifierStatusesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x36\n\x0fNullifierStatus\x12\x11\n\tnullifier\x18\x01 \x01(\x0c\x12\x10\n\x08is_spent\x18\x02 \x01(\x08\x1a\x8e\x01\n\x11NullifierStatuses\x12y\n\x07\x65ntries\x18\x01 \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse.GetShieldedNullifiersResponseV0.NullifierStatusB\x08\n\x06resultB\t\n\x07version\"\xe5\x01\n\x1eGetNullifiersTrunkStateRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetNullifiersTrunkStateRequest.GetNullifiersTrunkStateRequestV0H\x00\x1aN\n GetNullifiersTrunkStateRequestV0\x12\x11\n\tpool_type\x18\x01 \x01(\r\x12\x17\n\x0fpool_identifier\x18\x02 \x01(\x0c\x42\t\n\x07version\"\xae\x02\n\x1fGetNullifiersTrunkStateResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetNullifiersTrunkStateResponse.GetNullifiersTrunkStateResponseV0H\x00\x1a\x93\x01\n!GetNullifiersTrunkStateResponseV0\x12/\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xa1\x02\n\x1fGetNullifiersBranchStateRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetNullifiersBranchStateRequest.GetNullifiersBranchStateRequestV0H\x00\x1a\x86\x01\n!GetNullifiersBranchStateRequestV0\x12\x11\n\tpool_type\x18\x01 \x01(\r\x12\x17\n\x0fpool_identifier\x18\x02 \x01(\x0c\x12\x0b\n\x03key\x18\x03 \x01(\x0c\x12\r\n\x05\x64\x65pth\x18\x04 \x01(\r\x12\x19\n\x11\x63heckpoint_height\x18\x05 \x01(\x04\x42\t\n\x07version\"\xd5\x01\n GetNullifiersBranchStateResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetNullifiersBranchStateResponse.GetNullifiersBranchStateResponseV0H\x00\x1a\x38\n\"GetNullifiersBranchStateResponseV0\x12\x12\n\nmerk_proof\x18\x02 \x01(\x0c\x42\t\n\x07version\"E\n\x15\x42lockNullifierChanges\x12\x18\n\x0c\x62lock_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x12\n\nnullifiers\x18\x02 \x03(\x0c\"a\n\x16NullifierUpdateEntries\x12G\n\rblock_changes\x18\x01 \x03(\x0b\x32\x30.org.dash.platform.dapi.v0.BlockNullifierChanges\"\xea\x01\n GetRecentNullifierChangesRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetRecentNullifierChangesRequest.GetRecentNullifierChangesRequestV0H\x00\x1aM\n\"GetRecentNullifierChangesRequestV0\x12\x18\n\x0cstart_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x99\x03\n!GetRecentNullifierChangesResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetRecentNullifierChangesResponse.GetRecentNullifierChangesResponseV0H\x00\x1a\xf8\x01\n#GetRecentNullifierChangesResponseV0\x12U\n\x18nullifier_update_entries\x18\x01 \x01(\x0b\x32\x31.org.dash.platform.dapi.v0.NullifierUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"r\n\x1e\x43ompactedBlockNullifierChanges\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1c\n\x10\x65nd_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x12\n\nnullifiers\x18\x03 \x03(\x0c\"}\n\x1f\x43ompactedNullifierUpdateEntries\x12Z\n\x17\x63ompacted_block_changes\x18\x01 \x03(\x0b\x32\x39.org.dash.platform.dapi.v0.CompactedBlockNullifierChanges\"\x94\x02\n)GetRecentCompactedNullifierChangesRequest\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesRequest.GetRecentCompactedNullifierChangesRequestV0H\x00\x1a\\\n+GetRecentCompactedNullifierChangesRequestV0\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xd1\x03\n*GetRecentCompactedNullifierChangesResponse\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesResponse.GetRecentCompactedNullifierChangesResponseV0H\x00\x1a\x94\x02\n,GetRecentCompactedNullifierChangesResponseV0\x12h\n\"compacted_nullifier_update_entries\x18\x01 \x01(\x0b\x32:.org.dash.platform.dapi.v0.CompactedNullifierUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version*Z\n\nKeyPurpose\x12\x12\n\x0e\x41UTHENTICATION\x10\x00\x12\x0e\n\nENCRYPTION\x10\x01\x12\x0e\n\nDECRYPTION\x10\x02\x12\x0c\n\x08TRANSFER\x10\x03\x12\n\n\x06VOTING\x10\x05\x32\xb3G\n\x08Platform\x12\x93\x01\n\x18\x62roadcastStateTransition\x12:.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest\x1a;.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse\x12l\n\x0bgetIdentity\x12-.org.dash.platform.dapi.v0.GetIdentityRequest\x1a..org.dash.platform.dapi.v0.GetIdentityResponse\x12x\n\x0fgetIdentityKeys\x12\x31.org.dash.platform.dapi.v0.GetIdentityKeysRequest\x1a\x32.org.dash.platform.dapi.v0.GetIdentityKeysResponse\x12\x96\x01\n\x19getIdentitiesContractKeys\x12;.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest\x1a<.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse\x12{\n\x10getIdentityNonce\x12\x32.org.dash.platform.dapi.v0.GetIdentityNonceRequest\x1a\x33.org.dash.platform.dapi.v0.GetIdentityNonceResponse\x12\x93\x01\n\x18getIdentityContractNonce\x12:.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse\x12\x81\x01\n\x12getIdentityBalance\x12\x34.org.dash.platform.dapi.v0.GetIdentityBalanceRequest\x1a\x35.org.dash.platform.dapi.v0.GetIdentityBalanceResponse\x12\x8a\x01\n\x15getIdentitiesBalances\x12\x37.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse\x12\xa2\x01\n\x1dgetIdentityBalanceAndRevision\x12?.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest\x1a@.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse\x12\xaf\x01\n#getEvonodesProposedEpochBlocksByIds\x12\x45.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12\xb3\x01\n%getEvonodesProposedEpochBlocksByRange\x12G.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12x\n\x0fgetDataContract\x12\x31.org.dash.platform.dapi.v0.GetDataContractRequest\x1a\x32.org.dash.platform.dapi.v0.GetDataContractResponse\x12\x8d\x01\n\x16getDataContractHistory\x12\x38.org.dash.platform.dapi.v0.GetDataContractHistoryRequest\x1a\x39.org.dash.platform.dapi.v0.GetDataContractHistoryResponse\x12{\n\x10getDataContracts\x12\x32.org.dash.platform.dapi.v0.GetDataContractsRequest\x1a\x33.org.dash.platform.dapi.v0.GetDataContractsResponse\x12o\n\x0cgetDocuments\x12..org.dash.platform.dapi.v0.GetDocumentsRequest\x1a/.org.dash.platform.dapi.v0.GetDocumentsResponse\x12\x99\x01\n\x1agetIdentityByPublicKeyHash\x12<.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest\x1a=.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse\x12\xb4\x01\n#getIdentityByNonUniquePublicKeyHash\x12\x45.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashRequest\x1a\x46.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse\x12\x9f\x01\n\x1cwaitForStateTransitionResult\x12>.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest\x1a?.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse\x12\x81\x01\n\x12getConsensusParams\x12\x34.org.dash.platform.dapi.v0.GetConsensusParamsRequest\x1a\x35.org.dash.platform.dapi.v0.GetConsensusParamsResponse\x12\xa5\x01\n\x1egetProtocolVersionUpgradeState\x12@.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest\x1a\x41.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse\x12\xb4\x01\n#getProtocolVersionUpgradeVoteStatus\x12\x45.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest\x1a\x46.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse\x12r\n\rgetEpochsInfo\x12/.org.dash.platform.dapi.v0.GetEpochsInfoRequest\x1a\x30.org.dash.platform.dapi.v0.GetEpochsInfoResponse\x12\x8d\x01\n\x16getFinalizedEpochInfos\x12\x38.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest\x1a\x39.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse\x12\x8a\x01\n\x15getContestedResources\x12\x37.org.dash.platform.dapi.v0.GetContestedResourcesRequest\x1a\x38.org.dash.platform.dapi.v0.GetContestedResourcesResponse\x12\xa2\x01\n\x1dgetContestedResourceVoteState\x12?.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest\x1a@.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse\x12\xba\x01\n%getContestedResourceVotersForIdentity\x12G.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest\x1aH.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse\x12\xae\x01\n!getContestedResourceIdentityVotes\x12\x43.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest\x1a\x44.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse\x12\x8a\x01\n\x15getVotePollsByEndDate\x12\x37.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest\x1a\x38.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse\x12\xa5\x01\n\x1egetPrefundedSpecializedBalance\x12@.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest\x1a\x41.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse\x12\x96\x01\n\x19getTotalCreditsInPlatform\x12;.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest\x1a<.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse\x12x\n\x0fgetPathElements\x12\x31.org.dash.platform.dapi.v0.GetPathElementsRequest\x1a\x32.org.dash.platform.dapi.v0.GetPathElementsResponse\x12\x66\n\tgetStatus\x12+.org.dash.platform.dapi.v0.GetStatusRequest\x1a,.org.dash.platform.dapi.v0.GetStatusResponse\x12\x8a\x01\n\x15getCurrentQuorumsInfo\x12\x37.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest\x1a\x38.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse\x12\x93\x01\n\x18getIdentityTokenBalances\x12:.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse\x12\x99\x01\n\x1agetIdentitiesTokenBalances\x12<.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest\x1a=.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse\x12\x8a\x01\n\x15getIdentityTokenInfos\x12\x37.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse\x12\x90\x01\n\x17getIdentitiesTokenInfos\x12\x39.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest\x1a:.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse\x12{\n\x10getTokenStatuses\x12\x32.org.dash.platform.dapi.v0.GetTokenStatusesRequest\x1a\x33.org.dash.platform.dapi.v0.GetTokenStatusesResponse\x12\x9f\x01\n\x1cgetTokenDirectPurchasePrices\x12>.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesRequest\x1a?.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse\x12\x87\x01\n\x14getTokenContractInfo\x12\x36.org.dash.platform.dapi.v0.GetTokenContractInfoRequest\x1a\x37.org.dash.platform.dapi.v0.GetTokenContractInfoResponse\x12\xb1\x01\n\"getTokenPreProgrammedDistributions\x12\x44.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest\x1a\x45.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse\x12\xbd\x01\n&getTokenPerpetualDistributionLastClaim\x12H.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest\x1aI.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse\x12\x84\x01\n\x13getTokenTotalSupply\x12\x35.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest\x1a\x36.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse\x12o\n\x0cgetGroupInfo\x12..org.dash.platform.dapi.v0.GetGroupInfoRequest\x1a/.org.dash.platform.dapi.v0.GetGroupInfoResponse\x12r\n\rgetGroupInfos\x12/.org.dash.platform.dapi.v0.GetGroupInfosRequest\x1a\x30.org.dash.platform.dapi.v0.GetGroupInfosResponse\x12x\n\x0fgetGroupActions\x12\x31.org.dash.platform.dapi.v0.GetGroupActionsRequest\x1a\x32.org.dash.platform.dapi.v0.GetGroupActionsResponse\x12\x8a\x01\n\x15getGroupActionSigners\x12\x37.org.dash.platform.dapi.v0.GetGroupActionSignersRequest\x1a\x38.org.dash.platform.dapi.v0.GetGroupActionSignersResponse\x12u\n\x0egetAddressInfo\x12\x30.org.dash.platform.dapi.v0.GetAddressInfoRequest\x1a\x31.org.dash.platform.dapi.v0.GetAddressInfoResponse\x12~\n\x11getAddressesInfos\x12\x33.org.dash.platform.dapi.v0.GetAddressesInfosRequest\x1a\x34.org.dash.platform.dapi.v0.GetAddressesInfosResponse\x12\x8d\x01\n\x16getAddressesTrunkState\x12\x38.org.dash.platform.dapi.v0.GetAddressesTrunkStateRequest\x1a\x39.org.dash.platform.dapi.v0.GetAddressesTrunkStateResponse\x12\x90\x01\n\x17getAddressesBranchState\x12\x39.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest\x1a:.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse\x12\xa5\x01\n\x1egetRecentAddressBalanceChanges\x12@.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest\x1a\x41.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse\x12\xc0\x01\n\'getRecentCompactedAddressBalanceChanges\x12I.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest\x1aJ.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse\x12\x96\x01\n\x19getShieldedEncryptedNotes\x12;.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesRequest\x1a<.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse\x12\x81\x01\n\x12getShieldedAnchors\x12\x34.org.dash.platform.dapi.v0.GetShieldedAnchorsRequest\x1a\x35.org.dash.platform.dapi.v0.GetShieldedAnchorsResponse\x12\x9c\x01\n\x1bgetMostRecentShieldedAnchor\x12=.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorRequest\x1a>.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorResponse\x12\x87\x01\n\x14getShieldedPoolState\x12\x36.org.dash.platform.dapi.v0.GetShieldedPoolStateRequest\x1a\x37.org.dash.platform.dapi.v0.GetShieldedPoolStateResponse\x12\x8a\x01\n\x15getShieldedNullifiers\x12\x37.org.dash.platform.dapi.v0.GetShieldedNullifiersRequest\x1a\x38.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse\x12\x90\x01\n\x17getNullifiersTrunkState\x12\x39.org.dash.platform.dapi.v0.GetNullifiersTrunkStateRequest\x1a:.org.dash.platform.dapi.v0.GetNullifiersTrunkStateResponse\x12\x93\x01\n\x18getNullifiersBranchState\x12:.org.dash.platform.dapi.v0.GetNullifiersBranchStateRequest\x1a;.org.dash.platform.dapi.v0.GetNullifiersBranchStateResponse\x12\x96\x01\n\x19getRecentNullifierChanges\x12;.org.dash.platform.dapi.v0.GetRecentNullifierChangesRequest\x1a<.org.dash.platform.dapi.v0.GetRecentNullifierChangesResponse\x12\xb1\x01\n\"getRecentCompactedNullifierChanges\x12\x44.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesRequest\x1a\x45.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesResponseb\x06proto3' + serialized_pb=b'\n\x0eplatform.proto\x12\x19org.dash.platform.dapi.v0\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x01\n\x05Proof\x12\x15\n\rgrovedb_proof\x18\x01 \x01(\x0c\x12\x13\n\x0bquorum_hash\x18\x02 \x01(\x0c\x12\x11\n\tsignature\x18\x03 \x01(\x0c\x12\r\n\x05round\x18\x04 \x01(\r\x12\x15\n\rblock_id_hash\x18\x05 \x01(\x0c\x12\x13\n\x0bquorum_type\x18\x06 \x01(\r\"\x98\x01\n\x10ResponseMetadata\x12\x12\n\x06height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12 \n\x18\x63ore_chain_locked_height\x18\x02 \x01(\r\x12\r\n\x05\x65poch\x18\x03 \x01(\r\x12\x13\n\x07time_ms\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x18\n\x10protocol_version\x18\x05 \x01(\r\x12\x10\n\x08\x63hain_id\x18\x06 \x01(\t\"L\n\x1dStateTransitionBroadcastError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\";\n\x1f\x42roadcastStateTransitionRequest\x12\x18\n\x10state_transition\x18\x01 \x01(\x0c\"\"\n BroadcastStateTransitionResponse\"\xa4\x01\n\x12GetIdentityRequest\x12P\n\x02v0\x18\x01 \x01(\x0b\x32\x42.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0H\x00\x1a\x31\n\x14GetIdentityRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xc1\x01\n\x17GetIdentityNonceRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0H\x00\x1a?\n\x19GetIdentityNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf6\x01\n\x1fGetIdentityContractNonceRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0H\x00\x1a\\\n!GetIdentityContractNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xc0\x01\n\x19GetIdentityBalanceRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0H\x00\x1a\x38\n\x1bGetIdentityBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xec\x01\n$GetIdentityBalanceAndRevisionRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0H\x00\x1a\x43\n&GetIdentityBalanceAndRevisionRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9e\x02\n\x13GetIdentityResponse\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0H\x00\x1a\xa7\x01\n\x15GetIdentityResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbc\x02\n\x18GetIdentityNonceResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0H\x00\x1a\xb6\x01\n\x1aGetIdentityNonceResponseV0\x12\x1c\n\x0eidentity_nonce\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xe5\x02\n GetIdentityContractNonceResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0H\x00\x1a\xc7\x01\n\"GetIdentityContractNonceResponseV0\x12%\n\x17identity_contract_nonce\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbd\x02\n\x1aGetIdentityBalanceResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0H\x00\x1a\xb1\x01\n\x1cGetIdentityBalanceResponseV0\x12\x15\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb1\x04\n%GetIdentityBalanceAndRevisionResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0H\x00\x1a\x84\x03\n\'GetIdentityBalanceAndRevisionResponseV0\x12\x9b\x01\n\x14\x62\x61lance_and_revision\x18\x01 \x01(\x0b\x32{.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevisionH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a?\n\x12\x42\x61lanceAndRevision\x12\x13\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x14\n\x08revision\x18\x02 \x01(\x04\x42\x02\x30\x01\x42\x08\n\x06resultB\t\n\x07version\"\xd1\x01\n\x0eKeyRequestType\x12\x36\n\x08\x61ll_keys\x18\x01 \x01(\x0b\x32\".org.dash.platform.dapi.v0.AllKeysH\x00\x12@\n\rspecific_keys\x18\x02 \x01(\x0b\x32\'.org.dash.platform.dapi.v0.SpecificKeysH\x00\x12:\n\nsearch_key\x18\x03 \x01(\x0b\x32$.org.dash.platform.dapi.v0.SearchKeyH\x00\x42\t\n\x07request\"\t\n\x07\x41llKeys\"\x1f\n\x0cSpecificKeys\x12\x0f\n\x07key_ids\x18\x01 \x03(\r\"\xb6\x01\n\tSearchKey\x12I\n\x0bpurpose_map\x18\x01 \x03(\x0b\x32\x34.org.dash.platform.dapi.v0.SearchKey.PurposeMapEntry\x1a^\n\x0fPurposeMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.org.dash.platform.dapi.v0.SecurityLevelMap:\x02\x38\x01\"\xbf\x02\n\x10SecurityLevelMap\x12]\n\x12security_level_map\x18\x01 \x03(\x0b\x32\x41.org.dash.platform.dapi.v0.SecurityLevelMap.SecurityLevelMapEntry\x1aw\n\x15SecurityLevelMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12M\n\x05value\x18\x02 \x01(\x0e\x32>.org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType:\x02\x38\x01\"S\n\x12KeyKindRequestType\x12\x1f\n\x1b\x43URRENT_KEY_OF_KIND_REQUEST\x10\x00\x12\x1c\n\x18\x41LL_KEYS_OF_KIND_REQUEST\x10\x01\"\xda\x02\n\x16GetIdentityKeysRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0H\x00\x1a\xda\x01\n\x18GetIdentityKeysRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12?\n\x0crequest_type\x18\x02 \x01(\x0b\x32).org.dash.platform.dapi.v0.KeyRequestType\x12+\n\x05limit\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x04 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\x99\x03\n\x17GetIdentityKeysResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0H\x00\x1a\x96\x02\n\x19GetIdentityKeysResponseV0\x12\x61\n\x04keys\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.KeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1a\n\x04Keys\x12\x12\n\nkeys_bytes\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xef\x02\n GetIdentitiesContractKeysRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0H\x00\x1a\xd1\x01\n\"GetIdentitiesContractKeysRequestV0\x12\x16\n\x0eidentities_ids\x18\x01 \x03(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\x1f\n\x12\x64ocument_type_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x08purposes\x18\x04 \x03(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x15\n\x13_document_type_nameB\t\n\x07version\"\xdf\x06\n!GetIdentitiesContractKeysResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0H\x00\x1a\xbe\x05\n#GetIdentitiesContractKeysResponseV0\x12\x8a\x01\n\x0fidentities_keys\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aY\n\x0bPurposeKeys\x12\x36\n\x07purpose\x18\x01 \x01(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\x12\n\nkeys_bytes\x18\x02 \x03(\x0c\x1a\x9f\x01\n\x0cIdentityKeys\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12z\n\x04keys\x18\x02 \x03(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys\x1a\x90\x01\n\x0eIdentitiesKeys\x12~\n\x07\x65ntries\x18\x01 \x03(\x0b\x32m.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeysB\x08\n\x06resultB\t\n\x07version\"\xa4\x02\n*GetEvonodesProposedEpochBlocksByIdsRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0H\x00\x1ah\n,GetEvonodesProposedEpochBlocksByIdsRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x0b\n\x03ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x08\n\x06_epochB\t\n\x07version\"\x92\x06\n&GetEvonodesProposedEpochBlocksResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0H\x00\x1a\xe2\x04\n(GetEvonodesProposedEpochBlocksResponseV0\x12\xb1\x01\n#evonodes_proposed_block_counts_info\x18\x01 \x01(\x0b\x32\x81\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocksH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a?\n\x15\x45vonodeProposedBlocks\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x11\n\x05\x63ount\x18\x02 \x01(\x04\x42\x02\x30\x01\x1a\xc4\x01\n\x16\x45vonodesProposedBlocks\x12\xa9\x01\n\x1e\x65vonodes_proposed_block_counts\x18\x01 \x03(\x0b\x32\x80\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocksB\x08\n\x06resultB\t\n\x07version\"\xf2\x02\n,GetEvonodesProposedEpochBlocksByRangeRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0H\x00\x1a\xaf\x01\n.GetEvonodesProposedEpochBlocksByRangeRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x02 \x01(\rH\x02\x88\x01\x01\x12\x15\n\x0bstart_after\x18\x03 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x04 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x07\n\x05startB\x08\n\x06_epochB\x08\n\x06_limitB\t\n\x07version\"\xcd\x01\n\x1cGetIdentitiesBalancesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0H\x00\x1a<\n\x1eGetIdentitiesBalancesRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9f\x05\n\x1dGetIdentitiesBalancesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0H\x00\x1a\x8a\x04\n\x1fGetIdentitiesBalancesResponseV0\x12\x8a\x01\n\x13identities_balances\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aL\n\x0fIdentityBalance\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x18\n\x07\x62\x61lance\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x8f\x01\n\x12IdentitiesBalances\x12y\n\x07\x65ntries\x18\x01 \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalanceB\x08\n\x06resultB\t\n\x07version\"\xb4\x01\n\x16GetDataContractRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0H\x00\x1a\x35\n\x18GetDataContractRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xb3\x02\n\x17GetDataContractResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0H\x00\x1a\xb0\x01\n\x19GetDataContractResponseV0\x12\x17\n\rdata_contract\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb9\x01\n\x17GetDataContractsRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0H\x00\x1a\x37\n\x19GetDataContractsRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xcf\x04\n\x18GetDataContractsResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0H\x00\x1a[\n\x11\x44\x61taContractEntry\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x32\n\rdata_contract\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x1au\n\rDataContracts\x12\x64\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32\x45.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry\x1a\xf5\x01\n\x1aGetDataContractsResponseV0\x12[\n\x0e\x64\x61ta_contracts\x18\x01 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc5\x02\n\x1dGetDataContractHistoryRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0H\x00\x1a\xb0\x01\n\x1fGetDataContractHistoryRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x17\n\x0bstart_at_ms\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xb2\x05\n\x1eGetDataContractHistoryResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0H\x00\x1a\x9a\x04\n GetDataContractHistoryResponseV0\x12\x8f\x01\n\x15\x64\x61ta_contract_history\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a;\n\x18\x44\x61taContractHistoryEntry\x12\x10\n\x04\x64\x61te\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05value\x18\x02 \x01(\x0c\x1a\xaa\x01\n\x13\x44\x61taContractHistory\x12\x92\x01\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32s.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntryB\x08\n\x06resultB\t\n\x07version\"\xb2\x02\n\x13GetDocumentsRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0H\x00\x1a\xbb\x01\n\x15GetDocumentsRequestV0\x12\x18\n\x10\x64\x61ta_contract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12\r\n\x05where\x18\x03 \x01(\x0c\x12\x10\n\x08order_by\x18\x04 \x01(\x0c\x12\r\n\x05limit\x18\x05 \x01(\r\x12\x15\n\x0bstart_after\x18\x06 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x07 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x08 \x01(\x08\x42\x07\n\x05startB\t\n\x07version\"\x95\x03\n\x14GetDocumentsResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0H\x00\x1a\x9b\x02\n\x16GetDocumentsResponseV0\x12\x65\n\tdocuments\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.DocumentsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1e\n\tDocuments\x12\x11\n\tdocuments\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n\x18GetDocumentsCountRequest\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0H\x00\x1ak\n\x1aGetDocumentsCountRequestV0\x12\x18\n\x10\x64\x61ta_contract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12\r\n\x05where\x18\x03 \x01(\x0c\x12\r\n\x05prove\x18\x04 \x01(\x08\x42\t\n\x07version\"\xb3\x02\n\x19GetDocumentsCountResponse\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0H\x00\x1a\xaa\x01\n\x1bGetDocumentsCountResponseV0\x12\x0f\n\x05\x63ount\x18\x01 \x01(\x04H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xac\x02\n\x1dGetDocumentsSplitCountRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0H\x00\x1a\x97\x01\n\x1fGetDocumentsSplitCountRequestV0\x12\x18\n\x10\x64\x61ta_contract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12\r\n\x05where\x18\x03 \x01(\x0c\x12%\n\x1dsplit_count_by_index_property\x18\x04 \x01(\t\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xf2\x04\n\x1eGetDocumentsSplitCountResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0H\x00\x1a\xda\x03\n GetDocumentsSplitCountResponseV0\x12~\n\x0csplit_counts\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a-\n\x0fSplitCountEntry\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05\x63ount\x18\x02 \x01(\x04\x1a\x8a\x01\n\x0bSplitCounts\x12{\n\x07\x65ntries\x18\x01 \x03(\x0b\x32j.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntryB\x08\n\x06resultB\t\n\x07version\"\xed\x01\n!GetIdentityByPublicKeyHashRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0H\x00\x1aM\n#GetIdentityByPublicKeyHashRequestV0\x12\x17\n\x0fpublic_key_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xda\x02\n\"GetIdentityByPublicKeyHashResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0H\x00\x1a\xb6\x01\n$GetIdentityByPublicKeyHashResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbd\x02\n*GetIdentityByNonUniquePublicKeyHashRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashRequest.GetIdentityByNonUniquePublicKeyHashRequestV0H\x00\x1a\x80\x01\n,GetIdentityByNonUniquePublicKeyHashRequestV0\x12\x17\n\x0fpublic_key_hash\x18\x01 \x01(\x0c\x12\x18\n\x0bstart_after\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x0e\n\x0c_start_afterB\t\n\x07version\"\xd6\x06\n+GetIdentityByNonUniquePublicKeyHashResponse\x12\x82\x01\n\x02v0\x18\x01 \x01(\x0b\x32t.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0H\x00\x1a\x96\x05\n-GetIdentityByNonUniquePublicKeyHashResponseV0\x12\x9a\x01\n\x08identity\x18\x01 \x01(\x0b\x32\x85\x01.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityResponseH\x00\x12\x9d\x01\n\x05proof\x18\x02 \x01(\x0b\x32\x8b\x01.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponseH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x36\n\x10IdentityResponse\x12\x15\n\x08identity\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\x0b\n\t_identity\x1a\xa6\x01\n\x16IdentityProvedResponse\x12P\n&grovedb_identity_public_key_hash_proof\x18\x01 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12!\n\x14identity_proof_bytes\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x42\x17\n\x15_identity_proof_bytesB\x08\n\x06resultB\t\n\x07version\"\xfb\x01\n#WaitForStateTransitionResultRequest\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0H\x00\x1aU\n%WaitForStateTransitionResultRequestV0\x12\x1d\n\x15state_transition_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x99\x03\n$WaitForStateTransitionResultResponse\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0H\x00\x1a\xef\x01\n&WaitForStateTransitionResultResponseV0\x12I\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x38.org.dash.platform.dapi.v0.StateTransitionBroadcastErrorH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x19GetConsensusParamsRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0H\x00\x1a<\n\x1bGetConsensusParamsRequestV0\x12\x0e\n\x06height\x18\x01 \x01(\x05\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9c\x04\n\x1aGetConsensusParamsResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0H\x00\x1aP\n\x14\x43onsensusParamsBlock\x12\x11\n\tmax_bytes\x18\x01 \x01(\t\x12\x0f\n\x07max_gas\x18\x02 \x01(\t\x12\x14\n\x0ctime_iota_ms\x18\x03 \x01(\t\x1a\x62\n\x17\x43onsensusParamsEvidence\x12\x1a\n\x12max_age_num_blocks\x18\x01 \x01(\t\x12\x18\n\x10max_age_duration\x18\x02 \x01(\t\x12\x11\n\tmax_bytes\x18\x03 \x01(\t\x1a\xda\x01\n\x1cGetConsensusParamsResponseV0\x12Y\n\x05\x62lock\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock\x12_\n\x08\x65vidence\x18\x02 \x01(\x0b\x32M.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidenceB\t\n\x07version\"\xe4\x01\n%GetProtocolVersionUpgradeStateRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0H\x00\x1a\x38\n\'GetProtocolVersionUpgradeStateRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xb5\x05\n&GetProtocolVersionUpgradeStateResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0H\x00\x1a\x85\x04\n(GetProtocolVersionUpgradeStateResponseV0\x12\x87\x01\n\x08versions\x18\x01 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x96\x01\n\x08Versions\x12\x89\x01\n\x08versions\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry\x1a:\n\x0cVersionEntry\x12\x16\n\x0eversion_number\x18\x01 \x01(\r\x12\x12\n\nvote_count\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xa3\x02\n*GetProtocolVersionUpgradeVoteStatusRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0H\x00\x1ag\n,GetProtocolVersionUpgradeVoteStatusRequestV0\x12\x19\n\x11start_pro_tx_hash\x18\x01 \x01(\x0c\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xef\x05\n+GetProtocolVersionUpgradeVoteStatusResponse\x12\x82\x01\n\x02v0\x18\x01 \x01(\x0b\x32t.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0H\x00\x1a\xaf\x04\n-GetProtocolVersionUpgradeVoteStatusResponseV0\x12\x98\x01\n\x08versions\x18\x01 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignalsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xaf\x01\n\x0eVersionSignals\x12\x9c\x01\n\x0fversion_signals\x18\x01 \x03(\x0b\x32\x82\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal\x1a\x35\n\rVersionSignal\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07version\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xf5\x01\n\x14GetEpochsInfoRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0H\x00\x1a|\n\x16GetEpochsInfoRequestV0\x12\x31\n\x0bstart_epoch\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\x11\n\tascending\x18\x03 \x01(\x08\x12\r\n\x05prove\x18\x04 \x01(\x08\x42\t\n\x07version\"\x99\x05\n\x15GetEpochsInfoResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0H\x00\x1a\x9c\x04\n\x17GetEpochsInfoResponseV0\x12\x65\n\x06\x65pochs\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1au\n\nEpochInfos\x12g\n\x0b\x65poch_infos\x18\x01 \x03(\x0b\x32R.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo\x1a\xa6\x01\n\tEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1e\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x16\n\nstart_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x0e\x66\x65\x65_multiplier\x18\x05 \x01(\x01\x12\x18\n\x10protocol_version\x18\x06 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xbf\x02\n\x1dGetFinalizedEpochInfosRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0H\x00\x1a\xaa\x01\n\x1fGetFinalizedEpochInfosRequestV0\x12\x19\n\x11start_epoch_index\x18\x01 \x01(\r\x12\"\n\x1astart_epoch_index_included\x18\x02 \x01(\x08\x12\x17\n\x0f\x65nd_epoch_index\x18\x03 \x01(\r\x12 \n\x18\x65nd_epoch_index_included\x18\x04 \x01(\x08\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xbd\t\n\x1eGetFinalizedEpochInfosResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0H\x00\x1a\xa5\x08\n GetFinalizedEpochInfosResponseV0\x12\x80\x01\n\x06\x65pochs\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xa4\x01\n\x13\x46inalizedEpochInfos\x12\x8c\x01\n\x15\x66inalized_epoch_infos\x18\x01 \x03(\x0b\x32m.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo\x1a\x9f\x04\n\x12\x46inalizedEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1e\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x1c\n\x10\x66irst_block_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x0e\x66\x65\x65_multiplier\x18\x05 \x01(\x01\x12\x18\n\x10protocol_version\x18\x06 \x01(\r\x12!\n\x15total_blocks_in_epoch\x18\x07 \x01(\x04\x42\x02\x30\x01\x12*\n\"next_epoch_start_core_block_height\x18\x08 \x01(\r\x12!\n\x15total_processing_fees\x18\t \x01(\x04\x42\x02\x30\x01\x12*\n\x1etotal_distributed_storage_fees\x18\n \x01(\x04\x42\x02\x30\x01\x12&\n\x1atotal_created_storage_fees\x18\x0b \x01(\x04\x42\x02\x30\x01\x12\x1e\n\x12\x63ore_block_rewards\x18\x0c \x01(\x04\x42\x02\x30\x01\x12\x81\x01\n\x0f\x62lock_proposers\x18\r \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer\x1a\x39\n\rBlockProposer\x12\x13\n\x0bproposer_id\x18\x01 \x01(\x0c\x12\x13\n\x0b\x62lock_count\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xde\x04\n\x1cGetContestedResourcesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0H\x00\x1a\xcc\x03\n\x1eGetContestedResourcesRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x1a\n\x12start_index_values\x18\x04 \x03(\x0c\x12\x18\n\x10\x65nd_index_values\x18\x05 \x03(\x0c\x12\x89\x01\n\x13start_at_value_info\x18\x06 \x01(\x0b\x32g.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1a\x45\n\x10StartAtValueInfo\x12\x13\n\x0bstart_value\x18\x01 \x01(\x0c\x12\x1c\n\x14start_value_included\x18\x02 \x01(\x08\x42\x16\n\x14_start_at_value_infoB\x08\n\x06_countB\t\n\x07version\"\x88\x04\n\x1dGetContestedResourcesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0H\x00\x1a\xf3\x02\n\x1fGetContestedResourcesResponseV0\x12\x95\x01\n\x19\x63ontested_resource_values\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValuesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a<\n\x17\x43ontestedResourceValues\x12!\n\x19\x63ontested_resource_values\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xd2\x05\n\x1cGetVotePollsByEndDateRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0H\x00\x1a\xc0\x04\n\x1eGetVotePollsByEndDateRequestV0\x12\x84\x01\n\x0fstart_time_info\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfoH\x00\x88\x01\x01\x12\x80\x01\n\rend_time_info\x18\x02 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfoH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x13\n\x06offset\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x11\n\tascending\x18\x05 \x01(\x08\x12\r\n\x05prove\x18\x06 \x01(\x08\x1aI\n\x0fStartAtTimeInfo\x12\x19\n\rstart_time_ms\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x13start_time_included\x18\x02 \x01(\x08\x1a\x43\n\rEndAtTimeInfo\x12\x17\n\x0b\x65nd_time_ms\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x19\n\x11\x65nd_time_included\x18\x02 \x01(\x08\x42\x12\n\x10_start_time_infoB\x10\n\x0e_end_time_infoB\x08\n\x06_limitB\t\n\x07_offsetB\t\n\x07version\"\x83\x06\n\x1dGetVotePollsByEndDateResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0H\x00\x1a\xee\x04\n\x1fGetVotePollsByEndDateResponseV0\x12\x9c\x01\n\x18vote_polls_by_timestamps\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestampsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aV\n\x1eSerializedVotePollsByTimestamp\x12\x15\n\ttimestamp\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1d\n\x15serialized_vote_polls\x18\x02 \x03(\x0c\x1a\xd7\x01\n\x1fSerializedVotePollsByTimestamps\x12\x99\x01\n\x18vote_polls_by_timestamps\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xff\x06\n$GetContestedResourceVoteStateRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0H\x00\x1a\xd5\x05\n&GetContestedResourceVoteStateRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x86\x01\n\x0bresult_type\x18\x05 \x01(\x0e\x32q.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType\x12\x36\n.allow_include_locked_and_abstaining_vote_tally\x18\x06 \x01(\x08\x12\xa3\x01\n\x18start_at_identifier_info\x18\x07 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x08 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\"I\n\nResultType\x12\r\n\tDOCUMENTS\x10\x00\x12\x0e\n\nVOTE_TALLY\x10\x01\x12\x1c\n\x18\x44OCUMENTS_AND_VOTE_TALLY\x10\x02\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\x94\x0c\n%GetContestedResourceVoteStateResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0H\x00\x1a\xe7\n\n\'GetContestedResourceVoteStateResponseV0\x12\xae\x01\n\x1d\x63ontested_resource_contenders\x18\x01 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContendersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xda\x03\n\x10\x46inishedVoteInfo\x12\xad\x01\n\x15\x66inished_vote_outcome\x18\x01 \x01(\x0e\x32\x8d\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome\x12\x1f\n\x12won_by_identity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12$\n\x18\x66inished_at_block_height\x18\x03 \x01(\x04\x42\x02\x30\x01\x12%\n\x1d\x66inished_at_core_block_height\x18\x04 \x01(\r\x12%\n\x19\x66inished_at_block_time_ms\x18\x05 \x01(\x04\x42\x02\x30\x01\x12\x19\n\x11\x66inished_at_epoch\x18\x06 \x01(\r\"O\n\x13\x46inishedVoteOutcome\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\n\n\x06LOCKED\x10\x01\x12\x16\n\x12NO_PREVIOUS_WINNER\x10\x02\x42\x15\n\x13_won_by_identity_id\x1a\xc4\x03\n\x1b\x43ontestedResourceContenders\x12\x86\x01\n\ncontenders\x18\x01 \x03(\x0b\x32r.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender\x12\x1f\n\x12\x61\x62stain_vote_tally\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1c\n\x0flock_vote_tally\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x9a\x01\n\x12\x66inished_vote_info\x18\x04 \x01(\x0b\x32y.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfoH\x02\x88\x01\x01\x42\x15\n\x13_abstain_vote_tallyB\x12\n\x10_lock_vote_tallyB\x15\n\x13_finished_vote_info\x1ak\n\tContender\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x17\n\nvote_count\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x15\n\x08\x64ocument\x18\x03 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_vote_countB\x0b\n\t_documentB\x08\n\x06resultB\t\n\x07version\"\xd5\x05\n,GetContestedResourceVotersForIdentityRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0H\x00\x1a\x92\x04\n.GetContestedResourceVotersForIdentityRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x15\n\rcontestant_id\x18\x05 \x01(\x0c\x12\xb4\x01\n\x18start_at_identifier_info\x18\x06 \x01(\x0b\x32\x8c\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\xf1\x04\n-GetContestedResourceVotersForIdentityResponse\x12\x86\x01\n\x02v0\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0H\x00\x1a\xab\x03\n/GetContestedResourceVotersForIdentityResponseV0\x12\xb6\x01\n\x19\x63ontested_resource_voters\x18\x01 \x01(\x0b\x32\x90\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVotersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x43\n\x17\x43ontestedResourceVoters\x12\x0e\n\x06voters\x18\x01 \x03(\x0c\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xad\x05\n(GetContestedResourceIdentityVotesRequest\x12|\n\x02v0\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0H\x00\x1a\xf7\x03\n*GetContestedResourceIdentityVotesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x17\n\x0forder_ascending\x18\x04 \x01(\x08\x12\xae\x01\n\x1astart_at_vote_poll_id_info\x18\x05 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfoH\x00\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x1a\x61\n\x15StartAtVotePollIdInfo\x12 \n\x18start_at_poll_identifier\x18\x01 \x01(\x0c\x12&\n\x1estart_poll_identifier_included\x18\x02 \x01(\x08\x42\x1d\n\x1b_start_at_vote_poll_id_infoB\t\n\x07version\"\xc8\n\n)GetContestedResourceIdentityVotesResponse\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0H\x00\x1a\x8f\t\n+GetContestedResourceIdentityVotesResponseV0\x12\xa1\x01\n\x05votes\x18\x01 \x01(\x0b\x32\x8f\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xf7\x01\n\x1e\x43ontestedResourceIdentityVotes\x12\xba\x01\n!contested_resource_identity_votes\x18\x01 \x03(\x0b\x32\x8e\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x1a\xad\x02\n\x12ResourceVoteChoice\x12\xad\x01\n\x10vote_choice_type\x18\x01 \x01(\x0e\x32\x92\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType\x12\x18\n\x0bidentity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\"=\n\x0eVoteChoiceType\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\x0b\n\x07\x41\x42STAIN\x10\x01\x12\x08\n\x04LOCK\x10\x02\x42\x0e\n\x0c_identity_id\x1a\x95\x02\n\x1d\x43ontestedResourceIdentityVote\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\'\n\x1fserialized_index_storage_values\x18\x03 \x03(\x0c\x12\x99\x01\n\x0bvote_choice\x18\x04 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoiceB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n%GetPrefundedSpecializedBalanceRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0H\x00\x1a\x44\n\'GetPrefundedSpecializedBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xed\x02\n&GetPrefundedSpecializedBalanceResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0H\x00\x1a\xbd\x01\n(GetPrefundedSpecializedBalanceResponseV0\x12\x15\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xd0\x01\n GetTotalCreditsInPlatformRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0H\x00\x1a\x33\n\"GetTotalCreditsInPlatformRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xd9\x02\n!GetTotalCreditsInPlatformResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0H\x00\x1a\xb8\x01\n#GetTotalCreditsInPlatformResponseV0\x12\x15\n\x07\x63redits\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x16GetPathElementsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0H\x00\x1a\x45\n\x18GetPathElementsRequestV0\x12\x0c\n\x04path\x18\x01 \x03(\x0c\x12\x0c\n\x04keys\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xa3\x03\n\x17GetPathElementsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0H\x00\x1a\xa0\x02\n\x19GetPathElementsResponseV0\x12i\n\x08\x65lements\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ElementsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1c\n\x08\x45lements\x12\x10\n\x08\x65lements\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\x81\x01\n\x10GetStatusRequest\x12L\n\x02v0\x18\x01 \x01(\x0b\x32>.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0H\x00\x1a\x14\n\x12GetStatusRequestV0B\t\n\x07version\"\xe4\x10\n\x11GetStatusResponse\x12N\n\x02v0\x18\x01 \x01(\x0b\x32@.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0H\x00\x1a\xf3\x0f\n\x13GetStatusResponseV0\x12Y\n\x07version\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version\x12S\n\x04node\x18\x02 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node\x12U\n\x05\x63hain\x18\x03 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain\x12Y\n\x07network\x18\x04 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network\x12^\n\nstate_sync\x18\x05 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync\x12S\n\x04time\x18\x06 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time\x1a\x82\x05\n\x07Version\x12\x63\n\x08software\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software\x12\x63\n\x08protocol\x18\x02 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol\x1a^\n\x08Software\x12\x0c\n\x04\x64\x61pi\x18\x01 \x01(\t\x12\x12\n\x05\x64rive\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntenderdash\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_driveB\r\n\x0b_tenderdash\x1a\xcc\x02\n\x08Protocol\x12p\n\ntenderdash\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash\x12\x66\n\x05\x64rive\x18\x02 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive\x1a(\n\nTenderdash\x12\x0b\n\x03p2p\x18\x01 \x01(\r\x12\r\n\x05\x62lock\x18\x02 \x01(\r\x1a<\n\x05\x44rive\x12\x0e\n\x06latest\x18\x03 \x01(\r\x12\x0f\n\x07\x63urrent\x18\x04 \x01(\r\x12\x12\n\nnext_epoch\x18\x05 \x01(\r\x1a\x7f\n\x04Time\x12\x11\n\x05local\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x05\x62lock\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x88\x01\x01\x12\x18\n\x07genesis\x18\x03 \x01(\x04\x42\x02\x30\x01H\x01\x88\x01\x01\x12\x12\n\x05\x65poch\x18\x04 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_blockB\n\n\x08_genesisB\x08\n\x06_epoch\x1a<\n\x04Node\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\x18\n\x0bpro_tx_hash\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x42\x0e\n\x0c_pro_tx_hash\x1a\xb3\x02\n\x05\x43hain\x12\x13\n\x0b\x63\x61tching_up\x18\x01 \x01(\x08\x12\x19\n\x11latest_block_hash\x18\x02 \x01(\x0c\x12\x17\n\x0flatest_app_hash\x18\x03 \x01(\x0c\x12\x1f\n\x13latest_block_height\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x13\x65\x61rliest_block_hash\x18\x05 \x01(\x0c\x12\x19\n\x11\x65\x61rliest_app_hash\x18\x06 \x01(\x0c\x12!\n\x15\x65\x61rliest_block_height\x18\x07 \x01(\x04\x42\x02\x30\x01\x12!\n\x15max_peer_block_height\x18\t \x01(\x04\x42\x02\x30\x01\x12%\n\x18\x63ore_chain_locked_height\x18\n \x01(\rH\x00\x88\x01\x01\x42\x1b\n\x19_core_chain_locked_height\x1a\x43\n\x07Network\x12\x10\n\x08\x63hain_id\x18\x01 \x01(\t\x12\x13\n\x0bpeers_count\x18\x02 \x01(\r\x12\x11\n\tlistening\x18\x03 \x01(\x08\x1a\x85\x02\n\tStateSync\x12\x1d\n\x11total_synced_time\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1a\n\x0eremaining_time\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x17\n\x0ftotal_snapshots\x18\x03 \x01(\r\x12\"\n\x16\x63hunk_process_avg_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x0fsnapshot_height\x18\x05 \x01(\x04\x42\x02\x30\x01\x12!\n\x15snapshot_chunks_count\x18\x06 \x01(\x04\x42\x02\x30\x01\x12\x1d\n\x11\x62\x61\x63kfilled_blocks\x18\x07 \x01(\x04\x42\x02\x30\x01\x12!\n\x15\x62\x61\x63kfill_blocks_total\x18\x08 \x01(\x04\x42\x02\x30\x01\x42\t\n\x07version\"\xb1\x01\n\x1cGetCurrentQuorumsInfoRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0H\x00\x1a \n\x1eGetCurrentQuorumsInfoRequestV0B\t\n\x07version\"\xa1\x05\n\x1dGetCurrentQuorumsInfoResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0H\x00\x1a\x46\n\x0bValidatorV0\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07node_ip\x18\x02 \x01(\t\x12\x11\n\tis_banned\x18\x03 \x01(\x08\x1a\xaf\x01\n\x0eValidatorSetV0\x12\x13\n\x0bquorum_hash\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ore_height\x18\x02 \x01(\r\x12U\n\x07members\x18\x03 \x03(\x0b\x32\x44.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0\x12\x1c\n\x14threshold_public_key\x18\x04 \x01(\x0c\x1a\x92\x02\n\x1fGetCurrentQuorumsInfoResponseV0\x12\x15\n\rquorum_hashes\x18\x01 \x03(\x0c\x12\x1b\n\x13\x63urrent_quorum_hash\x18\x02 \x01(\x0c\x12_\n\x0evalidator_sets\x18\x03 \x03(\x0b\x32G.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0\x12\x1b\n\x13last_block_proposer\x18\x04 \x01(\x0c\x12=\n\x08metadata\x18\x05 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xf4\x01\n\x1fGetIdentityTokenBalancesRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0H\x00\x1aZ\n!GetIdentityTokenBalancesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xad\x05\n GetIdentityTokenBalancesResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0H\x00\x1a\x8f\x04\n\"GetIdentityTokenBalancesResponseV0\x12\x86\x01\n\x0etoken_balances\x18\x01 \x01(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aG\n\x11TokenBalanceEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x9a\x01\n\rTokenBalances\x12\x88\x01\n\x0etoken_balances\x18\x01 \x03(\x0b\x32p.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xfc\x01\n!GetIdentitiesTokenBalancesRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0H\x00\x1a\\\n#GetIdentitiesTokenBalancesRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xf2\x05\n\"GetIdentitiesTokenBalancesResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0H\x00\x1a\xce\x04\n$GetIdentitiesTokenBalancesResponseV0\x12\x9b\x01\n\x17identity_token_balances\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aR\n\x19IdentityTokenBalanceEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\xb7\x01\n\x15IdentityTokenBalances\x12\x9d\x01\n\x17identity_token_balances\x18\x01 \x03(\x0b\x32|.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xe8\x01\n\x1cGetIdentityTokenInfosRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0H\x00\x1aW\n\x1eGetIdentityTokenInfosRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\x98\x06\n\x1dGetIdentityTokenInfosResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0H\x00\x1a\x83\x05\n\x1fGetIdentityTokenInfosResponseV0\x12z\n\x0btoken_infos\x18\x01 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb0\x01\n\x0eTokenInfoEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x82\x01\n\x04info\x18\x02 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x8a\x01\n\nTokenInfos\x12|\n\x0btoken_infos\x18\x01 \x03(\x0b\x32g.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n\x1eGetIdentitiesTokenInfosRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0H\x00\x1aY\n GetIdentitiesTokenInfosRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xca\x06\n\x1fGetIdentitiesTokenInfosResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0H\x00\x1a\xaf\x05\n!GetIdentitiesTokenInfosResponseV0\x12\x8f\x01\n\x14identity_token_infos\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb7\x01\n\x0eTokenInfoEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x86\x01\n\x04info\x18\x02 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x97\x01\n\x12IdentityTokenInfos\x12\x80\x01\n\x0btoken_infos\x18\x01 \x03(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbf\x01\n\x17GetTokenStatusesRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0H\x00\x1a=\n\x19GetTokenStatusesRequestV0\x12\x11\n\ttoken_ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xe7\x04\n\x18GetTokenStatusesResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0H\x00\x1a\xe1\x03\n\x1aGetTokenStatusesResponseV0\x12v\n\x0etoken_statuses\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x44\n\x10TokenStatusEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x13\n\x06paused\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\t\n\x07_paused\x1a\x88\x01\n\rTokenStatuses\x12w\n\x0etoken_statuses\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntryB\x08\n\x06resultB\t\n\x07version\"\xef\x01\n#GetTokenDirectPurchasePricesRequest\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesRequest.GetTokenDirectPurchasePricesRequestV0H\x00\x1aI\n%GetTokenDirectPurchasePricesRequestV0\x12\x11\n\ttoken_ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x8b\t\n$GetTokenDirectPurchasePricesResponse\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0H\x00\x1a\xe1\x07\n&GetTokenDirectPurchasePricesResponseV0\x12\xa9\x01\n\x1ctoken_direct_purchase_prices\x18\x01 \x01(\x0b\x32\x80\x01.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.TokenDirectPurchasePricesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x33\n\x10PriceForQuantity\x12\x10\n\x08quantity\x18\x01 \x01(\x04\x12\r\n\x05price\x18\x02 \x01(\x04\x1a\xa7\x01\n\x0fPricingSchedule\x12\x93\x01\n\x12price_for_quantity\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PriceForQuantity\x1a\xe4\x01\n\x1dTokenDirectPurchasePriceEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x15\n\x0b\x66ixed_price\x18\x02 \x01(\x04H\x00\x12\x90\x01\n\x0evariable_price\x18\x03 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PricingScheduleH\x00\x42\x07\n\x05price\x1a\xc8\x01\n\x19TokenDirectPurchasePrices\x12\xaa\x01\n\x1btoken_direct_purchase_price\x18\x01 \x03(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.TokenDirectPurchasePriceEntryB\x08\n\x06resultB\t\n\x07version\"\xce\x01\n\x1bGetTokenContractInfoRequest\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetTokenContractInfoRequest.GetTokenContractInfoRequestV0H\x00\x1a@\n\x1dGetTokenContractInfoRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xfb\x03\n\x1cGetTokenContractInfoResponse\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetTokenContractInfoResponse.GetTokenContractInfoResponseV0H\x00\x1a\xe9\x02\n\x1eGetTokenContractInfoResponseV0\x12|\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32l.org.dash.platform.dapi.v0.GetTokenContractInfoResponse.GetTokenContractInfoResponseV0.TokenContractInfoDataH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aM\n\x15TokenContractInfoData\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17token_contract_position\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xef\x04\n)GetTokenPreProgrammedDistributionsRequest\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0H\x00\x1a\xb6\x03\n+GetTokenPreProgrammedDistributionsRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x98\x01\n\rstart_at_info\x18\x02 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfoH\x00\x88\x01\x01\x12\x12\n\x05limit\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x1a\x9a\x01\n\x0bStartAtInfo\x12\x15\n\rstart_time_ms\x18\x01 \x01(\x04\x12\x1c\n\x0fstart_recipient\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12%\n\x18start_recipient_included\x18\x03 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_start_recipientB\x1b\n\x19_start_recipient_includedB\x10\n\x0e_start_at_infoB\x08\n\x06_limitB\t\n\x07version\"\xec\x07\n*GetTokenPreProgrammedDistributionsResponse\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0H\x00\x1a\xaf\x06\n,GetTokenPreProgrammedDistributionsResponseV0\x12\xa5\x01\n\x13token_distributions\x18\x01 \x01(\x0b\x32\x85\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a>\n\x16TokenDistributionEntry\x12\x14\n\x0crecipient_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x1a\xd4\x01\n\x1bTokenTimedDistributionEntry\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12\xa1\x01\n\rdistributions\x18\x02 \x03(\x0b\x32\x89\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry\x1a\xc3\x01\n\x12TokenDistributions\x12\xac\x01\n\x13token_distributions\x18\x01 \x03(\x0b\x32\x8e\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntryB\x08\n\x06resultB\t\n\x07version\"\x82\x04\n-GetTokenPerpetualDistributionLastClaimRequest\x12\x86\x01\n\x02v0\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest.GetTokenPerpetualDistributionLastClaimRequestV0H\x00\x1aI\n\x11\x43ontractTokenInfo\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17token_contract_position\x18\x02 \x01(\r\x1a\xf1\x01\n/GetTokenPerpetualDistributionLastClaimRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12v\n\rcontract_info\x18\x02 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest.ContractTokenInfoH\x00\x88\x01\x01\x12\x13\n\x0bidentity_id\x18\x04 \x01(\x0c\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x10\n\x0e_contract_infoB\t\n\x07version\"\x93\x05\n.GetTokenPerpetualDistributionLastClaimResponse\x12\x88\x01\n\x02v0\x18\x01 \x01(\x0b\x32z.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse.GetTokenPerpetualDistributionLastClaimResponseV0H\x00\x1a\xca\x03\n0GetTokenPerpetualDistributionLastClaimResponseV0\x12\x9f\x01\n\nlast_claim\x18\x01 \x01(\x0b\x32\x88\x01.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse.GetTokenPerpetualDistributionLastClaimResponseV0.LastClaimInfoH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1ax\n\rLastClaimInfo\x12\x1a\n\x0ctimestamp_ms\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x1a\n\x0c\x62lock_height\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x12\x0f\n\x05\x65poch\x18\x03 \x01(\rH\x00\x12\x13\n\traw_bytes\x18\x04 \x01(\x0cH\x00\x42\t\n\x07paid_atB\x08\n\x06resultB\t\n\x07version\"\xca\x01\n\x1aGetTokenTotalSupplyRequest\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0H\x00\x1a?\n\x1cGetTokenTotalSupplyRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xaf\x04\n\x1bGetTokenTotalSupplyResponse\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0H\x00\x1a\xa0\x03\n\x1dGetTokenTotalSupplyResponseV0\x12\x88\x01\n\x12token_total_supply\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1ax\n\x15TokenTotalSupplyEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x30\n(total_aggregated_amount_in_user_accounts\x18\x02 \x01(\x04\x12\x1b\n\x13total_system_amount\x18\x03 \x01(\x04\x42\x08\n\x06resultB\t\n\x07version\"\xd2\x01\n\x13GetGroupInfoRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0H\x00\x1a\\\n\x15GetGroupInfoRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xd4\x05\n\x14GetGroupInfoResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0H\x00\x1a\xda\x04\n\x16GetGroupInfoResponseV0\x12\x66\n\ngroup_info\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x98\x01\n\x0eGroupInfoEntry\x12h\n\x07members\x18\x01 \x03(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x02 \x01(\r\x1a\x8a\x01\n\tGroupInfo\x12n\n\ngroup_info\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntryH\x00\x88\x01\x01\x42\r\n\x0b_group_infoB\x08\n\x06resultB\t\n\x07version\"\xed\x03\n\x14GetGroupInfosRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0H\x00\x1au\n\x1cStartAtGroupContractPosition\x12%\n\x1dstart_group_contract_position\x18\x01 \x01(\r\x12.\n&start_group_contract_position_included\x18\x02 \x01(\x08\x1a\xfc\x01\n\x16GetGroupInfosRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12{\n start_at_group_contract_position\x18\x02 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPositionH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x42#\n!_start_at_group_contract_positionB\x08\n\x06_countB\t\n\x07version\"\xff\x05\n\x15GetGroupInfosResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0H\x00\x1a\x82\x05\n\x17GetGroupInfosResponseV0\x12j\n\x0bgroup_infos\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\xc3\x01\n\x16GroupPositionInfoEntry\x12\x1f\n\x17group_contract_position\x18\x01 \x01(\r\x12j\n\x07members\x18\x02 \x03(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x03 \x01(\r\x1a\x82\x01\n\nGroupInfos\x12t\n\x0bgroup_infos\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbe\x04\n\x16GetGroupActionsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0H\x00\x1aL\n\x0fStartAtActionId\x12\x17\n\x0fstart_action_id\x18\x01 \x01(\x0c\x12 \n\x18start_action_id_included\x18\x02 \x01(\x08\x1a\xc8\x02\n\x18GetGroupActionsRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12N\n\x06status\x18\x03 \x01(\x0e\x32>.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus\x12\x62\n\x12start_at_action_id\x18\x04 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionIdH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x05 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x42\x15\n\x13_start_at_action_idB\x08\n\x06_count\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\xd6\x1e\n\x17GetGroupActionsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0H\x00\x1a\xd3\x1d\n\x19GetGroupActionsResponseV0\x12r\n\rgroup_actions\x18\x01 \x01(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a[\n\tMintEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x14\n\x0crecipient_id\x18\x02 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a[\n\tBurnEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x14\n\x0c\x62urn_from_id\x18\x02 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aJ\n\x0b\x46reezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aL\n\rUnfreezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x66\n\x17\x44\x65stroyFrozenFundsEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x13SharedEncryptedNote\x12\x18\n\x10sender_key_index\x18\x01 \x01(\r\x12\x1b\n\x13recipient_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a{\n\x15PersonalEncryptedNote\x12!\n\x19root_encryption_key_index\x18\x01 \x01(\r\x12\'\n\x1f\x64\x65rivation_encryption_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a\xe9\x01\n\x14\x45mergencyActionEvent\x12\x81\x01\n\x0b\x61\x63tion_type\x18\x01 \x01(\x0e\x32l.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\"#\n\nActionType\x12\t\n\x05PAUSE\x10\x00\x12\n\n\x06RESUME\x10\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x16TokenConfigUpdateEvent\x12 \n\x18token_config_update_item\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\xe6\x03\n\x1eUpdateDirectPurchasePriceEvent\x12\x15\n\x0b\x66ixed_price\x18\x01 \x01(\x04H\x00\x12\x95\x01\n\x0evariable_price\x18\x02 \x01(\x0b\x32{.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEvent.PricingScheduleH\x00\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x01\x88\x01\x01\x1a\x33\n\x10PriceForQuantity\x12\x10\n\x08quantity\x18\x01 \x01(\x04\x12\r\n\x05price\x18\x02 \x01(\x04\x1a\xac\x01\n\x0fPricingSchedule\x12\x98\x01\n\x12price_for_quantity\x18\x01 \x03(\x0b\x32|.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEvent.PriceForQuantityB\x07\n\x05priceB\x0e\n\x0c_public_note\x1a\xfc\x02\n\x10GroupActionEvent\x12n\n\x0btoken_event\x18\x01 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEventH\x00\x12t\n\x0e\x64ocument_event\x18\x02 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEventH\x00\x12t\n\x0e\x63ontract_event\x18\x03 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEventH\x00\x42\x0c\n\nevent_type\x1a\x8b\x01\n\rDocumentEvent\x12r\n\x06\x63reate\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEventH\x00\x42\x06\n\x04type\x1a/\n\x13\x44ocumentCreateEvent\x12\x18\n\x10\x63reated_document\x18\x01 \x01(\x0c\x1a/\n\x13\x43ontractUpdateEvent\x12\x18\n\x10updated_contract\x18\x01 \x01(\x0c\x1a\x8b\x01\n\rContractEvent\x12r\n\x06update\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEventH\x00\x42\x06\n\x04type\x1a\xd1\x07\n\nTokenEvent\x12\x66\n\x04mint\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEventH\x00\x12\x66\n\x04\x62urn\x18\x02 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEventH\x00\x12j\n\x06\x66reeze\x18\x03 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEventH\x00\x12n\n\x08unfreeze\x18\x04 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEventH\x00\x12\x84\x01\n\x14\x64\x65stroy_frozen_funds\x18\x05 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEventH\x00\x12}\n\x10\x65mergency_action\x18\x06 \x01(\x0b\x32\x61.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEventH\x00\x12\x82\x01\n\x13token_config_update\x18\x07 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEventH\x00\x12\x83\x01\n\x0cupdate_price\x18\x08 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEventH\x00\x42\x06\n\x04type\x1a\x93\x01\n\x10GroupActionEntry\x12\x11\n\taction_id\x18\x01 \x01(\x0c\x12l\n\x05\x65vent\x18\x02 \x01(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent\x1a\x84\x01\n\x0cGroupActions\x12t\n\rgroup_actions\x18\x01 \x03(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntryB\x08\n\x06resultB\t\n\x07version\"\x88\x03\n\x1cGetGroupActionSignersRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0H\x00\x1a\xce\x01\n\x1eGetGroupActionSignersRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12T\n\x06status\x18\x03 \x01(\x0e\x32\x44.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus\x12\x11\n\taction_id\x18\x04 \x01(\x0c\x12\r\n\x05prove\x18\x05 \x01(\x08\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\x8b\x05\n\x1dGetGroupActionSignersResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0H\x00\x1a\xf6\x03\n\x1fGetGroupActionSignersResponseV0\x12\x8b\x01\n\x14group_action_signers\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x35\n\x11GroupActionSigner\x12\x11\n\tsigner_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x91\x01\n\x12GroupActionSigners\x12{\n\x07signers\x18\x01 \x03(\x0b\x32j.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignerB\x08\n\x06resultB\t\n\x07version\"\xb5\x01\n\x15GetAddressInfoRequest\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetAddressInfoRequest.GetAddressInfoRequestV0H\x00\x1a\x39\n\x17GetAddressInfoRequestV0\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x85\x01\n\x10\x41\x64\x64ressInfoEntry\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12J\n\x11\x62\x61lance_and_nonce\x18\x02 \x01(\x0b\x32*.org.dash.platform.dapi.v0.BalanceAndNonceH\x00\x88\x01\x01\x42\x14\n\x12_balance_and_nonce\"1\n\x0f\x42\x61lanceAndNonce\x12\x0f\n\x07\x62\x61lance\x18\x01 \x01(\x04\x12\r\n\x05nonce\x18\x02 \x01(\r\"_\n\x12\x41\x64\x64ressInfoEntries\x12I\n\x14\x61\x64\x64ress_info_entries\x18\x01 \x03(\x0b\x32+.org.dash.platform.dapi.v0.AddressInfoEntry\"m\n\x14\x41\x64\x64ressBalanceChange\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12\x19\n\x0bset_balance\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x12\x1c\n\x0e\x61\x64\x64_to_balance\x18\x03 \x01(\x04\x42\x02\x30\x01H\x00\x42\x0b\n\toperation\"x\n\x1a\x42lockAddressBalanceChanges\x12\x18\n\x0c\x62lock_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12@\n\x07\x63hanges\x18\x02 \x03(\x0b\x32/.org.dash.platform.dapi.v0.AddressBalanceChange\"k\n\x1b\x41\x64\x64ressBalanceUpdateEntries\x12L\n\rblock_changes\x18\x01 \x03(\x0b\x32\x35.org.dash.platform.dapi.v0.BlockAddressBalanceChanges\"\xe1\x02\n\x16GetAddressInfoResponse\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0H\x00\x1a\xe1\x01\n\x18GetAddressInfoResponseV0\x12I\n\x12\x61\x64\x64ress_info_entry\x18\x01 \x01(\x0b\x32+.org.dash.platform.dapi.v0.AddressInfoEntryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc3\x01\n\x18GetAddressesInfosRequest\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetAddressesInfosRequest.GetAddressesInfosRequestV0H\x00\x1a>\n\x1aGetAddressesInfosRequestV0\x12\x11\n\taddresses\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf1\x02\n\x19GetAddressesInfosResponse\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetAddressesInfosResponse.GetAddressesInfosResponseV0H\x00\x1a\xe8\x01\n\x1bGetAddressesInfosResponseV0\x12M\n\x14\x61\x64\x64ress_info_entries\x18\x01 \x01(\x0b\x32-.org.dash.platform.dapi.v0.AddressInfoEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb5\x01\n\x1dGetAddressesTrunkStateRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetAddressesTrunkStateRequest.GetAddressesTrunkStateRequestV0H\x00\x1a!\n\x1fGetAddressesTrunkStateRequestV0B\t\n\x07version\"\xaa\x02\n\x1eGetAddressesTrunkStateResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetAddressesTrunkStateResponse.GetAddressesTrunkStateResponseV0H\x00\x1a\x92\x01\n GetAddressesTrunkStateResponseV0\x12/\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xf0\x01\n\x1eGetAddressesBranchStateRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0H\x00\x1aY\n GetAddressesBranchStateRequestV0\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05\x64\x65pth\x18\x02 \x01(\r\x12\x19\n\x11\x63heckpoint_height\x18\x03 \x01(\x04\x42\t\n\x07version\"\xd1\x01\n\x1fGetAddressesBranchStateResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse.GetAddressesBranchStateResponseV0H\x00\x1a\x37\n!GetAddressesBranchStateResponseV0\x12\x12\n\nmerk_proof\x18\x02 \x01(\x0c\x42\t\n\x07version\"\x9e\x02\n%GetRecentAddressBalanceChangesRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0H\x00\x1ar\n\'GetRecentAddressBalanceChangesRequestV0\x12\x18\n\x0cstart_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x12\x1e\n\x16start_height_exclusive\x18\x03 \x01(\x08\x42\t\n\x07version\"\xb8\x03\n&GetRecentAddressBalanceChangesResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0H\x00\x1a\x88\x02\n(GetRecentAddressBalanceChangesResponseV0\x12`\n\x1e\x61\x64\x64ress_balance_update_entries\x18\x01 \x01(\x0b\x32\x36.org.dash.platform.dapi.v0.AddressBalanceUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"G\n\x16\x42lockHeightCreditEntry\x12\x18\n\x0c\x62lock_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x13\n\x07\x63redits\x18\x02 \x01(\x04\x42\x02\x30\x01\"\xb0\x01\n\x1d\x43ompactedAddressBalanceChange\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12\x19\n\x0bset_credits\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x12V\n\x19\x61\x64\x64_to_credits_operations\x18\x03 \x01(\x0b\x32\x31.org.dash.platform.dapi.v0.AddToCreditsOperationsH\x00\x42\x0b\n\toperation\"\\\n\x16\x41\x64\x64ToCreditsOperations\x12\x42\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x31.org.dash.platform.dapi.v0.BlockHeightCreditEntry\"\xae\x01\n#CompactedBlockAddressBalanceChanges\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1c\n\x10\x65nd_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12I\n\x07\x63hanges\x18\x03 \x03(\x0b\x32\x38.org.dash.platform.dapi.v0.CompactedAddressBalanceChange\"\x87\x01\n$CompactedAddressBalanceUpdateEntries\x12_\n\x17\x63ompacted_block_changes\x18\x01 \x03(\x0b\x32>.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges\"\xa9\x02\n.GetRecentCompactedAddressBalanceChangesRequest\x12\x88\x01\n\x02v0\x18\x01 \x01(\x0b\x32z.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0H\x00\x1a\x61\n0GetRecentCompactedAddressBalanceChangesRequestV0\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf0\x03\n/GetRecentCompactedAddressBalanceChangesResponse\x12\x8a\x01\n\x02v0\x18\x01 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0H\x00\x1a\xa4\x02\n1GetRecentCompactedAddressBalanceChangesResponseV0\x12s\n(compacted_address_balance_update_entries\x18\x01 \x01(\x0b\x32?.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xf4\x01\n GetShieldedEncryptedNotesRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesRequest.GetShieldedEncryptedNotesRequestV0H\x00\x1aW\n\"GetShieldedEncryptedNotesRequestV0\x12\x13\n\x0bstart_index\x18\x01 \x01(\x04\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xac\x05\n!GetShieldedEncryptedNotesResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse.GetShieldedEncryptedNotesResponseV0H\x00\x1a\x8b\x04\n#GetShieldedEncryptedNotesResponseV0\x12\x8a\x01\n\x0f\x65ncrypted_notes\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse.GetShieldedEncryptedNotesResponseV0.EncryptedNotesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aG\n\rEncryptedNote\x12\x11\n\tnullifier\x18\x01 \x01(\x0c\x12\x0b\n\x03\x63mx\x18\x02 \x01(\x0c\x12\x16\n\x0e\x65ncrypted_note\x18\x03 \x01(\x0c\x1a\x91\x01\n\x0e\x45ncryptedNotes\x12\x7f\n\x07\x65ntries\x18\x01 \x03(\x0b\x32n.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse.GetShieldedEncryptedNotesResponseV0.EncryptedNoteB\x08\n\x06resultB\t\n\x07version\"\xb4\x01\n\x19GetShieldedAnchorsRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetShieldedAnchorsRequest.GetShieldedAnchorsRequestV0H\x00\x1a,\n\x1bGetShieldedAnchorsRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xb1\x03\n\x1aGetShieldedAnchorsResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetShieldedAnchorsResponse.GetShieldedAnchorsResponseV0H\x00\x1a\xa5\x02\n\x1cGetShieldedAnchorsResponseV0\x12m\n\x07\x61nchors\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetShieldedAnchorsResponse.GetShieldedAnchorsResponseV0.AnchorsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1a\n\x07\x41nchors\x12\x0f\n\x07\x61nchors\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xd8\x01\n\"GetMostRecentShieldedAnchorRequest\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorRequest.GetMostRecentShieldedAnchorRequestV0H\x00\x1a\x35\n$GetMostRecentShieldedAnchorRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xdc\x02\n#GetMostRecentShieldedAnchorResponse\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorResponse.GetMostRecentShieldedAnchorResponseV0H\x00\x1a\xb5\x01\n%GetMostRecentShieldedAnchorResponseV0\x12\x10\n\x06\x61nchor\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbc\x01\n\x1bGetShieldedPoolStateRequest\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetShieldedPoolStateRequest.GetShieldedPoolStateRequestV0H\x00\x1a.\n\x1dGetShieldedPoolStateRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xcb\x02\n\x1cGetShieldedPoolStateResponse\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetShieldedPoolStateResponse.GetShieldedPoolStateResponseV0H\x00\x1a\xb9\x01\n\x1eGetShieldedPoolStateResponseV0\x12\x1b\n\rtotal_balance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xd4\x01\n\x1cGetShieldedNullifiersRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetShieldedNullifiersRequest.GetShieldedNullifiersRequestV0H\x00\x1a\x43\n\x1eGetShieldedNullifiersRequestV0\x12\x12\n\nnullifiers\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x86\x05\n\x1dGetShieldedNullifiersResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse.GetShieldedNullifiersResponseV0H\x00\x1a\xf1\x03\n\x1fGetShieldedNullifiersResponseV0\x12\x88\x01\n\x12nullifier_statuses\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse.GetShieldedNullifiersResponseV0.NullifierStatusesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x36\n\x0fNullifierStatus\x12\x11\n\tnullifier\x18\x01 \x01(\x0c\x12\x10\n\x08is_spent\x18\x02 \x01(\x08\x1a\x8e\x01\n\x11NullifierStatuses\x12y\n\x07\x65ntries\x18\x01 \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse.GetShieldedNullifiersResponseV0.NullifierStatusB\x08\n\x06resultB\t\n\x07version\"\xe5\x01\n\x1eGetNullifiersTrunkStateRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetNullifiersTrunkStateRequest.GetNullifiersTrunkStateRequestV0H\x00\x1aN\n GetNullifiersTrunkStateRequestV0\x12\x11\n\tpool_type\x18\x01 \x01(\r\x12\x17\n\x0fpool_identifier\x18\x02 \x01(\x0c\x42\t\n\x07version\"\xae\x02\n\x1fGetNullifiersTrunkStateResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetNullifiersTrunkStateResponse.GetNullifiersTrunkStateResponseV0H\x00\x1a\x93\x01\n!GetNullifiersTrunkStateResponseV0\x12/\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xa1\x02\n\x1fGetNullifiersBranchStateRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetNullifiersBranchStateRequest.GetNullifiersBranchStateRequestV0H\x00\x1a\x86\x01\n!GetNullifiersBranchStateRequestV0\x12\x11\n\tpool_type\x18\x01 \x01(\r\x12\x17\n\x0fpool_identifier\x18\x02 \x01(\x0c\x12\x0b\n\x03key\x18\x03 \x01(\x0c\x12\r\n\x05\x64\x65pth\x18\x04 \x01(\r\x12\x19\n\x11\x63heckpoint_height\x18\x05 \x01(\x04\x42\t\n\x07version\"\xd5\x01\n GetNullifiersBranchStateResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetNullifiersBranchStateResponse.GetNullifiersBranchStateResponseV0H\x00\x1a\x38\n\"GetNullifiersBranchStateResponseV0\x12\x12\n\nmerk_proof\x18\x02 \x01(\x0c\x42\t\n\x07version\"E\n\x15\x42lockNullifierChanges\x12\x18\n\x0c\x62lock_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x12\n\nnullifiers\x18\x02 \x03(\x0c\"a\n\x16NullifierUpdateEntries\x12G\n\rblock_changes\x18\x01 \x03(\x0b\x32\x30.org.dash.platform.dapi.v0.BlockNullifierChanges\"\xea\x01\n GetRecentNullifierChangesRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetRecentNullifierChangesRequest.GetRecentNullifierChangesRequestV0H\x00\x1aM\n\"GetRecentNullifierChangesRequestV0\x12\x18\n\x0cstart_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x99\x03\n!GetRecentNullifierChangesResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetRecentNullifierChangesResponse.GetRecentNullifierChangesResponseV0H\x00\x1a\xf8\x01\n#GetRecentNullifierChangesResponseV0\x12U\n\x18nullifier_update_entries\x18\x01 \x01(\x0b\x32\x31.org.dash.platform.dapi.v0.NullifierUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"r\n\x1e\x43ompactedBlockNullifierChanges\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1c\n\x10\x65nd_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x12\n\nnullifiers\x18\x03 \x03(\x0c\"}\n\x1f\x43ompactedNullifierUpdateEntries\x12Z\n\x17\x63ompacted_block_changes\x18\x01 \x03(\x0b\x32\x39.org.dash.platform.dapi.v0.CompactedBlockNullifierChanges\"\x94\x02\n)GetRecentCompactedNullifierChangesRequest\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesRequest.GetRecentCompactedNullifierChangesRequestV0H\x00\x1a\\\n+GetRecentCompactedNullifierChangesRequestV0\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xd1\x03\n*GetRecentCompactedNullifierChangesResponse\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesResponse.GetRecentCompactedNullifierChangesResponseV0H\x00\x1a\x94\x02\n,GetRecentCompactedNullifierChangesResponseV0\x12h\n\"compacted_nullifier_update_entries\x18\x01 \x01(\x0b\x32:.org.dash.platform.dapi.v0.CompactedNullifierUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version*Z\n\nKeyPurpose\x12\x12\n\x0e\x41UTHENTICATION\x10\x00\x12\x0e\n\nENCRYPTION\x10\x01\x12\x0e\n\nDECRYPTION\x10\x02\x12\x0c\n\x08TRANSFER\x10\x03\x12\n\n\x06VOTING\x10\x05\x32\xc3I\n\x08Platform\x12\x93\x01\n\x18\x62roadcastStateTransition\x12:.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest\x1a;.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse\x12l\n\x0bgetIdentity\x12-.org.dash.platform.dapi.v0.GetIdentityRequest\x1a..org.dash.platform.dapi.v0.GetIdentityResponse\x12x\n\x0fgetIdentityKeys\x12\x31.org.dash.platform.dapi.v0.GetIdentityKeysRequest\x1a\x32.org.dash.platform.dapi.v0.GetIdentityKeysResponse\x12\x96\x01\n\x19getIdentitiesContractKeys\x12;.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest\x1a<.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse\x12{\n\x10getIdentityNonce\x12\x32.org.dash.platform.dapi.v0.GetIdentityNonceRequest\x1a\x33.org.dash.platform.dapi.v0.GetIdentityNonceResponse\x12\x93\x01\n\x18getIdentityContractNonce\x12:.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse\x12\x81\x01\n\x12getIdentityBalance\x12\x34.org.dash.platform.dapi.v0.GetIdentityBalanceRequest\x1a\x35.org.dash.platform.dapi.v0.GetIdentityBalanceResponse\x12\x8a\x01\n\x15getIdentitiesBalances\x12\x37.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse\x12\xa2\x01\n\x1dgetIdentityBalanceAndRevision\x12?.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest\x1a@.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse\x12\xaf\x01\n#getEvonodesProposedEpochBlocksByIds\x12\x45.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12\xb3\x01\n%getEvonodesProposedEpochBlocksByRange\x12G.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12x\n\x0fgetDataContract\x12\x31.org.dash.platform.dapi.v0.GetDataContractRequest\x1a\x32.org.dash.platform.dapi.v0.GetDataContractResponse\x12\x8d\x01\n\x16getDataContractHistory\x12\x38.org.dash.platform.dapi.v0.GetDataContractHistoryRequest\x1a\x39.org.dash.platform.dapi.v0.GetDataContractHistoryResponse\x12{\n\x10getDataContracts\x12\x32.org.dash.platform.dapi.v0.GetDataContractsRequest\x1a\x33.org.dash.platform.dapi.v0.GetDataContractsResponse\x12o\n\x0cgetDocuments\x12..org.dash.platform.dapi.v0.GetDocumentsRequest\x1a/.org.dash.platform.dapi.v0.GetDocumentsResponse\x12~\n\x11getDocumentsCount\x12\x33.org.dash.platform.dapi.v0.GetDocumentsCountRequest\x1a\x34.org.dash.platform.dapi.v0.GetDocumentsCountResponse\x12\x8d\x01\n\x16getDocumentsSplitCount\x12\x38.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest\x1a\x39.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse\x12\x99\x01\n\x1agetIdentityByPublicKeyHash\x12<.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest\x1a=.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse\x12\xb4\x01\n#getIdentityByNonUniquePublicKeyHash\x12\x45.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashRequest\x1a\x46.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse\x12\x9f\x01\n\x1cwaitForStateTransitionResult\x12>.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest\x1a?.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse\x12\x81\x01\n\x12getConsensusParams\x12\x34.org.dash.platform.dapi.v0.GetConsensusParamsRequest\x1a\x35.org.dash.platform.dapi.v0.GetConsensusParamsResponse\x12\xa5\x01\n\x1egetProtocolVersionUpgradeState\x12@.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest\x1a\x41.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse\x12\xb4\x01\n#getProtocolVersionUpgradeVoteStatus\x12\x45.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest\x1a\x46.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse\x12r\n\rgetEpochsInfo\x12/.org.dash.platform.dapi.v0.GetEpochsInfoRequest\x1a\x30.org.dash.platform.dapi.v0.GetEpochsInfoResponse\x12\x8d\x01\n\x16getFinalizedEpochInfos\x12\x38.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest\x1a\x39.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse\x12\x8a\x01\n\x15getContestedResources\x12\x37.org.dash.platform.dapi.v0.GetContestedResourcesRequest\x1a\x38.org.dash.platform.dapi.v0.GetContestedResourcesResponse\x12\xa2\x01\n\x1dgetContestedResourceVoteState\x12?.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest\x1a@.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse\x12\xba\x01\n%getContestedResourceVotersForIdentity\x12G.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest\x1aH.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse\x12\xae\x01\n!getContestedResourceIdentityVotes\x12\x43.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest\x1a\x44.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse\x12\x8a\x01\n\x15getVotePollsByEndDate\x12\x37.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest\x1a\x38.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse\x12\xa5\x01\n\x1egetPrefundedSpecializedBalance\x12@.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest\x1a\x41.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse\x12\x96\x01\n\x19getTotalCreditsInPlatform\x12;.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest\x1a<.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse\x12x\n\x0fgetPathElements\x12\x31.org.dash.platform.dapi.v0.GetPathElementsRequest\x1a\x32.org.dash.platform.dapi.v0.GetPathElementsResponse\x12\x66\n\tgetStatus\x12+.org.dash.platform.dapi.v0.GetStatusRequest\x1a,.org.dash.platform.dapi.v0.GetStatusResponse\x12\x8a\x01\n\x15getCurrentQuorumsInfo\x12\x37.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest\x1a\x38.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse\x12\x93\x01\n\x18getIdentityTokenBalances\x12:.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse\x12\x99\x01\n\x1agetIdentitiesTokenBalances\x12<.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest\x1a=.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse\x12\x8a\x01\n\x15getIdentityTokenInfos\x12\x37.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse\x12\x90\x01\n\x17getIdentitiesTokenInfos\x12\x39.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest\x1a:.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse\x12{\n\x10getTokenStatuses\x12\x32.org.dash.platform.dapi.v0.GetTokenStatusesRequest\x1a\x33.org.dash.platform.dapi.v0.GetTokenStatusesResponse\x12\x9f\x01\n\x1cgetTokenDirectPurchasePrices\x12>.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesRequest\x1a?.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse\x12\x87\x01\n\x14getTokenContractInfo\x12\x36.org.dash.platform.dapi.v0.GetTokenContractInfoRequest\x1a\x37.org.dash.platform.dapi.v0.GetTokenContractInfoResponse\x12\xb1\x01\n\"getTokenPreProgrammedDistributions\x12\x44.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest\x1a\x45.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse\x12\xbd\x01\n&getTokenPerpetualDistributionLastClaim\x12H.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest\x1aI.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse\x12\x84\x01\n\x13getTokenTotalSupply\x12\x35.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest\x1a\x36.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse\x12o\n\x0cgetGroupInfo\x12..org.dash.platform.dapi.v0.GetGroupInfoRequest\x1a/.org.dash.platform.dapi.v0.GetGroupInfoResponse\x12r\n\rgetGroupInfos\x12/.org.dash.platform.dapi.v0.GetGroupInfosRequest\x1a\x30.org.dash.platform.dapi.v0.GetGroupInfosResponse\x12x\n\x0fgetGroupActions\x12\x31.org.dash.platform.dapi.v0.GetGroupActionsRequest\x1a\x32.org.dash.platform.dapi.v0.GetGroupActionsResponse\x12\x8a\x01\n\x15getGroupActionSigners\x12\x37.org.dash.platform.dapi.v0.GetGroupActionSignersRequest\x1a\x38.org.dash.platform.dapi.v0.GetGroupActionSignersResponse\x12u\n\x0egetAddressInfo\x12\x30.org.dash.platform.dapi.v0.GetAddressInfoRequest\x1a\x31.org.dash.platform.dapi.v0.GetAddressInfoResponse\x12~\n\x11getAddressesInfos\x12\x33.org.dash.platform.dapi.v0.GetAddressesInfosRequest\x1a\x34.org.dash.platform.dapi.v0.GetAddressesInfosResponse\x12\x8d\x01\n\x16getAddressesTrunkState\x12\x38.org.dash.platform.dapi.v0.GetAddressesTrunkStateRequest\x1a\x39.org.dash.platform.dapi.v0.GetAddressesTrunkStateResponse\x12\x90\x01\n\x17getAddressesBranchState\x12\x39.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest\x1a:.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse\x12\xa5\x01\n\x1egetRecentAddressBalanceChanges\x12@.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest\x1a\x41.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse\x12\xc0\x01\n\'getRecentCompactedAddressBalanceChanges\x12I.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest\x1aJ.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse\x12\x96\x01\n\x19getShieldedEncryptedNotes\x12;.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesRequest\x1a<.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse\x12\x81\x01\n\x12getShieldedAnchors\x12\x34.org.dash.platform.dapi.v0.GetShieldedAnchorsRequest\x1a\x35.org.dash.platform.dapi.v0.GetShieldedAnchorsResponse\x12\x9c\x01\n\x1bgetMostRecentShieldedAnchor\x12=.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorRequest\x1a>.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorResponse\x12\x87\x01\n\x14getShieldedPoolState\x12\x36.org.dash.platform.dapi.v0.GetShieldedPoolStateRequest\x1a\x37.org.dash.platform.dapi.v0.GetShieldedPoolStateResponse\x12\x8a\x01\n\x15getShieldedNullifiers\x12\x37.org.dash.platform.dapi.v0.GetShieldedNullifiersRequest\x1a\x38.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse\x12\x90\x01\n\x17getNullifiersTrunkState\x12\x39.org.dash.platform.dapi.v0.GetNullifiersTrunkStateRequest\x1a:.org.dash.platform.dapi.v0.GetNullifiersTrunkStateResponse\x12\x93\x01\n\x18getNullifiersBranchState\x12:.org.dash.platform.dapi.v0.GetNullifiersBranchStateRequest\x1a;.org.dash.platform.dapi.v0.GetNullifiersBranchStateResponse\x12\x96\x01\n\x19getRecentNullifierChanges\x12;.org.dash.platform.dapi.v0.GetRecentNullifierChangesRequest\x1a<.org.dash.platform.dapi.v0.GetRecentNullifierChangesResponse\x12\xb1\x01\n\"getRecentCompactedNullifierChanges\x12\x44.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesRequest\x1a\x45.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesResponseb\x06proto3' , dependencies=[google_dot_protobuf_dot_wrappers__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) @@ -62,8 +62,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=62210, - serialized_end=62300, + serialized_start=63695, + serialized_end=63785, ) _sym_db.RegisterEnumDescriptor(_KEYPURPOSE) @@ -125,8 +125,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=22619, - serialized_end=22692, + serialized_start=24104, + serialized_end=24177, ) _sym_db.RegisterEnumDescriptor(_GETCONTESTEDRESOURCEVOTESTATEREQUEST_GETCONTESTEDRESOURCEVOTESTATEREQUESTV0_RESULTTYPE) @@ -155,8 +155,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=23614, - serialized_end=23693, + serialized_start=25099, + serialized_end=25178, ) _sym_db.RegisterEnumDescriptor(_GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_FINISHEDVOTEINFO_FINISHEDVOTEOUTCOME) @@ -185,8 +185,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=27322, - serialized_end=27383, + serialized_start=28807, + serialized_end=28868, ) _sym_db.RegisterEnumDescriptor(_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_RESOURCEVOTECHOICE_VOTECHOICETYPE) @@ -210,8 +210,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=45947, - serialized_end=45985, + serialized_start=47432, + serialized_end=47470, ) _sym_db.RegisterEnumDescriptor(_GETGROUPACTIONSREQUEST_ACTIONSTATUS) @@ -235,8 +235,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=47232, - serialized_end=47267, + serialized_start=48717, + serialized_end=48752, ) _sym_db.RegisterEnumDescriptor(_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT_ACTIONTYPE) @@ -260,8 +260,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=45947, - serialized_end=45985, + serialized_start=47432, + serialized_end=47470, ) _sym_db.RegisterEnumDescriptor(_GETGROUPACTIONSIGNERSREQUEST_ACTIONSTATUS) @@ -3591,6 +3591,434 @@ ) +_GETDOCUMENTSCOUNTREQUEST_GETDOCUMENTSCOUNTREQUESTV0 = _descriptor.Descriptor( + name='GetDocumentsCountRequestV0', + full_name='org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='data_contract_id', full_name='org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.data_contract_id', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='document_type', full_name='org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.document_type', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='where', full_name='org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.where', index=2, + number=3, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='prove', full_name='org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prove', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=11735, + serialized_end=11842, +) + +_GETDOCUMENTSCOUNTREQUEST = _descriptor.Descriptor( + name='GetDocumentsCountRequest', + full_name='org.dash.platform.dapi.v0.GetDocumentsCountRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='v0', full_name='org.dash.platform.dapi.v0.GetDocumentsCountRequest.v0', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_GETDOCUMENTSCOUNTREQUEST_GETDOCUMENTSCOUNTREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetDocumentsCountRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=11613, + serialized_end=11853, +) + + +_GETDOCUMENTSCOUNTRESPONSE_GETDOCUMENTSCOUNTRESPONSEV0 = _descriptor.Descriptor( + name='GetDocumentsCountResponseV0', + full_name='org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='count', full_name='org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.count', index=0, + number=1, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='proof', full_name='org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.proof', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='metadata', full_name='org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.metadata', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=11982, + serialized_end=12152, +) + +_GETDOCUMENTSCOUNTRESPONSE = _descriptor.Descriptor( + name='GetDocumentsCountResponse', + full_name='org.dash.platform.dapi.v0.GetDocumentsCountResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='v0', full_name='org.dash.platform.dapi.v0.GetDocumentsCountResponse.v0', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_GETDOCUMENTSCOUNTRESPONSE_GETDOCUMENTSCOUNTRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetDocumentsCountResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=11856, + serialized_end=12163, +) + + +_GETDOCUMENTSSPLITCOUNTREQUEST_GETDOCUMENTSSPLITCOUNTREQUESTV0 = _descriptor.Descriptor( + name='GetDocumentsSplitCountRequestV0', + full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='data_contract_id', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.data_contract_id', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='document_type', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.document_type', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='where', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.where', index=2, + number=3, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='split_count_by_index_property', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.split_count_by_index_property', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='prove', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prove', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=12304, + serialized_end=12455, +) + +_GETDOCUMENTSSPLITCOUNTREQUEST = _descriptor.Descriptor( + name='GetDocumentsSplitCountRequest', + full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='v0', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.v0', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_GETDOCUMENTSSPLITCOUNTREQUEST_GETDOCUMENTSSPLITCOUNTREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=12166, + serialized_end=12466, +) + + +_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0_SPLITCOUNTENTRY = _descriptor.Descriptor( + name='SplitCountEntry', + full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.key', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='count', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.count', index=1, + number=2, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=12888, + serialized_end=12933, +) + +_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0_SPLITCOUNTS = _descriptor.Descriptor( + name='SplitCounts', + full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='entries', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.entries', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=12936, + serialized_end=13074, +) + +_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0 = _descriptor.Descriptor( + name='GetDocumentsSplitCountResponseV0', + full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='split_counts', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.split_counts', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='proof', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.proof', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='metadata', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.metadata', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0_SPLITCOUNTENTRY, _GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0_SPLITCOUNTS, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=12610, + serialized_end=13084, +) + +_GETDOCUMENTSSPLITCOUNTRESPONSE = _descriptor.Descriptor( + name='GetDocumentsSplitCountResponse', + full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='v0', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.v0', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=12469, + serialized_end=13095, +) + + _GETIDENTITYBYPUBLICKEYHASHREQUEST_GETIDENTITYBYPUBLICKEYHASHREQUESTV0 = _descriptor.Descriptor( name='GetIdentityByPublicKeyHashRequestV0', full_name='org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0', @@ -3625,8 +4053,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11762, - serialized_end=11839, + serialized_start=13247, + serialized_end=13324, ) _GETIDENTITYBYPUBLICKEYHASHREQUEST = _descriptor.Descriptor( @@ -3661,8 +4089,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11613, - serialized_end=11850, + serialized_start=13098, + serialized_end=13335, ) @@ -3712,8 +4140,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12006, - serialized_end=12188, + serialized_start=13491, + serialized_end=13673, ) _GETIDENTITYBYPUBLICKEYHASHRESPONSE = _descriptor.Descriptor( @@ -3748,8 +4176,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11853, - serialized_end=12199, + serialized_start=13338, + serialized_end=13684, ) @@ -3799,8 +4227,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12380, - serialized_end=12508, + serialized_start=13865, + serialized_end=13993, ) _GETIDENTITYBYNONUNIQUEPUBLICKEYHASHREQUEST = _descriptor.Descriptor( @@ -3835,8 +4263,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12202, - serialized_end=12519, + serialized_start=13687, + serialized_end=14004, ) @@ -3872,8 +4300,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13132, - serialized_end=13186, + serialized_start=14617, + serialized_end=14671, ) _GETIDENTITYBYNONUNIQUEPUBLICKEYHASHRESPONSE_GETIDENTITYBYNONUNIQUEPUBLICKEYHASHRESPONSEV0_IDENTITYPROVEDRESPONSE = _descriptor.Descriptor( @@ -3915,8 +4343,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13189, - serialized_end=13355, + serialized_start=14674, + serialized_end=14840, ) _GETIDENTITYBYNONUNIQUEPUBLICKEYHASHRESPONSE_GETIDENTITYBYNONUNIQUEPUBLICKEYHASHRESPONSEV0 = _descriptor.Descriptor( @@ -3965,8 +4393,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12703, - serialized_end=13365, + serialized_start=14188, + serialized_end=14850, ) _GETIDENTITYBYNONUNIQUEPUBLICKEYHASHRESPONSE = _descriptor.Descriptor( @@ -4001,8 +4429,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12522, - serialized_end=13376, + serialized_start=14007, + serialized_end=14861, ) @@ -4040,8 +4468,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13534, - serialized_end=13619, + serialized_start=15019, + serialized_end=15104, ) _WAITFORSTATETRANSITIONRESULTREQUEST = _descriptor.Descriptor( @@ -4076,8 +4504,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13379, - serialized_end=13630, + serialized_start=14864, + serialized_end=15115, ) @@ -4127,8 +4555,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13792, - serialized_end=14031, + serialized_start=15277, + serialized_end=15516, ) _WAITFORSTATETRANSITIONRESULTRESPONSE = _descriptor.Descriptor( @@ -4163,8 +4591,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13633, - serialized_end=14042, + serialized_start=15118, + serialized_end=15527, ) @@ -4202,8 +4630,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14170, - serialized_end=14230, + serialized_start=15655, + serialized_end=15715, ) _GETCONSENSUSPARAMSREQUEST = _descriptor.Descriptor( @@ -4238,8 +4666,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=14045, - serialized_end=14241, + serialized_start=15530, + serialized_end=15726, ) @@ -4284,8 +4712,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14372, - serialized_end=14452, + serialized_start=15857, + serialized_end=15937, ) _GETCONSENSUSPARAMSRESPONSE_CONSENSUSPARAMSEVIDENCE = _descriptor.Descriptor( @@ -4329,8 +4757,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14454, - serialized_end=14552, + serialized_start=15939, + serialized_end=16037, ) _GETCONSENSUSPARAMSRESPONSE_GETCONSENSUSPARAMSRESPONSEV0 = _descriptor.Descriptor( @@ -4367,8 +4795,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14555, - serialized_end=14773, + serialized_start=16040, + serialized_end=16258, ) _GETCONSENSUSPARAMSRESPONSE = _descriptor.Descriptor( @@ -4403,8 +4831,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=14244, - serialized_end=14784, + serialized_start=15729, + serialized_end=16269, ) @@ -4435,8 +4863,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14948, - serialized_end=15004, + serialized_start=16433, + serialized_end=16489, ) _GETPROTOCOLVERSIONUPGRADESTATEREQUEST = _descriptor.Descriptor( @@ -4471,8 +4899,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=14787, - serialized_end=15015, + serialized_start=16272, + serialized_end=16500, ) @@ -4503,8 +4931,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15480, - serialized_end=15630, + serialized_start=16965, + serialized_end=17115, ) _GETPROTOCOLVERSIONUPGRADESTATERESPONSE_GETPROTOCOLVERSIONUPGRADESTATERESPONSEV0_VERSIONENTRY = _descriptor.Descriptor( @@ -4541,8 +4969,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15632, - serialized_end=15690, + serialized_start=17117, + serialized_end=17175, ) _GETPROTOCOLVERSIONUPGRADESTATERESPONSE_GETPROTOCOLVERSIONUPGRADESTATERESPONSEV0 = _descriptor.Descriptor( @@ -4591,8 +5019,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=15183, - serialized_end=15700, + serialized_start=16668, + serialized_end=17185, ) _GETPROTOCOLVERSIONUPGRADESTATERESPONSE = _descriptor.Descriptor( @@ -4627,8 +5055,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=15018, - serialized_end=15711, + serialized_start=16503, + serialized_end=17196, ) @@ -4673,8 +5101,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15891, - serialized_end=15994, + serialized_start=17376, + serialized_end=17479, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSREQUEST = _descriptor.Descriptor( @@ -4709,8 +5137,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=15714, - serialized_end=16005, + serialized_start=17199, + serialized_end=17490, ) @@ -4741,8 +5169,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=16508, - serialized_end=16683, + serialized_start=17993, + serialized_end=18168, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSEV0_VERSIONSIGNAL = _descriptor.Descriptor( @@ -4779,8 +5207,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=16685, - serialized_end=16738, + serialized_start=18170, + serialized_end=18223, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSEV0 = _descriptor.Descriptor( @@ -4829,8 +5257,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=16189, - serialized_end=16748, + serialized_start=17674, + serialized_end=18233, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE = _descriptor.Descriptor( @@ -4865,8 +5293,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=16008, - serialized_end=16759, + serialized_start=17493, + serialized_end=18244, ) @@ -4918,8 +5346,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=16872, - serialized_end=16996, + serialized_start=18357, + serialized_end=18481, ) _GETEPOCHSINFOREQUEST = _descriptor.Descriptor( @@ -4954,8 +5382,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=16762, - serialized_end=17007, + serialized_start=18247, + serialized_end=18492, ) @@ -4986,8 +5414,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17368, - serialized_end=17485, + serialized_start=18853, + serialized_end=18970, ) _GETEPOCHSINFORESPONSE_GETEPOCHSINFORESPONSEV0_EPOCHINFO = _descriptor.Descriptor( @@ -5052,8 +5480,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17488, - serialized_end=17654, + serialized_start=18973, + serialized_end=19139, ) _GETEPOCHSINFORESPONSE_GETEPOCHSINFORESPONSEV0 = _descriptor.Descriptor( @@ -5102,8 +5530,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=17124, - serialized_end=17664, + serialized_start=18609, + serialized_end=19149, ) _GETEPOCHSINFORESPONSE = _descriptor.Descriptor( @@ -5138,8 +5566,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=17010, - serialized_end=17675, + serialized_start=18495, + serialized_end=19160, ) @@ -5198,8 +5626,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17816, - serialized_end=17986, + serialized_start=19301, + serialized_end=19471, ) _GETFINALIZEDEPOCHINFOSREQUEST = _descriptor.Descriptor( @@ -5234,8 +5662,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=17678, - serialized_end=17997, + serialized_start=19163, + serialized_end=19482, ) @@ -5266,8 +5694,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18423, - serialized_end=18587, + serialized_start=19908, + serialized_end=20072, ) _GETFINALIZEDEPOCHINFOSRESPONSE_GETFINALIZEDEPOCHINFOSRESPONSEV0_FINALIZEDEPOCHINFO = _descriptor.Descriptor( @@ -5381,8 +5809,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18590, - serialized_end=19133, + serialized_start=20075, + serialized_end=20618, ) _GETFINALIZEDEPOCHINFOSRESPONSE_GETFINALIZEDEPOCHINFOSRESPONSEV0_BLOCKPROPOSER = _descriptor.Descriptor( @@ -5419,8 +5847,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=19135, - serialized_end=19192, + serialized_start=20620, + serialized_end=20677, ) _GETFINALIZEDEPOCHINFOSRESPONSE_GETFINALIZEDEPOCHINFOSRESPONSEV0 = _descriptor.Descriptor( @@ -5469,8 +5897,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=18141, - serialized_end=19202, + serialized_start=19626, + serialized_end=20687, ) _GETFINALIZEDEPOCHINFOSRESPONSE = _descriptor.Descriptor( @@ -5505,8 +5933,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=18000, - serialized_end=19213, + serialized_start=19485, + serialized_end=20698, ) @@ -5544,8 +5972,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=19708, - serialized_end=19777, + serialized_start=21193, + serialized_end=21262, ) _GETCONTESTEDRESOURCESREQUEST_GETCONTESTEDRESOURCESREQUESTV0 = _descriptor.Descriptor( @@ -5641,8 +6069,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=19351, - serialized_end=19811, + serialized_start=20836, + serialized_end=21296, ) _GETCONTESTEDRESOURCESREQUEST = _descriptor.Descriptor( @@ -5677,8 +6105,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=19216, - serialized_end=19822, + serialized_start=20701, + serialized_end=21307, ) @@ -5709,8 +6137,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=20264, - serialized_end=20324, + serialized_start=21749, + serialized_end=21809, ) _GETCONTESTEDRESOURCESRESPONSE_GETCONTESTEDRESOURCESRESPONSEV0 = _descriptor.Descriptor( @@ -5759,8 +6187,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=19963, - serialized_end=20334, + serialized_start=21448, + serialized_end=21819, ) _GETCONTESTEDRESOURCESRESPONSE = _descriptor.Descriptor( @@ -5795,8 +6223,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=19825, - serialized_end=20345, + serialized_start=21310, + serialized_end=21830, ) @@ -5834,8 +6262,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=20858, - serialized_end=20931, + serialized_start=22343, + serialized_end=22416, ) _GETVOTEPOLLSBYENDDATEREQUEST_GETVOTEPOLLSBYENDDATEREQUESTV0_ENDATTIMEINFO = _descriptor.Descriptor( @@ -5872,8 +6300,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=20933, - serialized_end=21000, + serialized_start=22418, + serialized_end=22485, ) _GETVOTEPOLLSBYENDDATEREQUEST_GETVOTEPOLLSBYENDDATEREQUESTV0 = _descriptor.Descriptor( @@ -5958,8 +6386,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=20483, - serialized_end=21059, + serialized_start=21968, + serialized_end=22544, ) _GETVOTEPOLLSBYENDDATEREQUEST = _descriptor.Descriptor( @@ -5994,8 +6422,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=20348, - serialized_end=21070, + serialized_start=21833, + serialized_end=22555, ) @@ -6033,8 +6461,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=21519, - serialized_end=21605, + serialized_start=23004, + serialized_end=23090, ) _GETVOTEPOLLSBYENDDATERESPONSE_GETVOTEPOLLSBYENDDATERESPONSEV0_SERIALIZEDVOTEPOLLSBYTIMESTAMPS = _descriptor.Descriptor( @@ -6071,8 +6499,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=21608, - serialized_end=21823, + serialized_start=23093, + serialized_end=23308, ) _GETVOTEPOLLSBYENDDATERESPONSE_GETVOTEPOLLSBYENDDATERESPONSEV0 = _descriptor.Descriptor( @@ -6121,8 +6549,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=21211, - serialized_end=21833, + serialized_start=22696, + serialized_end=23318, ) _GETVOTEPOLLSBYENDDATERESPONSE = _descriptor.Descriptor( @@ -6157,8 +6585,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=21073, - serialized_end=21844, + serialized_start=22558, + serialized_end=23329, ) @@ -6196,8 +6624,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=22533, - serialized_end=22617, + serialized_start=24018, + serialized_end=24102, ) _GETCONTESTEDRESOURCEVOTESTATEREQUEST_GETCONTESTEDRESOURCEVOTESTATEREQUESTV0 = _descriptor.Descriptor( @@ -6294,8 +6722,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=22006, - serialized_end=22731, + serialized_start=23491, + serialized_end=24216, ) _GETCONTESTEDRESOURCEVOTESTATEREQUEST = _descriptor.Descriptor( @@ -6330,8 +6758,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=21847, - serialized_end=22742, + serialized_start=23332, + serialized_end=24227, ) @@ -6403,8 +6831,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=23242, - serialized_end=23716, + serialized_start=24727, + serialized_end=25201, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_CONTESTEDRESOURCECONTENDERS = _descriptor.Descriptor( @@ -6470,8 +6898,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=23719, - serialized_end=24171, + serialized_start=25204, + serialized_end=25656, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_CONTENDER = _descriptor.Descriptor( @@ -6525,8 +6953,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=24173, - serialized_end=24280, + serialized_start=25658, + serialized_end=25765, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0 = _descriptor.Descriptor( @@ -6575,8 +7003,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=22907, - serialized_end=24290, + serialized_start=24392, + serialized_end=25775, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE = _descriptor.Descriptor( @@ -6611,8 +7039,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=22745, - serialized_end=24301, + serialized_start=24230, + serialized_end=25786, ) @@ -6650,8 +7078,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=22533, - serialized_end=22617, + serialized_start=24018, + serialized_end=24102, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST_GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUESTV0 = _descriptor.Descriptor( @@ -6747,8 +7175,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=24488, - serialized_end=25018, + serialized_start=25973, + serialized_end=26503, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST = _descriptor.Descriptor( @@ -6783,8 +7211,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=24304, - serialized_end=25029, + serialized_start=25789, + serialized_end=26514, ) @@ -6822,8 +7250,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=25569, - serialized_end=25636, + serialized_start=27054, + serialized_end=27121, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE_GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSEV0 = _descriptor.Descriptor( @@ -6872,8 +7300,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=25219, - serialized_end=25646, + serialized_start=26704, + serialized_end=27131, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE = _descriptor.Descriptor( @@ -6908,8 +7336,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=25032, - serialized_end=25657, + serialized_start=26517, + serialized_end=27142, ) @@ -6947,8 +7375,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=26206, - serialized_end=26303, + serialized_start=27691, + serialized_end=27788, ) _GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST_GETCONTESTEDRESOURCEIDENTITYVOTESREQUESTV0 = _descriptor.Descriptor( @@ -7018,8 +7446,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=25831, - serialized_end=26334, + serialized_start=27316, + serialized_end=27819, ) _GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST = _descriptor.Descriptor( @@ -7054,8 +7482,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=25660, - serialized_end=26345, + serialized_start=27145, + serialized_end=27830, ) @@ -7093,8 +7521,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=26848, - serialized_end=27095, + serialized_start=28333, + serialized_end=28580, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_RESOURCEVOTECHOICE = _descriptor.Descriptor( @@ -7137,8 +7565,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27098, - serialized_end=27399, + serialized_start=28583, + serialized_end=28884, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_CONTESTEDRESOURCEIDENTITYVOTE = _descriptor.Descriptor( @@ -7189,8 +7617,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=27402, - serialized_end=27679, + serialized_start=28887, + serialized_end=29164, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0 = _descriptor.Descriptor( @@ -7239,8 +7667,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=26522, - serialized_end=27689, + serialized_start=28007, + serialized_end=29174, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE = _descriptor.Descriptor( @@ -7275,8 +7703,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=26348, - serialized_end=27700, + serialized_start=27833, + serialized_end=29185, ) @@ -7314,8 +7742,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=27864, - serialized_end=27932, + serialized_start=29349, + serialized_end=29417, ) _GETPREFUNDEDSPECIALIZEDBALANCEREQUEST = _descriptor.Descriptor( @@ -7350,8 +7778,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27703, - serialized_end=27943, + serialized_start=29188, + serialized_end=29428, ) @@ -7401,8 +7829,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=28111, - serialized_end=28300, + serialized_start=29596, + serialized_end=29785, ) _GETPREFUNDEDSPECIALIZEDBALANCERESPONSE = _descriptor.Descriptor( @@ -7437,8 +7865,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27946, - serialized_end=28311, + serialized_start=29431, + serialized_end=29796, ) @@ -7469,8 +7897,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=28460, - serialized_end=28511, + serialized_start=29945, + serialized_end=29996, ) _GETTOTALCREDITSINPLATFORMREQUEST = _descriptor.Descriptor( @@ -7505,8 +7933,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=28314, - serialized_end=28522, + serialized_start=29799, + serialized_end=30007, ) @@ -7556,8 +7984,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=28675, - serialized_end=28859, + serialized_start=30160, + serialized_end=30344, ) _GETTOTALCREDITSINPLATFORMRESPONSE = _descriptor.Descriptor( @@ -7592,8 +8020,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=28525, - serialized_end=28870, + serialized_start=30010, + serialized_end=30355, ) @@ -7638,8 +8066,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=28989, - serialized_end=29058, + serialized_start=30474, + serialized_end=30543, ) _GETPATHELEMENTSREQUEST = _descriptor.Descriptor( @@ -7674,8 +8102,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=28873, - serialized_end=29069, + serialized_start=30358, + serialized_end=30554, ) @@ -7706,8 +8134,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=29442, - serialized_end=29470, + serialized_start=30927, + serialized_end=30955, ) _GETPATHELEMENTSRESPONSE_GETPATHELEMENTSRESPONSEV0 = _descriptor.Descriptor( @@ -7756,8 +8184,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=29192, - serialized_end=29480, + serialized_start=30677, + serialized_end=30965, ) _GETPATHELEMENTSRESPONSE = _descriptor.Descriptor( @@ -7792,8 +8220,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=29072, - serialized_end=29491, + serialized_start=30557, + serialized_end=30976, ) @@ -7817,8 +8245,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=29592, - serialized_end=29612, + serialized_start=31077, + serialized_end=31097, ) _GETSTATUSREQUEST = _descriptor.Descriptor( @@ -7853,8 +8281,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=29494, - serialized_end=29623, + serialized_start=30979, + serialized_end=31108, ) @@ -7909,8 +8337,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=30500, - serialized_end=30594, + serialized_start=31985, + serialized_end=32079, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL_TENDERDASH = _descriptor.Descriptor( @@ -7947,8 +8375,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=30827, - serialized_end=30867, + serialized_start=32312, + serialized_end=32352, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL_DRIVE = _descriptor.Descriptor( @@ -7992,8 +8420,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=30869, - serialized_end=30929, + serialized_start=32354, + serialized_end=32414, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL = _descriptor.Descriptor( @@ -8030,8 +8458,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=30597, - serialized_end=30929, + serialized_start=32082, + serialized_end=32414, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION = _descriptor.Descriptor( @@ -8068,8 +8496,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=30287, - serialized_end=30929, + serialized_start=31772, + serialized_end=32414, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_TIME = _descriptor.Descriptor( @@ -8135,8 +8563,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=30931, - serialized_end=31058, + serialized_start=32416, + serialized_end=32543, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_NODE = _descriptor.Descriptor( @@ -8178,8 +8606,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=31060, - serialized_end=31120, + serialized_start=32545, + serialized_end=32605, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_CHAIN = _descriptor.Descriptor( @@ -8270,8 +8698,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=31123, - serialized_end=31430, + serialized_start=32608, + serialized_end=32915, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_NETWORK = _descriptor.Descriptor( @@ -8315,8 +8743,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=31432, - serialized_end=31499, + serialized_start=32917, + serialized_end=32984, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_STATESYNC = _descriptor.Descriptor( @@ -8395,8 +8823,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=31502, - serialized_end=31763, + serialized_start=32987, + serialized_end=33248, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0 = _descriptor.Descriptor( @@ -8461,8 +8889,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=29728, - serialized_end=31763, + serialized_start=31213, + serialized_end=33248, ) _GETSTATUSRESPONSE = _descriptor.Descriptor( @@ -8497,8 +8925,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=29626, - serialized_end=31774, + serialized_start=31111, + serialized_end=33259, ) @@ -8522,8 +8950,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=31911, - serialized_end=31943, + serialized_start=33396, + serialized_end=33428, ) _GETCURRENTQUORUMSINFOREQUEST = _descriptor.Descriptor( @@ -8558,8 +8986,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=31777, - serialized_end=31954, + serialized_start=33262, + serialized_end=33439, ) @@ -8604,8 +9032,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=32094, - serialized_end=32164, + serialized_start=33579, + serialized_end=33649, ) _GETCURRENTQUORUMSINFORESPONSE_VALIDATORSETV0 = _descriptor.Descriptor( @@ -8656,8 +9084,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=32167, - serialized_end=32342, + serialized_start=33652, + serialized_end=33827, ) _GETCURRENTQUORUMSINFORESPONSE_GETCURRENTQUORUMSINFORESPONSEV0 = _descriptor.Descriptor( @@ -8715,8 +9143,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=32345, - serialized_end=32619, + serialized_start=33830, + serialized_end=34104, ) _GETCURRENTQUORUMSINFORESPONSE = _descriptor.Descriptor( @@ -8751,8 +9179,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=31957, - serialized_end=32630, + serialized_start=33442, + serialized_end=34115, ) @@ -8797,8 +9225,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=32776, - serialized_end=32866, + serialized_start=34261, + serialized_end=34351, ) _GETIDENTITYTOKENBALANCESREQUEST = _descriptor.Descriptor( @@ -8833,8 +9261,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=32633, - serialized_end=32877, + serialized_start=34118, + serialized_end=34362, ) @@ -8877,8 +9305,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=33316, - serialized_end=33387, + serialized_start=34801, + serialized_end=34872, ) _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCES = _descriptor.Descriptor( @@ -8908,8 +9336,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=33390, - serialized_end=33544, + serialized_start=34875, + serialized_end=35029, ) _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0 = _descriptor.Descriptor( @@ -8958,8 +9386,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=33027, - serialized_end=33554, + serialized_start=34512, + serialized_end=35039, ) _GETIDENTITYTOKENBALANCESRESPONSE = _descriptor.Descriptor( @@ -8994,8 +9422,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=32880, - serialized_end=33565, + serialized_start=34365, + serialized_end=35050, ) @@ -9040,8 +9468,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=33717, - serialized_end=33809, + serialized_start=35202, + serialized_end=35294, ) _GETIDENTITIESTOKENBALANCESREQUEST = _descriptor.Descriptor( @@ -9076,8 +9504,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=33568, - serialized_end=33820, + serialized_start=35053, + serialized_end=35305, ) @@ -9120,8 +9548,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=34288, - serialized_end=34370, + serialized_start=35773, + serialized_end=35855, ) _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCES = _descriptor.Descriptor( @@ -9151,8 +9579,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=34373, - serialized_end=34556, + serialized_start=35858, + serialized_end=36041, ) _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0 = _descriptor.Descriptor( @@ -9201,8 +9629,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=33976, - serialized_end=34566, + serialized_start=35461, + serialized_end=36051, ) _GETIDENTITIESTOKENBALANCESRESPONSE = _descriptor.Descriptor( @@ -9237,8 +9665,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=33823, - serialized_end=34577, + serialized_start=35308, + serialized_end=36062, ) @@ -9283,8 +9711,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=34714, - serialized_end=34801, + serialized_start=36199, + serialized_end=36286, ) _GETIDENTITYTOKENINFOSREQUEST = _descriptor.Descriptor( @@ -9319,8 +9747,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=34580, - serialized_end=34812, + serialized_start=36065, + serialized_end=36297, ) @@ -9351,8 +9779,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=35226, - serialized_end=35266, + serialized_start=36711, + serialized_end=36751, ) _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOENTRY = _descriptor.Descriptor( @@ -9394,8 +9822,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=35269, - serialized_end=35445, + serialized_start=36754, + serialized_end=36930, ) _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOS = _descriptor.Descriptor( @@ -9425,8 +9853,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=35448, - serialized_end=35586, + serialized_start=36933, + serialized_end=37071, ) _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0 = _descriptor.Descriptor( @@ -9475,8 +9903,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=34953, - serialized_end=35596, + serialized_start=36438, + serialized_end=37081, ) _GETIDENTITYTOKENINFOSRESPONSE = _descriptor.Descriptor( @@ -9511,8 +9939,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=34815, - serialized_end=35607, + serialized_start=36300, + serialized_end=37092, ) @@ -9557,8 +9985,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=35750, - serialized_end=35839, + serialized_start=37235, + serialized_end=37324, ) _GETIDENTITIESTOKENINFOSREQUEST = _descriptor.Descriptor( @@ -9593,8 +10021,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=35610, - serialized_end=35850, + serialized_start=37095, + serialized_end=37335, ) @@ -9625,8 +10053,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=35226, - serialized_end=35266, + serialized_start=36711, + serialized_end=36751, ) _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENINFOENTRY = _descriptor.Descriptor( @@ -9668,8 +10096,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=36337, - serialized_end=36520, + serialized_start=37822, + serialized_end=38005, ) _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_IDENTITYTOKENINFOS = _descriptor.Descriptor( @@ -9699,8 +10127,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=36523, - serialized_end=36674, + serialized_start=38008, + serialized_end=38159, ) _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0 = _descriptor.Descriptor( @@ -9749,8 +10177,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=35997, - serialized_end=36684, + serialized_start=37482, + serialized_end=38169, ) _GETIDENTITIESTOKENINFOSRESPONSE = _descriptor.Descriptor( @@ -9785,8 +10213,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=35853, - serialized_end=36695, + serialized_start=37338, + serialized_end=38180, ) @@ -9824,8 +10252,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=36817, - serialized_end=36878, + serialized_start=38302, + serialized_end=38363, ) _GETTOKENSTATUSESREQUEST = _descriptor.Descriptor( @@ -9860,8 +10288,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=36698, - serialized_end=36889, + serialized_start=38183, + serialized_end=38374, ) @@ -9904,8 +10332,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=37279, - serialized_end=37347, + serialized_start=38764, + serialized_end=38832, ) _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSES = _descriptor.Descriptor( @@ -9935,8 +10363,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=37350, - serialized_end=37486, + serialized_start=38835, + serialized_end=38971, ) _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0 = _descriptor.Descriptor( @@ -9985,8 +10413,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=37015, - serialized_end=37496, + serialized_start=38500, + serialized_end=38981, ) _GETTOKENSTATUSESRESPONSE = _descriptor.Descriptor( @@ -10021,8 +10449,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=36892, - serialized_end=37507, + serialized_start=38377, + serialized_end=38992, ) @@ -10060,8 +10488,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=37665, - serialized_end=37738, + serialized_start=39150, + serialized_end=39223, ) _GETTOKENDIRECTPURCHASEPRICESREQUEST = _descriptor.Descriptor( @@ -10096,8 +10524,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=37510, - serialized_end=37749, + serialized_start=38995, + serialized_end=39234, ) @@ -10135,8 +10563,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=38239, - serialized_end=38290, + serialized_start=39724, + serialized_end=39775, ) _GETTOKENDIRECTPURCHASEPRICESRESPONSE_GETTOKENDIRECTPURCHASEPRICESRESPONSEV0_PRICINGSCHEDULE = _descriptor.Descriptor( @@ -10166,8 +10594,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=38293, - serialized_end=38460, + serialized_start=39778, + serialized_end=39945, ) _GETTOKENDIRECTPURCHASEPRICESRESPONSE_GETTOKENDIRECTPURCHASEPRICESRESPONSEV0_TOKENDIRECTPURCHASEPRICEENTRY = _descriptor.Descriptor( @@ -10216,8 +10644,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=38463, - serialized_end=38691, + serialized_start=39948, + serialized_end=40176, ) _GETTOKENDIRECTPURCHASEPRICESRESPONSE_GETTOKENDIRECTPURCHASEPRICESRESPONSEV0_TOKENDIRECTPURCHASEPRICES = _descriptor.Descriptor( @@ -10247,8 +10675,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=38694, - serialized_end=38894, + serialized_start=40179, + serialized_end=40379, ) _GETTOKENDIRECTPURCHASEPRICESRESPONSE_GETTOKENDIRECTPURCHASEPRICESRESPONSEV0 = _descriptor.Descriptor( @@ -10297,8 +10725,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=37911, - serialized_end=38904, + serialized_start=39396, + serialized_end=40389, ) _GETTOKENDIRECTPURCHASEPRICESRESPONSE = _descriptor.Descriptor( @@ -10333,8 +10761,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=37752, - serialized_end=38915, + serialized_start=39237, + serialized_end=40400, ) @@ -10372,8 +10800,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=39049, - serialized_end=39113, + serialized_start=40534, + serialized_end=40598, ) _GETTOKENCONTRACTINFOREQUEST = _descriptor.Descriptor( @@ -10408,8 +10836,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=38918, - serialized_end=39124, + serialized_start=40403, + serialized_end=40609, ) @@ -10447,8 +10875,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=39536, - serialized_end=39613, + serialized_start=41021, + serialized_end=41098, ) _GETTOKENCONTRACTINFORESPONSE_GETTOKENCONTRACTINFORESPONSEV0 = _descriptor.Descriptor( @@ -10497,8 +10925,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=39262, - serialized_end=39623, + serialized_start=40747, + serialized_end=41108, ) _GETTOKENCONTRACTINFORESPONSE = _descriptor.Descriptor( @@ -10533,8 +10961,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=39127, - serialized_end=39634, + serialized_start=40612, + serialized_end=41119, ) @@ -10589,8 +11017,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=40067, - serialized_end=40221, + serialized_start=41552, + serialized_end=41706, ) _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0 = _descriptor.Descriptor( @@ -10651,8 +11079,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=39811, - serialized_end=40249, + serialized_start=41296, + serialized_end=41734, ) _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST = _descriptor.Descriptor( @@ -10687,8 +11115,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=39637, - serialized_end=40260, + serialized_start=41122, + serialized_end=41745, ) @@ -10726,8 +11154,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=40771, - serialized_end=40833, + serialized_start=42256, + serialized_end=42318, ) _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENTIMEDDISTRIBUTIONENTRY = _descriptor.Descriptor( @@ -10764,8 +11192,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=40836, - serialized_end=41048, + serialized_start=42321, + serialized_end=42533, ) _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENDISTRIBUTIONS = _descriptor.Descriptor( @@ -10795,8 +11223,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=41051, - serialized_end=41246, + serialized_start=42536, + serialized_end=42731, ) _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0 = _descriptor.Descriptor( @@ -10845,8 +11273,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=40441, - serialized_end=41256, + serialized_start=41926, + serialized_end=42741, ) _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE = _descriptor.Descriptor( @@ -10881,8 +11309,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=40263, - serialized_end=41267, + serialized_start=41748, + serialized_end=42752, ) @@ -10920,8 +11348,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=41456, - serialized_end=41529, + serialized_start=42941, + serialized_end=43014, ) _GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMREQUEST_GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMREQUESTV0 = _descriptor.Descriptor( @@ -10977,8 +11405,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=41532, - serialized_end=41773, + serialized_start=43017, + serialized_end=43258, ) _GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMREQUEST = _descriptor.Descriptor( @@ -11013,8 +11441,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=41270, - serialized_end=41784, + serialized_start=42755, + serialized_end=43269, ) @@ -11071,8 +11499,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=42305, - serialized_end=42425, + serialized_start=43790, + serialized_end=43910, ) _GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMRESPONSE_GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMRESPONSEV0 = _descriptor.Descriptor( @@ -11121,8 +11549,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=41977, - serialized_end=42435, + serialized_start=43462, + serialized_end=43920, ) _GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMRESPONSE = _descriptor.Descriptor( @@ -11157,8 +11585,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=41787, - serialized_end=42446, + serialized_start=43272, + serialized_end=43931, ) @@ -11196,8 +11624,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=42577, - serialized_end=42640, + serialized_start=44062, + serialized_end=44125, ) _GETTOKENTOTALSUPPLYREQUEST = _descriptor.Descriptor( @@ -11232,8 +11660,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=42449, - serialized_end=42651, + serialized_start=43934, + serialized_end=44136, ) @@ -11278,8 +11706,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=43072, - serialized_end=43192, + serialized_start=44557, + serialized_end=44677, ) _GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0 = _descriptor.Descriptor( @@ -11328,8 +11756,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=42786, - serialized_end=43202, + serialized_start=44271, + serialized_end=44687, ) _GETTOKENTOTALSUPPLYRESPONSE = _descriptor.Descriptor( @@ -11364,8 +11792,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=42654, - serialized_end=43213, + serialized_start=44139, + serialized_end=44698, ) @@ -11410,8 +11838,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=43323, - serialized_end=43415, + serialized_start=44808, + serialized_end=44900, ) _GETGROUPINFOREQUEST = _descriptor.Descriptor( @@ -11446,8 +11874,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=43216, - serialized_end=43426, + serialized_start=44701, + serialized_end=44911, ) @@ -11485,8 +11913,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=43784, - serialized_end=43836, + serialized_start=45269, + serialized_end=45321, ) _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFOENTRY = _descriptor.Descriptor( @@ -11523,8 +11951,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=43839, - serialized_end=43991, + serialized_start=45324, + serialized_end=45476, ) _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFO = _descriptor.Descriptor( @@ -11559,8 +11987,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=43994, - serialized_end=44132, + serialized_start=45479, + serialized_end=45617, ) _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0 = _descriptor.Descriptor( @@ -11609,8 +12037,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=43540, - serialized_end=44142, + serialized_start=45025, + serialized_end=45627, ) _GETGROUPINFORESPONSE = _descriptor.Descriptor( @@ -11645,8 +12073,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=43429, - serialized_end=44153, + serialized_start=44914, + serialized_end=45638, ) @@ -11684,8 +12112,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=44266, - serialized_end=44383, + serialized_start=45751, + serialized_end=45868, ) _GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0 = _descriptor.Descriptor( @@ -11746,8 +12174,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=44386, - serialized_end=44638, + serialized_start=45871, + serialized_end=46123, ) _GETGROUPINFOSREQUEST = _descriptor.Descriptor( @@ -11782,8 +12210,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=44156, - serialized_end=44649, + serialized_start=45641, + serialized_end=46134, ) @@ -11821,8 +12249,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=43784, - serialized_end=43836, + serialized_start=45269, + serialized_end=45321, ) _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPPOSITIONINFOENTRY = _descriptor.Descriptor( @@ -11866,8 +12294,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=45070, - serialized_end=45265, + serialized_start=46555, + serialized_end=46750, ) _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPINFOS = _descriptor.Descriptor( @@ -11897,8 +12325,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=45268, - serialized_end=45398, + serialized_start=46753, + serialized_end=46883, ) _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0 = _descriptor.Descriptor( @@ -11947,8 +12375,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=44766, - serialized_end=45408, + serialized_start=46251, + serialized_end=46893, ) _GETGROUPINFOSRESPONSE = _descriptor.Descriptor( @@ -11983,8 +12411,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=44652, - serialized_end=45419, + serialized_start=46137, + serialized_end=46904, ) @@ -12022,8 +12450,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=45538, - serialized_end=45614, + serialized_start=47023, + serialized_end=47099, ) _GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0 = _descriptor.Descriptor( @@ -12098,8 +12526,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=45617, - serialized_end=45945, + serialized_start=47102, + serialized_end=47430, ) _GETGROUPACTIONSREQUEST = _descriptor.Descriptor( @@ -12135,8 +12563,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=45422, - serialized_end=45996, + serialized_start=46907, + serialized_end=47481, ) @@ -12186,8 +12614,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=46378, - serialized_end=46469, + serialized_start=47863, + serialized_end=47954, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_BURNEVENT = _descriptor.Descriptor( @@ -12236,8 +12664,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=46471, - serialized_end=46562, + serialized_start=47956, + serialized_end=48047, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_FREEZEEVENT = _descriptor.Descriptor( @@ -12279,8 +12707,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=46564, - serialized_end=46638, + serialized_start=48049, + serialized_end=48123, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UNFREEZEEVENT = _descriptor.Descriptor( @@ -12322,8 +12750,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=46640, - serialized_end=46716, + serialized_start=48125, + serialized_end=48201, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DESTROYFROZENFUNDSEVENT = _descriptor.Descriptor( @@ -12372,8 +12800,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=46718, - serialized_end=46820, + serialized_start=48203, + serialized_end=48305, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_SHAREDENCRYPTEDNOTE = _descriptor.Descriptor( @@ -12417,8 +12845,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=46822, - serialized_end=46922, + serialized_start=48307, + serialized_end=48407, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_PERSONALENCRYPTEDNOTE = _descriptor.Descriptor( @@ -12462,8 +12890,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=46924, - serialized_end=47047, + serialized_start=48409, + serialized_end=48532, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT = _descriptor.Descriptor( @@ -12506,8 +12934,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=47050, - serialized_end=47283, + serialized_start=48535, + serialized_end=48768, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENCONFIGUPDATEEVENT = _descriptor.Descriptor( @@ -12549,8 +12977,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=47285, - serialized_end=47385, + serialized_start=48770, + serialized_end=48870, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UPDATEDIRECTPURCHASEPRICEEVENT_PRICEFORQUANTITY = _descriptor.Descriptor( @@ -12587,8 +13015,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=38239, - serialized_end=38290, + serialized_start=39724, + serialized_end=39775, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UPDATEDIRECTPURCHASEPRICEEVENT_PRICINGSCHEDULE = _descriptor.Descriptor( @@ -12618,8 +13046,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=47677, - serialized_end=47849, + serialized_start=49162, + serialized_end=49334, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UPDATEDIRECTPURCHASEPRICEEVENT = _descriptor.Descriptor( @@ -12673,8 +13101,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=47388, - serialized_end=47874, + serialized_start=48873, + serialized_end=49359, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT = _descriptor.Descriptor( @@ -12723,8 +13151,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=47877, - serialized_end=48257, + serialized_start=49362, + serialized_end=49742, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTEVENT = _descriptor.Descriptor( @@ -12759,8 +13187,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=48260, - serialized_end=48399, + serialized_start=49745, + serialized_end=49884, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTCREATEEVENT = _descriptor.Descriptor( @@ -12790,8 +13218,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=48401, - serialized_end=48448, + serialized_start=49886, + serialized_end=49933, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTUPDATEEVENT = _descriptor.Descriptor( @@ -12821,8 +13249,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=48450, - serialized_end=48497, + serialized_start=49935, + serialized_end=49982, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTEVENT = _descriptor.Descriptor( @@ -12857,8 +13285,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=48500, - serialized_end=48639, + serialized_start=49985, + serialized_end=50124, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT = _descriptor.Descriptor( @@ -12942,8 +13370,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=48642, - serialized_end=49619, + serialized_start=50127, + serialized_end=51104, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONENTRY = _descriptor.Descriptor( @@ -12980,8 +13408,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=49622, - serialized_end=49769, + serialized_start=51107, + serialized_end=51254, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONS = _descriptor.Descriptor( @@ -13011,8 +13439,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=49772, - serialized_end=49904, + serialized_start=51257, + serialized_end=51389, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 = _descriptor.Descriptor( @@ -13061,8 +13489,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=46119, - serialized_end=49914, + serialized_start=47604, + serialized_end=51399, ) _GETGROUPACTIONSRESPONSE = _descriptor.Descriptor( @@ -13097,8 +13525,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=45999, - serialized_end=49925, + serialized_start=47484, + serialized_end=51410, ) @@ -13157,8 +13585,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=50063, - serialized_end=50269, + serialized_start=51548, + serialized_end=51754, ) _GETGROUPACTIONSIGNERSREQUEST = _descriptor.Descriptor( @@ -13194,8 +13622,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=49928, - serialized_end=50320, + serialized_start=51413, + serialized_end=51805, ) @@ -13233,8 +13661,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=50752, - serialized_end=50805, + serialized_start=52237, + serialized_end=52290, ) _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0_GROUPACTIONSIGNERS = _descriptor.Descriptor( @@ -13264,8 +13692,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=50808, - serialized_end=50953, + serialized_start=52293, + serialized_end=52438, ) _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0 = _descriptor.Descriptor( @@ -13314,8 +13742,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=50461, - serialized_end=50963, + serialized_start=51946, + serialized_end=52448, ) _GETGROUPACTIONSIGNERSRESPONSE = _descriptor.Descriptor( @@ -13350,8 +13778,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=50323, - serialized_end=50974, + serialized_start=51808, + serialized_end=52459, ) @@ -13389,8 +13817,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=51090, - serialized_end=51147, + serialized_start=52575, + serialized_end=52632, ) _GETADDRESSINFOREQUEST = _descriptor.Descriptor( @@ -13425,8 +13853,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=50977, - serialized_end=51158, + serialized_start=52462, + serialized_end=52643, ) @@ -13469,8 +13897,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=51161, - serialized_end=51294, + serialized_start=52646, + serialized_end=52779, ) @@ -13508,8 +13936,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=51296, - serialized_end=51345, + serialized_start=52781, + serialized_end=52830, ) @@ -13540,8 +13968,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=51347, - serialized_end=51442, + serialized_start=52832, + serialized_end=52927, ) @@ -13591,8 +14019,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=51444, - serialized_end=51553, + serialized_start=52929, + serialized_end=53038, ) @@ -13630,8 +14058,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=51555, - serialized_end=51675, + serialized_start=53040, + serialized_end=53160, ) @@ -13662,8 +14090,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=51677, - serialized_end=51784, + serialized_start=53162, + serialized_end=53269, ) @@ -13713,8 +14141,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=51904, - serialized_end=52129, + serialized_start=53389, + serialized_end=53614, ) _GETADDRESSINFORESPONSE = _descriptor.Descriptor( @@ -13749,8 +14177,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=51787, - serialized_end=52140, + serialized_start=53272, + serialized_end=53625, ) @@ -13788,8 +14216,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=52265, - serialized_end=52327, + serialized_start=53750, + serialized_end=53812, ) _GETADDRESSESINFOSREQUEST = _descriptor.Descriptor( @@ -13824,8 +14252,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=52143, - serialized_end=52338, + serialized_start=53628, + serialized_end=53823, ) @@ -13875,8 +14303,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=52467, - serialized_end=52699, + serialized_start=53952, + serialized_end=54184, ) _GETADDRESSESINFOSRESPONSE = _descriptor.Descriptor( @@ -13911,8 +14339,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=52341, - serialized_end=52710, + serialized_start=53826, + serialized_end=54195, ) @@ -13936,8 +14364,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=52850, - serialized_end=52883, + serialized_start=54335, + serialized_end=54368, ) _GETADDRESSESTRUNKSTATEREQUEST = _descriptor.Descriptor( @@ -13972,8 +14400,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=52713, - serialized_end=52894, + serialized_start=54198, + serialized_end=54379, ) @@ -14011,8 +14439,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=53038, - serialized_end=53184, + serialized_start=54523, + serialized_end=54669, ) _GETADDRESSESTRUNKSTATERESPONSE = _descriptor.Descriptor( @@ -14047,8 +14475,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=52897, - serialized_end=53195, + serialized_start=54382, + serialized_end=54680, ) @@ -14093,8 +14521,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=53338, - serialized_end=53427, + serialized_start=54823, + serialized_end=54912, ) _GETADDRESSESBRANCHSTATEREQUEST = _descriptor.Descriptor( @@ -14129,8 +14557,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=53198, - serialized_end=53438, + serialized_start=54683, + serialized_end=54923, ) @@ -14161,8 +14589,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=53584, - serialized_end=53639, + serialized_start=55069, + serialized_end=55124, ) _GETADDRESSESBRANCHSTATERESPONSE = _descriptor.Descriptor( @@ -14197,8 +14625,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=53441, - serialized_end=53650, + serialized_start=54926, + serialized_end=55135, ) @@ -14243,8 +14671,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=53814, - serialized_end=53928, + serialized_start=55299, + serialized_end=55413, ) _GETRECENTADDRESSBALANCECHANGESREQUEST = _descriptor.Descriptor( @@ -14279,8 +14707,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=53653, - serialized_end=53939, + serialized_start=55138, + serialized_end=55424, ) @@ -14330,8 +14758,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=54107, - serialized_end=54371, + serialized_start=55592, + serialized_end=55856, ) _GETRECENTADDRESSBALANCECHANGESRESPONSE = _descriptor.Descriptor( @@ -14366,8 +14794,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=53942, - serialized_end=54382, + serialized_start=55427, + serialized_end=55867, ) @@ -14405,8 +14833,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=54384, - serialized_end=54455, + serialized_start=55869, + serialized_end=55940, ) @@ -14456,8 +14884,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=54458, - serialized_end=54634, + serialized_start=55943, + serialized_end=56119, ) @@ -14488,8 +14916,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=54636, - serialized_end=54728, + serialized_start=56121, + serialized_end=56213, ) @@ -14534,8 +14962,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=54731, - serialized_end=54905, + serialized_start=56216, + serialized_end=56390, ) @@ -14566,8 +14994,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=54908, - serialized_end=55043, + serialized_start=56393, + serialized_end=56528, ) @@ -14605,8 +15033,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=55235, - serialized_end=55332, + serialized_start=56720, + serialized_end=56817, ) _GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST = _descriptor.Descriptor( @@ -14641,8 +15069,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=55046, - serialized_end=55343, + serialized_start=56531, + serialized_end=56828, ) @@ -14692,8 +15120,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=55539, - serialized_end=55831, + serialized_start=57024, + serialized_end=57316, ) _GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE = _descriptor.Descriptor( @@ -14728,8 +15156,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=55346, - serialized_end=55842, + serialized_start=56831, + serialized_end=57327, ) @@ -14774,8 +15202,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=55991, - serialized_end=56078, + serialized_start=57476, + serialized_end=57563, ) _GETSHIELDEDENCRYPTEDNOTESREQUEST = _descriptor.Descriptor( @@ -14810,8 +15238,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=55845, - serialized_end=56089, + serialized_start=57330, + serialized_end=57574, ) @@ -14856,8 +15284,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=56536, - serialized_end=56607, + serialized_start=58021, + serialized_end=58092, ) _GETSHIELDEDENCRYPTEDNOTESRESPONSE_GETSHIELDEDENCRYPTEDNOTESRESPONSEV0_ENCRYPTEDNOTES = _descriptor.Descriptor( @@ -14887,8 +15315,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=56610, - serialized_end=56755, + serialized_start=58095, + serialized_end=58240, ) _GETSHIELDEDENCRYPTEDNOTESRESPONSE_GETSHIELDEDENCRYPTEDNOTESRESPONSEV0 = _descriptor.Descriptor( @@ -14937,8 +15365,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=56242, - serialized_end=56765, + serialized_start=57727, + serialized_end=58250, ) _GETSHIELDEDENCRYPTEDNOTESRESPONSE = _descriptor.Descriptor( @@ -14973,8 +15401,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=56092, - serialized_end=56776, + serialized_start=57577, + serialized_end=58261, ) @@ -15005,8 +15433,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=56904, - serialized_end=56948, + serialized_start=58389, + serialized_end=58433, ) _GETSHIELDEDANCHORSREQUEST = _descriptor.Descriptor( @@ -15041,8 +15469,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=56779, - serialized_end=56959, + serialized_start=58264, + serialized_end=58444, ) @@ -15073,8 +15501,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=57348, - serialized_end=57374, + serialized_start=58833, + serialized_end=58859, ) _GETSHIELDEDANCHORSRESPONSE_GETSHIELDEDANCHORSRESPONSEV0 = _descriptor.Descriptor( @@ -15123,8 +15551,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=57091, - serialized_end=57384, + serialized_start=58576, + serialized_end=58869, ) _GETSHIELDEDANCHORSRESPONSE = _descriptor.Descriptor( @@ -15159,8 +15587,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=56962, - serialized_end=57395, + serialized_start=58447, + serialized_end=58880, ) @@ -15191,8 +15619,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=57550, - serialized_end=57603, + serialized_start=59035, + serialized_end=59088, ) _GETMOSTRECENTSHIELDEDANCHORREQUEST = _descriptor.Descriptor( @@ -15227,8 +15655,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=57398, - serialized_end=57614, + serialized_start=58883, + serialized_end=59099, ) @@ -15278,8 +15706,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=57773, - serialized_end=57954, + serialized_start=59258, + serialized_end=59439, ) _GETMOSTRECENTSHIELDEDANCHORRESPONSE = _descriptor.Descriptor( @@ -15314,8 +15742,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=57617, - serialized_end=57965, + serialized_start=59102, + serialized_end=59450, ) @@ -15346,8 +15774,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=58099, - serialized_end=58145, + serialized_start=59584, + serialized_end=59630, ) _GETSHIELDEDPOOLSTATEREQUEST = _descriptor.Descriptor( @@ -15382,8 +15810,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=57968, - serialized_end=58156, + serialized_start=59453, + serialized_end=59641, ) @@ -15433,8 +15861,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=58294, - serialized_end=58479, + serialized_start=59779, + serialized_end=59964, ) _GETSHIELDEDPOOLSTATERESPONSE = _descriptor.Descriptor( @@ -15469,8 +15897,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=58159, - serialized_end=58490, + serialized_start=59644, + serialized_end=59975, ) @@ -15508,8 +15936,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=58627, - serialized_end=58694, + serialized_start=60112, + serialized_end=60179, ) _GETSHIELDEDNULLIFIERSREQUEST = _descriptor.Descriptor( @@ -15544,8 +15972,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=58493, - serialized_end=58705, + serialized_start=59978, + serialized_end=60190, ) @@ -15583,8 +16011,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=59134, - serialized_end=59188, + serialized_start=60619, + serialized_end=60673, ) _GETSHIELDEDNULLIFIERSRESPONSE_GETSHIELDEDNULLIFIERSRESPONSEV0_NULLIFIERSTATUSES = _descriptor.Descriptor( @@ -15614,8 +16042,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=59191, - serialized_end=59333, + serialized_start=60676, + serialized_end=60818, ) _GETSHIELDEDNULLIFIERSRESPONSE_GETSHIELDEDNULLIFIERSRESPONSEV0 = _descriptor.Descriptor( @@ -15664,8 +16092,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=58846, - serialized_end=59343, + serialized_start=60331, + serialized_end=60828, ) _GETSHIELDEDNULLIFIERSRESPONSE = _descriptor.Descriptor( @@ -15700,8 +16128,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=58708, - serialized_end=59354, + serialized_start=60193, + serialized_end=60839, ) @@ -15739,8 +16167,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=59497, - serialized_end=59575, + serialized_start=60982, + serialized_end=61060, ) _GETNULLIFIERSTRUNKSTATEREQUEST = _descriptor.Descriptor( @@ -15775,8 +16203,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=59357, - serialized_end=59586, + serialized_start=60842, + serialized_end=61071, ) @@ -15814,8 +16242,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=59733, - serialized_end=59880, + serialized_start=61218, + serialized_end=61365, ) _GETNULLIFIERSTRUNKSTATERESPONSE = _descriptor.Descriptor( @@ -15850,8 +16278,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=59589, - serialized_end=59891, + serialized_start=61074, + serialized_end=61376, ) @@ -15910,8 +16338,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=60038, - serialized_end=60172, + serialized_start=61523, + serialized_end=61657, ) _GETNULLIFIERSBRANCHSTATEREQUEST = _descriptor.Descriptor( @@ -15946,8 +16374,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=59894, - serialized_end=60183, + serialized_start=61379, + serialized_end=61668, ) @@ -15978,8 +16406,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=60332, - serialized_end=60388, + serialized_start=61817, + serialized_end=61873, ) _GETNULLIFIERSBRANCHSTATERESPONSE = _descriptor.Descriptor( @@ -16014,8 +16442,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=60186, - serialized_end=60399, + serialized_start=61671, + serialized_end=61884, ) @@ -16053,8 +16481,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=60401, - serialized_end=60470, + serialized_start=61886, + serialized_end=61955, ) @@ -16085,8 +16513,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=60472, - serialized_end=60569, + serialized_start=61957, + serialized_end=62054, ) @@ -16124,8 +16552,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=60718, - serialized_end=60795, + serialized_start=62203, + serialized_end=62280, ) _GETRECENTNULLIFIERCHANGESREQUEST = _descriptor.Descriptor( @@ -16160,8 +16588,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=60572, - serialized_end=60806, + serialized_start=62057, + serialized_end=62291, ) @@ -16211,8 +16639,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=60959, - serialized_end=61207, + serialized_start=62444, + serialized_end=62692, ) _GETRECENTNULLIFIERCHANGESRESPONSE = _descriptor.Descriptor( @@ -16247,8 +16675,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=60809, - serialized_end=61218, + serialized_start=62294, + serialized_end=62703, ) @@ -16293,8 +16721,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=61220, - serialized_end=61334, + serialized_start=62705, + serialized_end=62819, ) @@ -16325,8 +16753,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=61336, - serialized_end=61461, + serialized_start=62821, + serialized_end=62946, ) @@ -16364,8 +16792,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=61637, - serialized_end=61729, + serialized_start=63122, + serialized_end=63214, ) _GETRECENTCOMPACTEDNULLIFIERCHANGESREQUEST = _descriptor.Descriptor( @@ -16400,8 +16828,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=61464, - serialized_end=61740, + serialized_start=62949, + serialized_end=63225, ) @@ -16451,8 +16879,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=61921, - serialized_end=62197, + serialized_start=63406, + serialized_end=63682, ) _GETRECENTCOMPACTEDNULLIFIERCHANGESRESPONSE = _descriptor.Descriptor( @@ -16487,8 +16915,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=61743, - serialized_end=62208, + serialized_start=63228, + serialized_end=63693, ) _GETIDENTITYREQUEST_GETIDENTITYREQUESTV0.containing_type = _GETIDENTITYREQUEST @@ -16812,6 +17240,46 @@ _GETDOCUMENTSRESPONSE.oneofs_by_name['version'].fields.append( _GETDOCUMENTSRESPONSE.fields_by_name['v0']) _GETDOCUMENTSRESPONSE.fields_by_name['v0'].containing_oneof = _GETDOCUMENTSRESPONSE.oneofs_by_name['version'] +_GETDOCUMENTSCOUNTREQUEST_GETDOCUMENTSCOUNTREQUESTV0.containing_type = _GETDOCUMENTSCOUNTREQUEST +_GETDOCUMENTSCOUNTREQUEST.fields_by_name['v0'].message_type = _GETDOCUMENTSCOUNTREQUEST_GETDOCUMENTSCOUNTREQUESTV0 +_GETDOCUMENTSCOUNTREQUEST.oneofs_by_name['version'].fields.append( + _GETDOCUMENTSCOUNTREQUEST.fields_by_name['v0']) +_GETDOCUMENTSCOUNTREQUEST.fields_by_name['v0'].containing_oneof = _GETDOCUMENTSCOUNTREQUEST.oneofs_by_name['version'] +_GETDOCUMENTSCOUNTRESPONSE_GETDOCUMENTSCOUNTRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETDOCUMENTSCOUNTRESPONSE_GETDOCUMENTSCOUNTRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETDOCUMENTSCOUNTRESPONSE_GETDOCUMENTSCOUNTRESPONSEV0.containing_type = _GETDOCUMENTSCOUNTRESPONSE +_GETDOCUMENTSCOUNTRESPONSE_GETDOCUMENTSCOUNTRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETDOCUMENTSCOUNTRESPONSE_GETDOCUMENTSCOUNTRESPONSEV0.fields_by_name['count']) +_GETDOCUMENTSCOUNTRESPONSE_GETDOCUMENTSCOUNTRESPONSEV0.fields_by_name['count'].containing_oneof = _GETDOCUMENTSCOUNTRESPONSE_GETDOCUMENTSCOUNTRESPONSEV0.oneofs_by_name['result'] +_GETDOCUMENTSCOUNTRESPONSE_GETDOCUMENTSCOUNTRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETDOCUMENTSCOUNTRESPONSE_GETDOCUMENTSCOUNTRESPONSEV0.fields_by_name['proof']) +_GETDOCUMENTSCOUNTRESPONSE_GETDOCUMENTSCOUNTRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETDOCUMENTSCOUNTRESPONSE_GETDOCUMENTSCOUNTRESPONSEV0.oneofs_by_name['result'] +_GETDOCUMENTSCOUNTRESPONSE.fields_by_name['v0'].message_type = _GETDOCUMENTSCOUNTRESPONSE_GETDOCUMENTSCOUNTRESPONSEV0 +_GETDOCUMENTSCOUNTRESPONSE.oneofs_by_name['version'].fields.append( + _GETDOCUMENTSCOUNTRESPONSE.fields_by_name['v0']) +_GETDOCUMENTSCOUNTRESPONSE.fields_by_name['v0'].containing_oneof = _GETDOCUMENTSCOUNTRESPONSE.oneofs_by_name['version'] +_GETDOCUMENTSSPLITCOUNTREQUEST_GETDOCUMENTSSPLITCOUNTREQUESTV0.containing_type = _GETDOCUMENTSSPLITCOUNTREQUEST +_GETDOCUMENTSSPLITCOUNTREQUEST.fields_by_name['v0'].message_type = _GETDOCUMENTSSPLITCOUNTREQUEST_GETDOCUMENTSSPLITCOUNTREQUESTV0 +_GETDOCUMENTSSPLITCOUNTREQUEST.oneofs_by_name['version'].fields.append( + _GETDOCUMENTSSPLITCOUNTREQUEST.fields_by_name['v0']) +_GETDOCUMENTSSPLITCOUNTREQUEST.fields_by_name['v0'].containing_oneof = _GETDOCUMENTSSPLITCOUNTREQUEST.oneofs_by_name['version'] +_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0_SPLITCOUNTENTRY.containing_type = _GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0 +_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0_SPLITCOUNTS.fields_by_name['entries'].message_type = _GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0_SPLITCOUNTENTRY +_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0_SPLITCOUNTS.containing_type = _GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0 +_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0.fields_by_name['split_counts'].message_type = _GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0_SPLITCOUNTS +_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0.containing_type = _GETDOCUMENTSSPLITCOUNTRESPONSE +_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0.fields_by_name['split_counts']) +_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0.fields_by_name['split_counts'].containing_oneof = _GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0.oneofs_by_name['result'] +_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0.fields_by_name['proof']) +_GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0.oneofs_by_name['result'] +_GETDOCUMENTSSPLITCOUNTRESPONSE.fields_by_name['v0'].message_type = _GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0 +_GETDOCUMENTSSPLITCOUNTRESPONSE.oneofs_by_name['version'].fields.append( + _GETDOCUMENTSSPLITCOUNTRESPONSE.fields_by_name['v0']) +_GETDOCUMENTSSPLITCOUNTRESPONSE.fields_by_name['v0'].containing_oneof = _GETDOCUMENTSSPLITCOUNTRESPONSE.oneofs_by_name['version'] _GETIDENTITYBYPUBLICKEYHASHREQUEST_GETIDENTITYBYPUBLICKEYHASHREQUESTV0.containing_type = _GETIDENTITYBYPUBLICKEYHASHREQUEST _GETIDENTITYBYPUBLICKEYHASHREQUEST.fields_by_name['v0'].message_type = _GETIDENTITYBYPUBLICKEYHASHREQUEST_GETIDENTITYBYPUBLICKEYHASHREQUESTV0 _GETIDENTITYBYPUBLICKEYHASHREQUEST.oneofs_by_name['version'].fields.append( @@ -18107,6 +18575,10 @@ DESCRIPTOR.message_types_by_name['GetDataContractHistoryResponse'] = _GETDATACONTRACTHISTORYRESPONSE DESCRIPTOR.message_types_by_name['GetDocumentsRequest'] = _GETDOCUMENTSREQUEST DESCRIPTOR.message_types_by_name['GetDocumentsResponse'] = _GETDOCUMENTSRESPONSE +DESCRIPTOR.message_types_by_name['GetDocumentsCountRequest'] = _GETDOCUMENTSCOUNTREQUEST +DESCRIPTOR.message_types_by_name['GetDocumentsCountResponse'] = _GETDOCUMENTSCOUNTRESPONSE +DESCRIPTOR.message_types_by_name['GetDocumentsSplitCountRequest'] = _GETDOCUMENTSSPLITCOUNTREQUEST +DESCRIPTOR.message_types_by_name['GetDocumentsSplitCountResponse'] = _GETDOCUMENTSSPLITCOUNTRESPONSE DESCRIPTOR.message_types_by_name['GetIdentityByPublicKeyHashRequest'] = _GETIDENTITYBYPUBLICKEYHASHREQUEST DESCRIPTOR.message_types_by_name['GetIdentityByPublicKeyHashResponse'] = _GETIDENTITYBYPUBLICKEYHASHRESPONSE DESCRIPTOR.message_types_by_name['GetIdentityByNonUniquePublicKeyHashRequest'] = _GETIDENTITYBYNONUNIQUEPUBLICKEYHASHREQUEST @@ -18822,6 +19294,82 @@ _sym_db.RegisterMessage(GetDocumentsResponse.GetDocumentsResponseV0) _sym_db.RegisterMessage(GetDocumentsResponse.GetDocumentsResponseV0.Documents) +GetDocumentsCountRequest = _reflection.GeneratedProtocolMessageType('GetDocumentsCountRequest', (_message.Message,), { + + 'GetDocumentsCountRequestV0' : _reflection.GeneratedProtocolMessageType('GetDocumentsCountRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETDOCUMENTSCOUNTREQUEST_GETDOCUMENTSCOUNTREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0) + }) + , + 'DESCRIPTOR' : _GETDOCUMENTSCOUNTREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsCountRequest) + }) +_sym_db.RegisterMessage(GetDocumentsCountRequest) +_sym_db.RegisterMessage(GetDocumentsCountRequest.GetDocumentsCountRequestV0) + +GetDocumentsCountResponse = _reflection.GeneratedProtocolMessageType('GetDocumentsCountResponse', (_message.Message,), { + + 'GetDocumentsCountResponseV0' : _reflection.GeneratedProtocolMessageType('GetDocumentsCountResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _GETDOCUMENTSCOUNTRESPONSE_GETDOCUMENTSCOUNTRESPONSEV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0) + }) + , + 'DESCRIPTOR' : _GETDOCUMENTSCOUNTRESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsCountResponse) + }) +_sym_db.RegisterMessage(GetDocumentsCountResponse) +_sym_db.RegisterMessage(GetDocumentsCountResponse.GetDocumentsCountResponseV0) + +GetDocumentsSplitCountRequest = _reflection.GeneratedProtocolMessageType('GetDocumentsSplitCountRequest', (_message.Message,), { + + 'GetDocumentsSplitCountRequestV0' : _reflection.GeneratedProtocolMessageType('GetDocumentsSplitCountRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETDOCUMENTSSPLITCOUNTREQUEST_GETDOCUMENTSSPLITCOUNTREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0) + }) + , + 'DESCRIPTOR' : _GETDOCUMENTSSPLITCOUNTREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest) + }) +_sym_db.RegisterMessage(GetDocumentsSplitCountRequest) +_sym_db.RegisterMessage(GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0) + +GetDocumentsSplitCountResponse = _reflection.GeneratedProtocolMessageType('GetDocumentsSplitCountResponse', (_message.Message,), { + + 'GetDocumentsSplitCountResponseV0' : _reflection.GeneratedProtocolMessageType('GetDocumentsSplitCountResponseV0', (_message.Message,), { + + 'SplitCountEntry' : _reflection.GeneratedProtocolMessageType('SplitCountEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0_SPLITCOUNTENTRY, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry) + }) + , + + 'SplitCounts' : _reflection.GeneratedProtocolMessageType('SplitCounts', (_message.Message,), { + 'DESCRIPTOR' : _GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0_SPLITCOUNTS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts) + }) + , + 'DESCRIPTOR' : _GETDOCUMENTSSPLITCOUNTRESPONSE_GETDOCUMENTSSPLITCOUNTRESPONSEV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0) + }) + , + 'DESCRIPTOR' : _GETDOCUMENTSSPLITCOUNTRESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse) + }) +_sym_db.RegisterMessage(GetDocumentsSplitCountResponse) +_sym_db.RegisterMessage(GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0) +_sym_db.RegisterMessage(GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry) +_sym_db.RegisterMessage(GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts) + GetIdentityByPublicKeyHashRequest = _reflection.GeneratedProtocolMessageType('GetIdentityByPublicKeyHashRequest', (_message.Message,), { 'GetIdentityByPublicKeyHashRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityByPublicKeyHashRequestV0', (_message.Message,), { @@ -21214,8 +21762,8 @@ index=0, serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_start=62303, - serialized_end=71442, + serialized_start=63788, + serialized_end=73199, methods=[ _descriptor.MethodDescriptor( name='broadcastStateTransition', @@ -21367,10 +21915,30 @@ serialized_options=None, create_key=_descriptor._internal_create_key, ), + _descriptor.MethodDescriptor( + name='getDocumentsCount', + full_name='org.dash.platform.dapi.v0.Platform.getDocumentsCount', + index=15, + containing_service=None, + input_type=_GETDOCUMENTSCOUNTREQUEST, + output_type=_GETDOCUMENTSCOUNTRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='getDocumentsSplitCount', + full_name='org.dash.platform.dapi.v0.Platform.getDocumentsSplitCount', + index=16, + containing_service=None, + input_type=_GETDOCUMENTSSPLITCOUNTREQUEST, + output_type=_GETDOCUMENTSSPLITCOUNTRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), _descriptor.MethodDescriptor( name='getIdentityByPublicKeyHash', full_name='org.dash.platform.dapi.v0.Platform.getIdentityByPublicKeyHash', - index=15, + index=17, containing_service=None, input_type=_GETIDENTITYBYPUBLICKEYHASHREQUEST, output_type=_GETIDENTITYBYPUBLICKEYHASHRESPONSE, @@ -21380,7 +21948,7 @@ _descriptor.MethodDescriptor( name='getIdentityByNonUniquePublicKeyHash', full_name='org.dash.platform.dapi.v0.Platform.getIdentityByNonUniquePublicKeyHash', - index=16, + index=18, containing_service=None, input_type=_GETIDENTITYBYNONUNIQUEPUBLICKEYHASHREQUEST, output_type=_GETIDENTITYBYNONUNIQUEPUBLICKEYHASHRESPONSE, @@ -21390,7 +21958,7 @@ _descriptor.MethodDescriptor( name='waitForStateTransitionResult', full_name='org.dash.platform.dapi.v0.Platform.waitForStateTransitionResult', - index=17, + index=19, containing_service=None, input_type=_WAITFORSTATETRANSITIONRESULTREQUEST, output_type=_WAITFORSTATETRANSITIONRESULTRESPONSE, @@ -21400,7 +21968,7 @@ _descriptor.MethodDescriptor( name='getConsensusParams', full_name='org.dash.platform.dapi.v0.Platform.getConsensusParams', - index=18, + index=20, containing_service=None, input_type=_GETCONSENSUSPARAMSREQUEST, output_type=_GETCONSENSUSPARAMSRESPONSE, @@ -21410,7 +21978,7 @@ _descriptor.MethodDescriptor( name='getProtocolVersionUpgradeState', full_name='org.dash.platform.dapi.v0.Platform.getProtocolVersionUpgradeState', - index=19, + index=21, containing_service=None, input_type=_GETPROTOCOLVERSIONUPGRADESTATEREQUEST, output_type=_GETPROTOCOLVERSIONUPGRADESTATERESPONSE, @@ -21420,7 +21988,7 @@ _descriptor.MethodDescriptor( name='getProtocolVersionUpgradeVoteStatus', full_name='org.dash.platform.dapi.v0.Platform.getProtocolVersionUpgradeVoteStatus', - index=20, + index=22, containing_service=None, input_type=_GETPROTOCOLVERSIONUPGRADEVOTESTATUSREQUEST, output_type=_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE, @@ -21430,7 +21998,7 @@ _descriptor.MethodDescriptor( name='getEpochsInfo', full_name='org.dash.platform.dapi.v0.Platform.getEpochsInfo', - index=21, + index=23, containing_service=None, input_type=_GETEPOCHSINFOREQUEST, output_type=_GETEPOCHSINFORESPONSE, @@ -21440,7 +22008,7 @@ _descriptor.MethodDescriptor( name='getFinalizedEpochInfos', full_name='org.dash.platform.dapi.v0.Platform.getFinalizedEpochInfos', - index=22, + index=24, containing_service=None, input_type=_GETFINALIZEDEPOCHINFOSREQUEST, output_type=_GETFINALIZEDEPOCHINFOSRESPONSE, @@ -21450,7 +22018,7 @@ _descriptor.MethodDescriptor( name='getContestedResources', full_name='org.dash.platform.dapi.v0.Platform.getContestedResources', - index=23, + index=25, containing_service=None, input_type=_GETCONTESTEDRESOURCESREQUEST, output_type=_GETCONTESTEDRESOURCESRESPONSE, @@ -21460,7 +22028,7 @@ _descriptor.MethodDescriptor( name='getContestedResourceVoteState', full_name='org.dash.platform.dapi.v0.Platform.getContestedResourceVoteState', - index=24, + index=26, containing_service=None, input_type=_GETCONTESTEDRESOURCEVOTESTATEREQUEST, output_type=_GETCONTESTEDRESOURCEVOTESTATERESPONSE, @@ -21470,7 +22038,7 @@ _descriptor.MethodDescriptor( name='getContestedResourceVotersForIdentity', full_name='org.dash.platform.dapi.v0.Platform.getContestedResourceVotersForIdentity', - index=25, + index=27, containing_service=None, input_type=_GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST, output_type=_GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE, @@ -21480,7 +22048,7 @@ _descriptor.MethodDescriptor( name='getContestedResourceIdentityVotes', full_name='org.dash.platform.dapi.v0.Platform.getContestedResourceIdentityVotes', - index=26, + index=28, containing_service=None, input_type=_GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST, output_type=_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE, @@ -21490,7 +22058,7 @@ _descriptor.MethodDescriptor( name='getVotePollsByEndDate', full_name='org.dash.platform.dapi.v0.Platform.getVotePollsByEndDate', - index=27, + index=29, containing_service=None, input_type=_GETVOTEPOLLSBYENDDATEREQUEST, output_type=_GETVOTEPOLLSBYENDDATERESPONSE, @@ -21500,7 +22068,7 @@ _descriptor.MethodDescriptor( name='getPrefundedSpecializedBalance', full_name='org.dash.platform.dapi.v0.Platform.getPrefundedSpecializedBalance', - index=28, + index=30, containing_service=None, input_type=_GETPREFUNDEDSPECIALIZEDBALANCEREQUEST, output_type=_GETPREFUNDEDSPECIALIZEDBALANCERESPONSE, @@ -21510,7 +22078,7 @@ _descriptor.MethodDescriptor( name='getTotalCreditsInPlatform', full_name='org.dash.platform.dapi.v0.Platform.getTotalCreditsInPlatform', - index=29, + index=31, containing_service=None, input_type=_GETTOTALCREDITSINPLATFORMREQUEST, output_type=_GETTOTALCREDITSINPLATFORMRESPONSE, @@ -21520,7 +22088,7 @@ _descriptor.MethodDescriptor( name='getPathElements', full_name='org.dash.platform.dapi.v0.Platform.getPathElements', - index=30, + index=32, containing_service=None, input_type=_GETPATHELEMENTSREQUEST, output_type=_GETPATHELEMENTSRESPONSE, @@ -21530,7 +22098,7 @@ _descriptor.MethodDescriptor( name='getStatus', full_name='org.dash.platform.dapi.v0.Platform.getStatus', - index=31, + index=33, containing_service=None, input_type=_GETSTATUSREQUEST, output_type=_GETSTATUSRESPONSE, @@ -21540,7 +22108,7 @@ _descriptor.MethodDescriptor( name='getCurrentQuorumsInfo', full_name='org.dash.platform.dapi.v0.Platform.getCurrentQuorumsInfo', - index=32, + index=34, containing_service=None, input_type=_GETCURRENTQUORUMSINFOREQUEST, output_type=_GETCURRENTQUORUMSINFORESPONSE, @@ -21550,7 +22118,7 @@ _descriptor.MethodDescriptor( name='getIdentityTokenBalances', full_name='org.dash.platform.dapi.v0.Platform.getIdentityTokenBalances', - index=33, + index=35, containing_service=None, input_type=_GETIDENTITYTOKENBALANCESREQUEST, output_type=_GETIDENTITYTOKENBALANCESRESPONSE, @@ -21560,7 +22128,7 @@ _descriptor.MethodDescriptor( name='getIdentitiesTokenBalances', full_name='org.dash.platform.dapi.v0.Platform.getIdentitiesTokenBalances', - index=34, + index=36, containing_service=None, input_type=_GETIDENTITIESTOKENBALANCESREQUEST, output_type=_GETIDENTITIESTOKENBALANCESRESPONSE, @@ -21570,7 +22138,7 @@ _descriptor.MethodDescriptor( name='getIdentityTokenInfos', full_name='org.dash.platform.dapi.v0.Platform.getIdentityTokenInfos', - index=35, + index=37, containing_service=None, input_type=_GETIDENTITYTOKENINFOSREQUEST, output_type=_GETIDENTITYTOKENINFOSRESPONSE, @@ -21580,7 +22148,7 @@ _descriptor.MethodDescriptor( name='getIdentitiesTokenInfos', full_name='org.dash.platform.dapi.v0.Platform.getIdentitiesTokenInfos', - index=36, + index=38, containing_service=None, input_type=_GETIDENTITIESTOKENINFOSREQUEST, output_type=_GETIDENTITIESTOKENINFOSRESPONSE, @@ -21590,7 +22158,7 @@ _descriptor.MethodDescriptor( name='getTokenStatuses', full_name='org.dash.platform.dapi.v0.Platform.getTokenStatuses', - index=37, + index=39, containing_service=None, input_type=_GETTOKENSTATUSESREQUEST, output_type=_GETTOKENSTATUSESRESPONSE, @@ -21600,7 +22168,7 @@ _descriptor.MethodDescriptor( name='getTokenDirectPurchasePrices', full_name='org.dash.platform.dapi.v0.Platform.getTokenDirectPurchasePrices', - index=38, + index=40, containing_service=None, input_type=_GETTOKENDIRECTPURCHASEPRICESREQUEST, output_type=_GETTOKENDIRECTPURCHASEPRICESRESPONSE, @@ -21610,7 +22178,7 @@ _descriptor.MethodDescriptor( name='getTokenContractInfo', full_name='org.dash.platform.dapi.v0.Platform.getTokenContractInfo', - index=39, + index=41, containing_service=None, input_type=_GETTOKENCONTRACTINFOREQUEST, output_type=_GETTOKENCONTRACTINFORESPONSE, @@ -21620,7 +22188,7 @@ _descriptor.MethodDescriptor( name='getTokenPreProgrammedDistributions', full_name='org.dash.platform.dapi.v0.Platform.getTokenPreProgrammedDistributions', - index=40, + index=42, containing_service=None, input_type=_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST, output_type=_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE, @@ -21630,7 +22198,7 @@ _descriptor.MethodDescriptor( name='getTokenPerpetualDistributionLastClaim', full_name='org.dash.platform.dapi.v0.Platform.getTokenPerpetualDistributionLastClaim', - index=41, + index=43, containing_service=None, input_type=_GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMREQUEST, output_type=_GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMRESPONSE, @@ -21640,7 +22208,7 @@ _descriptor.MethodDescriptor( name='getTokenTotalSupply', full_name='org.dash.platform.dapi.v0.Platform.getTokenTotalSupply', - index=42, + index=44, containing_service=None, input_type=_GETTOKENTOTALSUPPLYREQUEST, output_type=_GETTOKENTOTALSUPPLYRESPONSE, @@ -21650,7 +22218,7 @@ _descriptor.MethodDescriptor( name='getGroupInfo', full_name='org.dash.platform.dapi.v0.Platform.getGroupInfo', - index=43, + index=45, containing_service=None, input_type=_GETGROUPINFOREQUEST, output_type=_GETGROUPINFORESPONSE, @@ -21660,7 +22228,7 @@ _descriptor.MethodDescriptor( name='getGroupInfos', full_name='org.dash.platform.dapi.v0.Platform.getGroupInfos', - index=44, + index=46, containing_service=None, input_type=_GETGROUPINFOSREQUEST, output_type=_GETGROUPINFOSRESPONSE, @@ -21670,7 +22238,7 @@ _descriptor.MethodDescriptor( name='getGroupActions', full_name='org.dash.platform.dapi.v0.Platform.getGroupActions', - index=45, + index=47, containing_service=None, input_type=_GETGROUPACTIONSREQUEST, output_type=_GETGROUPACTIONSRESPONSE, @@ -21680,7 +22248,7 @@ _descriptor.MethodDescriptor( name='getGroupActionSigners', full_name='org.dash.platform.dapi.v0.Platform.getGroupActionSigners', - index=46, + index=48, containing_service=None, input_type=_GETGROUPACTIONSIGNERSREQUEST, output_type=_GETGROUPACTIONSIGNERSRESPONSE, @@ -21690,7 +22258,7 @@ _descriptor.MethodDescriptor( name='getAddressInfo', full_name='org.dash.platform.dapi.v0.Platform.getAddressInfo', - index=47, + index=49, containing_service=None, input_type=_GETADDRESSINFOREQUEST, output_type=_GETADDRESSINFORESPONSE, @@ -21700,7 +22268,7 @@ _descriptor.MethodDescriptor( name='getAddressesInfos', full_name='org.dash.platform.dapi.v0.Platform.getAddressesInfos', - index=48, + index=50, containing_service=None, input_type=_GETADDRESSESINFOSREQUEST, output_type=_GETADDRESSESINFOSRESPONSE, @@ -21710,7 +22278,7 @@ _descriptor.MethodDescriptor( name='getAddressesTrunkState', full_name='org.dash.platform.dapi.v0.Platform.getAddressesTrunkState', - index=49, + index=51, containing_service=None, input_type=_GETADDRESSESTRUNKSTATEREQUEST, output_type=_GETADDRESSESTRUNKSTATERESPONSE, @@ -21720,7 +22288,7 @@ _descriptor.MethodDescriptor( name='getAddressesBranchState', full_name='org.dash.platform.dapi.v0.Platform.getAddressesBranchState', - index=50, + index=52, containing_service=None, input_type=_GETADDRESSESBRANCHSTATEREQUEST, output_type=_GETADDRESSESBRANCHSTATERESPONSE, @@ -21730,7 +22298,7 @@ _descriptor.MethodDescriptor( name='getRecentAddressBalanceChanges', full_name='org.dash.platform.dapi.v0.Platform.getRecentAddressBalanceChanges', - index=51, + index=53, containing_service=None, input_type=_GETRECENTADDRESSBALANCECHANGESREQUEST, output_type=_GETRECENTADDRESSBALANCECHANGESRESPONSE, @@ -21740,7 +22308,7 @@ _descriptor.MethodDescriptor( name='getRecentCompactedAddressBalanceChanges', full_name='org.dash.platform.dapi.v0.Platform.getRecentCompactedAddressBalanceChanges', - index=52, + index=54, containing_service=None, input_type=_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST, output_type=_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE, @@ -21750,7 +22318,7 @@ _descriptor.MethodDescriptor( name='getShieldedEncryptedNotes', full_name='org.dash.platform.dapi.v0.Platform.getShieldedEncryptedNotes', - index=53, + index=55, containing_service=None, input_type=_GETSHIELDEDENCRYPTEDNOTESREQUEST, output_type=_GETSHIELDEDENCRYPTEDNOTESRESPONSE, @@ -21760,7 +22328,7 @@ _descriptor.MethodDescriptor( name='getShieldedAnchors', full_name='org.dash.platform.dapi.v0.Platform.getShieldedAnchors', - index=54, + index=56, containing_service=None, input_type=_GETSHIELDEDANCHORSREQUEST, output_type=_GETSHIELDEDANCHORSRESPONSE, @@ -21770,7 +22338,7 @@ _descriptor.MethodDescriptor( name='getMostRecentShieldedAnchor', full_name='org.dash.platform.dapi.v0.Platform.getMostRecentShieldedAnchor', - index=55, + index=57, containing_service=None, input_type=_GETMOSTRECENTSHIELDEDANCHORREQUEST, output_type=_GETMOSTRECENTSHIELDEDANCHORRESPONSE, @@ -21780,7 +22348,7 @@ _descriptor.MethodDescriptor( name='getShieldedPoolState', full_name='org.dash.platform.dapi.v0.Platform.getShieldedPoolState', - index=56, + index=58, containing_service=None, input_type=_GETSHIELDEDPOOLSTATEREQUEST, output_type=_GETSHIELDEDPOOLSTATERESPONSE, @@ -21790,7 +22358,7 @@ _descriptor.MethodDescriptor( name='getShieldedNullifiers', full_name='org.dash.platform.dapi.v0.Platform.getShieldedNullifiers', - index=57, + index=59, containing_service=None, input_type=_GETSHIELDEDNULLIFIERSREQUEST, output_type=_GETSHIELDEDNULLIFIERSRESPONSE, @@ -21800,7 +22368,7 @@ _descriptor.MethodDescriptor( name='getNullifiersTrunkState', full_name='org.dash.platform.dapi.v0.Platform.getNullifiersTrunkState', - index=58, + index=60, containing_service=None, input_type=_GETNULLIFIERSTRUNKSTATEREQUEST, output_type=_GETNULLIFIERSTRUNKSTATERESPONSE, @@ -21810,7 +22378,7 @@ _descriptor.MethodDescriptor( name='getNullifiersBranchState', full_name='org.dash.platform.dapi.v0.Platform.getNullifiersBranchState', - index=59, + index=61, containing_service=None, input_type=_GETNULLIFIERSBRANCHSTATEREQUEST, output_type=_GETNULLIFIERSBRANCHSTATERESPONSE, @@ -21820,7 +22388,7 @@ _descriptor.MethodDescriptor( name='getRecentNullifierChanges', full_name='org.dash.platform.dapi.v0.Platform.getRecentNullifierChanges', - index=60, + index=62, containing_service=None, input_type=_GETRECENTNULLIFIERCHANGESREQUEST, output_type=_GETRECENTNULLIFIERCHANGESRESPONSE, @@ -21830,7 +22398,7 @@ _descriptor.MethodDescriptor( name='getRecentCompactedNullifierChanges', full_name='org.dash.platform.dapi.v0.Platform.getRecentCompactedNullifierChanges', - index=61, + index=63, containing_service=None, input_type=_GETRECENTCOMPACTEDNULLIFIERCHANGESREQUEST, output_type=_GETRECENTCOMPACTEDNULLIFIERCHANGESRESPONSE, diff --git a/packages/dapi-grpc/clients/platform/v0/python/platform_pb2_grpc.py b/packages/dapi-grpc/clients/platform/v0/python/platform_pb2_grpc.py index 3295ee4abd6..13785d5c8e0 100644 --- a/packages/dapi-grpc/clients/platform/v0/python/platform_pb2_grpc.py +++ b/packages/dapi-grpc/clients/platform/v0/python/platform_pb2_grpc.py @@ -89,6 +89,16 @@ def __init__(self, channel): request_serializer=platform__pb2.GetDocumentsRequest.SerializeToString, response_deserializer=platform__pb2.GetDocumentsResponse.FromString, ) + self.getDocumentsCount = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getDocumentsCount', + request_serializer=platform__pb2.GetDocumentsCountRequest.SerializeToString, + response_deserializer=platform__pb2.GetDocumentsCountResponse.FromString, + ) + self.getDocumentsSplitCount = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getDocumentsSplitCount', + request_serializer=platform__pb2.GetDocumentsSplitCountRequest.SerializeToString, + response_deserializer=platform__pb2.GetDocumentsSplitCountResponse.FromString, + ) self.getIdentityByPublicKeyHash = channel.unary_unary( '/org.dash.platform.dapi.v0.Platform/getIdentityByPublicKeyHash', request_serializer=platform__pb2.GetIdentityByPublicKeyHashRequest.SerializeToString, @@ -420,6 +430,18 @@ def getDocuments(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def getDocumentsCount(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getDocumentsSplitCount(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def getIdentityByPublicKeyHash(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -786,6 +808,16 @@ def add_PlatformServicer_to_server(servicer, server): request_deserializer=platform__pb2.GetDocumentsRequest.FromString, response_serializer=platform__pb2.GetDocumentsResponse.SerializeToString, ), + 'getDocumentsCount': grpc.unary_unary_rpc_method_handler( + servicer.getDocumentsCount, + request_deserializer=platform__pb2.GetDocumentsCountRequest.FromString, + response_serializer=platform__pb2.GetDocumentsCountResponse.SerializeToString, + ), + 'getDocumentsSplitCount': grpc.unary_unary_rpc_method_handler( + servicer.getDocumentsSplitCount, + request_deserializer=platform__pb2.GetDocumentsSplitCountRequest.FromString, + response_serializer=platform__pb2.GetDocumentsSplitCountResponse.SerializeToString, + ), 'getIdentityByPublicKeyHash': grpc.unary_unary_rpc_method_handler( servicer.getIdentityByPublicKeyHash, request_deserializer=platform__pb2.GetIdentityByPublicKeyHashRequest.FromString, @@ -1286,6 +1318,40 @@ def getDocuments(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def getDocumentsCount(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/org.dash.platform.dapi.v0.Platform/getDocumentsCount', + platform__pb2.GetDocumentsCountRequest.SerializeToString, + platform__pb2.GetDocumentsCountResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def getDocumentsSplitCount(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/org.dash.platform.dapi.v0.Platform/getDocumentsSplitCount', + platform__pb2.GetDocumentsSplitCountRequest.SerializeToString, + platform__pb2.GetDocumentsSplitCountResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def getIdentityByPublicKeyHash(request, target, diff --git a/packages/dapi-grpc/clients/platform/v0/web/platform_pb.d.ts b/packages/dapi-grpc/clients/platform/v0/web/platform_pb.d.ts index d5f6afb0fed..5b84143a33b 100644 --- a/packages/dapi-grpc/clients/platform/v0/web/platform_pb.d.ts +++ b/packages/dapi-grpc/clients/platform/v0/web/platform_pb.d.ts @@ -2434,6 +2434,324 @@ export namespace GetDocumentsResponse { } } +export class GetDocumentsCountRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetDocumentsCountRequest.GetDocumentsCountRequestV0 | undefined; + setV0(value?: GetDocumentsCountRequest.GetDocumentsCountRequestV0): void; + + getVersionCase(): GetDocumentsCountRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDocumentsCountRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetDocumentsCountRequest): GetDocumentsCountRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDocumentsCountRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDocumentsCountRequest; + static deserializeBinaryFromReader(message: GetDocumentsCountRequest, reader: jspb.BinaryReader): GetDocumentsCountRequest; +} + +export namespace GetDocumentsCountRequest { + export type AsObject = { + v0?: GetDocumentsCountRequest.GetDocumentsCountRequestV0.AsObject, + } + + export class GetDocumentsCountRequestV0 extends jspb.Message { + getDataContractId(): Uint8Array | string; + getDataContractId_asU8(): Uint8Array; + getDataContractId_asB64(): string; + setDataContractId(value: Uint8Array | string): void; + + getDocumentType(): string; + setDocumentType(value: string): void; + + getWhere(): Uint8Array | string; + getWhere_asU8(): Uint8Array; + getWhere_asB64(): string; + setWhere(value: Uint8Array | string): void; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDocumentsCountRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetDocumentsCountRequestV0): GetDocumentsCountRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDocumentsCountRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDocumentsCountRequestV0; + static deserializeBinaryFromReader(message: GetDocumentsCountRequestV0, reader: jspb.BinaryReader): GetDocumentsCountRequestV0; + } + + export namespace GetDocumentsCountRequestV0 { + export type AsObject = { + dataContractId: Uint8Array | string, + documentType: string, + where: Uint8Array | string, + prove: boolean, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetDocumentsCountResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetDocumentsCountResponse.GetDocumentsCountResponseV0 | undefined; + setV0(value?: GetDocumentsCountResponse.GetDocumentsCountResponseV0): void; + + getVersionCase(): GetDocumentsCountResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDocumentsCountResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetDocumentsCountResponse): GetDocumentsCountResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDocumentsCountResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDocumentsCountResponse; + static deserializeBinaryFromReader(message: GetDocumentsCountResponse, reader: jspb.BinaryReader): GetDocumentsCountResponse; +} + +export namespace GetDocumentsCountResponse { + export type AsObject = { + v0?: GetDocumentsCountResponse.GetDocumentsCountResponseV0.AsObject, + } + + export class GetDocumentsCountResponseV0 extends jspb.Message { + hasCount(): boolean; + clearCount(): void; + getCount(): number; + setCount(value: number): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetDocumentsCountResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDocumentsCountResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetDocumentsCountResponseV0): GetDocumentsCountResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDocumentsCountResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDocumentsCountResponseV0; + static deserializeBinaryFromReader(message: GetDocumentsCountResponseV0, reader: jspb.BinaryReader): GetDocumentsCountResponseV0; + } + + export namespace GetDocumentsCountResponseV0 { + export type AsObject = { + count: number, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + COUNT = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetDocumentsSplitCountRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 | undefined; + setV0(value?: GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0): void; + + getVersionCase(): GetDocumentsSplitCountRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDocumentsSplitCountRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetDocumentsSplitCountRequest): GetDocumentsSplitCountRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDocumentsSplitCountRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDocumentsSplitCountRequest; + static deserializeBinaryFromReader(message: GetDocumentsSplitCountRequest, reader: jspb.BinaryReader): GetDocumentsSplitCountRequest; +} + +export namespace GetDocumentsSplitCountRequest { + export type AsObject = { + v0?: GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.AsObject, + } + + export class GetDocumentsSplitCountRequestV0 extends jspb.Message { + getDataContractId(): Uint8Array | string; + getDataContractId_asU8(): Uint8Array; + getDataContractId_asB64(): string; + setDataContractId(value: Uint8Array | string): void; + + getDocumentType(): string; + setDocumentType(value: string): void; + + getWhere(): Uint8Array | string; + getWhere_asU8(): Uint8Array; + getWhere_asB64(): string; + setWhere(value: Uint8Array | string): void; + + getSplitCountByIndexProperty(): string; + setSplitCountByIndexProperty(value: string): void; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDocumentsSplitCountRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetDocumentsSplitCountRequestV0): GetDocumentsSplitCountRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDocumentsSplitCountRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDocumentsSplitCountRequestV0; + static deserializeBinaryFromReader(message: GetDocumentsSplitCountRequestV0, reader: jspb.BinaryReader): GetDocumentsSplitCountRequestV0; + } + + export namespace GetDocumentsSplitCountRequestV0 { + export type AsObject = { + dataContractId: Uint8Array | string, + documentType: string, + where: Uint8Array | string, + splitCountByIndexProperty: string, + prove: boolean, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetDocumentsSplitCountResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 | undefined; + setV0(value?: GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0): void; + + getVersionCase(): GetDocumentsSplitCountResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDocumentsSplitCountResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetDocumentsSplitCountResponse): GetDocumentsSplitCountResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDocumentsSplitCountResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDocumentsSplitCountResponse; + static deserializeBinaryFromReader(message: GetDocumentsSplitCountResponse, reader: jspb.BinaryReader): GetDocumentsSplitCountResponse; +} + +export namespace GetDocumentsSplitCountResponse { + export type AsObject = { + v0?: GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.AsObject, + } + + export class GetDocumentsSplitCountResponseV0 extends jspb.Message { + hasSplitCounts(): boolean; + clearSplitCounts(): void; + getSplitCounts(): GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts | undefined; + setSplitCounts(value?: GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetDocumentsSplitCountResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDocumentsSplitCountResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetDocumentsSplitCountResponseV0): GetDocumentsSplitCountResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDocumentsSplitCountResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDocumentsSplitCountResponseV0; + static deserializeBinaryFromReader(message: GetDocumentsSplitCountResponseV0, reader: jspb.BinaryReader): GetDocumentsSplitCountResponseV0; + } + + export namespace GetDocumentsSplitCountResponseV0 { + export type AsObject = { + splitCounts?: GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export class SplitCountEntry extends jspb.Message { + getKey(): Uint8Array | string; + getKey_asU8(): Uint8Array; + getKey_asB64(): string; + setKey(value: Uint8Array | string): void; + + getCount(): number; + setCount(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SplitCountEntry.AsObject; + static toObject(includeInstance: boolean, msg: SplitCountEntry): SplitCountEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SplitCountEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SplitCountEntry; + static deserializeBinaryFromReader(message: SplitCountEntry, reader: jspb.BinaryReader): SplitCountEntry; + } + + export namespace SplitCountEntry { + export type AsObject = { + key: Uint8Array | string, + count: number, + } + } + + export class SplitCounts extends jspb.Message { + clearEntriesList(): void; + getEntriesList(): Array; + setEntriesList(value: Array): void; + addEntries(value?: GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry, index?: number): GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SplitCounts.AsObject; + static toObject(includeInstance: boolean, msg: SplitCounts): SplitCounts.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SplitCounts, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SplitCounts; + static deserializeBinaryFromReader(message: SplitCounts, reader: jspb.BinaryReader): SplitCounts; + } + + export namespace SplitCounts { + export type AsObject = { + entriesList: Array, + } + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + SPLIT_COUNTS = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + export class GetIdentityByPublicKeyHashRequest extends jspb.Message { hasV0(): boolean; clearV0(): void; diff --git a/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js b/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js index 4dcf181afe7..b670f84bcc7 100644 --- a/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js +++ b/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js @@ -150,6 +150,13 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractsResponse.Data goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase', null, { proto }); @@ -159,6 +166,15 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocum goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.ResultCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.VersionCase', null, { proto }); @@ -2235,6 +2251,216 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -25259,6 +25485,2175 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.hasV0 = function( +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest; + return proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + dataContractId: msg.getDataContractId_asB64(), + documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), + where: msg.getWhere_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0; + return proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDataContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentType(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setWhere(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDocumentType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getWhere_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional bytes data_contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getDataContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data_contract_id = 1; + * This is a type-conversion wrapper around `getDataContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getDataContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDataContractId())); +}; + + +/** + * optional bytes data_contract_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDataContractId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getDataContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDataContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.setDataContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string document_type = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getDocumentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.setDocumentType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes where = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getWhere = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes where = 3; + * This is a type-conversion wrapper around `getWhere()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getWhere_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getWhere())); +}; + + +/** + * optional bytes where = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getWhere()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getWhere_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getWhere())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.setWhere = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional bool prove = 4; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional GetDocumentsCountRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.GetDocumentsCountRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse; + return proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.serializeBinaryToWriter + ); + } +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + COUNT: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + count: jspb.Message.getFieldWithDefault(msg, 1, 0), + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0; + return proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCount(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.Proof; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.ResponseMetadata; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 count = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.setCount = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.clearCount = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.hasCount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetDocumentsCountResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.GetDocumentsCountResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsCountResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest; + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + dataContractId: msg.getDataContractId_asB64(), + documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), + where: msg.getWhere_asB64(), + splitCountByIndexProperty: jspb.Message.getFieldWithDefault(msg, 4, ""), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0; + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDataContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentType(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setWhere(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSplitCountByIndexProperty(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDocumentType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getWhere_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getSplitCountByIndexProperty(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional bytes data_contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getDataContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data_contract_id = 1; + * This is a type-conversion wrapper around `getDataContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getDataContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDataContractId())); +}; + + +/** + * optional bytes data_contract_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDataContractId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getDataContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDataContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.setDataContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string document_type = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getDocumentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.setDocumentType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes where = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getWhere = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes where = 3; + * This is a type-conversion wrapper around `getWhere()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getWhere_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getWhere())); +}; + + +/** + * optional bytes where = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getWhere()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getWhere_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getWhere())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.setWhere = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional string split_count_by_index_property = 4; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getSplitCountByIndexProperty = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.setSplitCountByIndexProperty = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bool prove = 5; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional GetDocumentsSplitCountRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.GetDocumentsSplitCountRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse; + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.serializeBinaryToWriter + ); + } +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + SPLIT_COUNTS: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + splitCounts: (f = msg.getSplitCounts()) && proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.toObject(includeInstance, f), + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0; + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.deserializeBinaryFromReader); + msg.setSplitCounts(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.Proof; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.ResponseMetadata; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSplitCounts(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.serializeBinaryToWriter + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64(), + count: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry; + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getCount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes key = 1; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 count = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.prototype.setCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.toObject = function(includeInstance, msg) { + var f, obj = { + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts; + return proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SplitCountEntry entries = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCountEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + +/** + * optional SplitCounts split_counts = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.getSplitCounts = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.SplitCounts|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.setSplitCounts = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.clearSplitCounts = function() { + return this.setSplitCounts(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.hasSplitCounts = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetDocumentsSplitCountResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.GetDocumentsSplitCountResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsSplitCountResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all diff --git a/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.d.ts b/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.d.ts index 589095161be..b7062d2387d 100644 --- a/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.d.ts +++ b/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.d.ts @@ -139,6 +139,24 @@ type PlatformgetDocuments = { readonly responseType: typeof platform_pb.GetDocumentsResponse; }; +type PlatformgetDocumentsCount = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetDocumentsCountRequest; + readonly responseType: typeof platform_pb.GetDocumentsCountResponse; +}; + +type PlatformgetDocumentsSplitCount = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetDocumentsSplitCountRequest; + readonly responseType: typeof platform_pb.GetDocumentsSplitCountResponse; +}; + type PlatformgetIdentityByPublicKeyHash = { readonly methodName: string; readonly service: typeof Platform; @@ -579,6 +597,8 @@ export class Platform { static readonly getDataContractHistory: PlatformgetDataContractHistory; static readonly getDataContracts: PlatformgetDataContracts; static readonly getDocuments: PlatformgetDocuments; + static readonly getDocumentsCount: PlatformgetDocumentsCount; + static readonly getDocumentsSplitCount: PlatformgetDocumentsSplitCount; static readonly getIdentityByPublicKeyHash: PlatformgetIdentityByPublicKeyHash; static readonly getIdentityByNonUniquePublicKeyHash: PlatformgetIdentityByNonUniquePublicKeyHash; static readonly waitForStateTransitionResult: PlatformwaitForStateTransitionResult; @@ -795,6 +815,24 @@ export class PlatformClient { requestMessage: platform_pb.GetDocumentsRequest, callback: (error: ServiceError|null, responseMessage: platform_pb.GetDocumentsResponse|null) => void ): UnaryResponse; + getDocumentsCount( + requestMessage: platform_pb.GetDocumentsCountRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetDocumentsCountResponse|null) => void + ): UnaryResponse; + getDocumentsCount( + requestMessage: platform_pb.GetDocumentsCountRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetDocumentsCountResponse|null) => void + ): UnaryResponse; + getDocumentsSplitCount( + requestMessage: platform_pb.GetDocumentsSplitCountRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetDocumentsSplitCountResponse|null) => void + ): UnaryResponse; + getDocumentsSplitCount( + requestMessage: platform_pb.GetDocumentsSplitCountRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetDocumentsSplitCountResponse|null) => void + ): UnaryResponse; getIdentityByPublicKeyHash( requestMessage: platform_pb.GetIdentityByPublicKeyHashRequest, metadata: grpc.Metadata, diff --git a/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.js b/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.js index e7d245b66a6..4a2c1f4dfdf 100644 --- a/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.js +++ b/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.js @@ -145,6 +145,24 @@ Platform.getDocuments = { responseType: platform_pb.GetDocumentsResponse }; +Platform.getDocumentsCount = { + methodName: "getDocumentsCount", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetDocumentsCountRequest, + responseType: platform_pb.GetDocumentsCountResponse +}; + +Platform.getDocumentsSplitCount = { + methodName: "getDocumentsSplitCount", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetDocumentsSplitCountRequest, + responseType: platform_pb.GetDocumentsSplitCountResponse +}; + Platform.getIdentityByPublicKeyHash = { methodName: "getIdentityByPublicKeyHash", service: Platform, @@ -1040,6 +1058,68 @@ PlatformClient.prototype.getDocuments = function getDocuments(requestMessage, me }; }; +PlatformClient.prototype.getDocumentsCount = function getDocumentsCount(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getDocumentsCount, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +PlatformClient.prototype.getDocumentsSplitCount = function getDocumentsSplitCount(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getDocumentsSplitCount, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + PlatformClient.prototype.getIdentityByPublicKeyHash = function getIdentityByPublicKeyHash(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/packages/dapi-grpc/protos/platform/v0/platform.proto b/packages/dapi-grpc/protos/platform/v0/platform.proto index f4514340c73..002eef33638 100644 --- a/packages/dapi-grpc/protos/platform/v0/platform.proto +++ b/packages/dapi-grpc/protos/platform/v0/platform.proto @@ -36,6 +36,10 @@ service Platform { rpc getDataContracts(GetDataContractsRequest) returns (GetDataContractsResponse); rpc getDocuments(GetDocumentsRequest) returns (GetDocumentsResponse); + rpc getDocumentsCount(GetDocumentsCountRequest) + returns (GetDocumentsCountResponse); + rpc getDocumentsSplitCount(GetDocumentsSplitCountRequest) + returns (GetDocumentsSplitCountResponse); rpc getIdentityByPublicKeyHash(GetIdentityByPublicKeyHashRequest) returns (GetIdentityByPublicKeyHashResponse); rpc getIdentityByNonUniquePublicKeyHash( @@ -611,6 +615,60 @@ message GetDocumentsResponse { oneof version { GetDocumentsResponseV0 v0 = 1; } } + +message GetDocumentsCountRequest { + message GetDocumentsCountRequestV0 { + bytes data_contract_id = 1; // The ID of the data contract containing the documents + string document_type = 2; // The type of document being requested + bytes where = 3; // CBOR-encoded where clauses for filtering + bool prove = 4; // Flag to request a proof as the response + } + oneof version { GetDocumentsCountRequestV0 v0 = 1; } +} + +message GetDocumentsCountResponse { + message GetDocumentsCountResponseV0 { + oneof result { + uint64 count = 1; // Total document count matching the query + Proof proof = 2; // Cryptographic proof, if requested + } + ResponseMetadata metadata = 3; // Metadata about the blockchain state + } + oneof version { GetDocumentsCountResponseV0 v0 = 1; } +} + +message GetDocumentsSplitCountRequest { + message GetDocumentsSplitCountRequestV0 { + bytes data_contract_id = 1; // The ID of the data contract containing the documents + string document_type = 2; // The type of document being requested + bytes where = 3; // CBOR-encoded where clauses for filtering + string split_count_by_index_property = 4; // The index property to split counts by + bool prove = 5; // Flag to request a proof as the response + } + oneof version { GetDocumentsSplitCountRequestV0 v0 = 1; } +} + +message GetDocumentsSplitCountResponse { + message GetDocumentsSplitCountResponseV0 { + // A single entry: the key value and how many documents match + message SplitCountEntry { + bytes key = 1; // The index property value + uint64 count = 2; // Number of documents with this key value + } + + message SplitCounts { + repeated SplitCountEntry entries = 1; + } + + oneof result { + SplitCounts split_counts = 1; // Per-key counts + Proof proof = 2; // Cryptographic proof, if requested + } + ResponseMetadata metadata = 3; // Metadata about the blockchain state + } + oneof version { GetDocumentsSplitCountResponseV0 v0 = 1; } +} + message GetIdentityByPublicKeyHashRequest { message GetIdentityByPublicKeyHashRequestV0 { bytes public_key_hash = diff --git a/packages/rs-dapi-client/src/transport/grpc.rs b/packages/rs-dapi-client/src/transport/grpc.rs index 3b9aa9eed5b..2fb9e0e78a5 100644 --- a/packages/rs-dapi-client/src/transport/grpc.rs +++ b/packages/rs-dapi-client/src/transport/grpc.rs @@ -205,6 +205,22 @@ impl_transport_request_grpc!( get_documents ); +impl_transport_request_grpc!( + platform_proto::GetDocumentsCountRequest, + platform_proto::GetDocumentsCountResponse, + PlatformGrpcClient, + RequestSettings::default(), + get_documents_count +); + +impl_transport_request_grpc!( + platform_proto::GetDocumentsSplitCountRequest, + platform_proto::GetDocumentsSplitCountResponse, + PlatformGrpcClient, + RequestSettings::default(), + get_documents_split_count +); + impl_transport_request_grpc!( platform_proto::GetDataContractRequest, platform_proto::GetDataContractResponse, diff --git a/packages/rs-dapi/src/services/platform_service/mod.rs b/packages/rs-dapi/src/services/platform_service/mod.rs index 1fa71606a43..9086389e158 100644 --- a/packages/rs-dapi/src/services/platform_service/mod.rs +++ b/packages/rs-dapi/src/services/platform_service/mod.rs @@ -344,6 +344,18 @@ impl Platform for PlatformServiceImpl { dapi_grpc::platform::v0::GetDocumentsResponse ); + drive_method!( + get_documents_count, + dapi_grpc::platform::v0::GetDocumentsCountRequest, + dapi_grpc::platform::v0::GetDocumentsCountResponse + ); + + drive_method!( + get_documents_split_count, + dapi_grpc::platform::v0::GetDocumentsSplitCountRequest, + dapi_grpc::platform::v0::GetDocumentsSplitCountResponse + ); + // System methods drive_method!( get_consensus_params, diff --git a/packages/rs-dpp/schema/meta_schemas/document/v1/document-meta.json b/packages/rs-dpp/schema/meta_schemas/document/v1/document-meta.json index e5e06f620bb..39836336d9b 100644 --- a/packages/rs-dpp/schema/meta_schemas/document/v1/document-meta.json +++ b/packages/rs-dpp/schema/meta_schemas/document/v1/document-meta.json @@ -429,8 +429,18 @@ "additionalProperties": false }, "countable": { - "type": "boolean", - "description": "Enables countable operations on the index. Adds extra costs for documents storage" + "oneOf": [ + { + "type": "boolean", + "description": "Legacy form. true == \"countable\", false == \"notCountable\". Kept for back-compat with contracts written before the enum form was introduced." + }, + { + "type": "string", + "enum": ["notCountable", "countable", "countableAllowingOffset"], + "description": "\"countable\" — index uses a CountTree (O(1) totals). \"countableAllowingOffset\" — index uses a ProvableCountTree (totals + future O(log n) range / offset queries). \"notCountable\" — plain NormalTree (no count fast path)." + } + ], + "description": "Whether and how the index supports count fast paths. Adds extra storage cost for non-default values." } }, "required": [ diff --git a/packages/rs-dpp/src/data_contract/document_type/class_methods/try_from_schema/v1/mod.rs b/packages/rs-dpp/src/data_contract/document_type/class_methods/try_from_schema/v1/mod.rs index bc3b58832a8..0e11b14f6be 100644 --- a/packages/rs-dpp/src/data_contract/document_type/class_methods/try_from_schema/v1/mod.rs +++ b/packages/rs-dpp/src/data_contract/document_type/class_methods/try_from_schema/v1/mod.rs @@ -341,8 +341,12 @@ impl DocumentTypeV1 { #[cfg(feature = "validation")] if full_validation { - // Countable indices are only supported starting from protocol version 12 - if index.countable && platform_version.protocol_version < 12 { + // Countable indices are only supported starting from protocol version 12. + // Both `Countable` and `CountableAllowingOffset` are gated together — + // either form requires v12+ since it changes the GroveDB tree type. + if index.countable.is_countable() + && platform_version.protocol_version < 12 + { return Err(ProtocolError::ConsensusError(Box::new( UnsupportedFeatureError::new( "count index".to_string(), diff --git a/packages/rs-dpp/src/data_contract/document_type/index/mod.rs b/packages/rs-dpp/src/data_contract/document_type/index/mod.rs index 5c2fe9539c3..0f4aa0d8ae5 100644 --- a/packages/rs-dpp/src/data_contract/document_type/index/mod.rs +++ b/packages/rs-dpp/src/data_contract/document_type/index/mod.rs @@ -283,6 +283,64 @@ impl Default for ContestedIndexInformation { } } +/// What countable operations the index's tree supports. +/// +/// - `NotCountable` — plain `NormalTree`. Counts on this index require enumerating +/// documents (no fast path). +/// - `Countable` — `CountTree`. The total count of documents under any covering +/// equality / `In` prefix is an O(1) read (or O(distinct values) for partial +/// prefixes). +/// - `CountableAllowingOffset` — `ProvableCountTree`. Same total-count semantics +/// as `Countable`, plus every internal node carries the count of its left and +/// right subtrees, so future range / offset queries (e.g. "the next 50 items +/// starting after key X") will be answerable in O(log n) without enumerating. +/// +/// `CountableAllowingOffset` is strictly more capable than `Countable` but also +/// strictly more expensive (every node carries count metadata, not just the +/// root). Pick `Countable` when you only need totals; pick +/// `CountableAllowingOffset` when you also need range/offset queries on this +/// index. +/// +/// **Note on `unique` indexes.** A unique index stores its terminal as a bare +/// `Reference` at key `[0]` rather than wrapping it in a `CountTree`, so for +/// documents whose indexed fields are *all* non-null the `countable` flag is a +/// no-op at the storage level. It still does meaningful work for **null-bearing** +/// entries: when a document has any null value among the indexed properties, +/// insertion takes the same count-tree branch a non-unique index uses (because +/// uniqueness can't be enforced on null), and the count tree at that path +/// aggregates them. So `Countable` / `CountableAllowingOffset` on a unique index +/// is meaningful exactly when at least one of the indexed properties is +/// optional in the document schema. Counts on all-non-null exact matches still +/// return the correct value (1 if present, 0 if not) because grovedb's +/// `Element::count_value_or_default()` returns 1 for non-`CountTree` elements +/// like `Reference`. +#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Default)] +#[cfg_attr(feature = "serde-conversion", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde-conversion", serde(rename_all = "camelCase"))] +pub enum IndexCountability { + /// The index uses a plain `NormalTree` and does not support count fast paths. + #[default] + NotCountable, + /// The index uses a `CountTree` — total counts are O(1) via the root count. + Countable, + /// The index uses a `ProvableCountTree` — same as `Countable` plus per-node + /// counts that enable future O(log n) range / offset queries. + CountableAllowingOffset, +} + +impl IndexCountability { + /// Returns true if this index supports count fast paths (either variant). + pub fn is_countable(&self) -> bool { + !matches!(self, Self::NotCountable) + } + + /// Returns true if this index uses the provable variant (per-node counts, + /// enabling future range / offset support). + pub fn allows_offset(&self) -> bool { + matches!(self, Self::CountableAllowingOffset) + } +} + // Indices documentation: https://dashplatform.readme.io/docs/reference-data-contracts#document-indices #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] #[cfg_attr(feature = "serde-conversion", derive(Serialize, Deserialize))] @@ -295,8 +353,9 @@ pub struct Index { pub null_searchable: bool, /// Contested indexes are useful when a resource is considered valuable pub contested_index: Option, - /// Enables countable operations on the index - pub countable: bool, + /// Whether and how the index supports count fast paths. See + /// [`IndexCountability`]. + pub countable: IndexCountability, } impl Index { @@ -471,7 +530,7 @@ impl TryFrom<&[(Value, Value)]> for Index { let mut name = None; let mut contested_index = None; let mut index_properties: Vec = Vec::new(); - let mut countable = false; + let mut countable = IndexCountability::NotCountable; for (key_value, value_value) in index_type_value_map { let key = key_value.to_str()?; @@ -589,11 +648,36 @@ impl TryFrom<&[(Value, Value)]> for Index { contested_index = Some(contested_index_information); } "countable" => { - countable = value_value - .as_bool() - .ok_or(DataContractError::ValueWrongType( - "countable value must be a boolean".to_string(), - ))?; + // Accept either: + // - boolean: `true` → Countable, `false` → NotCountable. + // This preserves v0 contracts (whose meta-schema enforces + // `"type": "boolean"`) and any v1 contracts written before + // the enum form was introduced. + // - string: one of `"notCountable"`, `"countable"`, + // `"countableAllowingOffset"` (camelCase, matching the + // `IndexCountability` serde rename rule). + countable = match value_value { + Value::Bool(true) => IndexCountability::Countable, + Value::Bool(false) => IndexCountability::NotCountable, + Value::Text(s) => match s.as_str() { + "notCountable" => IndexCountability::NotCountable, + "countable" => IndexCountability::Countable, + "countableAllowingOffset" => IndexCountability::CountableAllowingOffset, + other => { + return Err(DataContractError::ValueWrongType(format!( + "countable value must be a boolean or one of \ + \"notCountable\" / \"countable\" / \ + \"countableAllowingOffset\"; got {:?}", + other + ))) + } + }, + _ => { + return Err(DataContractError::ValueWrongType( + "countable value must be a boolean or a string".to_string(), + )) + } + }; } "properties" => { let properties = @@ -691,7 +775,7 @@ mod tests { unique, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, } } diff --git a/packages/rs-dpp/src/data_contract/document_type/index/random_index.rs b/packages/rs-dpp/src/data_contract/document_type/index/random_index.rs index fe1f996e516..e215b403701 100644 --- a/packages/rs-dpp/src/data_contract/document_type/index/random_index.rs +++ b/packages/rs-dpp/src/data_contract/document_type/index/random_index.rs @@ -1,4 +1,4 @@ -use crate::data_contract::document_type::index::{Index, IndexProperty}; +use crate::data_contract::document_type::index::{Index, IndexCountability, IndexProperty}; use crate::ProtocolError; use rand::prelude::StdRng; use rand::seq::SliceRandom; @@ -60,7 +60,7 @@ impl Index { unique, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, }) } } diff --git a/packages/rs-dpp/src/data_contract/document_type/index_level/mod.rs b/packages/rs-dpp/src/data_contract/document_type/index_level/mod.rs index b94ce32284e..8c5e8a5ef12 100644 --- a/packages/rs-dpp/src/data_contract/document_type/index_level/mod.rs +++ b/packages/rs-dpp/src/data_contract/document_type/index_level/mod.rs @@ -3,6 +3,7 @@ use crate::consensus::basic::data_contract::DataContractInvalidIndexDefinitionUp use crate::consensus::basic::data_contract::DuplicateIndexError; use crate::consensus::basic::BasicError; use crate::consensus::ConsensusError; +use crate::data_contract::document_type::index::IndexCountability; use crate::data_contract::document_type::index_level::IndexType::{ ContestedResourceIndex, NonUniqueIndex, UniqueIndex, }; @@ -35,8 +36,12 @@ pub struct IndexLevelTypeInfo { pub should_insert_with_all_null: bool, /// The index type pub index_type: IndexType, - /// Is this index countable. Uses sum trees to enable count operations - pub countable: bool, + /// Whether and how this index supports count fast paths. Drives the GroveDB + /// tree variant chosen at the terminal level of the index path: + /// `NotCountable` → `NormalTree`, + /// `Countable` → `CountTree`, + /// `CountableAllowingOffset` → `ProvableCountTree`. + pub countable: IndexCountability, } impl IndexType { @@ -323,7 +328,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, }]; let old_index_structure = @@ -351,7 +356,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, }]; let new_indices = vec![ @@ -364,7 +369,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, }, Index { name: "test2".to_string(), @@ -375,7 +380,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, }, ]; @@ -412,7 +417,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, }, Index { name: "test2".to_string(), @@ -423,7 +428,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, }, ]; @@ -436,7 +441,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, }]; let old_index_structure = @@ -471,7 +476,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, }]; let new_indices = vec![Index { @@ -489,7 +494,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, }]; let old_index_structure = @@ -530,7 +535,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, }]; let new_indices = vec![Index { @@ -542,7 +547,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, }]; let old_index_structure = @@ -577,7 +582,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, }]; let new_indices = vec![Index { @@ -589,7 +594,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: true, + countable: IndexCountability::Countable, }]; let old_index_structure = @@ -624,7 +629,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: true, + countable: IndexCountability::Countable, }]; let new_indices = vec![Index { @@ -636,7 +641,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, }]; let old_index_structure = @@ -671,7 +676,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: true, + countable: IndexCountability::Countable, }]; let old_index_structure = @@ -706,7 +711,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: false, + countable: IndexCountability::NotCountable, }]; let new_indices = vec![Index { @@ -724,7 +729,7 @@ mod tests { unique: false, null_searchable: true, contested_index: None, - countable: true, + countable: IndexCountability::Countable, }]; let old_index_structure = diff --git a/packages/rs-drive-abci/src/query/document_count_query/mod.rs b/packages/rs-drive-abci/src/query/document_count_query/mod.rs new file mode 100644 index 00000000000..61f10e4f3a9 --- /dev/null +++ b/packages/rs-drive-abci/src/query/document_count_query/mod.rs @@ -0,0 +1,54 @@ +use crate::error::query::QueryError; +use crate::error::Error; +use crate::platform_types::platform::Platform; +use crate::platform_types::platform_state::PlatformState; +use crate::query::QueryValidationResult; +use dapi_grpc::platform::v0::get_documents_count_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_documents_count_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{GetDocumentsCountRequest, GetDocumentsCountResponse}; +use dpp::version::PlatformVersion; + +mod v0; + +impl Platform { + /// Querying of document count + pub fn query_documents_count( + &self, + GetDocumentsCountRequest { version }: GetDocumentsCountRequest, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let Some(version) = version else { + return Ok(QueryValidationResult::new_with_error( + QueryError::DecodingError("could not decode documents count query".to_string()), + )); + }; + + let feature_version_bounds = &platform_version.drive_abci.query.document_count_query; + + let feature_version = match &version { + RequestVersion::V0(_) => 0, + }; + if !feature_version_bounds.check_version(feature_version) { + return Ok(QueryValidationResult::new_with_error( + QueryError::UnsupportedQueryVersion( + "documents_count".to_string(), + feature_version_bounds.min_version, + feature_version_bounds.max_version, + platform_version.protocol_version, + feature_version, + ), + )); + } + match version { + RequestVersion::V0(request_v0) => { + let result = + self.query_documents_count_v0(request_v0, platform_state, platform_version)?; + + Ok(result.map(|response_v0| GetDocumentsCountResponse { + version: Some(ResponseVersion::V0(response_v0)), + })) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/document_count_query/v0/mod.rs b/packages/rs-drive-abci/src/query/document_count_query/v0/mod.rs new file mode 100644 index 00000000000..5c68d6c6ba3 --- /dev/null +++ b/packages/rs-drive-abci/src/query/document_count_query/v0/mod.rs @@ -0,0 +1,586 @@ +use crate::error::query::QueryError; +use crate::error::Error; +use crate::platform_types::platform::Platform; +use crate::platform_types::platform_state::PlatformState; +use crate::query::response_metadata::CheckpointUsed; +use crate::query::QueryValidationResult; +use dapi_grpc::platform::v0::get_documents_count_request::GetDocumentsCountRequestV0; +use dapi_grpc::platform::v0::get_documents_count_response::{ + get_documents_count_response_v0, GetDocumentsCountResponseV0, +}; +use dpp::check_validation_result_with_data; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; +use dpp::identifier::Identifier; +use dpp::platform_value::Value; +use dpp::validation::ValidationResult; +use dpp::version::PlatformVersion; +use drive::error::query::QuerySyntaxError; +use drive::query::{DriveDocumentCountQuery, DriveDocumentQuery, WhereClause}; +use drive::util::grove_operations::GroveDBToUse; + +impl Platform { + pub(super) fn query_documents_count_v0( + &self, + GetDocumentsCountRequestV0 { + data_contract_id, + document_type: document_type_name, + r#where, + prove, + }: GetDocumentsCountRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let contract_id: Identifier = check_validation_result_with_data!(data_contract_id + .try_into() + .map_err(|_| QueryError::InvalidArgument( + "id must be a valid identifier (32 bytes long)".to_string() + ))); + + let (_, contract) = self.drive.get_contract_with_fetch_info_and_fee( + contract_id.to_buffer(), + None, + true, + None, + platform_version, + )?; + + let contract = check_validation_result_with_data!(contract.ok_or(QueryError::Query( + QuerySyntaxError::DataContractNotFound( + "contract not found when querying from value with contract info", + ) + ))); + + let contract_ref = &contract.contract; + + let document_type = check_validation_result_with_data!(contract_ref + .document_type_for_name(document_type_name.as_str()) + .map_err(|_| QueryError::InvalidArgument(format!( + "document type {} not found for contract {}", + document_type_name, contract_id + )))); + + let where_clause = if r#where.is_empty() { + Value::Null + } else { + check_validation_result_with_data!(ciborium::de::from_reader(r#where.as_slice()) + .map_err(|_| { + QueryError::Query(QuerySyntaxError::DeserializationError( + "unable to decode 'where' query from cbor".to_string(), + )) + })) + }; + + // Parse where clauses into WhereClause structs so we can match them against + // index properties for the CountTree path. + let all_where_clauses: Vec = + check_validation_result_with_data!(match &where_clause { + Value::Null => Ok(vec![]), + Value::Array(clauses) => clauses + .iter() + .map(|wc| { + if let Value::Array(components) = wc { + WhereClause::from_components(components).map_err(|e| match e { + drive::error::Error::Query(qe) => QueryError::Query(qe), + other => QueryError::InvalidArgument(format!( + "error parsing where clauses: {}", + other + )), + }) + } else { + Err(QueryError::Query( + QuerySyntaxError::InvalidFormatWhereClause( + "where clause must be an array", + ), + )) + } + }) + .collect::, QueryError>>(), + _ => Err(QueryError::Query( + QuerySyntaxError::InvalidFormatWhereClause("where clause must be an array"), + )), + }); + + let response = if prove { + // For prove path, use the standard DriveDocumentQuery approach. + // We still need the full path query structure for proof generation. + let mut drive_query = + check_validation_result_with_data!(DriveDocumentQuery::from_decomposed_values( + where_clause, + None, + Some(self.config.drive.default_query_limit), + None, + true, + None, + contract_ref, + document_type, + &self.config.drive, + )); + + // Cap the proof at u16::MAX matching documents. The proof + // verifier returns the count by deserializing every document in + // the proof, so an unbounded query would force the server to + // materialize and the client to verify an arbitrarily large set + // of documents purely to learn their count. Until count-tree + // proofs are implemented, callers that need exact counts on + // larger result sets should use `prove=false` with a covering + // countable index. + drive_query.limit = Some(u16::MAX); + + let proof = + match drive_query.execute_with_proof(&self.drive, None, None, platform_version) { + Ok(result) => result.0, + Err(drive::error::Error::Query(query_error)) => { + return Ok(QueryValidationResult::new_with_error(QueryError::Query( + query_error, + ))); + } + Err(e) => return Err(e.into()), + }; + + let (grovedb_used, proof) = + self.response_proof_v0(platform_state, proof, GroveDBToUse::Current)?; + + GetDocumentsCountResponseV0 { + result: Some(get_documents_count_response_v0::Result::Proof(proof)), + metadata: Some(self.response_metadata_v0(platform_state, grovedb_used)), + } + } else { + // The count fast path supports only Equal and In where-clause + // operators. Range operators (>, <, between, startsWith) need a + // boundary walk that the current count-tree path query model + // cannot express; surface that as a clear error rather than + // letting it fall through and silently drop the predicate. + if DriveDocumentCountQuery::has_unsupported_operator(&all_where_clauses) { + return Ok(QueryValidationResult::new_with_error( + QueryError::InvalidArgument( + "count query supports only `==` and `in` where-clause operators; \ + range operators (`>`, `<`, `between`, `startsWith`) are not yet \ + supported on the no-prove path" + .to_string(), + ), + )); + } + + // For no-prove path, use CountTree-based O(1) counting when possible. + // Find a countable index that matches the where clause properties. + let countable_index = DriveDocumentCountQuery::find_countable_index_for_where_clauses( + document_type.indexes(), + &all_where_clauses, + ); + + let count = if let Some(index) = countable_index { + let count_query = DriveDocumentCountQuery { + document_type, + contract_id: contract_id.to_buffer(), + document_type_name: document_type_name.clone(), + index, + where_clauses: all_where_clauses, + split_by_property: None, + }; + + let results = count_query.execute_no_proof(&self.drive, None, platform_version)?; + + // For a total count query, execute_no_proof returns a single entry + // with an empty key and the total count. + results.first().map_or(0, |entry| entry.count) + } else { + // No countable index found. Return an error telling the caller + // that count queries require a countable index. + return Ok(QueryValidationResult::new_with_error( + QueryError::InvalidArgument( + "count query requires a countable index on the document type that \ + matches the where clause properties" + .to_string(), + ), + )); + }; + + GetDocumentsCountResponseV0 { + result: Some(get_documents_count_response_v0::Result::Count(count)), + metadata: Some(self.response_metadata_v0(platform_state, CheckpointUsed::Current)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::query::tests::{setup_platform, store_data_contract, store_document}; + use dpp::dashcore::Network; + use dpp::data_contract::document_type::random_document::CreateRandomDocument; + use dpp::tests::json_document::json_document_to_contract_with_ids; + use rand::rngs::StdRng; + use rand::SeedableRng; + + #[test] + fn test_documents_count_no_prove() { + let (platform, state, version) = setup_platform(None, Network::Testnet, None); + + let platform_version = PlatformVersion::latest(); + + let data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/family/family-contract-countable.json", + None, + None, + false, + platform_version, + ) + .expect("expected to get json based contract"); + + store_data_contract(&platform, &data_contract, version); + + let data_contract_id = data_contract.id(); + let document_type_name = "person"; + let document_type = data_contract + .document_type_for_name(document_type_name) + .expect("expected document type"); + + let mut std_rng = StdRng::seed_from_u64(500); + for _ in 0..5 { + let random_document = document_type + .random_document_with_rng(&mut std_rng, platform_version) + .expect("expected to get random document"); + store_document( + &platform, + &data_contract, + document_type, + &random_document, + platform_version, + ); + } + + let request = GetDocumentsCountRequestV0 { + data_contract_id: data_contract_id.to_vec(), + document_type: document_type_name.to_string(), + r#where: vec![], + prove: false, + }; + + let result = platform + .query_documents_count_v0(request, &state, version) + .expect("expected query to succeed"); + + assert!(result.errors.is_empty(), "errors: {:?}", result.errors); + + match result.data { + Some(GetDocumentsCountResponseV0 { + result: Some(get_documents_count_response_v0::Result::Count(count)), + metadata: Some(_), + }) => { + assert_eq!(count, 5, "expected count of 5 documents"); + } + other => panic!("expected count result, got {:?}", other), + } + } + + #[test] + fn test_documents_count_empty_result() { + let (platform, state, version) = setup_platform(None, Network::Testnet, None); + + let platform_version = PlatformVersion::latest(); + + let data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/family/family-contract-countable.json", + None, + None, + false, + platform_version, + ) + .expect("expected to get json based contract"); + + store_data_contract(&platform, &data_contract, version); + + let data_contract_id = data_contract.id(); + let document_type_name = "person"; + + let request = GetDocumentsCountRequestV0 { + data_contract_id: data_contract_id.to_vec(), + document_type: document_type_name.to_string(), + r#where: vec![], + prove: false, + }; + + let result = platform + .query_documents_count_v0(request, &state, version) + .expect("expected query to succeed"); + + assert!(result.errors.is_empty(), "errors: {:?}", result.errors); + + match result.data { + Some(GetDocumentsCountResponseV0 { + result: Some(get_documents_count_response_v0::Result::Count(count)), + metadata: Some(_), + }) => { + assert_eq!(count, 0, "expected count of 0 documents"); + } + other => panic!("expected count result, got {:?}", other), + } + } + + fn serialize_where_clauses_to_cbor(where_clauses: Vec) -> Vec { + use ciborium::value::Value as CborValue; + let cbor: CborValue = TryInto::::try_into(Value::Array(where_clauses)) + .expect("expected to convert where clauses to cbor value"); + let mut out = Vec::new(); + ciborium::ser::into_writer(&cbor, &mut out).expect("expected to serialize where clauses"); + out + } + + fn store_person_document( + platform: &crate::test::helpers::setup::TempPlatform, + data_contract: &dpp::prelude::DataContract, + id: [u8; 32], + first_name: &str, + last_name: &str, + age: u64, + platform_version: &PlatformVersion, + ) { + use dpp::document::{Document, DocumentV0}; + use std::collections::BTreeMap; + + let document_type = data_contract + .document_type_for_name("person") + .expect("expected document type"); + + let mut properties = BTreeMap::new(); + properties.insert("firstName".to_string(), Value::Text(first_name.to_string())); + properties.insert("lastName".to_string(), Value::Text(last_name.to_string())); + properties.insert("age".to_string(), Value::U64(age)); + + let document: Document = DocumentV0 { + id: Identifier::from(id), + owner_id: Identifier::from([0u8; 32]), + properties, + revision: None, + created_at: None, + updated_at: None, + transferred_at: None, + created_at_block_height: None, + updated_at_block_height: None, + transferred_at_block_height: None, + created_at_core_block_height: None, + updated_at_core_block_height: None, + transferred_at_core_block_height: None, + creator_id: None, + } + .into(); + + store_document( + platform, + data_contract, + document_type, + &document, + platform_version, + ); + } + + #[test] + fn test_documents_count_with_in_operator() { + let (platform, state, version) = setup_platform(None, Network::Testnet, None); + let platform_version = PlatformVersion::latest(); + + let data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/family/family-contract-countable.json", + None, + None, + false, + platform_version, + ) + .expect("expected to get json based contract"); + + store_data_contract(&platform, &data_contract, version); + + // 3 docs with age=30, 2 with age=40, 1 with age=50. + store_person_document( + &platform, + &data_contract, + [1u8; 32], + "Alice", + "Smith", + 30, + platform_version, + ); + store_person_document( + &platform, + &data_contract, + [2u8; 32], + "Bob", + "Smith", + 30, + platform_version, + ); + store_person_document( + &platform, + &data_contract, + [3u8; 32], + "Carol", + "Smith", + 30, + platform_version, + ); + store_person_document( + &platform, + &data_contract, + [4u8; 32], + "Dave", + "Smith", + 40, + platform_version, + ); + store_person_document( + &platform, + &data_contract, + [5u8; 32], + "Eve", + "Smith", + 40, + platform_version, + ); + store_person_document( + &platform, + &data_contract, + [6u8; 32], + "Frank", + "Smith", + 50, + platform_version, + ); + + // [["age", "in", [30, 40]]] + let where_clauses = vec![Value::Array(vec![ + Value::Text("age".to_string()), + Value::Text("in".to_string()), + Value::Array(vec![Value::U64(30), Value::U64(40)]), + ])]; + + let request = GetDocumentsCountRequestV0 { + data_contract_id: data_contract.id().to_vec(), + document_type: "person".to_string(), + r#where: serialize_where_clauses_to_cbor(where_clauses), + prove: false, + }; + + let result = platform + .query_documents_count_v0(request, &state, version) + .expect("expected query to succeed"); + + assert!(result.errors.is_empty(), "errors: {:?}", result.errors); + + match result.data { + Some(GetDocumentsCountResponseV0 { + result: Some(get_documents_count_response_v0::Result::Count(count)), + metadata: Some(_), + }) => { + assert_eq!(count, 5, "expected count of 5 (3 age=30 + 2 age=40)"); + } + other => panic!("expected count result, got {:?}", other), + } + } + + #[test] + fn test_documents_count_rejects_range_operator() { + let (platform, state, version) = setup_platform(None, Network::Testnet, None); + let platform_version = PlatformVersion::latest(); + + let data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/family/family-contract-countable.json", + None, + None, + false, + platform_version, + ) + .expect("expected to get json based contract"); + + store_data_contract(&platform, &data_contract, version); + + // [["age", ">", 20]] — range operator, must be rejected on no-prove path. + let where_clauses = vec![Value::Array(vec![ + Value::Text("age".to_string()), + Value::Text(">".to_string()), + Value::U64(20), + ])]; + + let request = GetDocumentsCountRequestV0 { + data_contract_id: data_contract.id().to_vec(), + document_type: "person".to_string(), + r#where: serialize_where_clauses_to_cbor(where_clauses), + prove: false, + }; + + let result = platform + .query_documents_count_v0(request, &state, version) + .expect("expected query to return validation error"); + + assert!( + matches!( + result.errors.as_slice(), + [QueryError::InvalidArgument(msg)] if msg.contains("range operators") && msg.contains("not yet") + ), + "expected range-operator rejection, got {:?}", + result.errors + ); + } + + #[test] + fn test_documents_count_with_prove() { + let (platform, state, version) = setup_platform(None, Network::Testnet, None); + + let platform_version = PlatformVersion::latest(); + + let data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/family/family-contract-countable.json", + None, + None, + false, + platform_version, + ) + .expect("expected to get json based contract"); + + store_data_contract(&platform, &data_contract, version); + + let data_contract_id = data_contract.id(); + let document_type_name = "person"; + let document_type = data_contract + .document_type_for_name(document_type_name) + .expect("expected document type"); + + let mut std_rng = StdRng::seed_from_u64(500); + for _ in 0..3 { + let random_document = document_type + .random_document_with_rng(&mut std_rng, platform_version) + .expect("expected to get random document"); + store_document( + &platform, + &data_contract, + document_type, + &random_document, + platform_version, + ); + } + + let request = GetDocumentsCountRequestV0 { + data_contract_id: data_contract_id.to_vec(), + document_type: document_type_name.to_string(), + r#where: vec![], + prove: true, + }; + + let result = platform + .query_documents_count_v0(request, &state, version) + .expect("expected query to succeed"); + + assert!(result.errors.is_empty(), "errors: {:?}", result.errors); + + assert!(matches!( + result.data, + Some(GetDocumentsCountResponseV0 { + result: Some(get_documents_count_response_v0::Result::Proof(_)), + metadata: Some(_), + }) + )); + } +} diff --git a/packages/rs-drive-abci/src/query/document_split_count_query/mod.rs b/packages/rs-drive-abci/src/query/document_split_count_query/mod.rs new file mode 100644 index 00000000000..ccb7145123d --- /dev/null +++ b/packages/rs-drive-abci/src/query/document_split_count_query/mod.rs @@ -0,0 +1,59 @@ +use crate::error::query::QueryError; +use crate::error::Error; +use crate::platform_types::platform::Platform; +use crate::platform_types::platform_state::PlatformState; +use crate::query::QueryValidationResult; +use dapi_grpc::platform::v0::get_documents_split_count_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_documents_split_count_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{GetDocumentsSplitCountRequest, GetDocumentsSplitCountResponse}; +use dpp::version::PlatformVersion; + +mod v0; + +impl Platform { + /// Querying of document split count + pub fn query_documents_split_count( + &self, + GetDocumentsSplitCountRequest { version }: GetDocumentsSplitCountRequest, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let Some(version) = version else { + return Ok(QueryValidationResult::new_with_error( + QueryError::DecodingError( + "could not decode documents split count query".to_string(), + ), + )); + }; + + let feature_version_bounds = &platform_version.drive_abci.query.document_split_count_query; + + let feature_version = match &version { + RequestVersion::V0(_) => 0, + }; + if !feature_version_bounds.check_version(feature_version) { + return Ok(QueryValidationResult::new_with_error( + QueryError::UnsupportedQueryVersion( + "documents_split_count".to_string(), + feature_version_bounds.min_version, + feature_version_bounds.max_version, + platform_version.protocol_version, + feature_version, + ), + )); + } + match version { + RequestVersion::V0(request_v0) => { + let result = self.query_documents_split_count_v0( + request_v0, + platform_state, + platform_version, + )?; + + Ok(result.map(|response_v0| GetDocumentsSplitCountResponse { + version: Some(ResponseVersion::V0(response_v0)), + })) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/document_split_count_query/v0/mod.rs b/packages/rs-drive-abci/src/query/document_split_count_query/v0/mod.rs new file mode 100644 index 00000000000..80d3c51b345 --- /dev/null +++ b/packages/rs-drive-abci/src/query/document_split_count_query/v0/mod.rs @@ -0,0 +1,666 @@ +use crate::error::query::QueryError; +use crate::error::Error; +use crate::platform_types::platform::Platform; +use crate::platform_types::platform_state::PlatformState; +use crate::query::response_metadata::CheckpointUsed; +use crate::query::QueryValidationResult; +use dapi_grpc::platform::v0::get_documents_split_count_request::GetDocumentsSplitCountRequestV0; +use dapi_grpc::platform::v0::get_documents_split_count_response::{ + get_documents_split_count_response_v0, GetDocumentsSplitCountResponseV0, +}; +use dpp::check_validation_result_with_data; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; +use dpp::identifier::Identifier; +use dpp::platform_value::Value; +use dpp::validation::ValidationResult; +use dpp::version::PlatformVersion; +use drive::error::query::QuerySyntaxError; +use drive::query::{DriveDocumentCountQuery, DriveDocumentQuery, WhereClause}; +use drive::util::grove_operations::GroveDBToUse; + +impl Platform { + pub(super) fn query_documents_split_count_v0( + &self, + GetDocumentsSplitCountRequestV0 { + data_contract_id, + document_type: document_type_name, + r#where, + split_count_by_index_property, + prove, + }: GetDocumentsSplitCountRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let contract_id: Identifier = check_validation_result_with_data!(data_contract_id + .try_into() + .map_err(|_| QueryError::InvalidArgument( + "id must be a valid identifier (32 bytes long)".to_string() + ))); + + let (_, contract) = self.drive.get_contract_with_fetch_info_and_fee( + contract_id.to_buffer(), + None, + true, + None, + platform_version, + )?; + + let contract = check_validation_result_with_data!(contract.ok_or(QueryError::Query( + QuerySyntaxError::DataContractNotFound( + "contract not found when querying from value with contract info", + ) + ))); + + let contract_ref = &contract.contract; + + let document_type = check_validation_result_with_data!(contract_ref + .document_type_for_name(document_type_name.as_str()) + .map_err(|_| QueryError::InvalidArgument(format!( + "document type {} not found for contract {}", + document_type_name, contract_id + )))); + + // Validate the split property exists in the document type + if split_count_by_index_property.is_empty() { + return Ok(QueryValidationResult::new_with_error( + QueryError::InvalidArgument( + "split_count_by_index_property must not be empty".to_string(), + ), + )); + } + + // Check that the property exists in the document type schema + if document_type + .properties() + .get(split_count_by_index_property.as_str()) + .is_none() + { + return Ok(QueryValidationResult::new_with_error( + QueryError::InvalidArgument(format!( + "property {} not found in document type {}", + split_count_by_index_property, document_type_name + )), + )); + } + + let where_clause = if r#where.is_empty() { + Value::Null + } else { + check_validation_result_with_data!(ciborium::de::from_reader(r#where.as_slice()) + .map_err(|_| { + QueryError::Query(QuerySyntaxError::DeserializationError( + "unable to decode 'where' query from cbor".to_string(), + )) + })) + }; + + // Parse where clauses + let all_where_clauses: Vec = + check_validation_result_with_data!(match &where_clause { + Value::Null => Ok(vec![]), + Value::Array(clauses) => clauses + .iter() + .map(|wc| { + if let Value::Array(components) = wc { + WhereClause::from_components(components).map_err(|e| match e { + drive::error::Error::Query(qe) => QueryError::Query(qe), + other => QueryError::InvalidArgument(format!( + "error parsing where clauses: {}", + other + )), + }) + } else { + Err(QueryError::Query( + QuerySyntaxError::InvalidFormatWhereClause( + "where clause must be an array", + ), + )) + } + }) + .collect::, QueryError>>(), + _ => Err(QueryError::Query( + QuerySyntaxError::InvalidFormatWhereClause("where clause must be an array"), + )), + }); + + let response = if prove { + // For prove path, use the standard DriveDocumentQuery approach. + let mut drive_query = + check_validation_result_with_data!(DriveDocumentQuery::from_decomposed_values( + where_clause, + None, + Some(self.config.drive.default_query_limit), + None, + true, + None, + contract_ref, + document_type, + &self.config.drive, + )); + + // Same defensive cap as on the total-count handler; see the + // matching note there. + drive_query.limit = Some(u16::MAX); + + let proof = + match drive_query.execute_with_proof(&self.drive, None, None, platform_version) { + Ok(result) => result.0, + Err(drive::error::Error::Query(query_error)) => { + return Ok(QueryValidationResult::new_with_error(QueryError::Query( + query_error, + ))); + } + Err(e) => return Err(e.into()), + }; + + let (grovedb_used, proof) = + self.response_proof_v0(platform_state, proof, GroveDBToUse::Current)?; + + GetDocumentsSplitCountResponseV0 { + result: Some(get_documents_split_count_response_v0::Result::Proof(proof)), + metadata: Some(self.response_metadata_v0(platform_state, grovedb_used)), + } + } else { + // Same operator restriction as the total-count fast path. + if DriveDocumentCountQuery::has_unsupported_operator(&all_where_clauses) { + return Ok(QueryValidationResult::new_with_error( + QueryError::InvalidArgument( + "split count query supports only `==` and `in` where-clause operators; \ + range operators (`>`, `<`, `between`, `startsWith`) are not yet \ + supported on the no-prove path" + .to_string(), + ), + )); + } + + // For no-prove path, use CountTree-based approach. + // Find a countable index where the split property follows the where clause + // properties in the index. + let countable_index = DriveDocumentCountQuery::find_countable_index_for_split( + document_type.indexes(), + &all_where_clauses, + &split_count_by_index_property, + ); + + let entries = if let Some(index) = countable_index { + let count_query = DriveDocumentCountQuery { + document_type, + contract_id: contract_id.to_buffer(), + document_type_name: document_type_name.clone(), + index, + where_clauses: all_where_clauses, + split_by_property: Some(split_count_by_index_property), + }; + + let results = count_query.execute_no_proof(&self.drive, None, platform_version)?; + + results + .into_iter() + .map( + |entry| get_documents_split_count_response_v0::SplitCountEntry { + key: entry.key, + count: entry.count, + }, + ) + .collect() + } else { + return Ok(QueryValidationResult::new_with_error( + QueryError::InvalidArgument( + "split count query requires a countable index where the split property \ + follows the where clause properties in the index" + .to_string(), + ), + )); + }; + + GetDocumentsSplitCountResponseV0 { + result: Some(get_documents_split_count_response_v0::Result::SplitCounts( + get_documents_split_count_response_v0::SplitCounts { entries }, + )), + metadata: Some(self.response_metadata_v0(platform_state, CheckpointUsed::Current)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::query::tests::{setup_platform, store_data_contract, store_document}; + use dpp::dashcore::Network; + use dpp::data_contract::document_type::random_document::CreateRandomDocument; + use dpp::tests::json_document::json_document_to_contract_with_ids; + use rand::rngs::StdRng; + use rand::SeedableRng; + + #[test] + fn test_documents_split_count_no_prove() { + let (platform, state, version) = setup_platform(None, Network::Testnet, None); + + let platform_version = PlatformVersion::latest(); + + let data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/family/family-contract-countable.json", + None, + None, + false, + platform_version, + ) + .expect("expected to get json based contract"); + + store_data_contract(&platform, &data_contract, version); + + let data_contract_id = data_contract.id(); + let document_type_name = "person"; + let document_type = data_contract + .document_type_for_name(document_type_name) + .expect("expected document type"); + + let mut std_rng = StdRng::seed_from_u64(600); + for _ in 0..5 { + let random_document = document_type + .random_document_with_rng(&mut std_rng, platform_version) + .expect("expected to get random document"); + store_document( + &platform, + &data_contract, + document_type, + &random_document, + platform_version, + ); + } + + let request = GetDocumentsSplitCountRequestV0 { + data_contract_id: data_contract_id.to_vec(), + document_type: document_type_name.to_string(), + r#where: vec![], + split_count_by_index_property: "firstName".to_string(), + prove: false, + }; + + let result = platform + .query_documents_split_count_v0(request, &state, version) + .expect("expected query to succeed"); + + assert!(result.errors.is_empty(), "errors: {:?}", result.errors); + + match result.data { + Some(GetDocumentsSplitCountResponseV0 { + result: + Some(get_documents_split_count_response_v0::Result::SplitCounts(split_counts)), + metadata: Some(_), + }) => { + // The total count across all splits should equal 5 + let total: u64 = split_counts.entries.iter().map(|e| e.count).sum(); + assert_eq!(total, 5, "expected total split count of 5 documents"); + // Each entry should have a non-empty key (firstName is required) + for entry in &split_counts.entries { + assert!(!entry.key.is_empty(), "expected non-empty split key"); + assert!(entry.count > 0, "expected positive count per split"); + } + } + other => panic!("expected split counts result, got {:?}", other), + } + } + + #[test] + fn test_documents_split_count_with_prove() { + let (platform, state, version) = setup_platform(None, Network::Testnet, None); + + let platform_version = PlatformVersion::latest(); + + let data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/family/family-contract-countable.json", + None, + None, + false, + platform_version, + ) + .expect("expected to get json based contract"); + + store_data_contract(&platform, &data_contract, version); + + let data_contract_id = data_contract.id(); + let document_type_name = "person"; + let document_type = data_contract + .document_type_for_name(document_type_name) + .expect("expected document type"); + + let mut std_rng = StdRng::seed_from_u64(600); + for _ in 0..3 { + let random_document = document_type + .random_document_with_rng(&mut std_rng, platform_version) + .expect("expected to get random document"); + store_document( + &platform, + &data_contract, + document_type, + &random_document, + platform_version, + ); + } + + let request = GetDocumentsSplitCountRequestV0 { + data_contract_id: data_contract_id.to_vec(), + document_type: document_type_name.to_string(), + r#where: vec![], + split_count_by_index_property: "firstName".to_string(), + prove: true, + }; + + let result = platform + .query_documents_split_count_v0(request, &state, version) + .expect("expected query to succeed"); + + assert!(result.errors.is_empty(), "errors: {:?}", result.errors); + + assert!(matches!( + result.data, + Some(GetDocumentsSplitCountResponseV0 { + result: Some(get_documents_split_count_response_v0::Result::Proof(_)), + metadata: Some(_), + }) + )); + } + + #[test] + fn test_documents_split_count_empty_split_property() { + let (platform, state, version) = setup_platform(None, Network::Testnet, None); + + let platform_version = PlatformVersion::latest(); + + let data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/family/family-contract-countable.json", + None, + None, + false, + platform_version, + ) + .expect("expected to get json based contract"); + + store_data_contract(&platform, &data_contract, version); + + let data_contract_id = data_contract.id(); + let document_type_name = "person"; + + let request = GetDocumentsSplitCountRequestV0 { + data_contract_id: data_contract_id.to_vec(), + document_type: document_type_name.to_string(), + r#where: vec![], + split_count_by_index_property: "".to_string(), + prove: false, + }; + + let result = platform + .query_documents_split_count_v0(request, &state, version) + .expect("expected query to succeed"); + + assert!(matches!( + result.errors.as_slice(), + [QueryError::InvalidArgument(msg)] if msg == "split_count_by_index_property must not be empty" + )); + } + + fn serialize_where_clauses_to_cbor(where_clauses: Vec) -> Vec { + use ciborium::value::Value as CborValue; + let cbor: CborValue = TryInto::::try_into(Value::Array(where_clauses)) + .expect("expected to convert where clauses to cbor value"); + let mut out = Vec::new(); + ciborium::ser::into_writer(&cbor, &mut out).expect("expected to serialize where clauses"); + out + } + + fn store_person_document( + platform: &crate::test::helpers::setup::TempPlatform, + data_contract: &dpp::prelude::DataContract, + id: [u8; 32], + first_name: &str, + last_name: &str, + age: u64, + platform_version: &PlatformVersion, + ) { + use dpp::document::{Document, DocumentV0}; + use std::collections::BTreeMap; + + let document_type = data_contract + .document_type_for_name("person") + .expect("expected document type"); + + let mut properties = BTreeMap::new(); + properties.insert("firstName".to_string(), Value::Text(first_name.to_string())); + properties.insert("lastName".to_string(), Value::Text(last_name.to_string())); + properties.insert("age".to_string(), Value::U64(age)); + + let document: Document = DocumentV0 { + id: Identifier::from(id), + owner_id: Identifier::from([0u8; 32]), + properties, + revision: None, + created_at: None, + updated_at: None, + transferred_at: None, + created_at_block_height: None, + updated_at_block_height: None, + transferred_at_block_height: None, + created_at_core_block_height: None, + updated_at_core_block_height: None, + transferred_at_core_block_height: None, + creator_id: None, + } + .into(); + + store_document( + platform, + data_contract, + document_type, + &document, + platform_version, + ); + } + + #[test] + fn test_documents_split_count_with_in_prefix() { + let (platform, state, version) = setup_platform(None, Network::Testnet, None); + let platform_version = PlatformVersion::latest(); + + let data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/family/family-contract-countable.json", + None, + None, + false, + platform_version, + ) + .expect("expected to get json based contract"); + + store_data_contract(&platform, &data_contract, version); + + // firstName IN ["Alice", "Bob"] split by lastName. + // Smith=3 (Alice+Alice+Bob), Jones=2 (Alice+Bob); Carol/Doe excluded. + store_person_document( + &platform, + &data_contract, + [1u8; 32], + "Alice", + "Smith", + 30, + platform_version, + ); + store_person_document( + &platform, + &data_contract, + [2u8; 32], + "Alice", + "Smith", + 31, + platform_version, + ); + store_person_document( + &platform, + &data_contract, + [3u8; 32], + "Bob", + "Smith", + 32, + platform_version, + ); + store_person_document( + &platform, + &data_contract, + [4u8; 32], + "Alice", + "Jones", + 33, + platform_version, + ); + store_person_document( + &platform, + &data_contract, + [5u8; 32], + "Bob", + "Jones", + 34, + platform_version, + ); + store_person_document( + &platform, + &data_contract, + [6u8; 32], + "Carol", + "Doe", + 35, + platform_version, + ); + + let where_clauses = vec![Value::Array(vec![ + Value::Text("firstName".to_string()), + Value::Text("in".to_string()), + Value::Array(vec![ + Value::Text("Alice".to_string()), + Value::Text("Bob".to_string()), + ]), + ])]; + + let request = GetDocumentsSplitCountRequestV0 { + data_contract_id: data_contract.id().to_vec(), + document_type: "person".to_string(), + r#where: serialize_where_clauses_to_cbor(where_clauses), + split_count_by_index_property: "lastName".to_string(), + prove: false, + }; + + let result = platform + .query_documents_split_count_v0(request, &state, version) + .expect("expected query to succeed"); + + assert!(result.errors.is_empty(), "errors: {:?}", result.errors); + + match result.data { + Some(GetDocumentsSplitCountResponseV0 { + result: + Some(get_documents_split_count_response_v0::Result::SplitCounts(split_counts)), + metadata: Some(_), + }) => { + let total: u64 = split_counts.entries.iter().map(|e| e.count).sum(); + assert_eq!( + total, 5, + "expected total of 5 (3 Smith + 2 Jones, Carol/Doe excluded)" + ); + assert_eq!( + split_counts.entries.len(), + 2, + "expected 2 split entries (Smith and Jones)" + ); + for entry in &split_counts.entries { + assert!(entry.count > 0); + } + } + other => panic!("expected split counts result, got {:?}", other), + } + } + + #[test] + fn test_documents_split_count_rejects_range_operator() { + let (platform, state, version) = setup_platform(None, Network::Testnet, None); + let platform_version = PlatformVersion::latest(); + + let data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/family/family-contract-countable.json", + None, + None, + false, + platform_version, + ) + .expect("expected to get json based contract"); + + store_data_contract(&platform, &data_contract, version); + + // [["age", ">=", 30]] — range operator, must be rejected on no-prove path. + let where_clauses = vec![Value::Array(vec![ + Value::Text("age".to_string()), + Value::Text(">=".to_string()), + Value::U64(30), + ])]; + + let request = GetDocumentsSplitCountRequestV0 { + data_contract_id: data_contract.id().to_vec(), + document_type: "person".to_string(), + r#where: serialize_where_clauses_to_cbor(where_clauses), + split_count_by_index_property: "firstName".to_string(), + prove: false, + }; + + let result = platform + .query_documents_split_count_v0(request, &state, version) + .expect("expected query to return validation error"); + + assert!( + matches!( + result.errors.as_slice(), + [QueryError::InvalidArgument(msg)] if msg.contains("range operators") && msg.contains("not yet") + ), + "expected range-operator rejection, got {:?}", + result.errors + ); + } + + #[test] + fn test_documents_split_count_nonexistent_property() { + let (platform, state, version) = setup_platform(None, Network::Testnet, None); + + let platform_version = PlatformVersion::latest(); + + let data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/family/family-contract-countable.json", + None, + None, + false, + platform_version, + ) + .expect("expected to get json based contract"); + + store_data_contract(&platform, &data_contract, version); + + let data_contract_id = data_contract.id(); + let document_type_name = "person"; + + let request = GetDocumentsSplitCountRequestV0 { + data_contract_id: data_contract_id.to_vec(), + document_type: document_type_name.to_string(), + r#where: vec![], + split_count_by_index_property: "nonExistentProp".to_string(), + prove: false, + }; + + let result = platform + .query_documents_split_count_v0(request, &state, version) + .expect("expected query to succeed"); + + assert!(matches!( + result.errors.as_slice(), + [QueryError::InvalidArgument(msg)] if msg.contains("property nonExistentProp not found") + )); + } +} diff --git a/packages/rs-drive-abci/src/query/mod.rs b/packages/rs-drive-abci/src/query/mod.rs index e3cc7911f1f..e87aaf112a0 100644 --- a/packages/rs-drive-abci/src/query/mod.rs +++ b/packages/rs-drive-abci/src/query/mod.rs @@ -1,6 +1,8 @@ mod address_funds; mod data_contract_based_queries; +mod document_count_query; mod document_query; +mod document_split_count_query; mod group_queries; mod identity_based_queries; mod prefunded_specialized_balances; diff --git a/packages/rs-drive-abci/src/query/service.rs b/packages/rs-drive-abci/src/query/service.rs index 5bf6259fa6d..4a5aceb2f3f 100644 --- a/packages/rs-drive-abci/src/query/service.rs +++ b/packages/rs-drive-abci/src/query/service.rs @@ -22,13 +22,15 @@ use dapi_grpc::platform::v0::{ GetContestedResourcesRequest, GetContestedResourcesResponse, GetCurrentQuorumsInfoRequest, GetCurrentQuorumsInfoResponse, GetDataContractHistoryRequest, GetDataContractHistoryResponse, GetDataContractRequest, GetDataContractResponse, GetDataContractsRequest, - GetDataContractsResponse, GetDocumentsRequest, GetDocumentsResponse, GetEpochsInfoRequest, - GetEpochsInfoResponse, GetEvonodesProposedEpochBlocksByIdsRequest, - GetEvonodesProposedEpochBlocksByRangeRequest, GetEvonodesProposedEpochBlocksResponse, - GetFinalizedEpochInfosRequest, GetFinalizedEpochInfosResponse, GetGroupActionSignersRequest, - GetGroupActionSignersResponse, GetGroupActionsRequest, GetGroupActionsResponse, - GetGroupInfoRequest, GetGroupInfoResponse, GetGroupInfosRequest, GetGroupInfosResponse, - GetIdentitiesBalancesRequest, GetIdentitiesBalancesResponse, GetIdentitiesContractKeysRequest, + GetDataContractsResponse, GetDocumentsCountRequest, GetDocumentsCountResponse, + GetDocumentsRequest, GetDocumentsResponse, GetDocumentsSplitCountRequest, + GetDocumentsSplitCountResponse, GetEpochsInfoRequest, GetEpochsInfoResponse, + GetEvonodesProposedEpochBlocksByIdsRequest, GetEvonodesProposedEpochBlocksByRangeRequest, + GetEvonodesProposedEpochBlocksResponse, GetFinalizedEpochInfosRequest, + GetFinalizedEpochInfosResponse, GetGroupActionSignersRequest, GetGroupActionSignersResponse, + GetGroupActionsRequest, GetGroupActionsResponse, GetGroupInfoRequest, GetGroupInfoResponse, + GetGroupInfosRequest, GetGroupInfosResponse, GetIdentitiesBalancesRequest, + GetIdentitiesBalancesResponse, GetIdentitiesContractKeysRequest, GetIdentitiesContractKeysResponse, GetIdentitiesTokenBalancesRequest, GetIdentitiesTokenBalancesResponse, GetIdentitiesTokenInfosRequest, GetIdentitiesTokenInfosResponse, GetIdentityBalanceAndRevisionRequest, @@ -405,6 +407,30 @@ impl PlatformService for QueryService { .await } + async fn get_documents_count( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_documents_count, + "get_documents_count", + ) + .await + } + + async fn get_documents_split_count( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_documents_split_count, + "get_documents_split_count", + ) + .await + } + async fn get_identity_by_public_key_hash( &self, request: Request, diff --git a/packages/rs-drive-abci/tests/supporting_files/contract/family/family-contract-countable.json b/packages/rs-drive-abci/tests/supporting_files/contract/family/family-contract-countable.json index d63d8dc3761..c75fca2634b 100644 --- a/packages/rs-drive-abci/tests/supporting_files/contract/family/family-contract-countable.json +++ b/packages/rs-drive-abci/tests/supporting_files/contract/family/family-contract-countable.json @@ -13,6 +13,21 @@ { "firstName": "asc" } ], "countable": true + }, + { + "name": "byFirstNameLastName", + "properties": [ + { "firstName": "asc" }, + { "lastName": "asc" } + ], + "countable": true + }, + { + "name": "byAge", + "properties": [ + { "age": "asc" } + ], + "countable": true } ], "properties": { @@ -20,9 +35,18 @@ "type": "string", "maxLength": 50, "position": 0 + }, + "lastName": { + "type": "string", + "maxLength": 50, + "position": 1 + }, + "age": { + "type": "integer", + "position": 2 } }, - "required": ["firstName"], + "required": ["firstName", "lastName", "age"], "additionalProperties": false } } diff --git a/packages/rs-drive-proof-verifier/src/lib.rs b/packages/rs-drive-proof-verifier/src/lib.rs index 5790b842a93..955fa0602dd 100644 --- a/packages/rs-drive-proof-verifier/src/lib.rs +++ b/packages/rs-drive-proof-verifier/src/lib.rs @@ -9,6 +9,8 @@ mod proof; pub mod types; mod verify; pub use error::Error; +pub use proof::document_count::DocumentCount; +pub use proof::document_split_count::DocumentSplitCounts; pub use proof::{FromProof, Length}; // Re-export context provider types from dash-context-provider diff --git a/packages/rs-drive-proof-verifier/src/proof.rs b/packages/rs-drive-proof-verifier/src/proof.rs index b32e5591d81..8c485e87358 100644 --- a/packages/rs-drive-proof-verifier/src/proof.rs +++ b/packages/rs-drive-proof-verifier/src/proof.rs @@ -1,3 +1,5 @@ +pub mod document_count; +pub mod document_split_count; pub mod groups; pub mod identity_token_balance; pub mod token_contract_info; diff --git a/packages/rs-drive-proof-verifier/src/proof/document_count.rs b/packages/rs-drive-proof-verifier/src/proof/document_count.rs new file mode 100644 index 00000000000..46065aeae4c --- /dev/null +++ b/packages/rs-drive-proof-verifier/src/proof/document_count.rs @@ -0,0 +1,57 @@ +use crate::error::MapGroveDbError; +use crate::verify::verify_tenderdash_proof; +use crate::{ContextProvider, Error, FromProof}; +use dapi_grpc::platform::v0::{GetDocumentsCountResponse, Proof, ResponseMetadata}; +use dapi_grpc::platform::VersionedGrpcResponse; +use dpp::dashcore::Network; +use dpp::version::PlatformVersion; +use drive::query::DriveDocumentQuery; + +/// The count of documents matching a query, verified from proof. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct DocumentCount(pub u64); + +impl<'dq, Q> FromProof for DocumentCount +where + Q: TryInto> + Clone + 'dq, + Q::Error: std::fmt::Display, +{ + type Request = Q; + type Response = GetDocumentsCountResponse; + + fn maybe_from_proof_with_metadata<'a, I: Into, O: Into>( + request: I, + response: O, + _network: Network, + platform_version: &PlatformVersion, + provider: &'a dyn ContextProvider, + ) -> Result<(Option, ResponseMetadata, Proof), Error> + where + Self: 'a, + { + let request: Self::Request = request.into(); + let response: Self::Response = response.into(); + + let request: DriveDocumentQuery<'dq> = + request + .clone() + .try_into() + .map_err(|e: Q::Error| Error::RequestError { + error: e.to_string(), + })?; + + // Parse response to read proof and metadata + let proof = response.proof().or(Err(Error::NoProofInResult))?; + let mtd = response.metadata().or(Err(Error::EmptyResponseMetadata))?; + + let (root_hash, documents) = request + .verify_proof(&proof.grovedb_proof, platform_version) + .map_drive_error(proof, mtd)?; + + let count = documents.len() as u64; + + verify_tenderdash_proof(proof, mtd, &root_hash, provider)?; + + Ok((Some(DocumentCount(count)), mtd.clone(), proof.clone())) + } +} diff --git a/packages/rs-drive-proof-verifier/src/proof/document_split_count.rs b/packages/rs-drive-proof-verifier/src/proof/document_split_count.rs new file mode 100644 index 00000000000..7b1277e9577 --- /dev/null +++ b/packages/rs-drive-proof-verifier/src/proof/document_split_count.rs @@ -0,0 +1,157 @@ +use crate::error::MapGroveDbError; +use crate::verify::verify_tenderdash_proof; +use crate::{ContextProvider, Error, FromProof}; +use dapi_grpc::platform::v0::{GetDocumentsSplitCountResponse, Proof, ResponseMetadata}; +use dapi_grpc::platform::VersionedGrpcResponse; +use dpp::dashcore::Network; +use dpp::data_contract::document_type::methods::DocumentTypeV0Methods; +use dpp::document::Document; +use dpp::document::DocumentV0Getters; +use dpp::version::PlatformVersion; +use drive::query::DriveDocumentQuery; +use std::collections::BTreeMap; + +/// The split counts of documents matching a query, verified from proof. +/// Maps property value bytes to count. +/// +/// The keys are the byte form of each split-property value as produced by +/// [`DocumentTypeBasicMethods::serialize_value_for_key`], so they line up +/// with the keys returned on the no-proof / CountTree path. +#[derive(Debug, Clone, PartialEq, Eq, Default)] +pub struct DocumentSplitCounts(pub BTreeMap, u64>); + +/// Reject the generic [`FromProof`] entry point for [`DocumentSplitCounts`]. +/// +/// Splitting requires the split-property name, which isn't carried by +/// `DriveDocumentQuery`. Earlier versions of this impl silently returned an +/// empty map under proof, which made `prove=true` callers think there were +/// zero documents per group. To stop that footgun, the generic +/// [`FromProof`] now returns an explicit error; SDK-level callers must use +/// [`DocumentSplitCounts::maybe_from_proof_with_split_property`] (or, in +/// `rs-sdk`, the [`Fetch`](dash_sdk::platform::Fetch) impl on +/// `DocumentSplitCountQuery`) which threads the split property through. +impl<'dq, Q> FromProof for DocumentSplitCounts +where + Q: TryInto> + Clone + 'dq, + Q::Error: std::fmt::Display, +{ + type Request = Q; + type Response = GetDocumentsSplitCountResponse; + + fn maybe_from_proof_with_metadata<'a, I: Into, O: Into>( + _request: I, + _response: O, + _network: Network, + _platform_version: &PlatformVersion, + _provider: &'a dyn ContextProvider, + ) -> Result<(Option, ResponseMetadata, Proof), Error> + where + Self: 'a, + { + Err(Error::RequestError { + error: "DocumentSplitCounts requires a split-property; call \ + DocumentSplitCounts::maybe_from_proof_with_split_property \ + (or use the rs-sdk Fetch impl on DocumentSplitCountQuery)" + .to_string(), + }) + } +} + +impl DocumentSplitCounts { + /// Verify a `GetDocumentsSplitCount` proof and aggregate the verified + /// documents into per-key counts using `split_property` as the grouping + /// key. + /// + /// `Q` is anything that can be turned into a [`DriveDocumentQuery`] — + /// typically a `DocumentSplitCountQuery` from `rs-sdk` or a + /// `DriveDocumentQuery` directly. + /// + /// Returns `(Some(splits), metadata, proof)` even when no documents + /// matched (in which case `splits.0` is empty). + pub fn maybe_from_proof_with_split_property<'dq, 'a, Q, I, O>( + request: I, + split_property: &str, + response: O, + _network: Network, + platform_version: &PlatformVersion, + provider: &'a dyn ContextProvider, + ) -> Result<(Option, ResponseMetadata, Proof), Error> + where + Q: TryInto> + Clone + 'dq, + Q::Error: std::fmt::Display, + I: Into, + O: Into, + Self: 'a, + { + let request: Q = request.into(); + let response: GetDocumentsSplitCountResponse = response.into(); + + let drive_query: DriveDocumentQuery<'dq> = + request + .clone() + .try_into() + .map_err(|e: Q::Error| Error::RequestError { + error: e.to_string(), + })?; + + let proof = response.proof().or(Err(Error::NoProofInResult))?; + let mtd = response.metadata().or(Err(Error::EmptyResponseMetadata))?; + + let (root_hash, documents) = drive_query + .verify_proof(&proof.grovedb_proof, platform_version) + .map_drive_error(proof, mtd)?; + + verify_tenderdash_proof(proof, mtd, &root_hash, provider)?; + + let aggregated = aggregate_documents_by_property( + &documents, + drive_query.document_type, + split_property, + platform_version, + )?; + + Ok(( + Some(DocumentSplitCounts(aggregated)), + mtd.clone(), + proof.clone(), + )) + } +} + +/// Group documents by the byte-encoded value of `split_property` and return +/// the per-key counts. Documents that don't carry the property are skipped +/// (mirroring the server-side CountTree path, which only counts documents +/// whose primary-key tree path includes the property). +fn aggregate_documents_by_property( + documents: &[Document], + document_type: dpp::data_contract::document_type::DocumentTypeRef<'_>, + split_property: &str, + platform_version: &PlatformVersion, +) -> Result, u64>, Error> { + let mut counts: BTreeMap, u64> = BTreeMap::new(); + + for document in documents { + let value = match document.properties().get(split_property) { + Some(v) => v, + None => continue, + }; + + let key = document_type + .serialize_value_for_key(split_property, value, platform_version) + .map_err(|e| Error::ResponseDecodeError { + error: format!( + "Failed to serialize split property `{}` for grouping: {}", + split_property, e + ), + })?; + + *counts.entry(key).or_insert(0) += 1; + } + + Ok(counts) +} + +// Aggregation unit tests live in higher-level crates with full test fixtures: +// - SDK: packages/rs-sdk/tests/fetch/document_split_count.rs +// - drive-abci: src/query/document_split_count_query/v0/mod.rs tests +// (drive-proof-verifier's feature surface doesn't expose dpp test helpers) diff --git a/packages/rs-drive/src/drive/document/delete/remove_reference_for_index_level_for_contract_operations/v0/mod.rs b/packages/rs-drive/src/drive/document/delete/remove_reference_for_index_level_for_contract_operations/v0/mod.rs index e05348b32de..bdba7ee465e 100644 --- a/packages/rs-drive/src/drive/document/delete/remove_reference_for_index_level_for_contract_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/delete/remove_reference_for_index_level_for_contract_operations/v0/mod.rs @@ -5,8 +5,8 @@ use grovedb::EstimatedLayerCount::PotentiallyAtMaxElements; use grovedb::EstimatedLayerSizes::{AllReference, AllSubtrees}; use grovedb::{EstimatedLayerInformation, MaybeTree, TransactionArg, TreeType}; -use dpp::data_contract::document_type::IndexLevelTypeInfo; use dpp::data_contract::document_type::IndexType::{ContestedResourceIndex, NonUniqueIndex}; +use dpp::data_contract::document_type::{IndexCountability, IndexLevelTypeInfo}; use grovedb::EstimatedSumTrees::NoSumTrees; use std::collections::HashMap; @@ -59,10 +59,12 @@ impl Drive { { key_info_path.push(KnownKey(vec![0])); - let reference_tree_type = if index_type.countable { - TreeType::CountTree - } else { - TreeType::NormalTree + // Mirror the insert path: tree variant is driven by the index's + // countability. See `add_reference_for_index_level_for_contract_operations`. + let reference_tree_type = match index_type.countable { + IndexCountability::NotCountable => TreeType::NormalTree, + IndexCountability::Countable => TreeType::CountTree, + IndexCountability::CountableAllowingOffset => TreeType::ProvableCountTree, }; if let Some(estimated_costs_only_with_layer_info) = estimated_costs_only_with_layer_info diff --git a/packages/rs-drive/src/drive/document/insert/add_reference_for_index_level_for_contract_operations/v0/mod.rs b/packages/rs-drive/src/drive/document/insert/add_reference_for_index_level_for_contract_operations/v0/mod.rs index 2a9ddf9bde4..756c584dc80 100644 --- a/packages/rs-drive/src/drive/document/insert/add_reference_for_index_level_for_contract_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/insert/add_reference_for_index_level_for_contract_operations/v0/mod.rs @@ -16,7 +16,7 @@ use crate::util::object_size_info::{DocumentAndContractInfo, PathInfo, PathKeyEl use crate::util::storage_flags::StorageFlags; use crate::util::type_constants::DEFAULT_HASH_SIZE_U8; use dpp::data_contract::document_type::methods::DocumentTypeBasicMethods; -use dpp::data_contract::document_type::IndexLevelTypeInfo; +use dpp::data_contract::document_type::{IndexCountability, IndexLevelTypeInfo}; use dpp::document::DocumentV0Getters; use dpp::version::drive_versions::DriveVersion; use grovedb::batch::key_info::KeyInfo; @@ -50,11 +50,15 @@ impl Drive { return Ok(()); } - // if index is countable, we should use count trees, so we can get the count of elements - let reference_tree_type = if index_type.countable { - TreeType::CountTree - } else { - TreeType::NormalTree + // The terminal reference's tree type is driven by the index's countability: + // `NotCountable` keeps a plain `NormalTree`; `Countable` uses a `CountTree` + // so totals are O(1) at the root; `CountableAllowingOffset` uses a + // `ProvableCountTree` so future range / offset queries can walk per-node + // counts. + let reference_tree_type = match index_type.countable { + IndexCountability::NotCountable => TreeType::NormalTree, + IndexCountability::Countable => TreeType::CountTree, + IndexCountability::CountableAllowingOffset => TreeType::ProvableCountTree, }; // unique indexes will be stored under key "0" diff --git a/packages/rs-drive/src/query/drive_document_count_query/mod.rs b/packages/rs-drive/src/query/drive_document_count_query/mod.rs new file mode 100644 index 00000000000..e7a34ae3f5f --- /dev/null +++ b/packages/rs-drive/src/query/drive_document_count_query/mod.rs @@ -0,0 +1,742 @@ +use std::collections::{BTreeMap, BTreeSet}; + +#[cfg(feature = "server")] +use crate::drive::Drive; +#[cfg(feature = "server")] +use crate::error::query::QuerySyntaxError; +#[cfg(feature = "server")] +use crate::error::Error; +#[cfg(feature = "server")] +use crate::util::grove_operations::DirectQueryType; +#[cfg(feature = "server")] +use dpp::version::drive_versions::DriveVersion; +#[cfg(feature = "server")] +use grovedb::query_result_type::QueryResultType; +#[cfg(feature = "server")] +use grovedb::{PathQuery, Query, SizedQuery, TransactionArg}; +#[cfg(feature = "server")] +use grovedb_path::SubtreePath; + +#[cfg(feature = "server")] +use crate::drive::RootTree; +#[cfg(feature = "server")] +use dpp::data_contract::document_type::methods::DocumentTypeV0Methods; +#[cfg(feature = "server")] +use dpp::data_contract::document_type::IndexProperty; +use dpp::data_contract::document_type::{DocumentTypeRef, Index}; +#[cfg(feature = "server")] +use dpp::version::PlatformVersion; + +use super::conditions::{WhereClause, WhereOperator}; + +#[cfg(feature = "server")] +#[cfg(test)] +mod tests; + +/// A query to count documents using CountTree elements in the index path. +/// +/// This struct encapsulates all the information needed to perform a count +/// query on a document type's countable index, including optional split-by +/// functionality for getting per-value counts. +#[derive(Debug, Clone)] +pub struct DriveDocumentCountQuery<'a> { + /// The document type to count + pub document_type: DocumentTypeRef<'a>, + /// The contract id (32 bytes) + pub contract_id: [u8; 32], + /// The document type name + pub document_type_name: String, + /// The countable index to use + pub index: &'a Index, + /// The equality where clauses that match index prefix properties + pub where_clauses: Vec, + /// Optional property to split counts by. When set, returns per-value + /// counts for this property instead of a single total count. + pub split_by_property: Option, +} + +/// An entry in a split count result, containing the serialized key +/// and the count of documents matching that key value. +#[derive(Debug, Clone, PartialEq)] +pub struct SplitCountEntry { + /// The serialized key bytes for this value + pub key: Vec, + /// The count of documents matching this key value + pub count: u64, +} + +impl<'a> DriveDocumentCountQuery<'a> { + /// Returns `true` if the where-clause operator is one the count fast path + /// can serve via point-lookups in a CountTree. + /// + /// Today that's `Equal` (one path) and `In` (cartesian fork over the listed + /// values). Range operators (`>`, `<`, `Between*`, `StartsWith`) need a + /// boundary walk that the current PathQuery infrastructure cannot express; + /// callers detect those via [`Self::has_unsupported_operator`] and surface + /// an error instead of silently returning a wrong count. + fn is_indexable_for_count(op: WhereOperator) -> bool { + matches!(op, WhereOperator::Equal | WhereOperator::In) + } + + /// Returns `true` if any where clause uses an operator the count fast path + /// cannot serve. Callers should treat this as a query-rejection signal. + pub fn has_unsupported_operator(where_clauses: &[WhereClause]) -> bool { + where_clauses + .iter() + .any(|wc| !Self::is_indexable_for_count(wc.operator)) + } + + /// Finds a countable index whose properties form a prefix that matches the + /// indexable (Equal / In) where-clause fields. For a count query: + /// - All indexable where-clause fields must appear as a prefix of the index properties + /// - The index must have `countable = true` + /// - Returns `None` if any where clause uses an operator other than `Equal` / `In` + /// - Among matching indexes, we prefer the one with the most properties + /// matched by where clauses (most specific) + pub fn find_countable_index_for_where_clauses<'b>( + indexes: &'b BTreeMap, + where_clauses: &[WhereClause], + ) -> Option<&'b Index> { + if Self::has_unsupported_operator(where_clauses) { + return None; + } + + let indexable_fields: BTreeSet<&str> = where_clauses + .iter() + .filter(|wc| Self::is_indexable_for_count(wc.operator)) + .map(|wc| wc.field.as_str()) + .collect(); + + let mut best_match: Option<(&Index, usize)> = None; + + for index in indexes.values() { + if !index.countable.is_countable() { + continue; + } + + // Check that the indexable where-clause fields form a prefix of + // the index properties. + let mut prefix_len = 0; + for prop in &index.properties { + if indexable_fields.contains(prop.name.as_str()) { + prefix_len += 1; + } else { + break; + } + } + + // All indexable where-clause fields must be consumed as a prefix. + if prefix_len < indexable_fields.len() { + continue; + } + + // Prefer the index with the longest matching prefix (most specific). + match &best_match { + None => best_match = Some((index, prefix_len)), + Some((_, best_len)) if prefix_len > *best_len => { + best_match = Some((index, prefix_len)); + } + _ => {} + } + } + + best_match.map(|(index, _)| index) + } + + /// Finds a countable index where: + /// - The indexable (Equal / In) where-clause fields form a prefix of the index properties + /// - The `split_property` is the next property after the covered prefix + /// - The index has `countable = true` + /// - Returns `None` if any where clause uses an operator other than `Equal` / `In` + pub fn find_countable_index_for_split<'b>( + indexes: &'b BTreeMap, + where_clauses: &[WhereClause], + split_property: &str, + ) -> Option<&'b Index> { + if Self::has_unsupported_operator(where_clauses) { + return None; + } + + let indexable_fields: BTreeSet<&str> = where_clauses + .iter() + .filter(|wc| Self::is_indexable_for_count(wc.operator)) + .map(|wc| wc.field.as_str()) + .collect(); + + for index in indexes.values() { + if !index.countable.is_countable() { + continue; + } + + // Check that indexable where-clause fields form a prefix. + let mut prefix_len = 0; + for prop in &index.properties { + if indexable_fields.contains(prop.name.as_str()) { + prefix_len += 1; + } else { + break; + } + } + + if prefix_len < indexable_fields.len() { + continue; + } + + // The split property must be the next property after the prefix. + if let Some(next_prop) = index.properties.get(prefix_len) { + if next_prop.name == split_property { + return Some(index); + } + } + } + + None + } + + /// Executes the count query without generating a proof. + /// + /// When `split_by_property` is `None`, returns the total count as a single + /// `SplitCountEntry` with an empty key. + /// + /// When `split_by_property` is `Some`, returns per-value counts for the + /// split property. + #[cfg(feature = "server")] + pub fn execute_no_proof( + &self, + drive: &Drive, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + if self.split_by_property.is_some() { + self.execute_split_count(drive, transaction, platform_version) + } else { + let count = self.execute_total_count(drive, transaction, platform_version)?; + Ok(vec![SplitCountEntry { key: vec![], count }]) + } + } + + /// Executes the count query and generates a GroveDB proof. + /// + /// Returns the raw proof bytes. The caller is responsible for verifying + /// the proof and extracting the count from the verified result. + #[cfg(feature = "server")] + pub fn execute_with_proof( + &self, + drive: &Drive, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let drive_version = &platform_version.drive; + + // Build the same path as execute_no_proof + let mut path = vec![ + vec![RootTree::DataContractDocuments as u8], + self.contract_id.to_vec(), + vec![1u8], + self.document_type_name.as_bytes().to_vec(), + ]; + + // Walk the index properties, pushing property keys and equality values + for prop in &self.index.properties { + let matching_clause = self + .where_clauses + .iter() + .find(|wc| wc.field == prop.name && wc.operator == WhereOperator::Equal); + + if let Some(clause) = matching_clause { + path.push(prop.name.as_bytes().to_vec()); + let serialized_value = self.document_type.serialize_value_for_key( + prop.name.as_str(), + &clause.value, + platform_version, + )?; + path.push(serialized_value); + } else { + break; + } + } + + // Build a path query that covers the count tree and its contents + let mut query = Query::new(); + query.insert_all(); + + let path_query = PathQuery::new(path, SizedQuery::new(query, None, None)); + + let proof = drive + .grove + .get_proved_path_query(&path_query, None, transaction, &drive_version.grove_version) + .unwrap() + .map_err(|e| Error::GroveDB(Box::new(e)))?; + + Ok(proof) + } + + /// Executes the total count query, returning a single u64 count. + /// + /// Walks the index level-by-level, branching on `In` clauses (each value + /// adds a path) and falling through to [`Self::count_recursive`] for any + /// trailing index properties that have no matching where clause. + #[cfg(feature = "server")] + fn execute_total_count( + &self, + drive: &Drive, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + // Build the base path: [DataContractDocuments, contract_id, 1, doc_type_name] + let base_path = vec![ + vec![RootTree::DataContractDocuments as u8], + self.contract_id.to_vec(), + vec![1u8], + self.document_type_name.as_bytes().to_vec(), + ]; + + self.expand_paths_and_count(drive, base_path, 0, transaction, platform_version) + } + + /// Recursive helper for [`Self::execute_total_count`]. + /// + /// Visits the index property at `prop_idx`. If a matching where clause is + /// found: + /// - `Equal` → extend the current path with `(prop_name, value)` and recurse. + /// - `In` → for each value in the clause's array, clone the path, extend + /// with that value, recurse, and sum the per-branch counts. This is the + /// cartesian fork. + /// - anything else → unreachable; the index picker rejects the query. + /// + /// If no clause matches the current property, hand off to + /// [`Self::count_recursive`] which sums all sub-counts at the remaining + /// levels. + #[cfg(feature = "server")] + fn expand_paths_and_count( + &self, + drive: &Drive, + current_path: Vec>, + prop_idx: usize, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let drive_version = &platform_version.drive; + + if prop_idx == self.index.properties.len() { + // All index properties resolved to a fixed key — O(1) read. + return Self::fetch_count_at_path(drive, ¤t_path, transaction, drive_version); + } + + let prop = &self.index.properties[prop_idx]; + let matching_clause = self.where_clauses.iter().find(|wc| wc.field == prop.name); + + let Some(clause) = matching_clause else { + // No clause for this property. Walk all values at the remaining + // levels and sum. + let remaining = &self.index.properties[prop_idx..]; + return Self::count_recursive( + drive, + current_path, + remaining, + transaction, + drive_version, + ); + }; + + match clause.operator { + WhereOperator::Equal => { + let mut new_path = current_path; + new_path.push(prop.name.as_bytes().to_vec()); + new_path.push(self.document_type.serialize_value_for_key( + prop.name.as_str(), + &clause.value, + platform_version, + )?); + self.expand_paths_and_count( + drive, + new_path, + prop_idx + 1, + transaction, + platform_version, + ) + } + WhereOperator::In => { + let values = clause.value.as_array().ok_or_else(|| { + Error::Query(QuerySyntaxError::InvalidWhereClauseComponents( + "In where-clause value must be an array", + )) + })?; + + // `In` is set-membership: serialize each value to the canonical + // index key and dedupe before forking. Without this, a query + // like `age in [30, 30]` would visit and sum the same subtree + // twice (Codex review finding #3). + let mut seen_keys: BTreeSet> = BTreeSet::new(); + let mut total: u64 = 0; + for v in values { + let serialized = self.document_type.serialize_value_for_key( + prop.name.as_str(), + v, + platform_version, + )?; + if !seen_keys.insert(serialized.clone()) { + continue; + } + let mut new_path = current_path.clone(); + new_path.push(prop.name.as_bytes().to_vec()); + new_path.push(serialized); + total = total.saturating_add(self.expand_paths_and_count( + drive, + new_path, + prop_idx + 1, + transaction, + platform_version, + )?); + } + Ok(total) + } + _ => Err(Error::Query( + QuerySyntaxError::InvalidWhereClauseComponents( + "count fast path supports only Equal and In where-clause operators", + ), + )), + } + } + + /// Executes a split count query, returning per-value counts for the + /// split property. + /// + /// Walks the index prefix that precedes `split_by_property` level by + /// level, branching on `In` clauses. For each fully-resolved prefix, + /// runs the per-split-value sub-query (see [`Self::collect_split_at_prefix`]) + /// and merges the results by split key, summing counts. + #[cfg(feature = "server")] + fn execute_split_count( + &self, + drive: &Drive, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let split_property = self + .split_by_property + .as_deref() + .expect("split_by_property must be Some when calling execute_split_count"); + + let split_prop_idx = self + .index + .properties + .iter() + .position(|p| p.name == split_property) + .unwrap_or(0); + + let base_path = vec![ + vec![RootTree::DataContractDocuments as u8], + self.contract_id.to_vec(), + vec![1u8], + self.document_type_name.as_bytes().to_vec(), + ]; + + let mut merged: BTreeMap, u64> = BTreeMap::new(); + self.expand_split_prefix_paths( + drive, + base_path, + 0, + split_prop_idx, + split_property, + transaction, + platform_version, + &mut merged, + )?; + + Ok(merged + .into_iter() + .filter(|(_, count)| *count > 0) + .map(|(key, count)| SplitCountEntry { key, count }) + .collect()) + } + + /// Walks the index up to `split_prop_idx`, branching on `In`. At each + /// fully-resolved prefix, calls [`Self::collect_split_at_prefix`] to + /// gather the per-split-value counts, and accumulates them into `merged`. + #[cfg(feature = "server")] + #[allow(clippy::too_many_arguments)] + fn expand_split_prefix_paths( + &self, + drive: &Drive, + current_path: Vec>, + prop_idx: usize, + split_prop_idx: usize, + split_property: &str, + transaction: TransactionArg, + platform_version: &PlatformVersion, + merged: &mut BTreeMap, u64>, + ) -> Result<(), Error> { + if prop_idx == split_prop_idx { + // Reached the split property level under this prefix. Run the + // per-split-value sub-query and merge entries by key. + return self.collect_split_at_prefix( + drive, + current_path, + split_prop_idx, + split_property, + transaction, + platform_version, + merged, + ); + } + + let prop = &self.index.properties[prop_idx]; + let clause = self + .where_clauses + .iter() + .find(|wc| wc.field == prop.name) + .ok_or_else(|| { + // The index picker guarantees every property before the split + // property has a matching clause; missing one indicates a + // mis-picked index. + Error::Query(QuerySyntaxError::InvalidWhereClauseComponents( + "split count: missing where clause for an index property preceding the split property", + )) + })?; + + match clause.operator { + WhereOperator::Equal => { + let mut new_path = current_path; + new_path.push(prop.name.as_bytes().to_vec()); + new_path.push(self.document_type.serialize_value_for_key( + prop.name.as_str(), + &clause.value, + platform_version, + )?); + self.expand_split_prefix_paths( + drive, + new_path, + prop_idx + 1, + split_prop_idx, + split_property, + transaction, + platform_version, + merged, + ) + } + WhereOperator::In => { + let values = clause.value.as_array().ok_or_else(|| { + Error::Query(QuerySyntaxError::InvalidWhereClauseComponents( + "In where-clause value must be an array", + )) + })?; + + // Same dedup as in `expand_paths_and_count`: serialize each + // value to the canonical index key and skip duplicates. + // Without this, a duplicated `In` value on the prefix would + // visit the same prefix subtree twice and double its + // contribution to the merged split counts. + let mut seen_keys: BTreeSet> = BTreeSet::new(); + for v in values { + let serialized = self.document_type.serialize_value_for_key( + prop.name.as_str(), + v, + platform_version, + )?; + if !seen_keys.insert(serialized.clone()) { + continue; + } + let mut new_path = current_path.clone(); + new_path.push(prop.name.as_bytes().to_vec()); + new_path.push(serialized); + self.expand_split_prefix_paths( + drive, + new_path, + prop_idx + 1, + split_prop_idx, + split_property, + transaction, + platform_version, + merged, + )?; + } + Ok(()) + } + _ => Err(Error::Query( + QuerySyntaxError::InvalidWhereClauseComponents( + "split count fast path supports only Equal and In where-clause operators", + ), + )), + } + } + + /// Reads all per-value sub-counts for `split_property` under + /// `prefix_path`, summing per-key counts into `merged`. Mirrors the + /// original (pre-`In`-support) loop; factored out so the prefix-walk + /// recursion can call it once per resolved prefix. + #[cfg(feature = "server")] + #[allow(clippy::too_many_arguments)] + fn collect_split_at_prefix( + &self, + drive: &Drive, + prefix_path: Vec>, + split_prop_idx: usize, + split_property: &str, + transaction: TransactionArg, + platform_version: &PlatformVersion, + merged: &mut BTreeMap, u64>, + ) -> Result<(), Error> { + let drive_version = &platform_version.drive; + + // Push the split-property key onto the prefix to address the per-value + // subtree level. + let mut path = prefix_path; + path.push(split_property.as_bytes().to_vec()); + + let mut query = Query::new(); + query.insert_all(); + let path_query = PathQuery::new(path.clone(), SizedQuery::new(query, None, None)); + + let mut drive_operations = vec![]; + let result = drive.grove_get_raw_path_query( + &path_query, + transaction, + QueryResultType::QueryKeyElementPairResultType, + &mut drive_operations, + drive_version, + ); + + let (elements, _) = match result { + Ok(result) => result, + Err(Error::GroveDB(e)) + if matches!( + e.as_ref(), + grovedb::Error::PathNotFound(_) + | grovedb::Error::PathParentLayerNotFound(_) + | grovedb::Error::PathKeyNotFound(_) + ) => + { + // No documents under this prefix; nothing to merge. + return Ok(()); + } + Err(e) => return Err(e), + }; + + let key_elements = elements.to_key_elements(); + if key_elements.is_empty() { + return Ok(()); + } + + let remaining_properties = &self.index.properties[split_prop_idx + 1..]; + + for (key, _element) in key_elements { + let mut value_path = path.clone(); + value_path.push(key.clone()); + + let count = if remaining_properties.is_empty() { + Self::fetch_count_at_path(drive, &value_path, transaction, drive_version)? + } else { + Self::count_recursive( + drive, + value_path, + remaining_properties, + transaction, + drive_version, + )? + }; + + if count == 0 { + continue; + } + *merged.entry(key).or_insert(0) += count; + } + + Ok(()) + } + + /// Fetches the CountTree element count at the given path. + /// The CountTree element is at key [0] under the path. + #[cfg(feature = "server")] + fn fetch_count_at_path( + drive: &Drive, + path: &[Vec], + transaction: TransactionArg, + drive_version: &DriveVersion, + ) -> Result { + let mut drive_operations = vec![]; + let path_refs: Vec<&[u8]> = path.iter().map(|p| p.as_slice()).collect(); + let element = drive.grove_get_raw_optional( + SubtreePath::from(path_refs.as_slice()), + &[0], + DirectQueryType::StatefulDirectQuery, + transaction, + &mut drive_operations, + drive_version, + )?; + + Ok(element.map_or(0, |e| e.count_value_or_default())) + } + + /// Recursively descends through remaining index property levels, + /// iterating over all values at each level, and sums the CountTree + /// counts at the terminal level. + #[cfg(feature = "server")] + fn count_recursive( + drive: &Drive, + current_path: Vec>, + remaining_properties: &[IndexProperty], + transaction: TransactionArg, + drive_version: &DriveVersion, + ) -> Result { + if remaining_properties.is_empty() { + return Self::fetch_count_at_path(drive, ¤t_path, transaction, drive_version); + } + + let prop = &remaining_properties[0]; + let rest = &remaining_properties[1..]; + + // Push the index property key to descend into that level + let mut property_path = current_path; + property_path.push(prop.name.as_bytes().to_vec()); + + // Query all children (value subtrees) at this property level + let mut query = Query::new(); + query.insert_all(); + + let path_query = PathQuery::new(property_path.clone(), SizedQuery::new(query, None, None)); + + let mut drive_operations = vec![]; + let result = drive.grove_get_raw_path_query( + &path_query, + transaction, + QueryResultType::QueryKeyElementPairResultType, + &mut drive_operations, + drive_version, + ); + + let (elements, _) = match result { + Ok(result) => result, + Err(Error::GroveDB(e)) + if matches!( + e.as_ref(), + grovedb::Error::PathNotFound(_) + | grovedb::Error::PathParentLayerNotFound(_) + | grovedb::Error::PathKeyNotFound(_) + ) => + { + return Ok(0); + } + Err(e) => return Err(e), + }; + + let key_elements = elements.to_key_elements(); + + if key_elements.is_empty() { + return Ok(0); + } + + let mut total_count: u64 = 0; + + for (key, _element) in key_elements { + let mut value_path = property_path.clone(); + value_path.push(key); + + let sub_count = + Self::count_recursive(drive, value_path, rest, transaction, drive_version)?; + total_count = total_count.saturating_add(sub_count); + } + + Ok(total_count) + } +} diff --git a/packages/rs-drive/src/query/drive_document_count_query/tests.rs b/packages/rs-drive/src/query/drive_document_count_query/tests.rs new file mode 100644 index 00000000000..66f47019dfd --- /dev/null +++ b/packages/rs-drive/src/query/drive_document_count_query/tests.rs @@ -0,0 +1,927 @@ +use super::*; +use crate::drive::Drive; +use crate::util::object_size_info::DocumentInfo::DocumentRefInfo; +use crate::util::object_size_info::{DocumentAndContractInfo, OwnedDocumentInfo}; +use crate::util::storage_flags::StorageFlags; +use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; +use dpp::block::block_info::BlockInfo; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; +use dpp::data_contract::document_type::random_document::CreateRandomDocument; +use dpp::document::{Document, DocumentV0}; +use dpp::identifier::Identifier; +use dpp::platform_value::Value; +use dpp::tests::json_document::json_document_to_contract_with_ids; +use dpp::version::PlatformVersion; +use rand::rngs::StdRng; +use rand::SeedableRng; +use std::borrow::Cow; +use std::collections::BTreeMap as StdBTreeMap; + +fn setup_drive_and_contract() -> (Drive, dpp::prelude::DataContract) { + let drive = setup_drive_with_initial_state_structure(None); + let platform_version = PlatformVersion::latest(); + + let data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/family/family-contract-countable.json", + None, + None, + false, + platform_version, + ) + .expect("expected to get json based contract"); + + drive + .apply_contract( + &data_contract, + BlockInfo::default(), + true, + StorageFlags::optional_default_as_cow(), + None, + platform_version, + ) + .expect("expected to apply contract successfully"); + + (drive, data_contract) +} + +fn insert_random_documents( + drive: &Drive, + data_contract: &dpp::prelude::DataContract, + document_type_name: &str, + count: usize, + seed: u64, +) { + let platform_version = PlatformVersion::latest(); + let document_type = data_contract + .document_type_for_name(document_type_name) + .expect("expected document type"); + + let mut std_rng = StdRng::seed_from_u64(seed); + for _ in 0..count { + let random_document = document_type + .random_document_with_rng(&mut std_rng, platform_version) + .expect("expected to get random document"); + + let storage_flags = Some(Cow::Owned(StorageFlags::SingleEpoch(0))); + + drive + .add_document_for_contract( + DocumentAndContractInfo { + owned_document_info: OwnedDocumentInfo { + document_info: DocumentRefInfo((&random_document, storage_flags)), + owner_id: None, + }, + contract: data_contract, + document_type, + }, + false, + BlockInfo::default(), + true, + None, + platform_version, + None, + ) + .expect("expected to insert document"); + } +} + +/// Inserts a person document with a controlled set of property values, +/// so tests can drive the count fast path with known firstName / age +/// values rather than relying on the random-document generator. +fn insert_person_doc( + drive: &Drive, + data_contract: &dpp::prelude::DataContract, + id: [u8; 32], + first_name: &str, + middle_name: &str, + last_name: &str, + age: u64, +) { + let platform_version = PlatformVersion::latest(); + let document_type = data_contract + .document_type_for_name("person") + .expect("expected document type"); + + let mut properties = StdBTreeMap::new(); + properties.insert("firstName".to_string(), Value::Text(first_name.to_string())); + properties.insert( + "middleName".to_string(), + Value::Text(middle_name.to_string()), + ); + properties.insert("lastName".to_string(), Value::Text(last_name.to_string())); + properties.insert("age".to_string(), Value::U64(age)); + + let document: Document = DocumentV0 { + id: Identifier::from(id), + owner_id: Identifier::from([0u8; 32]), + properties, + revision: None, + created_at: None, + updated_at: None, + transferred_at: None, + created_at_block_height: None, + updated_at_block_height: None, + transferred_at_block_height: None, + created_at_core_block_height: None, + updated_at_core_block_height: None, + transferred_at_core_block_height: None, + creator_id: None, + } + .into(); + + let storage_flags = Some(Cow::Owned(StorageFlags::SingleEpoch(0))); + + drive + .add_document_for_contract( + DocumentAndContractInfo { + owned_document_info: OwnedDocumentInfo { + document_info: DocumentRefInfo((&document, storage_flags)), + owner_id: None, + }, + contract: data_contract, + document_type, + }, + false, + BlockInfo::default(), + true, + None, + platform_version, + None, + ) + .expect("expected to insert document"); +} + +#[test] +fn test_count_query_total_count_with_documents() { + let (drive, data_contract) = setup_drive_and_contract(); + let platform_version = PlatformVersion::latest(); + + insert_random_documents(&drive, &data_contract, "person", 5, 500); + + let document_type = data_contract + .document_type_for_name("person") + .expect("expected document type"); + + let index = DriveDocumentCountQuery::find_countable_index_for_where_clauses( + document_type.indexes(), + &[], + ) + .expect("expected to find countable index"); + + let query = DriveDocumentCountQuery { + document_type, + contract_id: data_contract.id().to_buffer(), + document_type_name: "person".to_string(), + index, + where_clauses: vec![], + split_by_property: None, + }; + + let results = query + .execute_no_proof(&drive, None, platform_version) + .expect("expected query to succeed"); + + assert_eq!(results.len(), 1); + assert_eq!(results[0].count, 5, "expected count of 5 documents"); + assert!( + results[0].key.is_empty(), + "expected empty key for total count" + ); + + // Also verify proof generation works + let proof = query + .execute_with_proof(&drive, None, platform_version) + .expect("expected proof generation to succeed"); + assert!(!proof.is_empty(), "expected non-empty proof"); +} + +#[test] +fn test_count_query_total_count_empty() { + let (drive, data_contract) = setup_drive_and_contract(); + let platform_version = PlatformVersion::latest(); + + let document_type = data_contract + .document_type_for_name("person") + .expect("expected document type"); + + let index = DriveDocumentCountQuery::find_countable_index_for_where_clauses( + document_type.indexes(), + &[], + ) + .expect("expected to find countable index"); + + let query = DriveDocumentCountQuery { + document_type, + contract_id: data_contract.id().to_buffer(), + document_type_name: "person".to_string(), + index, + where_clauses: vec![], + split_by_property: None, + }; + + let results = query + .execute_no_proof(&drive, None, platform_version) + .expect("expected query to succeed"); + + assert_eq!(results.len(), 1); + assert_eq!(results[0].count, 0, "expected count of 0 documents"); + + // Also verify proof generation works on empty index + let proof = query + .execute_with_proof(&drive, None, platform_version) + .expect("expected proof generation to succeed"); + assert!(!proof.is_empty(), "expected non-empty proof"); +} + +#[test] +fn test_count_query_split_by_property() { + let (drive, data_contract) = setup_drive_and_contract(); + let platform_version = PlatformVersion::latest(); + + insert_random_documents(&drive, &data_contract, "person", 5, 600); + + let document_type = data_contract + .document_type_for_name("person") + .expect("expected document type"); + + let index = DriveDocumentCountQuery::find_countable_index_for_split( + document_type.indexes(), + &[], + "firstName", + ) + .expect("expected to find countable index for split"); + + let query = DriveDocumentCountQuery { + document_type, + contract_id: data_contract.id().to_buffer(), + document_type_name: "person".to_string(), + index, + where_clauses: vec![], + split_by_property: Some("firstName".to_string()), + }; + + let results = query + .execute_no_proof(&drive, None, platform_version) + .expect("expected query to succeed"); + + let total: u64 = results.iter().map(|e| e.count).sum(); + assert_eq!(total, 5, "expected total split count of 5 documents"); + + for entry in &results { + assert!(!entry.key.is_empty(), "expected non-empty split key"); + assert!(entry.count > 0, "expected positive count per split"); + } + + // Also verify proof generation works for split query + let proof = query + .execute_with_proof(&drive, None, platform_version) + .expect("expected proof generation to succeed"); + assert!(!proof.is_empty(), "expected non-empty proof"); +} + +#[test] +fn test_find_countable_index_for_where_clauses_no_match() { + let platform_version = PlatformVersion::latest(); + + let data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/family/family-contract-countable.json", + None, + None, + false, + platform_version, + ) + .expect("expected to get json based contract"); + + let document_type = data_contract + .document_type_for_name("person") + .expect("expected document type"); + + // Create a where clause for a field that doesn't appear as a prefix of any index + let where_clause = WhereClause { + field: "nonExistentField".to_string(), + operator: WhereOperator::Equal, + value: Value::Text("test".to_string()), + }; + + let result = DriveDocumentCountQuery::find_countable_index_for_where_clauses( + document_type.indexes(), + &[where_clause], + ); + + assert!( + result.is_none(), + "expected no countable index for non-existent field" + ); +} + +#[test] +fn test_find_countable_index_for_split_no_match() { + let platform_version = PlatformVersion::latest(); + + let data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/family/family-contract-countable.json", + None, + None, + false, + platform_version, + ) + .expect("expected to get json based contract"); + + let document_type = data_contract + .document_type_for_name("person") + .expect("expected document type"); + + let result = DriveDocumentCountQuery::find_countable_index_for_split( + document_type.indexes(), + &[], + "nonExistentField", + ); + + assert!( + result.is_none(), + "expected no countable index for non-existent split field" + ); +} + +#[test] +fn test_has_unsupported_operator() { + let eq_clause = WhereClause { + field: "age".to_string(), + operator: WhereOperator::Equal, + value: Value::U64(30), + }; + let in_clause = WhereClause { + field: "age".to_string(), + operator: WhereOperator::In, + value: Value::Array(vec![Value::U64(30), Value::U64(40)]), + }; + let gt_clause = WhereClause { + field: "age".to_string(), + operator: WhereOperator::GreaterThan, + value: Value::U64(20), + }; + + assert!(!DriveDocumentCountQuery::has_unsupported_operator(&[])); + assert!(!DriveDocumentCountQuery::has_unsupported_operator( + std::slice::from_ref(&eq_clause) + )); + assert!(!DriveDocumentCountQuery::has_unsupported_operator( + std::slice::from_ref(&in_clause) + )); + assert!(!DriveDocumentCountQuery::has_unsupported_operator(&[ + eq_clause.clone(), + in_clause.clone(), + ])); + assert!(DriveDocumentCountQuery::has_unsupported_operator( + std::slice::from_ref(>_clause) + )); + assert!(DriveDocumentCountQuery::has_unsupported_operator(&[ + eq_clause, gt_clause, + ])); +} + +#[test] +fn test_find_countable_index_rejects_unsupported_operator() { + let platform_version = PlatformVersion::latest(); + + let data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/family/family-contract-countable.json", + None, + None, + false, + platform_version, + ) + .expect("expected to get json based contract"); + + let document_type = data_contract + .document_type_for_name("person") + .expect("expected document type"); + + let gt_clause = WhereClause { + field: "age".to_string(), + operator: WhereOperator::GreaterThan, + value: Value::U64(20), + }; + + // Even though `age` exists as a countable index, GreaterThan disqualifies it + // for the count fast path; the picker must report this as "no usable index" + // so the handler turns it into a clear error. + assert!( + DriveDocumentCountQuery::find_countable_index_for_where_clauses( + document_type.indexes(), + std::slice::from_ref(>_clause), + ) + .is_none() + ); + assert!(DriveDocumentCountQuery::find_countable_index_for_split( + document_type.indexes(), + std::slice::from_ref(>_clause), + "firstName", + ) + .is_none()); +} + +#[test] +fn test_count_query_total_count_with_in_operator() { + let (drive, data_contract) = setup_drive_and_contract(); + let platform_version = PlatformVersion::latest(); + + // Three docs with age=30, two with age=40, one with age=50. + insert_person_doc(&drive, &data_contract, [1u8; 32], "Alice", "M", "Smith", 30); + insert_person_doc(&drive, &data_contract, [2u8; 32], "Bob", "M", "Smith", 30); + insert_person_doc(&drive, &data_contract, [3u8; 32], "Carol", "M", "Smith", 30); + insert_person_doc(&drive, &data_contract, [4u8; 32], "Dave", "M", "Smith", 40); + insert_person_doc(&drive, &data_contract, [5u8; 32], "Eve", "M", "Smith", 40); + insert_person_doc(&drive, &data_contract, [6u8; 32], "Frank", "M", "Smith", 50); + + let document_type = data_contract + .document_type_for_name("person") + .expect("expected document type"); + + // age IN [30, 40] should count 5 documents (3 + 2). + let in_clause = WhereClause { + field: "age".to_string(), + operator: WhereOperator::In, + value: Value::Array(vec![Value::U64(30), Value::U64(40)]), + }; + + let index = DriveDocumentCountQuery::find_countable_index_for_where_clauses( + document_type.indexes(), + std::slice::from_ref(&in_clause), + ) + .expect("expected to find countable index for In on age"); + + let query = DriveDocumentCountQuery { + document_type, + contract_id: data_contract.id().to_buffer(), + document_type_name: "person".to_string(), + index, + where_clauses: vec![in_clause], + split_by_property: None, + }; + + let results = query + .execute_no_proof(&drive, None, platform_version) + .expect("expected query to succeed"); + + assert_eq!(results.len(), 1); + assert_eq!( + results[0].count, 5, + "expected count of 5 (age=30 has 3, age=40 has 2)" + ); +} + +#[test] +fn test_count_query_total_count_with_in_operator_no_matches() { + let (drive, data_contract) = setup_drive_and_contract(); + let platform_version = PlatformVersion::latest(); + + insert_person_doc(&drive, &data_contract, [1u8; 32], "Alice", "M", "Smith", 30); + insert_person_doc(&drive, &data_contract, [2u8; 32], "Bob", "M", "Smith", 30); + + let document_type = data_contract + .document_type_for_name("person") + .expect("expected document type"); + + // age IN [99, 100] - no matches. + let in_clause = WhereClause { + field: "age".to_string(), + operator: WhereOperator::In, + value: Value::Array(vec![Value::U64(99), Value::U64(100)]), + }; + + let index = DriveDocumentCountQuery::find_countable_index_for_where_clauses( + document_type.indexes(), + std::slice::from_ref(&in_clause), + ) + .expect("expected to find countable index for In on age"); + + let query = DriveDocumentCountQuery { + document_type, + contract_id: data_contract.id().to_buffer(), + document_type_name: "person".to_string(), + index, + where_clauses: vec![in_clause], + split_by_property: None, + }; + + let results = query + .execute_no_proof(&drive, None, platform_version) + .expect("expected query to succeed"); + + assert_eq!(results.len(), 1); + assert_eq!(results[0].count, 0, "expected count of 0 for unmatched In"); +} + +#[test] +fn test_count_query_split_with_in_prefix() { + let (drive, data_contract) = setup_drive_and_contract(); + let platform_version = PlatformVersion::latest(); + + // firstName IN ["Alice", "Bob"] split by lastName + // Expected: Smith=3 (Alice+Alice+Bob), Jones=2 (Alice+Bob), Doe=1 (Carol — excluded) + insert_person_doc(&drive, &data_contract, [1u8; 32], "Alice", "M", "Smith", 30); + insert_person_doc(&drive, &data_contract, [2u8; 32], "Alice", "N", "Smith", 31); + insert_person_doc(&drive, &data_contract, [3u8; 32], "Bob", "M", "Smith", 32); + insert_person_doc(&drive, &data_contract, [4u8; 32], "Alice", "M", "Jones", 33); + insert_person_doc(&drive, &data_contract, [5u8; 32], "Bob", "M", "Jones", 34); + insert_person_doc(&drive, &data_contract, [6u8; 32], "Carol", "M", "Doe", 35); + + let document_type = data_contract + .document_type_for_name("person") + .expect("expected document type"); + + let in_clause = WhereClause { + field: "firstName".to_string(), + operator: WhereOperator::In, + value: Value::Array(vec![ + Value::Text("Alice".to_string()), + Value::Text("Bob".to_string()), + ]), + }; + + let index = DriveDocumentCountQuery::find_countable_index_for_split( + document_type.indexes(), + std::slice::from_ref(&in_clause), + "lastName", + ) + .expect("expected to find countable index for In + split lastName"); + + let query = DriveDocumentCountQuery { + document_type, + contract_id: data_contract.id().to_buffer(), + document_type_name: "person".to_string(), + index, + where_clauses: vec![in_clause], + split_by_property: Some("lastName".to_string()), + }; + + let results = query + .execute_no_proof(&drive, None, platform_version) + .expect("expected query to succeed"); + + let total: u64 = results.iter().map(|e| e.count).sum(); + assert_eq!( + total, 5, + "expected total of 5 (3 Smith + 2 Jones, Carol/Doe excluded)" + ); + assert_eq!( + results.len(), + 2, + "expected 2 split entries (Smith and Jones)" + ); + for entry in &results { + assert!(entry.count > 0, "filtered split entries should be > 0"); + } +} + +/// Codex review finding #3: an `In` clause with duplicate values used to +/// double-count by recursing once per array element. The fix dedupes +/// branches by serialized key before summing. +#[test] +fn test_count_query_in_operator_dedupes_duplicate_values() { + let (drive, data_contract) = setup_drive_and_contract(); + let platform_version = PlatformVersion::latest(); + + insert_person_doc(&drive, &data_contract, [1u8; 32], "Alice", "M", "Smith", 30); + insert_person_doc(&drive, &data_contract, [2u8; 32], "Bob", "M", "Smith", 30); + insert_person_doc(&drive, &data_contract, [3u8; 32], "Carol", "M", "Smith", 40); + + let document_type = data_contract + .document_type_for_name("person") + .expect("expected document type"); + + // age IN [30, 30, 30] — set semantics: should count age=30 once = 2 docs. + let in_clause = WhereClause { + field: "age".to_string(), + operator: WhereOperator::In, + value: Value::Array(vec![Value::U64(30), Value::U64(30), Value::U64(30)]), + }; + + let index = DriveDocumentCountQuery::find_countable_index_for_where_clauses( + document_type.indexes(), + std::slice::from_ref(&in_clause), + ) + .expect("expected to find countable index for In on age"); + + let query = DriveDocumentCountQuery { + document_type, + contract_id: data_contract.id().to_buffer(), + document_type_name: "person".to_string(), + index, + where_clauses: vec![in_clause], + split_by_property: None, + }; + + let results = query + .execute_no_proof(&drive, None, platform_version) + .expect("expected query to succeed"); + + assert_eq!(results.len(), 1); + assert_eq!( + results[0].count, 2, + "expected count of 2 (age=30, set semantics — duplicates collapsed)" + ); +} + +/// Documents the grovedb semantic the count fast path relies on: +/// what does a child element contribute to a parent `CountTree`'s count? +/// +/// Per [`merk/src/element/tree_type.rs`](https://github.com/dashpay/grovedb/blob/8f25b20/merk/src/element/tree_type.rs) +/// `get_feature_type`, a child inserted under a `TreeType::CountTree` parent +/// is wrapped as `CountedMerkNode(self.count_value_or_default())`, and per +/// [`grovedb-element/src/element/helpers.rs`](https://github.com/dashpay/grovedb/blob/8f25b20/grovedb-element/src/element/helpers.rs) +/// `count_value_or_default` returns the child's stored count value for +/// `CountTree` / `ProvableCountTree` / `CountSumTree` / `ProvableCountSumTree` +/// variants and **`1` for everything else** — including an empty `Tree`. +/// +/// So an empty `Tree` child counts as **1**, not 0. The CountTree's +/// aggregated count is `local_value + left_subtree_count + right_subtree_count` +/// (recursively). +#[test] +fn test_count_tree_aggregation_with_empty_child_subtrees() { + use grovedb::Element; + use grovedb_path::SubtreePath; + + let drive = crate::util::test_helpers::setup::setup_drive(None); + let platform_version = PlatformVersion::latest(); + let drive_version = &platform_version.drive; + let grove_version = &drive_version.grove_version; + + let root: &[&[u8]] = &[]; + + // 1. Insert an empty CountTree at the root, key "ct". + drive + .grove + .insert( + SubtreePath::from(root), + b"ct", + Element::empty_count_tree(), + None, + None, + grove_version, + ) + .unwrap() + .expect("insert empty count tree"); + + let read_count = |drive: &Drive| -> u64 { + let elem = drive + .grove + .get(SubtreePath::from(root), b"ct", None, grove_version) + .unwrap() + .expect("read count tree"); + elem.count_value_or_default() + }; + + // Empty CountTree → count = 0 (no children at all). + assert_eq!( + read_count(&drive), + 0, + "freshly created empty count tree should have count 0" + ); + + // 2. Insert an empty Tree (NormalTree) as a child of the CountTree. + let count_tree_path: &[&[u8]] = &[b"ct"]; + drive + .grove + .insert( + SubtreePath::from(count_tree_path), + b"empty_subtree_a", + Element::empty_tree(), + None, + None, + grove_version, + ) + .unwrap() + .expect("insert empty subtree under count tree"); + + // The empty Tree contributes 1 to the parent CountTree's count. + assert_eq!( + read_count(&drive), + 1, + "an empty Tree child counts as 1 inside a CountTree" + ); + + // 3. Insert a second empty Tree → count = 2. + drive + .grove + .insert( + SubtreePath::from(count_tree_path), + b"empty_subtree_b", + Element::empty_tree(), + None, + None, + grove_version, + ) + .unwrap() + .expect("insert second empty subtree"); + assert_eq!( + read_count(&drive), + 2, + "two empty Tree children count as 2 inside a CountTree" + ); + + // 4. Insert a non-tree Item child → count = 3 (each non-CountTree element + // contributes 1, regardless of whether it's a Tree, an Item, or a + // Reference). + drive + .grove + .insert( + SubtreePath::from(count_tree_path), + b"item", + Element::new_item(b"hello".to_vec()), + None, + None, + grove_version, + ) + .unwrap() + .expect("insert item child"); + assert_eq!( + read_count(&drive), + 3, + "an Item child also contributes 1, same as an empty Tree" + ); +} + +/// Sanity check that a contract using the new `IndexCountability::CountableAllowingOffset` +/// variant — a string `"countableAllowingOffset"` in the JSON schema — loads, +/// is recognized as countable by the picker, and answers a total-count query. +/// +/// This exercises the full path: schema → `IndexCountability` enum → index +/// picker → tree-type selection (`ProvableCountTree`) → fast-path read. +#[test] +fn test_countable_allowing_offset_variant_end_to_end() { + use dpp::data_contract::conversion::json::DataContractJsonConversionMethodsV0; + use dpp::data_contract::document_type::IndexCountability; + + let drive = setup_drive_with_initial_state_structure(None); + let platform_version = PlatformVersion::latest(); + + // Hand-build a contract from JSON value so we can use the string form. + // family-contract-countable.json sits next door using "countable": true; this + // covers the CountableAllowingOffset variant via the string form and a + // single index for clarity. + let contract_json = serde_json::json!({ + "$formatVersion": "0", + "id": "94zNLp7A1ZcYG3Egqf2YmQk4DQr9P8D543GwXyCJRz4", + "ownerId": "AcYUCSvAmUwryNsQqkqqD1o3BnFuzepGtR3Mhh2swLk6", + "version": 1, + "documentSchemas": { + "person": { + "type": "object", + "indices": [ + { + "name": "byFirstName", + "properties": [{ "firstName": "asc" }], + "countable": "countableAllowingOffset" + } + ], + "properties": { + "firstName": { + "type": "string", + "maxLength": 50, + "position": 0 + } + }, + "required": ["firstName"], + "additionalProperties": false + } + } + }); + + let data_contract = + dpp::data_contract::DataContract::from_json(contract_json, false, platform_version) + .expect("expected to load contract with string-form countable"); + + let document_type = data_contract + .document_type_for_name("person") + .expect("expected document type"); + + // Confirm the schema parsed into the right enum variant. + let index = document_type + .indexes() + .values() + .next() + .expect("expected one index"); + assert_eq!( + index.countable, + IndexCountability::CountableAllowingOffset, + "string \"countableAllowingOffset\" should parse as CountableAllowingOffset" + ); + assert!(index.countable.allows_offset()); + + drive + .apply_contract( + &data_contract, + BlockInfo::default(), + true, + StorageFlags::optional_default_as_cow(), + None, + platform_version, + ) + .expect("expected to apply contract"); + + insert_random_documents(&drive, &data_contract, "person", 4, 700); + + // The picker should still find this index — `is_countable()` covers both + // `Countable` and `CountableAllowingOffset`. + let picked = DriveDocumentCountQuery::find_countable_index_for_where_clauses( + document_type.indexes(), + &[], + ) + .expect("expected picker to accept CountableAllowingOffset index"); + assert_eq!(picked.countable, IndexCountability::CountableAllowingOffset); + + let query = DriveDocumentCountQuery { + document_type, + contract_id: data_contract.id().to_buffer(), + document_type_name: "person".to_string(), + index: picked, + where_clauses: vec![], + split_by_property: None, + }; + + let results = query + .execute_no_proof(&drive, None, platform_version) + .expect("expected count query to succeed against ProvableCountTree"); + assert_eq!(results.len(), 1); + assert_eq!( + results[0].count, 4, + "ProvableCountTree should report total count = 4" + ); +} + +/// On a unique index, the `countable` flag only affects storage for +/// **null-bearing** index entries: when a document has any null value among +/// the indexed properties, insertion goes through the count-tree branch +/// (the same one non-unique indexes use). For all-non-null docs on a +/// unique index, the terminal is a bare Reference at key `[0]` and the +/// flag is a no-op — the count *value* still works correctly because +/// grovedb's `Element::count_value_or_default()` returns 1 for non-CountTree +/// elements (Reference falls into the `_ => 1` arm). +/// +/// This test exercises the all-non-null path on a unique countable index +/// and verifies the count comes back as 1 — confirming the no-op fallback. +#[test] +fn test_count_query_unique_countable_index_returns_correct_count() { + let (drive, data_contract) = setup_drive_and_contract(); + let platform_version = PlatformVersion::latest(); + + // 3 distinct (firstName, middleName, lastName) tuples — the unique + // countable index `(firstName, middleName, lastName)` stores a + // Reference at key [0] under the final value level (no count tree + // is created because all indexed fields are non-null). + insert_person_doc(&drive, &data_contract, [1u8; 32], "Alice", "M", "Smith", 30); + insert_person_doc(&drive, &data_contract, [2u8; 32], "Alice", "N", "Smith", 31); + insert_person_doc(&drive, &data_contract, [3u8; 32], "Bob", "O", "Jones", 32); + + let document_type = data_contract + .document_type_for_name("person") + .expect("expected document type"); + + // Pick the unique countable 3-property index by matching its full prefix. + let where_clauses = vec![ + WhereClause { + field: "firstName".to_string(), + operator: WhereOperator::Equal, + value: Value::Text("Alice".to_string()), + }, + WhereClause { + field: "middleName".to_string(), + operator: WhereOperator::Equal, + value: Value::Text("M".to_string()), + }, + WhereClause { + field: "lastName".to_string(), + operator: WhereOperator::Equal, + value: Value::Text("Smith".to_string()), + }, + ]; + + let index = DriveDocumentCountQuery::find_countable_index_for_where_clauses( + document_type.indexes(), + &where_clauses, + ) + .expect("expected to find a countable index covering all 3 properties"); + + let query = DriveDocumentCountQuery { + document_type, + contract_id: data_contract.id().to_buffer(), + document_type_name: "person".to_string(), + index, + where_clauses, + split_by_property: None, + }; + + let results = query + .execute_no_proof(&drive, None, platform_version) + .expect("expected query to succeed"); + + assert_eq!(results.len(), 1); + assert_eq!( + results[0].count, 1, + "exact match on a unique countable index should be 1, not 0 \ + (Reference at [0] returns count_value_or_default = 1)" + ); +} diff --git a/packages/rs-drive/src/query/mod.rs b/packages/rs-drive/src/query/mod.rs index d44907d9e9e..cfe80bfdb68 100644 --- a/packages/rs-drive/src/query/mod.rs +++ b/packages/rs-drive/src/query/mod.rs @@ -3,6 +3,7 @@ use std::sync::Arc; #[cfg(any(feature = "server", feature = "verify"))] pub use { conditions::{ValueClause, WhereClause, WhereOperator}, + drive_document_count_query::{DriveDocumentCountQuery, SplitCountEntry}, grovedb::{PathQuery, Query, QueryItem, SizedQuery}, ordering::OrderClause, single_document_drive_query::SingleDocumentDriveQuery, @@ -154,6 +155,10 @@ pub mod filter; #[cfg(any(feature = "server", feature = "verify"))] pub mod token_status_drive_query; +/// A query to count documents using CountTree elements +#[cfg(any(feature = "server", feature = "verify"))] +pub mod drive_document_count_query; + /// A Query Syntax Validation Result that contains data pub type QuerySyntaxValidationResult = ValidationResult; diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs index 4b198177f77..e1ea399d02b 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs @@ -8,6 +8,8 @@ pub struct DriveAbciQueryVersions { pub response_metadata: FeatureVersion, pub proofs_query: FeatureVersion, pub document_query: FeatureVersionBounds, + pub document_count_query: FeatureVersionBounds, + pub document_split_count_query: FeatureVersionBounds, pub prefunded_specialized_balances: DriveAbciQueryPrefundedSpecializedBalancesVersions, pub identity_based_queries: DriveAbciQueryIdentityVersions, pub token_queries: DriveAbciQueryTokenVersions, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs index 2fca8af4c62..ef9b8c5519f 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs @@ -16,6 +16,16 @@ pub const DRIVE_ABCI_QUERY_VERSIONS_V1: DriveAbciQueryVersions = DriveAbciQueryV max_version: 0, default_current_version: 0, }, + document_count_query: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_split_count_query: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, prefunded_specialized_balances: DriveAbciQueryPrefundedSpecializedBalancesVersions { balance: FeatureVersionBounds { min_version: 0, diff --git a/packages/rs-platform-version/src/version/mocks/v2_test.rs b/packages/rs-platform-version/src/version/mocks/v2_test.rs index 2871e55c336..968068efb26 100644 --- a/packages/rs-platform-version/src/version/mocks/v2_test.rs +++ b/packages/rs-platform-version/src/version/mocks/v2_test.rs @@ -176,6 +176,16 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { max_version: 0, default_current_version: 0, }, + document_count_query: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_split_count_query: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, prefunded_specialized_balances: DriveAbciQueryPrefundedSpecializedBalancesVersions { balance: FeatureVersionBounds { min_version: 0, diff --git a/packages/rs-sdk-ffi/src/document/queries/count.rs b/packages/rs-sdk-ffi/src/document/queries/count.rs new file mode 100644 index 00000000000..6913adbfc58 --- /dev/null +++ b/packages/rs-sdk-ffi/src/document/queries/count.rs @@ -0,0 +1,256 @@ +//! Document count + split-count query operations. +//! +//! Wraps the rs-sdk `DocumentCount::fetch` and `DocumentSplitCounts::fetch` +//! flows so iOS / native callers can obtain document counts without having +//! to construct `GetDocumentsCountRequest` payloads themselves. + +use std::collections::BTreeMap; +use std::ffi::{CStr, CString}; +use std::os::raw::c_char; + +use dash_sdk::dpp::platform_value::Value; +use dash_sdk::dpp::prelude::DataContract; +use dash_sdk::drive::query::{WhereClause, WhereOperator}; +use dash_sdk::platform::documents::document_count_query::DocumentCountQuery; +use dash_sdk::platform::documents::document_query::DocumentQuery; +use dash_sdk::platform::documents::document_split_count_query::DocumentSplitCountQuery; +use dash_sdk::platform::Fetch; +use drive_proof_verifier::{DocumentCount, DocumentSplitCounts}; +use serde::{Deserialize, Serialize}; +use serde_json; + +use crate::sdk::SDKWrapper; +use crate::types::{DataContractHandle, SDKHandle}; +use crate::{DashSDKError, DashSDKErrorCode, DashSDKResult, FFIError}; + +#[derive(Debug, Deserialize)] +struct WhereClauseJson { + field: String, + operator: String, + value: serde_json::Value, +} + +#[derive(Debug, Serialize)] +struct DocumentCountResult { + count: u64, +} + +#[derive(Debug, Serialize)] +struct DocumentSplitCountResult { + /// Per-key counts. Keys are hex-encoded so iOS callers can match them + /// against the corresponding platform-value-encoded property bytes. + counts: BTreeMap, +} + +#[allow(clippy::result_large_err)] +fn parse_where_operator(op: &str) -> Result { + match op { + "=" | "==" | "equal" => Ok(WhereOperator::Equal), + ">" | "gt" => Ok(WhereOperator::GreaterThan), + ">=" | "gte" => Ok(WhereOperator::GreaterThanOrEquals), + "<" | "lt" => Ok(WhereOperator::LessThan), + "<=" | "lte" => Ok(WhereOperator::LessThanOrEquals), + "in" => Ok(WhereOperator::In), + "startsWith" => Ok(WhereOperator::StartsWith), + _ => Err(FFIError::InternalError(format!( + "Unknown where operator: {}", + op + ))), + } +} + +#[allow(clippy::result_large_err)] +fn json_to_platform_value(json: serde_json::Value) -> Result { + match json { + serde_json::Value::Null => Ok(Value::Null), + serde_json::Value::Bool(b) => Ok(Value::Bool(b)), + serde_json::Value::Number(n) => { + if let Some(i) = n.as_i64() { + Ok(Value::I64(i)) + } else if let Some(u) = n.as_u64() { + Ok(Value::U64(u)) + } else if let Some(f) = n.as_f64() { + Ok(Value::Float(f)) + } else { + Err(FFIError::InternalError("Invalid number value".to_string())) + } + } + serde_json::Value::String(s) => Ok(Value::Text(s)), + serde_json::Value::Array(arr) => { + let values: Result, _> = + arr.into_iter().map(json_to_platform_value).collect(); + Ok(Value::Array(values?)) + } + serde_json::Value::Object(map) => { + let mut pairs = Vec::new(); + for (k, v) in map { + pairs.push((Value::Text(k), json_to_platform_value(v)?)); + } + Ok(Value::Map(pairs)) + } + } +} + +#[allow(clippy::result_large_err)] +unsafe fn build_base_query( + data_contract: &DataContract, + document_type: *const c_char, + where_json: *const c_char, +) -> Result { + let document_type_str = CStr::from_ptr(document_type) + .to_str() + .map_err(FFIError::from)?; + + let mut query = DocumentQuery::new(data_contract.clone(), document_type_str) + .map_err(|e| FFIError::InternalError(format!("Failed to create query: {}", e)))?; + + if !where_json.is_null() { + let where_str = CStr::from_ptr(where_json) + .to_str() + .map_err(FFIError::from)?; + if !where_str.is_empty() { + let clauses: Vec = serde_json::from_str(where_str) + .map_err(|e| FFIError::InternalError(format!("Invalid where JSON: {}", e)))?; + + for clause in clauses { + let operator = parse_where_operator(&clause.operator)?; + let value = json_to_platform_value(clause.value)?; + query = query.with_where(WhereClause { + field: clause.field, + operator, + value, + }); + } + } + } + + Ok(query) +} + +/// Count documents matching a query. +/// +/// Returns a JSON string of shape `{"count": }`. +/// +/// # Safety +/// - `sdk_handle` and `data_contract_handle` must be valid, non-null pointers. +/// - `document_type` must be a NUL-terminated C string valid for the duration of the call. +/// - `where_json` may be null; if non-null it must be a NUL-terminated JSON string of `[{field, operator, value}]`. +/// - On success, returns a heap-allocated C string pointer; caller must free it using SDK routines. +#[no_mangle] +pub unsafe extern "C" fn dash_sdk_document_count( + sdk_handle: *const SDKHandle, + data_contract_handle: *const DataContractHandle, + document_type: *const c_char, + where_json: *const c_char, +) -> DashSDKResult { + if sdk_handle.is_null() || data_contract_handle.is_null() || document_type.is_null() { + return DashSDKResult::error(DashSDKError::new( + DashSDKErrorCode::InvalidParameter, + "SDK handle, data contract handle, or document type is null".to_string(), + )); + } + + let wrapper = &*(sdk_handle as *const SDKWrapper); + let data_contract = &*(data_contract_handle as *const DataContract); + + let result: Result = wrapper.runtime.block_on(async { + let base_query = build_base_query(data_contract, document_type, where_json)?; + let count_query = DocumentCountQuery { + document_query: base_query, + }; + + let count = DocumentCount::fetch(&wrapper.sdk, count_query) + .await + .map_err(|e| FFIError::InternalError(format!("Failed to fetch count: {}", e)))? + .map(|c| c.0) + .unwrap_or(0); + + serde_json::to_string(&DocumentCountResult { count }) + .map_err(|e| FFIError::InternalError(format!("Failed to serialize result: {}", e))) + }); + + match result { + Ok(json) => match CString::new(json) { + Ok(s) => DashSDKResult::success_string(s.into_raw()), + Err(e) => DashSDKResult::error(DashSDKError::new( + DashSDKErrorCode::InternalError, + format!("Failed to create CString: {}", e), + )), + }, + Err(e) => DashSDKResult::error(e.into()), + } +} + +/// Count documents matching a query, split by an index property. +/// +/// Returns a JSON string of shape `{"counts": {"": , ...}}`. +/// Hex keys correspond to the platform-value-encoded property values from the +/// underlying split-count tree; iOS callers should hex-decode them and decode +/// against the contract's index-property type if they need a typed key. +/// +/// # Safety +/// - `sdk_handle`, `data_contract_handle`, `document_type`, and `split_property` must be valid, non-null pointers. +/// - `document_type` and `split_property` must be NUL-terminated C strings valid for the duration of the call. +/// - `where_json` may be null; if non-null it must be a NUL-terminated JSON string of `[{field, operator, value}]`. +/// - On success, returns a heap-allocated C string pointer; caller must free it using SDK routines. +#[no_mangle] +pub unsafe extern "C" fn dash_sdk_document_split_count( + sdk_handle: *const SDKHandle, + data_contract_handle: *const DataContractHandle, + document_type: *const c_char, + split_property: *const c_char, + where_json: *const c_char, +) -> DashSDKResult { + if sdk_handle.is_null() + || data_contract_handle.is_null() + || document_type.is_null() + || split_property.is_null() + { + return DashSDKResult::error(DashSDKError::new( + DashSDKErrorCode::InvalidParameter, + "SDK handle, data contract handle, document type, or split property is null" + .to_string(), + )); + } + + let wrapper = &*(sdk_handle as *const SDKWrapper); + let data_contract = &*(data_contract_handle as *const DataContract); + + let split_property_str = match CStr::from_ptr(split_property).to_str() { + Ok(s) => s.to_string(), + Err(e) => return DashSDKResult::error(FFIError::from(e).into()), + }; + + let result: Result = wrapper.runtime.block_on(async { + let base_query = build_base_query(data_contract, document_type, where_json)?; + let split_query = DocumentSplitCountQuery { + document_query: base_query, + split_property: split_property_str, + }; + + let split_counts = DocumentSplitCounts::fetch(&wrapper.sdk, split_query) + .await + .map_err(|e| FFIError::InternalError(format!("Failed to fetch split counts: {}", e)))? + .map(|s| s.0) + .unwrap_or_default(); + + let counts: BTreeMap = split_counts + .into_iter() + .map(|(k, v)| (hex::encode(k), v)) + .collect(); + + serde_json::to_string(&DocumentSplitCountResult { counts }) + .map_err(|e| FFIError::InternalError(format!("Failed to serialize result: {}", e))) + }); + + match result { + Ok(json) => match CString::new(json) { + Ok(s) => DashSDKResult::success_string(s.into_raw()), + Err(e) => DashSDKResult::error(DashSDKError::new( + DashSDKErrorCode::InternalError, + format!("Failed to create CString: {}", e), + )), + }, + Err(e) => DashSDKResult::error(e.into()), + } +} diff --git a/packages/rs-sdk-ffi/src/document/queries/mod.rs b/packages/rs-sdk-ffi/src/document/queries/mod.rs index 50c97a2d2af..f21de165ace 100644 --- a/packages/rs-sdk-ffi/src/document/queries/mod.rs +++ b/packages/rs-sdk-ffi/src/document/queries/mod.rs @@ -1,9 +1,12 @@ //! Document query operations +pub mod count; pub mod fetch; pub mod info; pub mod search; // Re-export all public functions for convenient access +#[allow(unused_imports)] +pub use count::{dash_sdk_document_count, dash_sdk_document_split_count}; pub use fetch::dash_sdk_document_fetch; pub use search::{dash_sdk_document_search, DashSDKDocumentSearchParams}; diff --git a/packages/rs-sdk/src/mock/requests.rs b/packages/rs-sdk/src/mock/requests.rs index 401fba3c728..60b73e8eb35 100644 --- a/packages/rs-sdk/src/mock/requests.rs +++ b/packages/rs-sdk/src/mock/requests.rs @@ -566,3 +566,38 @@ impl MockResponse for NullifiersTrunkState { unimplemented!("NullifiersTrunkState does not support mock deserialization - the Tree type is not serializable") } } + +impl MockResponse for drive_proof_verifier::DocumentCount { + fn mock_serialize(&self, _sdk: &MockDashPlatformSdk) -> Vec { + let bincode_config = standard(); + bincode::encode_to_vec(self.0, bincode_config).expect("encode DocumentCount") + } + + fn mock_deserialize(_sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self + where + Self: Sized, + { + let bincode_config = standard(); + let (count, _): (u64, _) = + bincode::decode_from_slice(buf, bincode_config).expect("decode DocumentCount"); + drive_proof_verifier::DocumentCount(count) + } +} + +impl MockResponse for drive_proof_verifier::DocumentSplitCounts { + fn mock_serialize(&self, _sdk: &MockDashPlatformSdk) -> Vec { + let bincode_config = standard(); + let pairs: Vec<(Vec, u64)> = self.0.iter().map(|(k, v)| (k.clone(), *v)).collect(); + bincode::encode_to_vec(pairs, bincode_config).expect("encode DocumentSplitCounts") + } + + fn mock_deserialize(_sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self + where + Self: Sized, + { + let bincode_config = standard(); + let (pairs, _): (Vec<(Vec, u64)>, _) = + bincode::decode_from_slice(buf, bincode_config).expect("decode DocumentSplitCounts"); + drive_proof_verifier::DocumentSplitCounts(pairs.into_iter().collect()) + } +} diff --git a/packages/rs-sdk/src/mock/sdk.rs b/packages/rs-sdk/src/mock/sdk.rs index 9e52c297d24..95f3885b4cf 100644 --- a/packages/rs-sdk/src/mock/sdk.rs +++ b/packages/rs-sdk/src/mock/sdk.rs @@ -134,6 +134,18 @@ impl MockDashPlatformSdk { match request_type { "DocumentQuery" => load_expectation::(&mut dapi, filename)?, + "DocumentCountQuery" => load_expectation::< + crate::platform::documents::document_count_query::DocumentCountQuery, + >(&mut dapi, filename)?, + "DocumentSplitCountQuery" => load_expectation::< + crate::platform::documents::document_split_count_query::DocumentSplitCountQuery, + >(&mut dapi, filename)?, + "GetDocumentsCountRequest" => { + load_expectation::(&mut dapi, filename)? + } + "GetDocumentsSplitCountRequest" => { + load_expectation::(&mut dapi, filename)? + } "GetEpochsInfoRequest" => { load_expectation::(&mut dapi, filename)? } diff --git a/packages/rs-sdk/src/platform/documents/document_count_query.rs b/packages/rs-sdk/src/platform/documents/document_count_query.rs new file mode 100644 index 00000000000..4f01de9b096 --- /dev/null +++ b/packages/rs-sdk/src/platform/documents/document_count_query.rs @@ -0,0 +1,197 @@ +//! High-level SDK query for [`GetDocumentsCountRequest`]. +//! +//! [`DocumentCountQuery`] mirrors [`super::document_query::DocumentQuery`] for +//! the new count endpoint introduced by PR #3435: it wraps the data contract, +//! document type, and where clauses, converts to the gRPC request for +//! transport, and converts to a [`DriveDocumentQuery`] for proof verification. + +use std::sync::Arc; + +use crate::error::Error; +use crate::platform::documents::document_query::DocumentQuery; +use crate::platform::Fetch; +use ciborium::Value as CborValue; +use dapi_grpc::platform::v0::get_documents_count_request::{ + GetDocumentsCountRequestV0, Version as GetDocumentsCountRequestVersion, +}; +use dapi_grpc::platform::v0::{ + GetDocumentsCountRequest, GetDocumentsCountResponse, Proof, ResponseMetadata, +}; +use dash_context_provider::ContextProvider; +use dpp::dashcore::Network; +use dpp::version::PlatformVersion; +use dpp::{ + data_contract::accessors::v0::DataContractV0Getters, platform_value::Value, + prelude::DataContract, ProtocolError, +}; +use drive::query::{DriveDocumentQuery, WhereClause}; +use drive_proof_verifier::{DocumentCount, FromProof}; +use rs_dapi_client::transport::{ + AppliedRequestSettings, BoxFuture, TransportError, TransportRequest, +}; + +/// SDK-side query for the `GetDocumentsCount` endpoint. +/// +/// Wraps a [`DocumentQuery`] (so we can reuse its [`DriveDocumentQuery`] +/// conversion machinery) and is consumed by [`DocumentCount::fetch`]. +#[derive(Debug, Clone, dash_platform_macros::Mockable)] +#[cfg_attr(feature = "mocks", derive(serde::Serialize, serde::Deserialize))] +pub struct DocumentCountQuery { + /// Underlying document query — the count endpoint takes the same + /// data-contract / document-type / where-clauses inputs as the + /// regular document query. + pub document_query: DocumentQuery, +} + +impl DocumentCountQuery { + /// Build a count query from a contract reference and document type name. + pub fn new>>( + contract: C, + document_type_name: &str, + ) -> Result { + Ok(Self { + document_query: DocumentQuery::new(contract, document_type_name)?, + }) + } + + /// Add a where clause to the underlying query. + pub fn with_where(mut self, clause: WhereClause) -> Self { + self.document_query = self.document_query.with_where(clause); + self + } +} + +impl<'a> From<&'a DriveDocumentQuery<'a>> for DocumentCountQuery { + fn from(value: &'a DriveDocumentQuery<'a>) -> Self { + Self { + document_query: value.into(), + } + } +} + +impl<'a> From> for DocumentCountQuery { + fn from(value: DriveDocumentQuery<'a>) -> Self { + Self { + document_query: value.into(), + } + } +} + +impl<'a> TryFrom<&'a DocumentCountQuery> for DriveDocumentQuery<'a> { + type Error = Error; + + fn try_from(query: &'a DocumentCountQuery) -> Result { + // Force the underlying DriveDocumentQuery to be unbounded. + // + // The proof verifier counts documents from the verified proof, so + // any limit set on the wrapped DocumentQuery would silently cap the + // returned count. The server-side count handler also runs with no + // limit, so the client must match. Without this, callers (e.g. the + // WASM SDK, which defaults DocumentQuery.limit to 100) would see + // a count truncated at their pagination limit instead of the actual + // total. + let mut drive_query: DriveDocumentQuery = (&query.document_query).try_into()?; + drive_query.limit = None; + Ok(drive_query) + } +} + +impl TryFrom for GetDocumentsCountRequest { + type Error = Error; + + fn try_from(query: DocumentCountQuery) -> Result { + let where_bytes = serialize_where_clauses_to_cbor(&query.document_query.where_clauses)?; + Ok(GetDocumentsCountRequest { + version: Some(GetDocumentsCountRequestVersion::V0( + GetDocumentsCountRequestV0 { + data_contract_id: query.document_query.data_contract.id().to_vec(), + document_type: query.document_query.document_type_name.clone(), + r#where: where_bytes, + prove: true, + }, + )), + }) + } +} + +impl TransportRequest for DocumentCountQuery { + type Client = ::Client; + type Response = ::Response; + const SETTINGS_OVERRIDES: rs_dapi_client::RequestSettings = + ::SETTINGS_OVERRIDES; + + fn request_name(&self) -> &'static str { + "GetDocumentsCountRequest" + } + + fn method_name(&self) -> &'static str { + "get_documents_count" + } + + fn execute_transport<'c>( + self, + client: &'c mut Self::Client, + settings: &AppliedRequestSettings, + ) -> BoxFuture<'c, Result> { + let request: GetDocumentsCountRequest = self + .try_into() + .expect("DocumentCountQuery should always be valid"); + request.execute_transport(client, settings) + } +} + +impl FromProof for DocumentCount { + type Request = DocumentCountQuery; + type Response = GetDocumentsCountResponse; + + fn maybe_from_proof_with_metadata<'a, I: Into, O: Into>( + request: I, + response: O, + network: Network, + platform_version: &PlatformVersion, + provider: &'a dyn ContextProvider, + ) -> Result<(Option, ResponseMetadata, Proof), drive_proof_verifier::Error> + where + Self: 'a, + { + let request: Self::Request = request.into(); + let drive_query: DriveDocumentQuery = + (&request) + .try_into() + .map_err(|e| drive_proof_verifier::Error::RequestError { + error: format!( + "Failed to convert DocumentCountQuery to DriveDocumentQuery: {}", + e + ), + })?; + + >::maybe_from_proof_with_metadata( + drive_query, + response, + network, + platform_version, + provider, + ) + } +} + +impl Fetch for DocumentCount { + type Request = DocumentCountQuery; +} + +fn serialize_where_clauses_to_cbor(clauses: &[WhereClause]) -> Result, Error> { + if clauses.is_empty() { + return Ok(Vec::new()); + } + + let value_array = Value::Array(clauses.iter().cloned().map(Value::from).collect()); + + let cbor_value: CborValue = TryInto::::try_into(value_array) + .map_err(|e| Error::Protocol(ProtocolError::EncodingError(e.to_string())))?; + + let mut serialized = Vec::new(); + ciborium::ser::into_writer(&cbor_value, &mut serialized) + .map_err(|e| Error::Protocol(ProtocolError::EncodingError(e.to_string())))?; + + Ok(serialized) +} diff --git a/packages/rs-sdk/src/platform/documents/document_split_count_query.rs b/packages/rs-sdk/src/platform/documents/document_split_count_query.rs new file mode 100644 index 00000000000..e6330bb2d23 --- /dev/null +++ b/packages/rs-sdk/src/platform/documents/document_split_count_query.rs @@ -0,0 +1,184 @@ +//! High-level SDK query for [`GetDocumentsSplitCountRequest`]. +//! +//! Adds a `split_property` parameter on top of the inputs accepted by +//! [`super::document_count_query::DocumentCountQuery`]: the index property +//! whose values partition the count. + +use std::sync::Arc; + +use crate::error::Error; +use crate::platform::documents::document_query::DocumentQuery; +use crate::platform::Fetch; +use ciborium::Value as CborValue; +use dapi_grpc::platform::v0::get_documents_split_count_request::{ + GetDocumentsSplitCountRequestV0, Version as GetDocumentsSplitCountRequestVersion, +}; +use dapi_grpc::platform::v0::{ + GetDocumentsSplitCountRequest, GetDocumentsSplitCountResponse, Proof, ResponseMetadata, +}; +use dash_context_provider::ContextProvider; +use dpp::dashcore::Network; +use dpp::version::PlatformVersion; +use dpp::{ + data_contract::accessors::v0::DataContractV0Getters, platform_value::Value, + prelude::DataContract, ProtocolError, +}; +use drive::query::{DriveDocumentQuery, WhereClause}; +use drive_proof_verifier::{DocumentSplitCounts, FromProof}; +use rs_dapi_client::transport::{ + AppliedRequestSettings, BoxFuture, TransportError, TransportRequest, +}; + +/// SDK-side query for the `GetDocumentsSplitCount` endpoint. +/// +/// Same shape as [`DocumentCountQuery`](super::document_count_query::DocumentCountQuery), +/// plus a `split_property` field naming the index property whose distinct +/// values partition the returned counts. +#[derive(Debug, Clone, dash_platform_macros::Mockable)] +#[cfg_attr(feature = "mocks", derive(serde::Serialize, serde::Deserialize))] +pub struct DocumentSplitCountQuery { + /// Underlying document query. + pub document_query: DocumentQuery, + /// Index property whose distinct values partition the counts. + pub split_property: String, +} + +impl DocumentSplitCountQuery { + /// Build a split-count query. + pub fn new>>( + contract: C, + document_type_name: &str, + split_property: impl Into, + ) -> Result { + Ok(Self { + document_query: DocumentQuery::new(contract, document_type_name)?, + split_property: split_property.into(), + }) + } + + /// Add a where clause to the underlying query. + pub fn with_where(mut self, clause: WhereClause) -> Self { + self.document_query = self.document_query.with_where(clause); + self + } +} + +impl<'a> TryFrom<&'a DocumentSplitCountQuery> for DriveDocumentQuery<'a> { + type Error = Error; + + fn try_from(query: &'a DocumentSplitCountQuery) -> Result { + // Force the underlying DriveDocumentQuery to be unbounded so the + // proof-verifier aggregation sees every matching document. See the + // matching note on `DocumentCountQuery`'s impl for the rationale. + let mut drive_query: DriveDocumentQuery = (&query.document_query).try_into()?; + drive_query.limit = None; + Ok(drive_query) + } +} + +impl TryFrom for GetDocumentsSplitCountRequest { + type Error = Error; + + fn try_from(query: DocumentSplitCountQuery) -> Result { + let where_bytes = serialize_where_clauses_to_cbor(&query.document_query.where_clauses)?; + Ok(GetDocumentsSplitCountRequest { + version: Some(GetDocumentsSplitCountRequestVersion::V0( + GetDocumentsSplitCountRequestV0 { + data_contract_id: query.document_query.data_contract.id().to_vec(), + document_type: query.document_query.document_type_name.clone(), + r#where: where_bytes, + split_count_by_index_property: query.split_property.clone(), + prove: true, + }, + )), + }) + } +} + +impl TransportRequest for DocumentSplitCountQuery { + type Client = ::Client; + type Response = ::Response; + const SETTINGS_OVERRIDES: rs_dapi_client::RequestSettings = + ::SETTINGS_OVERRIDES; + + fn request_name(&self) -> &'static str { + "GetDocumentsSplitCountRequest" + } + + fn method_name(&self) -> &'static str { + "get_documents_split_count" + } + + fn execute_transport<'c>( + self, + client: &'c mut Self::Client, + settings: &AppliedRequestSettings, + ) -> BoxFuture<'c, Result> { + let request: GetDocumentsSplitCountRequest = self + .try_into() + .expect("DocumentSplitCountQuery should always be valid"); + request.execute_transport(client, settings) + } +} + +impl FromProof for DocumentSplitCounts { + type Request = DocumentSplitCountQuery; + type Response = GetDocumentsSplitCountResponse; + + fn maybe_from_proof_with_metadata<'a, I: Into, O: Into>( + request: I, + response: O, + network: Network, + platform_version: &PlatformVersion, + provider: &'a dyn ContextProvider, + ) -> Result<(Option, ResponseMetadata, Proof), drive_proof_verifier::Error> + where + Self: 'a, + { + // Route through the split-property-aware helper rather than the + // generic FromProof impl, which deliberately + // returns an error to prevent silent empty results when the split + // property is unknown. + let request: Self::Request = request.into(); + let split_property = request.split_property.clone(); + let drive_query: DriveDocumentQuery = + (&request) + .try_into() + .map_err(|e| drive_proof_verifier::Error::RequestError { + error: format!( + "Failed to convert DocumentSplitCountQuery to DriveDocumentQuery: {}", + e + ), + })?; + + DocumentSplitCounts::maybe_from_proof_with_split_property::( + drive_query, + &split_property, + response, + network, + platform_version, + provider, + ) + } +} + +impl Fetch for DocumentSplitCounts { + type Request = DocumentSplitCountQuery; +} + +fn serialize_where_clauses_to_cbor(clauses: &[WhereClause]) -> Result, Error> { + if clauses.is_empty() { + return Ok(Vec::new()); + } + + let value_array = Value::Array(clauses.iter().cloned().map(Value::from).collect()); + + let cbor_value: CborValue = TryInto::::try_into(value_array) + .map_err(|e| Error::Protocol(ProtocolError::EncodingError(e.to_string())))?; + + let mut serialized = Vec::new(); + ciborium::ser::into_writer(&cbor_value, &mut serialized) + .map_err(|e| Error::Protocol(ProtocolError::EncodingError(e.to_string())))?; + + Ok(serialized) +} diff --git a/packages/rs-sdk/src/platform/documents/mod.rs b/packages/rs-sdk/src/platform/documents/mod.rs index 94f890f14a0..1a86237febe 100644 --- a/packages/rs-sdk/src/platform/documents/mod.rs +++ b/packages/rs-sdk/src/platform/documents/mod.rs @@ -1,2 +1,4 @@ +pub mod document_count_query; pub mod document_query; +pub mod document_split_count_query; pub mod transitions; diff --git a/packages/rs-sdk/tests/fetch/document_count.rs b/packages/rs-sdk/tests/fetch/document_count.rs new file mode 100644 index 00000000000..794dc63f8c1 --- /dev/null +++ b/packages/rs-sdk/tests/fetch/document_count.rs @@ -0,0 +1,89 @@ +//! Mock-based integration tests for the SDK [`DocumentCount`] fetch path. +//! +//! Live-devnet end-to-end coverage requires test vectors generated against a +//! running platform; for now we exercise the SDK ↔ mock-DAPI path which proves +//! that: +//! - `DocumentCountQuery` builds + serializes through the mock transport +//! - `Fetch for DocumentCount` correctly threads the query, response, and +//! mock expectations +//! - `MockResponse for DocumentCount` round-trips a `u64` count + +use std::sync::Arc; + +use super::common::{mock_data_contract, mock_document_type}; +use dash_sdk::{ + platform::{documents::document_count_query::DocumentCountQuery, Fetch}, + Sdk, +}; +use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; +use drive_proof_verifier::DocumentCount; + +#[tokio::test] +async fn test_mock_fetch_document_count_returns_expected() { + let mut sdk = Sdk::new_mock(); + + let document_type = mock_document_type(); + let data_contract = mock_data_contract(Some(&document_type)); + let query = DocumentCountQuery::new(Arc::new(data_contract), document_type.name()) + .expect("build DocumentCountQuery"); + + let expected = DocumentCount(7); + + sdk.mock() + .expect_fetch(query.clone(), Some(expected.clone())) + .await + .expect("expectation should be added"); + + let retrieved = DocumentCount::fetch(&sdk, query) + .await + .expect("fetch should succeed") + .expect("count should be present"); + + assert_eq!(retrieved, expected); + assert_eq!(retrieved.0, 7); +} + +#[tokio::test] +async fn test_mock_fetch_document_count_zero() { + let mut sdk = Sdk::new_mock(); + + let document_type = mock_document_type(); + let data_contract = mock_data_contract(Some(&document_type)); + let query = DocumentCountQuery::new(Arc::new(data_contract), document_type.name()) + .expect("build DocumentCountQuery"); + + let expected = DocumentCount(0); + + sdk.mock() + .expect_fetch(query.clone(), Some(expected.clone())) + .await + .expect("expectation should be added"); + + let retrieved = DocumentCount::fetch(&sdk, query) + .await + .expect("fetch should succeed") + .expect("count should be present"); + + assert_eq!(retrieved, DocumentCount(0)); +} + +#[tokio::test] +async fn test_mock_fetch_document_count_not_found() { + let mut sdk = Sdk::new_mock(); + + let document_type = mock_document_type(); + let data_contract = mock_data_contract(Some(&document_type)); + let query = DocumentCountQuery::new(Arc::new(data_contract), document_type.name()) + .expect("build DocumentCountQuery"); + + sdk.mock() + .expect_fetch(query.clone(), None as Option) + .await + .expect("expectation should be added"); + + let retrieved = DocumentCount::fetch(&sdk, query) + .await + .expect("fetch should succeed"); + + assert!(retrieved.is_none()); +} diff --git a/packages/rs-sdk/tests/fetch/document_split_count.rs b/packages/rs-sdk/tests/fetch/document_split_count.rs new file mode 100644 index 00000000000..2a61b0b599b --- /dev/null +++ b/packages/rs-sdk/tests/fetch/document_split_count.rs @@ -0,0 +1,176 @@ +//! Mock-based integration tests for the SDK [`DocumentSplitCounts`] fetch path. + +use std::collections::BTreeMap; +use std::sync::Arc; + +use super::common::{mock_data_contract, mock_document_type}; +use dash_sdk::{ + platform::{documents::document_split_count_query::DocumentSplitCountQuery, Fetch}, + Sdk, +}; +use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; +use drive_proof_verifier::DocumentSplitCounts; + +#[tokio::test] +async fn test_mock_fetch_document_split_counts_returns_expected() { + let mut sdk = Sdk::new_mock(); + + let document_type = mock_document_type(); + let data_contract = mock_data_contract(Some(&document_type)); + let query = DocumentSplitCountQuery::new(Arc::new(data_contract), document_type.name(), "a") + .expect("build DocumentSplitCountQuery"); + + let mut counts = BTreeMap::new(); + counts.insert(b"alice".to_vec(), 3u64); + counts.insert(b"bob".to_vec(), 11u64); + let expected = DocumentSplitCounts(counts); + + sdk.mock() + .expect_fetch(query.clone(), Some(expected.clone())) + .await + .expect("expectation should be added"); + + let retrieved = DocumentSplitCounts::fetch(&sdk, query) + .await + .expect("fetch should succeed") + .expect("split counts should be present"); + + assert_eq!(retrieved, expected); + assert_eq!(retrieved.0.get(b"alice".as_slice()), Some(&3u64)); + assert_eq!(retrieved.0.get(b"bob".as_slice()), Some(&11u64)); +} + +#[tokio::test] +async fn test_mock_fetch_document_split_counts_empty_map() { + let mut sdk = Sdk::new_mock(); + + let document_type = mock_document_type(); + let data_contract = mock_data_contract(Some(&document_type)); + let query = DocumentSplitCountQuery::new(Arc::new(data_contract), document_type.name(), "a") + .expect("build DocumentSplitCountQuery"); + + let expected = DocumentSplitCounts(BTreeMap::new()); + + sdk.mock() + .expect_fetch(query.clone(), Some(expected.clone())) + .await + .expect("expectation should be added"); + + let retrieved = DocumentSplitCounts::fetch(&sdk, query) + .await + .expect("fetch should succeed") + .expect("split counts should be present"); + + assert!(retrieved.0.is_empty()); +} + +#[tokio::test] +async fn test_mock_fetch_document_split_counts_not_found() { + let mut sdk = Sdk::new_mock(); + + let document_type = mock_document_type(); + let data_contract = mock_data_contract(Some(&document_type)); + let query = DocumentSplitCountQuery::new(Arc::new(data_contract), document_type.name(), "a") + .expect("build DocumentSplitCountQuery"); + + sdk.mock() + .expect_fetch(query.clone(), None as Option) + .await + .expect("expectation should be added"); + + let retrieved = DocumentSplitCounts::fetch(&sdk, query) + .await + .expect("fetch should succeed"); + + assert!(retrieved.is_none()); +} + +#[tokio::test] +async fn test_generic_fromproof_for_drive_query_returns_error_not_empty_map() { + // Regression: the older `FromProof for DocumentSplitCounts` + // silently returned `Some(DocumentSplitCounts(BTreeMap::new()))` because the + // split-property name isn't carried by `DriveDocumentQuery`. After the fix + // the generic impl returns an explicit error so callers can't get silent + // empty results — only the SDK-side `Fetch` impl on `DocumentSplitCountQuery` + // (which threads `split_property`) should succeed. + use dash_context_provider::{ContextProvider, ContextProviderError}; + use dash_sdk::dpp::dashcore::Network; + use dash_sdk::dpp::data_contract::accessors::v0::DataContractV0Getters; + use dash_sdk::dpp::version::PlatformVersion; + use dash_sdk::platform::proto::GetDocumentsSplitCountResponse; + use dash_sdk::platform::DriveDocumentQuery; + use drive_proof_verifier::{DocumentSplitCounts, FromProof}; + + struct NoopProvider; + impl ContextProvider for NoopProvider { + fn get_data_contract( + &self, + _id: &dash_sdk::dpp::prelude::Identifier, + _platform_version: &PlatformVersion, + ) -> Result< + Option>, + ContextProviderError, + > { + Ok(None) + } + fn get_token_configuration( + &self, + _token_id: &dash_sdk::dpp::prelude::Identifier, + ) -> Result, ContextProviderError> + { + Ok(None) + } + fn get_quorum_public_key( + &self, + _quorum_type: u32, + _quorum_hash: [u8; 32], + _core_chain_locked_height: u32, + ) -> Result<[u8; 48], ContextProviderError> { + Ok([0u8; 48]) + } + fn get_platform_activation_height( + &self, + ) -> Result { + Ok(0) + } + } + + let document_type = mock_document_type(); + let data_contract = mock_data_contract(Some(&document_type)); + let drive_query = DriveDocumentQuery { + contract: &data_contract, + document_type: data_contract + .document_type_for_name(document_type.name()) + .unwrap(), + internal_clauses: Default::default(), + offset: None, + limit: None, + order_by: Default::default(), + start_at: None, + start_at_included: false, + block_time_ms: None, + }; + + let response = GetDocumentsSplitCountResponse { version: None }; + let provider = NoopProvider; + + let result = + >::maybe_from_proof_with_metadata( + drive_query, + response, + Network::Testnet, + PlatformVersion::latest(), + &provider, + ); + + let err = result.expect_err( + "generic FromProof for DocumentSplitCounts must error \ + (split-property unknown) — see fix preventing silent empty maps under prove=true", + ); + let msg = format!("{}", err); + assert!( + msg.contains("split-property"), + "error should mention the missing split-property contract: {}", + msg + ); +} diff --git a/packages/rs-sdk/tests/fetch/mod.rs b/packages/rs-sdk/tests/fetch/mod.rs index 83fc9a97b03..807680ae67b 100644 --- a/packages/rs-sdk/tests/fetch/mod.rs +++ b/packages/rs-sdk/tests/fetch/mod.rs @@ -18,6 +18,8 @@ mod contested_resource_vote_state; mod contested_resource_voters; mod data_contract; mod document; +mod document_count; +mod document_split_count; mod epoch; mod evonode; mod generated_data; diff --git a/packages/wasm-sdk/src/queries/document.rs b/packages/wasm-sdk/src/queries/document.rs index bb6a9da45f3..14a8569812e 100644 --- a/packages/wasm-sdk/src/queries/document.rs +++ b/packages/wasm-sdk/src/queries/document.rs @@ -6,10 +6,13 @@ use dash_sdk::dpp::data_contract::accessors::v0::DataContractV0Getters; use dash_sdk::dpp::document::Document; use dash_sdk::dpp::platform_value::Value; use dash_sdk::dpp::prelude::Identifier; +use dash_sdk::platform::documents::document_count_query::DocumentCountQuery; use dash_sdk::platform::documents::document_query::DocumentQuery; +use dash_sdk::platform::documents::document_split_count_query::DocumentSplitCountQuery; use dash_sdk::platform::Fetch; use dash_sdk::platform::FetchMany; use drive::query::{OrderClause, WhereClause, WhereOperator}; +use drive_proof_verifier::{DocumentCount, DocumentSplitCounts}; use js_sys::Map; use serde::Deserialize; use serde_json::Value as JsonValue; @@ -455,4 +458,103 @@ impl WasmSdk { proof, )) } + + #[wasm_bindgen(js_name = "getDocumentsCount", unchecked_return_type = "bigint")] + pub async fn get_documents_count(&self, query: DocumentsQueryJs) -> Result { + let base_query = parse_documents_query(self, query).await?; + let count_query = DocumentCountQuery { + document_query: base_query, + }; + + let count = DocumentCount::fetch(self.as_ref(), count_query) + .await? + .map(|c| c.0) + .unwrap_or(0); + + Ok(count) + } + + #[wasm_bindgen( + js_name = "getDocumentsCountWithProofInfo", + unchecked_return_type = "ProofMetadataResponseTyped" + )] + pub async fn get_documents_count_with_proof_info( + &self, + query: DocumentsQueryJs, + ) -> Result { + let base_query = parse_documents_query(self, query).await?; + let count_query = DocumentCountQuery { + document_query: base_query, + }; + + let (count_opt, metadata, proof) = + DocumentCount::fetch_with_metadata_and_proof(self.as_ref(), count_query, None).await?; + let count = count_opt.map(|c| c.0).unwrap_or(0); + + Ok(ProofMetadataResponseWasm::from_sdk_parts( + JsValue::from(count), + metadata, + proof, + )) + } + + #[wasm_bindgen( + js_name = "getDocumentsSplitCount", + unchecked_return_type = "Map" + )] + pub async fn get_documents_split_count( + &self, + query: DocumentsQueryJs, + #[wasm_bindgen(js_name = "splitProperty")] split_property: String, + ) -> Result { + let base_query = parse_documents_query(self, query).await?; + let split_query = DocumentSplitCountQuery { + document_query: base_query, + split_property, + }; + + let splits = DocumentSplitCounts::fetch(self.as_ref(), split_query).await?; + Ok(split_counts_to_js_map(splits)) + } + + #[wasm_bindgen( + js_name = "getDocumentsSplitCountWithProofInfo", + unchecked_return_type = "ProofMetadataResponseTyped>" + )] + pub async fn get_documents_split_count_with_proof_info( + &self, + query: DocumentsQueryJs, + #[wasm_bindgen(js_name = "splitProperty")] split_property: String, + ) -> Result { + let base_query = parse_documents_query(self, query).await?; + let split_query = DocumentSplitCountQuery { + document_query: base_query, + split_property, + }; + + let (splits_opt, metadata, proof) = + DocumentSplitCounts::fetch_with_metadata_and_proof(self.as_ref(), split_query, None) + .await?; + let map = split_counts_to_js_map(splits_opt); + + Ok(ProofMetadataResponseWasm::from_sdk_parts( + map, metadata, proof, + )) + } +} + +/// Convert an `Option` into a JS `Map`. +/// +/// Keys are hex-encoded so the JS side can match them against the +/// platform-value-encoded property values returned in proofs. None → +/// empty map. +fn split_counts_to_js_map(splits: Option) -> Map { + let map = Map::new(); + if let Some(DocumentSplitCounts(inner)) = splits { + for (key_bytes, count) in inner { + let key: JsValue = hex::encode(key_bytes).into(); + map.set(&key, &JsValue::from(count)); + } + } + map }