diff --git a/.cargo/config-release.toml b/.cargo/config-release.toml new file mode 100644 index 00000000000..faab5e6c572 --- /dev/null +++ b/.cargo/config-release.toml @@ -0,0 +1,11 @@ +# This is a config file used by Docker build process when building release version of drive-abci. +# Hopefully it can be removed once profile-rustflags is stabilized, see https://github.com/rust-lang/cargo/issues/10271 + +[target.aarch64-unknown-linux-musl] +rustflags = ["-C", "target-feature=-crt-static"] + +[target.x86_64-unknown-linux-musl] +rustflags = ["-C", "target-feature=-crt-static"] + +[target.aarch64-unknown-linux-gnu] +linker = "aarch64-linux-gnu-gcc" diff --git a/.github/workflows/release-docker-image.yml b/.github/workflows/release-docker-image.yml index a8ed8273ca9..5c56ade272f 100644 --- a/.github/workflows/release-docker-image.yml +++ b/.github/workflows/release-docker-image.yml @@ -17,8 +17,16 @@ on: type: string description: Image target. i.e. drive-abci, dapi required: true + tag: + type: string + description: Image tag, i.e. v0.1.0; note it can be inherited from 'workflow_dispatch' event + default: ${{ github.event.inputs.tag || github.event.release.tag_name }} + cargo_profile: + type: string + description: Cargo profile. i.e. release, dev + default: release env: - DIGEST_NAME: digests-${{ inputs.image_org }}-${{ inputs.image_name }}-${{ github.sha }} + DIGEST_NAME: digests-${{ inputs.image_org }}-${{ inputs.image_name }}-${{ inputs.tag }}-${{ inputs.cargo_profile }}-${{ github.sha }} DIGEST_DIR_PATH: /tmp/digests jobs: @@ -29,9 +37,9 @@ jobs: strategy: matrix: include: - - runner: [ "self-hosted", "linux", "x64", "ubuntu-platform" ] + - runner: ["self-hosted", "linux", "x64", "ubuntu-platform"] platform: linux/amd64 - - runner: [ "self-hosted", "linux", "arm64", "ubuntu-platform" ] + - runner: ["self-hosted", "linux", "arm64", "ubuntu-platform"] platform: linux/arm64 steps: - name: Check out repo @@ -52,10 +60,10 @@ jobs: with: image_name: ${{ inputs.image_name }} image_org: ${{ inputs.image_org }} - image_version: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.event.release.tag_name }} + image_version: ${{ inputs.tag }} target: ${{ inputs.target }} platform: ${{ matrix.platform }} - cargo_profile: release + cargo_profile: ${{ inputs.cargo_profile }} dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} region: ${{ secrets.AWS_REGION }} @@ -92,29 +100,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Get image version - uses: actions/github-script@v6 - id: version - with: - result-encoding: string - script: | - return ( - context.eventName === 'workflow_dispatch' - ? '${{ github.event.inputs.tag }}' - : context.payload.release.tag_name - ); - - name: Set suffix uses: actions/github-script@v6 id: suffix with: result-encoding: string script: | - const fullTag = '${{ steps.version.outputs.result }}'; + const fullTag = '${{ inputs.tag }}'; if (fullTag.includes('-')) { - const [, fullSuffix] = fullTag.split('-'); - const [suffix] = fullSuffix.split('.'); - return `-${suffix}`; + const suffixes = fullTag.split('-').slice(1); + const firstElements = suffixes.map(suffix => suffix.split('.')[0]); + return `-${firstElements.join('-')}`; } else { return ''; } @@ -125,10 +121,10 @@ jobs: with: images: ${{ inputs.image_org }}/${{ inputs.image_name }} tags: | - type=match,pattern=v(\d+),group=1,value=${{ steps.version.outputs.result }} - type=match,pattern=v(\d+.\d+),group=1,value=${{ steps.version.outputs.result }} - type=match,pattern=v(\d+.\d+.\d+),group=1,value=${{ steps.version.outputs.result }} - type=match,pattern=v(.*),group=1,value=${{ steps.version.outputs.result }},suffix= + type=match,pattern=v(.*),group=1,value=${{ inputs.tag }},priority=910,suffix= + type=match,pattern=v(\d+),group=1,value=${{ inputs.tag }} + type=match,pattern=v(\d+.\d+),group=1,value=${{ inputs.tag }} + type=match,pattern=v(\d+.\d+.\d+),group=1,value=${{ inputs.tag }} flavor: | suffix=${{ steps.suffix.outputs.result }},onlatest=true latest=${{ github.event_name == 'release' }} @@ -138,7 +134,6 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Create manifest list and push working-directory: ${{ env.DIGEST_DIR_PATH }} run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 036e6ac49c4..3f6f9810a6a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,10 @@ on: tag: description: "Version (i.e. v0.22.3-pre.2)" required: true + only_drive: + type: boolean + description: Only build Drive image + default: false concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -17,7 +21,7 @@ concurrency: jobs: release-npm: name: Release NPM packages - runs-on: [ "self-hosted", "linux", "arm64", "ubuntu-platform" ] + runs-on: ["self-hosted", "linux", "arm64", "ubuntu-platform"] timeout-minutes: 15 if: github.event_name != 'workflow_dispatch' steps: @@ -81,7 +85,7 @@ jobs: with: result-encoding: string script: | - const fullTag = context.payload.release.tag_name; + const fullTag = "${{ inputs.tag }}" || context.payload.release.tag_name; if (fullTag.includes('-')) { const [, fullSuffix] = fullTag.split('-'); const [suffix] = fullSuffix.split('.'); @@ -96,10 +100,15 @@ jobs: with: result-encoding: string script: | - const tag = context.payload.release.tag_name; + const tag = "${{ inputs.tag }}" || context.payload.release.tag_name; const [, major, minor] = tag.match(/^v([0-9]+)\.([0-9]+)/); return (tag.includes('-') ? `${major}.${minor}-${{steps.suffix.outputs.result}}` : 'latest'); + - name: Show NPM release tag + run: | + echo "NPM suffix: ${{ steps.suffix.outputs.result }}" + echo "NPM release tag: ${{ steps.tag.outputs.result }}" + - name: Configure NPM auth token run: yarn config set npmAuthToken ${{ secrets.NPM_TOKEN }} @@ -136,9 +145,23 @@ jobs: image_org: dashpay image_name: drive target: drive-abci + tag: ${{ inputs.tag || github.event.release.tag_name }} + + release-drive-image-debug: + name: Release Drive debug image + secrets: inherit + uses: ./.github/workflows/release-docker-image.yml + with: + name: Drive + image_org: dashpay + image_name: drive + target: drive-abci + cargo_profile: dev + tag: ${{ inputs.tag || github.event.release.tag_name }}-debug release-dapi-image: name: Release DAPI image + if: ${{ !inputs.only_drive }} secrets: inherit uses: ./.github/workflows/release-docker-image.yml with: @@ -146,9 +169,11 @@ jobs: image_org: dashpay image_name: dapi target: dapi + tag: ${{ inputs.tag || github.event.release.tag_name }} release-test-suite-image: name: Release Test Suite image + if: ${{ !inputs.only_drive }} secrets: inherit uses: ./.github/workflows/release-docker-image.yml with: @@ -156,20 +181,24 @@ jobs: image_org: dashpay image_name: platform-test-suite target: test-suite + tag: ${{ inputs.tag || github.event.release.tag_name }} release-dashmate-helper-image: name: Release Dashmate Helper image secrets: inherit + if: ${{ !inputs.only_drive }} uses: ./.github/workflows/release-docker-image.yml with: name: Dashmate Helper image_org: dashpay image_name: dashmate-helper target: dashmate-helper + tag: ${{ inputs.tag || github.event.release.tag_name }} release-dashmate-packages: name: Release Dashmate packages runs-on: ${{ matrix.os }} + if: ${{ !inputs.only_drive }} needs: release-npm permissions: id-token: write # s3 cache @@ -190,7 +219,7 @@ jobs: - name: Check out repo uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 0 - name: Configure AWS credentials and bucket region uses: aws-actions/configure-aws-credentials@v4 diff --git a/.pnp.cjs b/.pnp.cjs index 6ab0a1adc1e..7b11ce621c1 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -6769,20 +6769,22 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["body-parser", [\ - ["npm:1.19.0", {\ - "packageLocation": "./.yarn/cache/body-parser-npm-1.19.0-6e177cabfa-6ed5f3f42f.zip/node_modules/body-parser/",\ + ["npm:1.20.3", {\ + "packageLocation": "./.yarn/cache/body-parser-npm-1.20.3-c7b184cd14-8723e3d7a6.zip/node_modules/body-parser/",\ "packageDependencies": [\ - ["body-parser", "npm:1.19.0"],\ - ["bytes", "npm:3.1.0"],\ - ["content-type", "npm:1.0.4"],\ - ["debug", "virtual:6e177cabfad012f413f9c41366539c04d8701f0567119998690ab02224012faa99ec3a16b9f74f4d7920ab472c12b3e70f47f8f143239c06d0e2569e60ed9f62#npm:2.6.9"],\ - ["depd", "npm:1.1.2"],\ - ["http-errors", "npm:1.7.2"],\ + ["body-parser", "npm:1.20.3"],\ + ["bytes", "npm:3.1.2"],\ + ["content-type", "npm:1.0.5"],\ + ["debug", "virtual:c7b184cd14c02e3ce555ab1875e60cf5033c617e17d82c4c02ea822101d3c817f48bf25a766b4d4335742dc5c9c14c2e88a57ed955a56c4ad0613899f82f5618#npm:2.6.9"],\ + ["depd", "npm:2.0.0"],\ + ["destroy", "npm:1.2.0"],\ + ["http-errors", "npm:2.0.0"],\ ["iconv-lite", "npm:0.4.24"],\ - ["on-finished", "npm:2.3.0"],\ + ["on-finished", "npm:2.4.1"],\ ["qs", "npm:6.11.0"],\ - ["raw-body", "npm:2.4.0"],\ - ["type-is", "npm:1.6.18"]\ + ["raw-body", "npm:2.5.2"],\ + ["type-is", "npm:1.6.18"],\ + ["unpipe", "npm:1.0.0"]\ ],\ "linkType": "HARD"\ }]\ @@ -7077,10 +7079,10 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["bytes", [\ - ["npm:3.1.0", {\ - "packageLocation": "./.yarn/cache/bytes-npm-3.1.0-19c5b15405-7c3b21c5d9.zip/node_modules/bytes/",\ + ["npm:3.1.2", {\ + "packageLocation": "./.yarn/cache/bytes-npm-3.1.2-28b8643004-a10abf2ba7.zip/node_modules/bytes/",\ "packageDependencies": [\ - ["bytes", "npm:3.1.0"]\ + ["bytes", "npm:3.1.2"]\ ],\ "linkType": "HARD"\ }]\ @@ -7992,7 +7994,7 @@ const RAW_RUNTIME_STATE = "packageLocation": "./.yarn/cache/connect-npm-3.7.0-25ccb085cc-f94818b198.zip/node_modules/connect/",\ "packageDependencies": [\ ["connect", "npm:3.7.0"],\ - ["debug", "virtual:6e177cabfad012f413f9c41366539c04d8701f0567119998690ab02224012faa99ec3a16b9f74f4d7920ab472c12b3e70f47f8f143239c06d0e2569e60ed9f62#npm:2.6.9"],\ + ["debug", "virtual:c7b184cd14c02e3ce555ab1875e60cf5033c617e17d82c4c02ea822101d3c817f48bf25a766b4d4335742dc5c9c14c2e88a57ed955a56c4ad0613899f82f5618#npm:2.6.9"],\ ["finalhandler", "npm:1.1.2"],\ ["parseurl", "npm:1.3.3"],\ ["utils-merge", "npm:1.0.1"]\ @@ -8038,6 +8040,13 @@ const RAW_RUNTIME_STATE = ["content-type", "npm:1.0.4"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:1.0.5", {\ + "packageLocation": "./.yarn/cache/content-type-npm-1.0.5-3e037bf9ab-585847d98d.zip/node_modules/content-type/",\ + "packageDependencies": [\ + ["content-type", "npm:1.0.5"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["conventional-changelog", [\ @@ -8701,12 +8710,12 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "HARD"\ }],\ - ["virtual:6e177cabfad012f413f9c41366539c04d8701f0567119998690ab02224012faa99ec3a16b9f74f4d7920ab472c12b3e70f47f8f143239c06d0e2569e60ed9f62#npm:2.6.9", {\ - "packageLocation": "./.yarn/__virtual__/debug-virtual-53242bdd6a/0/cache/debug-npm-2.6.9-7d4cb597dc-e07005f2b4.zip/node_modules/debug/",\ + ["virtual:7a0505537f63825f62aaaf982168c2b7c1e816756656d44af98202b8d07990e163024e7dadf5587aa11d691887401ca8792ff06467da4d479c747705c9e87544#npm:4.3.5", {\ + "packageLocation": "./.yarn/__virtual__/debug-virtual-e443f3d004/0/cache/debug-npm-4.3.5-b5001f59b7-cb6eab424c.zip/node_modules/debug/",\ "packageDependencies": [\ - ["debug", "virtual:6e177cabfad012f413f9c41366539c04d8701f0567119998690ab02224012faa99ec3a16b9f74f4d7920ab472c12b3e70f47f8f143239c06d0e2569e60ed9f62#npm:2.6.9"],\ + ["debug", "virtual:7a0505537f63825f62aaaf982168c2b7c1e816756656d44af98202b8d07990e163024e7dadf5587aa11d691887401ca8792ff06467da4d479c747705c9e87544#npm:4.3.5"],\ ["@types/supports-color", null],\ - ["ms", "npm:2.0.0"],\ + ["ms", "npm:2.1.2"],\ ["supports-color", null]\ ],\ "packagePeers": [\ @@ -8715,13 +8724,13 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "HARD"\ }],\ - ["virtual:7a0505537f63825f62aaaf982168c2b7c1e816756656d44af98202b8d07990e163024e7dadf5587aa11d691887401ca8792ff06467da4d479c747705c9e87544#npm:4.3.5", {\ - "packageLocation": "./.yarn/__virtual__/debug-virtual-e443f3d004/0/cache/debug-npm-4.3.5-b5001f59b7-cb6eab424c.zip/node_modules/debug/",\ + ["virtual:87db25c7c5e6b25bbc12571091cdabc648b79d427ab445d1714ccfdcdfb3265c9de6561ca760cc3de470037cbedf3af4be56ba3b684b3a1c01d4c9c2fd55a741#npm:4.3.4", {\ + "packageLocation": "./.yarn/__virtual__/debug-virtual-762d08cbe9/0/cache/debug-npm-4.3.4-4513954577-0073c3bcbd.zip/node_modules/debug/",\ "packageDependencies": [\ - ["debug", "virtual:7a0505537f63825f62aaaf982168c2b7c1e816756656d44af98202b8d07990e163024e7dadf5587aa11d691887401ca8792ff06467da4d479c747705c9e87544#npm:4.3.5"],\ + ["debug", "virtual:87db25c7c5e6b25bbc12571091cdabc648b79d427ab445d1714ccfdcdfb3265c9de6561ca760cc3de470037cbedf3af4be56ba3b684b3a1c01d4c9c2fd55a741#npm:4.3.4"],\ ["@types/supports-color", null],\ ["ms", "npm:2.1.2"],\ - ["supports-color", null]\ + ["supports-color", "npm:8.1.1"]\ ],\ "packagePeers": [\ "@types/supports-color",\ @@ -8729,13 +8738,13 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "HARD"\ }],\ - ["virtual:87db25c7c5e6b25bbc12571091cdabc648b79d427ab445d1714ccfdcdfb3265c9de6561ca760cc3de470037cbedf3af4be56ba3b684b3a1c01d4c9c2fd55a741#npm:4.3.4", {\ - "packageLocation": "./.yarn/__virtual__/debug-virtual-762d08cbe9/0/cache/debug-npm-4.3.4-4513954577-0073c3bcbd.zip/node_modules/debug/",\ + ["virtual:c7b184cd14c02e3ce555ab1875e60cf5033c617e17d82c4c02ea822101d3c817f48bf25a766b4d4335742dc5c9c14c2e88a57ed955a56c4ad0613899f82f5618#npm:2.6.9", {\ + "packageLocation": "./.yarn/__virtual__/debug-virtual-ce39f1817a/0/cache/debug-npm-2.6.9-7d4cb597dc-e07005f2b4.zip/node_modules/debug/",\ "packageDependencies": [\ - ["debug", "virtual:87db25c7c5e6b25bbc12571091cdabc648b79d427ab445d1714ccfdcdfb3265c9de6561ca760cc3de470037cbedf3af4be56ba3b684b3a1c01d4c9c2fd55a741#npm:4.3.4"],\ + ["debug", "virtual:c7b184cd14c02e3ce555ab1875e60cf5033c617e17d82c4c02ea822101d3c817f48bf25a766b4d4335742dc5c9c14c2e88a57ed955a56c4ad0613899f82f5618#npm:2.6.9"],\ ["@types/supports-color", null],\ - ["ms", "npm:2.1.2"],\ - ["supports-color", "npm:8.1.1"]\ + ["ms", "npm:2.0.0"],\ + ["supports-color", null]\ ],\ "packagePeers": [\ "@types/supports-color",\ @@ -8933,13 +8942,6 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["depd", [\ - ["npm:1.1.2", {\ - "packageLocation": "./.yarn/cache/depd-npm-1.1.2-b0c8414da7-2ed6966fc1.zip/node_modules/depd/",\ - "packageDependencies": [\ - ["depd", "npm:1.1.2"]\ - ],\ - "linkType": "HARD"\ - }],\ ["npm:2.0.0", {\ "packageLocation": "./.yarn/cache/depd-npm-2.0.0-b6c51a4b43-c0c8ff3607.zip/node_modules/depd/",\ "packageDependencies": [\ @@ -8968,6 +8970,15 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["destroy", [\ + ["npm:1.2.0", {\ + "packageLocation": "./.yarn/cache/destroy-npm-1.2.0-6a511802e2-0acb300b74.zip/node_modules/destroy/",\ + "packageDependencies": [\ + ["destroy", "npm:1.2.0"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["dezalgo", [\ ["npm:1.0.3", {\ "packageLocation": "./.yarn/cache/dezalgo-npm-1.0.3-e2bc978ebd-960f4b6230.zip/node_modules/dezalgo/",\ @@ -10442,7 +10453,7 @@ const RAW_RUNTIME_STATE = "packageLocation": "./.yarn/cache/finalhandler-npm-1.1.2-55a75d6b53-351e99a889.zip/node_modules/finalhandler/",\ "packageDependencies": [\ ["finalhandler", "npm:1.1.2"],\ - ["debug", "virtual:6e177cabfad012f413f9c41366539c04d8701f0567119998690ab02224012faa99ec3a16b9f74f4d7920ab472c12b3e70f47f8f143239c06d0e2569e60ed9f62#npm:2.6.9"],\ + ["debug", "virtual:c7b184cd14c02e3ce555ab1875e60cf5033c617e17d82c4c02ea822101d3c817f48bf25a766b4d4335742dc5c9c14c2e88a57ed955a56c4ad0613899f82f5618#npm:2.6.9"],\ ["encodeurl", "npm:1.0.2"],\ ["escape-html", "npm:1.0.3"],\ ["on-finished", "npm:2.3.0"],\ @@ -11483,15 +11494,15 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["http-errors", [\ - ["npm:1.7.2", {\ - "packageLocation": "./.yarn/cache/http-errors-npm-1.7.2-67163ae1df-cf8da344b1.zip/node_modules/http-errors/",\ + ["npm:2.0.0", {\ + "packageLocation": "./.yarn/cache/http-errors-npm-2.0.0-3f1c503428-0e7f76ee8f.zip/node_modules/http-errors/",\ "packageDependencies": [\ - ["http-errors", "npm:1.7.2"],\ - ["depd", "npm:1.1.2"],\ - ["inherits", "npm:2.0.3"],\ - ["setprototypeof", "npm:1.1.1"],\ - ["statuses", "npm:1.5.0"],\ - ["toidentifier", "npm:1.0.0"]\ + ["http-errors", "npm:2.0.0"],\ + ["depd", "npm:2.0.0"],\ + ["inherits", "npm:2.0.4"],\ + ["setprototypeof", "npm:1.2.0"],\ + ["statuses", "npm:2.0.1"],\ + ["toidentifier", "npm:1.0.1"]\ ],\ "linkType": "HARD"\ }]\ @@ -11774,13 +11785,6 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "HARD"\ }],\ - ["npm:2.0.3", {\ - "packageLocation": "./.yarn/cache/inherits-npm-2.0.3-401e64b080-8771303d66.zip/node_modules/inherits/",\ - "packageDependencies": [\ - ["inherits", "npm:2.0.3"]\ - ],\ - "linkType": "HARD"\ - }],\ ["npm:2.0.4", {\ "packageLocation": "./.yarn/cache/inherits-npm-2.0.4-c66b3957a0-cd45e923be.zip/node_modules/inherits/",\ "packageDependencies": [\ @@ -12837,7 +12841,7 @@ const RAW_RUNTIME_STATE = "packageDependencies": [\ ["karma", "npm:6.4.3"],\ ["@colors/colors", "npm:1.5.0"],\ - ["body-parser", "npm:1.19.0"],\ + ["body-parser", "npm:1.20.3"],\ ["braces", "npm:3.0.2"],\ ["chokidar", "npm:3.5.3"],\ ["connect", "npm:3.7.0"],\ @@ -14563,7 +14567,7 @@ const RAW_RUNTIME_STATE = ["@sinonjs/fake-timers", "npm:10.3.0"],\ ["@sinonjs/text-encoding", "npm:0.7.1"],\ ["just-extend", "npm:4.2.1"],\ - ["path-to-regexp", "npm:1.8.0"]\ + ["path-to-regexp", "npm:1.9.0"]\ ],\ "linkType": "HARD"\ }]\ @@ -15174,6 +15178,14 @@ const RAW_RUNTIME_STATE = ["ee-first", "npm:1.1.1"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:2.4.1", {\ + "packageLocation": "./.yarn/cache/on-finished-npm-2.4.1-907af70f88-8e81472c50.zip/node_modules/on-finished/",\ + "packageDependencies": [\ + ["on-finished", "npm:2.4.1"],\ + ["ee-first", "npm:1.1.1"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["once", [\ @@ -15766,10 +15778,10 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["path-to-regexp", [\ - ["npm:1.8.0", {\ - "packageLocation": "./.yarn/cache/path-to-regexp-npm-1.8.0-a1904f5c44-45a01690f7.zip/node_modules/path-to-regexp/",\ + ["npm:1.9.0", {\ + "packageLocation": "./.yarn/cache/path-to-regexp-npm-1.9.0-723549d8d9-67f0f4823f.zip/node_modules/path-to-regexp/",\ "packageDependencies": [\ - ["path-to-regexp", "npm:1.8.0"],\ + ["path-to-regexp", "npm:1.9.0"],\ ["isarray", "npm:0.0.1"]\ ],\ "linkType": "HARD"\ @@ -16359,12 +16371,12 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["raw-body", [\ - ["npm:2.4.0", {\ - "packageLocation": "./.yarn/cache/raw-body-npm-2.4.0-14d9d633af-aa2c506055.zip/node_modules/raw-body/",\ + ["npm:2.5.2", {\ + "packageLocation": "./.yarn/cache/raw-body-npm-2.5.2-5cb9dfebc1-863b5171e1.zip/node_modules/raw-body/",\ "packageDependencies": [\ - ["raw-body", "npm:2.4.0"],\ - ["bytes", "npm:3.1.0"],\ - ["http-errors", "npm:1.7.2"],\ + ["raw-body", "npm:2.5.2"],\ + ["bytes", "npm:3.1.2"],\ + ["http-errors", "npm:2.0.0"],\ ["iconv-lite", "npm:0.4.24"],\ ["unpipe", "npm:1.0.0"]\ ],\ @@ -17163,10 +17175,10 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["setprototypeof", [\ - ["npm:1.1.1", {\ - "packageLocation": "./.yarn/cache/setprototypeof-npm-1.1.1-706b6318ec-b8fcf5b4b8.zip/node_modules/setprototypeof/",\ + ["npm:1.2.0", {\ + "packageLocation": "./.yarn/cache/setprototypeof-npm-1.2.0-0fedbdcd3a-fde1630422.zip/node_modules/setprototypeof/",\ "packageDependencies": [\ - ["setprototypeof", "npm:1.1.1"]\ + ["setprototypeof", "npm:1.2.0"]\ ],\ "linkType": "HARD"\ }]\ @@ -17813,6 +17825,13 @@ const RAW_RUNTIME_STATE = ["statuses", "npm:1.5.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:2.0.1", {\ + "packageLocation": "./.yarn/cache/statuses-npm-2.0.1-81d2b97fee-18c7623fdb.zip/node_modules/statuses/",\ + "packageDependencies": [\ + ["statuses", "npm:2.0.1"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["stream-browserify", [\ @@ -18607,10 +18626,10 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["toidentifier", [\ - ["npm:1.0.0", {\ - "packageLocation": "./.yarn/cache/toidentifier-npm-1.0.0-5dad252f90-199e6bfca1.zip/node_modules/toidentifier/",\ + ["npm:1.0.1", {\ + "packageLocation": "./.yarn/cache/toidentifier-npm-1.0.1-f759712599-952c29e2a8.zip/node_modules/toidentifier/",\ "packageDependencies": [\ - ["toidentifier", "npm:1.0.0"]\ + ["toidentifier", "npm:1.0.1"]\ ],\ "linkType": "HARD"\ }]\ diff --git a/.yarn/cache/body-parser-npm-1.19.0-6e177cabfa-6ed5f3f42f.zip b/.yarn/cache/body-parser-npm-1.19.0-6e177cabfa-6ed5f3f42f.zip deleted file mode 100644 index f91e00e0773..00000000000 Binary files a/.yarn/cache/body-parser-npm-1.19.0-6e177cabfa-6ed5f3f42f.zip and /dev/null differ diff --git a/.yarn/cache/body-parser-npm-1.20.3-c7b184cd14-8723e3d7a6.zip b/.yarn/cache/body-parser-npm-1.20.3-c7b184cd14-8723e3d7a6.zip new file mode 100644 index 00000000000..20637461b03 Binary files /dev/null and b/.yarn/cache/body-parser-npm-1.20.3-c7b184cd14-8723e3d7a6.zip differ diff --git a/.yarn/cache/bytes-npm-3.1.0-19c5b15405-7c3b21c5d9.zip b/.yarn/cache/bytes-npm-3.1.0-19c5b15405-7c3b21c5d9.zip deleted file mode 100644 index a459fadbe56..00000000000 Binary files a/.yarn/cache/bytes-npm-3.1.0-19c5b15405-7c3b21c5d9.zip and /dev/null differ diff --git a/.yarn/cache/bytes-npm-3.1.2-28b8643004-a10abf2ba7.zip b/.yarn/cache/bytes-npm-3.1.2-28b8643004-a10abf2ba7.zip new file mode 100644 index 00000000000..37db2fe4b73 Binary files /dev/null and b/.yarn/cache/bytes-npm-3.1.2-28b8643004-a10abf2ba7.zip differ diff --git a/.yarn/cache/content-type-npm-1.0.5-3e037bf9ab-585847d98d.zip b/.yarn/cache/content-type-npm-1.0.5-3e037bf9ab-585847d98d.zip new file mode 100644 index 00000000000..55809c71623 Binary files /dev/null and b/.yarn/cache/content-type-npm-1.0.5-3e037bf9ab-585847d98d.zip differ diff --git a/.yarn/cache/depd-npm-1.1.2-b0c8414da7-2ed6966fc1.zip b/.yarn/cache/depd-npm-1.1.2-b0c8414da7-2ed6966fc1.zip deleted file mode 100644 index a4e9f778966..00000000000 Binary files a/.yarn/cache/depd-npm-1.1.2-b0c8414da7-2ed6966fc1.zip and /dev/null differ diff --git a/.yarn/cache/destroy-npm-1.2.0-6a511802e2-0acb300b74.zip b/.yarn/cache/destroy-npm-1.2.0-6a511802e2-0acb300b74.zip new file mode 100644 index 00000000000..3bc30ea4d8c Binary files /dev/null and b/.yarn/cache/destroy-npm-1.2.0-6a511802e2-0acb300b74.zip differ diff --git a/.yarn/cache/http-errors-npm-1.7.2-67163ae1df-cf8da344b1.zip b/.yarn/cache/http-errors-npm-1.7.2-67163ae1df-cf8da344b1.zip deleted file mode 100644 index 408a57291ef..00000000000 Binary files a/.yarn/cache/http-errors-npm-1.7.2-67163ae1df-cf8da344b1.zip and /dev/null differ diff --git a/.yarn/cache/http-errors-npm-2.0.0-3f1c503428-0e7f76ee8f.zip b/.yarn/cache/http-errors-npm-2.0.0-3f1c503428-0e7f76ee8f.zip new file mode 100644 index 00000000000..aa9494e34d6 Binary files /dev/null and b/.yarn/cache/http-errors-npm-2.0.0-3f1c503428-0e7f76ee8f.zip differ diff --git a/.yarn/cache/inherits-npm-2.0.3-401e64b080-8771303d66.zip b/.yarn/cache/inherits-npm-2.0.3-401e64b080-8771303d66.zip deleted file mode 100644 index 4c1ad083cec..00000000000 Binary files a/.yarn/cache/inherits-npm-2.0.3-401e64b080-8771303d66.zip and /dev/null differ diff --git a/.yarn/cache/on-finished-npm-2.4.1-907af70f88-8e81472c50.zip b/.yarn/cache/on-finished-npm-2.4.1-907af70f88-8e81472c50.zip new file mode 100644 index 00000000000..2c026245768 Binary files /dev/null and b/.yarn/cache/on-finished-npm-2.4.1-907af70f88-8e81472c50.zip differ diff --git a/.yarn/cache/path-to-regexp-npm-1.8.0-a1904f5c44-45a01690f7.zip b/.yarn/cache/path-to-regexp-npm-1.8.0-a1904f5c44-45a01690f7.zip deleted file mode 100644 index ad2d8036af8..00000000000 Binary files a/.yarn/cache/path-to-regexp-npm-1.8.0-a1904f5c44-45a01690f7.zip and /dev/null differ diff --git a/.yarn/cache/path-to-regexp-npm-1.9.0-723549d8d9-67f0f4823f.zip b/.yarn/cache/path-to-regexp-npm-1.9.0-723549d8d9-67f0f4823f.zip new file mode 100644 index 00000000000..f5b77bd0003 Binary files /dev/null and b/.yarn/cache/path-to-regexp-npm-1.9.0-723549d8d9-67f0f4823f.zip differ diff --git a/.yarn/cache/raw-body-npm-2.4.0-14d9d633af-aa2c506055.zip b/.yarn/cache/raw-body-npm-2.4.0-14d9d633af-aa2c506055.zip deleted file mode 100644 index a4cdebd7768..00000000000 Binary files a/.yarn/cache/raw-body-npm-2.4.0-14d9d633af-aa2c506055.zip and /dev/null differ diff --git a/.yarn/cache/raw-body-npm-2.5.2-5cb9dfebc1-863b5171e1.zip b/.yarn/cache/raw-body-npm-2.5.2-5cb9dfebc1-863b5171e1.zip new file mode 100644 index 00000000000..1e3aceaded5 Binary files /dev/null and b/.yarn/cache/raw-body-npm-2.5.2-5cb9dfebc1-863b5171e1.zip differ diff --git a/.yarn/cache/setprototypeof-npm-1.1.1-706b6318ec-b8fcf5b4b8.zip b/.yarn/cache/setprototypeof-npm-1.1.1-706b6318ec-b8fcf5b4b8.zip deleted file mode 100644 index 73ad3ae35a2..00000000000 Binary files a/.yarn/cache/setprototypeof-npm-1.1.1-706b6318ec-b8fcf5b4b8.zip and /dev/null differ diff --git a/.yarn/cache/setprototypeof-npm-1.2.0-0fedbdcd3a-fde1630422.zip b/.yarn/cache/setprototypeof-npm-1.2.0-0fedbdcd3a-fde1630422.zip new file mode 100644 index 00000000000..ea426181ffa Binary files /dev/null and b/.yarn/cache/setprototypeof-npm-1.2.0-0fedbdcd3a-fde1630422.zip differ diff --git a/.yarn/cache/statuses-npm-2.0.1-81d2b97fee-18c7623fdb.zip b/.yarn/cache/statuses-npm-2.0.1-81d2b97fee-18c7623fdb.zip new file mode 100644 index 00000000000..d54195d67f0 Binary files /dev/null and b/.yarn/cache/statuses-npm-2.0.1-81d2b97fee-18c7623fdb.zip differ diff --git a/.yarn/cache/toidentifier-npm-1.0.0-5dad252f90-199e6bfca1.zip b/.yarn/cache/toidentifier-npm-1.0.0-5dad252f90-199e6bfca1.zip deleted file mode 100644 index 27ee34cbcc4..00000000000 Binary files a/.yarn/cache/toidentifier-npm-1.0.0-5dad252f90-199e6bfca1.zip and /dev/null differ diff --git a/.yarn/cache/toidentifier-npm-1.0.1-f759712599-952c29e2a8.zip b/.yarn/cache/toidentifier-npm-1.0.1-f759712599-952c29e2a8.zip new file mode 100644 index 00000000000..595363e93b5 Binary files /dev/null and b/.yarn/cache/toidentifier-npm-1.0.1-f759712599-952c29e2a8.zip differ diff --git a/CHANGELOG.md b/CHANGELOG.md index f8306af518f..c3cfb761044 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,77 @@ +## [1.3.0-dev.5](https://github.com/dashpay/platform/compare/v1.3.0-dev.4...v1.3.0-dev.5) (2024-09-16) + + +### Bug Fixes + +* **drive-abci:** cleanup of later contests on testnet only ([#2134](https://github.com/dashpay/platform/issues/2134)) + +## [1.3.0-dev.4](https://github.com/dashpay/platform/compare/v1.3.0-dev.3...v1.3.0-dev.4) (2024-09-16) + + +### Bug Fixes + +* require75p of active not total hpmns ([#2129](https://github.com/dashpay/platform/issues/2129)) + +## [1.3.0-dev.3](https://github.com/dashpay/platform/compare/v1.3.0-dev.2...v1.3.0-dev.3) (2024-09-16) + + +### Bug Fixes + +* **drive-abci:** require 75 percent of active, not total hpmns ([#2127](https://github.com/dashpay/platform/issues/2127)) + +## [1.3.0-dev.2](https://github.com/dashpay/platform/compare/v1.3.0-dev.1...v1.3.0-dev.2) (2024-09-16) + + +### ⚠ BREAKING CHANGES + +* **platform:** contests on testnet should take less time (#2115) +* **platform:** contested username distribution (#2118) + +### Features + +* **platform:** contests on testnet should take less time ([#2115](https://github.com/dashpay/platform/issues/2115)) + + +### Bug Fixes + +* body-parser vulnerability ([#2119](https://github.com/dashpay/platform/issues/2119)) +* **platform:** contested username distribution ([#2118](https://github.com/dashpay/platform/issues/2118)) + + +### Miscellaneous Chores + +* **dashmate:** update platform images to `1-dev` ([#2120](https://github.com/dashpay/platform/issues/2120)) + + +### Styles + +* **dapi:** better api for identities balances ([#2122](https://github.com/dashpay/platform/issues/2122)) + +## [1.3.0-dev.1](https://github.com/dashpay/platform/compare/v1.2.0...v1.3.0-dev.1) (2024-09-12) + + +### Features + +* query block count per Evonode proposed in any given epoch ([#2114](https://github.com/dashpay/platform/issues/2114)) +* query many identity balances at a time ([#2112](https://github.com/dashpay/platform/issues/2112)) + + +### Bug Fixes + +* **sdk:** use proofs when waiting for asset lock ([#2067](https://github.com/dashpay/platform/issues/2067)) + + +### Build System + +* cache Rust dependencies build as a docker layer ([#1900](https://github.com/dashpay/platform/issues/1900)) +* **drive-abci:** debug docker image with grovedb visualizer and tokio console ([#2012](https://github.com/dashpay/platform/issues/2012)) + + +### Miscellaneous Chores + +* add change base branch script ([#2082](https://github.com/dashpay/platform/issues/2082)) +* creation of protocol V2 ([#2104](https://github.com/dashpay/platform/issues/2104)) + ## [1.2.0](https://github.com/dashpay/platform/compare/v1.1.1...v1.2.0) (2024-08-30) diff --git a/Cargo.lock b/Cargo.lock index 4202127bf14..ace558a658f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -781,7 +781,7 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "check-features" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "toml", ] @@ -1147,7 +1147,7 @@ dependencies = [ [[package]] name = "dapi-grpc" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "dapi-grpc-macros", "futures-core", @@ -1156,14 +1156,14 @@ dependencies = [ "serde", "serde_bytes", "serde_json", - "tenderdash-proto", + "tenderdash-proto 1.1.0 (git+https://github.com/dashpay/rs-tenderdash-abci?tag=v1.1.0)", "tonic 0.11.0", "tonic-build 0.9.2", ] [[package]] name = "dapi-grpc-macros" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "dapi-grpc", "heck 0.5.0", @@ -1208,7 +1208,7 @@ dependencies = [ [[package]] name = "dash-sdk" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "arc-swap", "async-trait", @@ -1308,7 +1308,7 @@ dependencies = [ [[package]] name = "dashpay-contract" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "platform-value", "platform-version", @@ -1318,7 +1318,7 @@ dependencies = [ [[package]] name = "data-contracts" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "dashpay-contract", "dpns-contract", @@ -1434,7 +1434,7 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "dpns-contract" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "platform-value", "platform-version", @@ -1444,7 +1444,7 @@ dependencies = [ [[package]] name = "dpp" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "anyhow", "assert_matches", @@ -1496,7 +1496,7 @@ dependencies = [ [[package]] name = "drive" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "arc-swap", "base64 0.22.1", @@ -1536,7 +1536,7 @@ dependencies = [ [[package]] name = "drive-abci" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "arc-swap", "assert_matches", @@ -1567,7 +1567,6 @@ dependencies = [ "metrics", "metrics-exporter-prometheus", "mockall", - "once_cell", "platform-version", "prost 0.12.6", "rand", @@ -1581,7 +1580,7 @@ dependencies = [ "simple-signer", "strategy-tests", "tempfile", - "tenderdash-abci", + "tenderdash-abci 1.1.0 (git+https://github.com/dashpay/rs-tenderdash-abci?branch=feat/consensus-params-version)", "thiserror", "tokio", "tokio-util", @@ -1593,7 +1592,7 @@ dependencies = [ [[package]] name = "drive-proof-verifier" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "bincode", "dapi-grpc", @@ -1605,7 +1604,7 @@ dependencies = [ "platform-serialization-derive", "serde", "serde_json", - "tenderdash-abci", + "tenderdash-abci 1.1.0 (git+https://github.com/dashpay/rs-tenderdash-abci?tag=v1.1.0)", "thiserror", "tracing", ] @@ -1807,7 +1806,7 @@ checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "feature-flags-contract" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "platform-value", "platform-version", @@ -2751,7 +2750,7 @@ dependencies = [ [[package]] name = "json-schema-compatibility-validator" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "assert_matches", "json-patch", @@ -2924,7 +2923,7 @@ dependencies = [ [[package]] name = "masternode-reward-shares-contract" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "platform-value", "platform-version", @@ -3498,7 +3497,7 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "platform-serialization" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "bincode", "platform-version", @@ -3506,7 +3505,7 @@ dependencies = [ [[package]] name = "platform-serialization-derive" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "proc-macro2", "quote", @@ -3516,7 +3515,7 @@ dependencies = [ [[package]] name = "platform-value" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "base64 0.22.1", "bincode", @@ -3537,7 +3536,7 @@ dependencies = [ [[package]] name = "platform-value-convertible" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "quote", "syn 2.0.75", @@ -3545,7 +3544,7 @@ dependencies = [ [[package]] name = "platform-version" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "bincode", "grovedb-version", @@ -3556,7 +3555,7 @@ dependencies = [ [[package]] name = "platform-versioning" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "proc-macro2", "quote", @@ -4169,7 +4168,7 @@ dependencies = [ [[package]] name = "rs-dapi-client" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "backon", "chrono", @@ -4686,7 +4685,7 @@ checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" [[package]] name = "simple-signer" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "base64 0.22.1", "bincode", @@ -4777,7 +4776,7 @@ dependencies = [ [[package]] name = "strategy-tests" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "bincode", "dpp", @@ -4970,6 +4969,23 @@ dependencies = [ name = "tenderdash-abci" version = "1.1.0" source = "git+https://github.com/dashpay/rs-tenderdash-abci?tag=v1.1.0#03b741f3f24281ec6990c6c343079076c549b0f8" +dependencies = [ + "bytes", + "hex", + "lhash", + "prost 0.12.6", + "semver", + "serde_json", + "tenderdash-proto 1.1.0 (git+https://github.com/dashpay/rs-tenderdash-abci?tag=v1.1.0)", + "thiserror", + "tracing", + "url", +] + +[[package]] +name = "tenderdash-abci" +version = "1.1.0" +source = "git+https://github.com/dashpay/rs-tenderdash-abci?branch=feat/consensus-params-version#22e16d6f0c5bc43738e857b67a618ee1cb7d461b" dependencies = [ "bytes", "futures", @@ -4978,7 +4994,7 @@ dependencies = [ "prost 0.12.6", "semver", "serde_json", - "tenderdash-proto", + "tenderdash-proto 1.1.0 (git+https://github.com/dashpay/rs-tenderdash-abci?branch=feat/consensus-params-version)", "thiserror", "tokio", "tokio-util", @@ -5002,7 +5018,26 @@ dependencies = [ "prost 0.12.6", "serde", "subtle-encoding", - "tenderdash-proto-compiler", + "tenderdash-proto-compiler 1.1.0 (git+https://github.com/dashpay/rs-tenderdash-abci?tag=v1.1.0)", + "time", + "tonic 0.11.0", +] + +[[package]] +name = "tenderdash-proto" +version = "1.1.0" +source = "git+https://github.com/dashpay/rs-tenderdash-abci?branch=feat/consensus-params-version#22e16d6f0c5bc43738e857b67a618ee1cb7d461b" +dependencies = [ + "bytes", + "chrono", + "derive_more", + "flex-error", + "num-derive", + "num-traits", + "prost 0.12.6", + "serde", + "subtle-encoding", + "tenderdash-proto-compiler 1.1.0 (git+https://github.com/dashpay/rs-tenderdash-abci?branch=feat/consensus-params-version)", "time", "tonic 0.11.0", ] @@ -5022,6 +5057,21 @@ dependencies = [ "zip 2.2.0", ] +[[package]] +name = "tenderdash-proto-compiler" +version = "1.1.0" +source = "git+https://github.com/dashpay/rs-tenderdash-abci?branch=feat/consensus-params-version#22e16d6f0c5bc43738e857b67a618ee1cb7d461b" +dependencies = [ + "fs_extra", + "prost-build 0.12.6", + "regex", + "tempfile", + "tonic-build 0.11.0", + "ureq", + "walkdir", + "zip 2.2.0", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -5821,7 +5871,7 @@ checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" [[package]] name = "wasm-dpp" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "anyhow", "async-trait", @@ -6123,7 +6173,7 @@ dependencies = [ [[package]] name = "withdrawals-contract" -version = "1.2.0" +version = "1.3.0-dev.5" dependencies = [ "num_enum", "platform-value", diff --git a/Dockerfile b/Dockerfile index 7d45dee9533..a96488115b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -154,9 +154,10 @@ FROM deps-${RUSTC_WRAPPER:-base} AS deps ARG SCCACHE_S3_KEY_PREFIX ENV SCCACHE_S3_KEY_PREFIX=${SCCACHE_S3_KEY_PREFIX}/${TARGETARCH}/linux-musl +WORKDIR /platform + # Install wasm-bindgen-cli in the same profile as other components, to sacrifice some performance & disk space to gain # better build caching -WORKDIR /platform RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ --mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \ --mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \ @@ -170,16 +171,16 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM # Meanwhile if you want to update wasm-bindgen you also need to update version in: # - packages/wasm-dpp/Cargo.toml # - packages/wasm-dpp/scripts/build-wasm.sh - cargo install --profile "$CARGO_BUILD_PROFILE" wasm-bindgen-cli@0.2.86 + cargo install --profile "$CARGO_BUILD_PROFILE" wasm-bindgen-cli@0.2.86 cargo-chef@0.1.67 --locked # -# LOAD SOURCES +# Rust build planner to speed up builds # -FROM deps as sources - +FROM deps AS build-planner WORKDIR /platform - COPY . . +RUN source $HOME/.cargo/env && \ + cargo chef prepare --recipe-path recipe.json # Workaround: as we cache dapi-grpc, its build.rs is not rerun, so we need to touch it RUN touch /platform/packages/dapi-grpc/build.rs @@ -188,35 +189,90 @@ RUN touch /platform/packages/dapi-grpc/build.rs # STAGE: BUILD RS-DRIVE-ABCI # # This will prebuild majority of dependencies -FROM sources AS build-drive-abci +FROM deps AS build-drive-abci + +SHELL ["/bin/bash", "-o", "pipefail","-e", "-x", "-c"] ARG SCCACHE_S3_KEY_PREFIX ENV SCCACHE_S3_KEY_PREFIX=${SCCACHE_S3_KEY_PREFIX}/${TARGETARCH}/linux-musl +WORKDIR /platform + +COPY --from=build-planner /platform/recipe.json recipe.json + +# Build dependencies - this is the caching Docker layer! +RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ + --mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \ + --mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \ + --mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \ + source $HOME/.cargo/env && \ + export SCCACHE_SERVER_PORT=$((RANDOM+1025)) && \ + if [[ -z "${SCCACHE_MEMCACHED}" ]] ; then unset SCCACHE_MEMCACHED ; fi ; \ + cargo chef cook \ + --recipe-path recipe.json \ + --profile "$CARGO_BUILD_PROFILE" \ + --package drive-abci \ + --locked && \ + if [[ "${RUSTC_WRAPPER}" == "sccache" ]] ; then sccache --show-stats; fi + +COPY . . + RUN mkdir /artifacts +# Build Drive ABCI RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ --mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \ --mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \ --mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \ source $HOME/.cargo/env && \ export SCCACHE_SERVER_PORT=$((RANDOM+1025)) && \ + if [[ "${CARGO_BUILD_PROFILE}" == "release" ]] ; then \ + mv .cargo/config-release.toml .cargo/config.toml && \ + export OUT_DIRECTORY=release ; \ + else \ + export FEATURES_FLAG="--features=console,grovedbg" ; \ + export OUT_DIRECTORY=debug ; \ + + fi && \ if [[ -z "${SCCACHE_MEMCACHED}" ]] ; then unset SCCACHE_MEMCACHED ; fi ; \ cargo build \ - --profile "$CARGO_BUILD_PROFILE" \ + --profile "${CARGO_BUILD_PROFILE}" \ --package drive-abci \ + ${FEATURES_FLAG} \ --locked && \ - cp /platform/target/*/drive-abci /artifacts/ && \ + cp /platform/target/${OUT_DIRECTORY}/drive-abci /artifacts/ && \ if [[ "${RUSTC_WRAPPER}" == "sccache" ]] ; then sccache --show-stats; fi # # STAGE: BUILD JAVASCRIPT INTERMEDIATE IMAGE # -FROM sources AS build-js +FROM deps AS build-js ARG SCCACHE_S3_KEY_PREFIX ENV SCCACHE_S3_KEY_PREFIX=${SCCACHE_S3_KEY_PREFIX}/wasm/wasm32 +WORKDIR /platform + +COPY --from=build-planner /platform/recipe.json recipe.json + +# Build dependencies - this is the caching Docker layer! +RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ + --mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \ + --mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \ + --mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \ + source $HOME/.cargo/env && \ + export SCCACHE_SERVER_PORT=$((RANDOM+1025)) && \ + if [[ -z "${SCCACHE_MEMCACHED}" ]] ; then unset SCCACHE_MEMCACHED ; fi ; \ + cargo chef cook \ + --recipe-path recipe.json \ + --profile "$CARGO_BUILD_PROFILE" \ + --package wasm-dpp \ + --target wasm32-unknown-unknown \ + --locked && \ + if [[ "${RUSTC_WRAPPER}" == "sccache" ]] ; then sccache --show-stats; fi + +COPY . . + RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ --mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \ --mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \ diff --git a/README.md b/README.md index 45689c393c5..fd688fbc883 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ this repository may be used on the following networks: - [x] **Development networks** ([**devnets**](https://dashplatform.readme.io/docs/reference-glossary#devnet)) - [x] [**Testnet**](https://dashplatform.readme.io/docs/reference-glossary#testnet) -- [ ] [Mainnet](https://dashplatform.readme.io/docs/reference-glossary#mainnet) +- [x] [Mainnet](https://dashplatform.readme.io/docs/reference-glossary#mainnet) ## FAQ diff --git a/package.json b/package.json index 867ef341a03..da2ed57cae1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/platform", - "version": "1.2.0", + "version": "1.3.0-dev.5", "private": true, "scripts": { "setup": "yarn install && yarn run build && yarn run configure", @@ -89,7 +89,9 @@ "node-gyp": "10.0.1", "follow-redirects": "^1.15.5", "socks": "^2.8.1", - "ws": "^8.17.1" + "ws": "^8.17.1", + "body-parser": "^1.20.3", + "path-to-regexp": "^1.9.0" }, "dependencies": { "node-gyp": "^10.0.1" diff --git a/packages/bench-suite/package.json b/packages/bench-suite/package.json index 6ffcf72bf03..b0e9bed7059 100644 --- a/packages/bench-suite/package.json +++ b/packages/bench-suite/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/bench-suite", "private": true, - "version": "1.2.0", + "version": "1.3.0-dev.5", "description": "Dash Platform benchmark tool", "scripts": { "bench": "node ./bin/bench.js", diff --git a/packages/check-features/Cargo.toml b/packages/check-features/Cargo.toml index 4424fda535c..c2c0a477713 100644 --- a/packages/check-features/Cargo.toml +++ b/packages/check-features/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "check-features" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/packages/dapi-grpc/Cargo.toml b/packages/dapi-grpc/Cargo.toml index 619322f8604..230ed3ffbbf 100644 --- a/packages/dapi-grpc/Cargo.toml +++ b/packages/dapi-grpc/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dapi-grpc" description = "GRPC client for Dash Platform" -version = "1.2.0" +version = "1.3.0-dev.5" authors = [ "Samuel Westrich ", "Igor Markin ", diff --git a/packages/dapi-grpc/build.rs b/packages/dapi-grpc/build.rs index 0b613a8c12a..4bd36542e81 100644 --- a/packages/dapi-grpc/build.rs +++ b/packages/dapi-grpc/build.rs @@ -47,13 +47,14 @@ 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; 26] = [ + const VERSIONED_REQUESTS: [&str; 29] = [ "GetDataContractHistoryRequest", "GetDataContractRequest", "GetDataContractsRequest", "GetDocumentsRequest", "GetIdentitiesByPublicKeyHashesRequest", "GetIdentitiesRequest", + "GetIdentitiesBalancesRequest", "GetIdentityNonceRequest", "GetIdentityContractNonceRequest", "GetIdentityBalanceAndRevisionRequest", @@ -74,16 +75,20 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig { "GetContestedResourceIdentityVotesRequest", "GetVotePollsByEndDateRequest", "GetTotalCreditsInPlatformRequest", + "GetEvonodesProposedEpochBlocksByIdsRequest", + "GetEvonodesProposedEpochBlocksByRangeRequest", ]; // "GetConsensusParamsResponse" is excluded as this message does not support proofs - const VERSIONED_RESPONSES: [&str; 27] = [ + // "GetEvonodesProposedEpochBlocksResponse" is used for 2 Requests + const VERSIONED_RESPONSES: [&str; 29] = [ "GetDataContractHistoryResponse", "GetDataContractResponse", "GetDataContractsResponse", "GetDocumentsResponse", "GetIdentitiesByPublicKeyHashesResponse", "GetIdentitiesResponse", + "GetIdentitiesBalancesResponse", "GetIdentityBalanceAndRevisionResponse", "GetIdentityBalanceResponse", "GetIdentityNonceResponse", @@ -105,6 +110,7 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig { "GetContestedResourceIdentityVotesResponse", "GetVotePollsByEndDateResponse", "GetTotalCreditsInPlatformResponse", + "GetEvonodesProposedEpochBlocksResponse", ]; check_unique(&VERSIONED_REQUESTS).expect("VERSIONED_REQUESTS"); 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 c8d5cd7c354..035bb981380 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 @@ -232,6 +232,37 @@ org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityBalanceResponse> getGetI return getGetIdentityBalanceMethod; } + private static volatile io.grpc.MethodDescriptor getGetIdentitiesBalancesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getIdentitiesBalances", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesBalancesRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesBalancesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetIdentitiesBalancesMethod() { + io.grpc.MethodDescriptor getGetIdentitiesBalancesMethod; + if ((getGetIdentitiesBalancesMethod = PlatformGrpc.getGetIdentitiesBalancesMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetIdentitiesBalancesMethod = PlatformGrpc.getGetIdentitiesBalancesMethod) == null) { + PlatformGrpc.getGetIdentitiesBalancesMethod = getGetIdentitiesBalancesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getIdentitiesBalances")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesBalancesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesBalancesResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getIdentitiesBalances")) + .build(); + } + } + } + return getGetIdentitiesBalancesMethod; + } + private static volatile io.grpc.MethodDescriptor getGetIdentityBalanceAndRevisionMethod; @@ -263,6 +294,68 @@ org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityBalanceAndRevisionRespon return getGetIdentityBalanceAndRevisionMethod; } + private static volatile io.grpc.MethodDescriptor getGetEvonodesProposedEpochBlocksByIdsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getEvonodesProposedEpochBlocksByIds", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByIdsRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetEvonodesProposedEpochBlocksByIdsMethod() { + io.grpc.MethodDescriptor getGetEvonodesProposedEpochBlocksByIdsMethod; + if ((getGetEvonodesProposedEpochBlocksByIdsMethod = PlatformGrpc.getGetEvonodesProposedEpochBlocksByIdsMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetEvonodesProposedEpochBlocksByIdsMethod = PlatformGrpc.getGetEvonodesProposedEpochBlocksByIdsMethod) == null) { + PlatformGrpc.getGetEvonodesProposedEpochBlocksByIdsMethod = getGetEvonodesProposedEpochBlocksByIdsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getEvonodesProposedEpochBlocksByIds")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByIdsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getEvonodesProposedEpochBlocksByIds")) + .build(); + } + } + } + return getGetEvonodesProposedEpochBlocksByIdsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetEvonodesProposedEpochBlocksByRangeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getEvonodesProposedEpochBlocksByRange", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByRangeRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetEvonodesProposedEpochBlocksByRangeMethod() { + io.grpc.MethodDescriptor getGetEvonodesProposedEpochBlocksByRangeMethod; + if ((getGetEvonodesProposedEpochBlocksByRangeMethod = PlatformGrpc.getGetEvonodesProposedEpochBlocksByRangeMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetEvonodesProposedEpochBlocksByRangeMethod = PlatformGrpc.getGetEvonodesProposedEpochBlocksByRangeMethod) == null) { + PlatformGrpc.getGetEvonodesProposedEpochBlocksByRangeMethod = getGetEvonodesProposedEpochBlocksByRangeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getEvonodesProposedEpochBlocksByRange")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByRangeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getEvonodesProposedEpochBlocksByRange")) + .build(); + } + } + } + return getGetEvonodesProposedEpochBlocksByRangeMethod; + } + private static volatile io.grpc.MethodDescriptor getGetProofsMethod; @@ -980,6 +1073,13 @@ public void getIdentityBalance(org.dash.platform.dapi.v0.PlatformOuterClass.GetI io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetIdentityBalanceMethod(), responseObserver); } + /** + */ + public void getIdentitiesBalances(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesBalancesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetIdentitiesBalancesMethod(), responseObserver); + } + /** */ public void getIdentityBalanceAndRevision(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityBalanceAndRevisionRequest request, @@ -987,6 +1087,20 @@ public void getIdentityBalanceAndRevision(org.dash.platform.dapi.v0.PlatformOute io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetIdentityBalanceAndRevisionMethod(), responseObserver); } + /** + */ + public void getEvonodesProposedEpochBlocksByIds(org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByIdsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetEvonodesProposedEpochBlocksByIdsMethod(), responseObserver); + } + + /** + */ + public void getEvonodesProposedEpochBlocksByRange(org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByRangeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetEvonodesProposedEpochBlocksByRangeMethod(), responseObserver); + } + /** */ public void getProofs(org.dash.platform.dapi.v0.PlatformOuterClass.GetProofsRequest request, @@ -1193,6 +1307,13 @@ public void getStatus(org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusRequ org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityBalanceRequest, org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityBalanceResponse>( this, METHODID_GET_IDENTITY_BALANCE))) + .addMethod( + getGetIdentitiesBalancesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesBalancesRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesBalancesResponse>( + this, METHODID_GET_IDENTITIES_BALANCES))) .addMethod( getGetIdentityBalanceAndRevisionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1200,6 +1321,20 @@ public void getStatus(org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusRequ org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityBalanceAndRevisionRequest, org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityBalanceAndRevisionResponse>( this, METHODID_GET_IDENTITY_BALANCE_AND_REVISION))) + .addMethod( + getGetEvonodesProposedEpochBlocksByIdsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByIdsRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksResponse>( + this, METHODID_GET_EVONODES_PROPOSED_EPOCH_BLOCKS_BY_IDS))) + .addMethod( + getGetEvonodesProposedEpochBlocksByRangeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByRangeRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksResponse>( + this, METHODID_GET_EVONODES_PROPOSED_EPOCH_BLOCKS_BY_RANGE))) .addMethod( getGetProofsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1414,6 +1549,14 @@ public void getIdentityBalance(org.dash.platform.dapi.v0.PlatformOuterClass.GetI getChannel().newCall(getGetIdentityBalanceMethod(), getCallOptions()), request, responseObserver); } + /** + */ + public void getIdentitiesBalances(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesBalancesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIdentitiesBalancesMethod(), getCallOptions()), request, responseObserver); + } + /** */ public void getIdentityBalanceAndRevision(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityBalanceAndRevisionRequest request, @@ -1422,6 +1565,22 @@ public void getIdentityBalanceAndRevision(org.dash.platform.dapi.v0.PlatformOute getChannel().newCall(getGetIdentityBalanceAndRevisionMethod(), getCallOptions()), request, responseObserver); } + /** + */ + public void getEvonodesProposedEpochBlocksByIds(org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByIdsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetEvonodesProposedEpochBlocksByIdsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getEvonodesProposedEpochBlocksByRange(org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByRangeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetEvonodesProposedEpochBlocksByRangeMethod(), getCallOptions()), request, responseObserver); + } + /** */ public void getProofs(org.dash.platform.dapi.v0.PlatformOuterClass.GetProofsRequest request, @@ -1661,6 +1820,13 @@ public org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityBalanceResponse g getChannel(), getGetIdentityBalanceMethod(), getCallOptions(), request); } + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesBalancesResponse getIdentitiesBalances(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesBalancesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIdentitiesBalancesMethod(), getCallOptions(), request); + } + /** */ public org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityBalanceAndRevisionResponse getIdentityBalanceAndRevision(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityBalanceAndRevisionRequest request) { @@ -1668,6 +1834,20 @@ public org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityBalanceAndRevisio getChannel(), getGetIdentityBalanceAndRevisionMethod(), getCallOptions(), request); } + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksResponse getEvonodesProposedEpochBlocksByIds(org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByIdsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetEvonodesProposedEpochBlocksByIdsMethod(), getCallOptions(), request); + } + + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksResponse getEvonodesProposedEpochBlocksByRange(org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByRangeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetEvonodesProposedEpochBlocksByRangeMethod(), getCallOptions(), request); + } + /** */ public org.dash.platform.dapi.v0.PlatformOuterClass.GetProofsResponse getProofs(org.dash.platform.dapi.v0.PlatformOuterClass.GetProofsRequest request) { @@ -1894,6 +2074,14 @@ public com.google.common.util.concurrent.ListenableFuture getIdentitiesBalances( + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesBalancesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIdentitiesBalancesMethod(), getCallOptions()), request); + } + /** */ public com.google.common.util.concurrent.ListenableFuture getIdentityBalanceAndRevision( @@ -1902,6 +2090,22 @@ public com.google.common.util.concurrent.ListenableFuture getEvonodesProposedEpochBlocksByIds( + org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByIdsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetEvonodesProposedEpochBlocksByIdsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getEvonodesProposedEpochBlocksByRange( + org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByRangeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetEvonodesProposedEpochBlocksByRangeMethod(), getCallOptions()), request); + } + /** */ public com.google.common.util.concurrent.ListenableFuture getProofs( @@ -2085,27 +2289,30 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2152,10 +2359,22 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv serviceImpl.getIdentityBalance((org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityBalanceRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_IDENTITIES_BALANCES: + serviceImpl.getIdentitiesBalances((org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesBalancesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_GET_IDENTITY_BALANCE_AND_REVISION: serviceImpl.getIdentityBalanceAndRevision((org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityBalanceAndRevisionRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_EVONODES_PROPOSED_EPOCH_BLOCKS_BY_IDS: + serviceImpl.getEvonodesProposedEpochBlocksByIds((org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByIdsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_EVONODES_PROPOSED_EPOCH_BLOCKS_BY_RANGE: + serviceImpl.getEvonodesProposedEpochBlocksByRange((org.dash.platform.dapi.v0.PlatformOuterClass.GetEvonodesProposedEpochBlocksByRangeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_GET_PROOFS: serviceImpl.getProofs((org.dash.platform.dapi.v0.PlatformOuterClass.GetProofsRequest) request, (io.grpc.stub.StreamObserver) responseObserver); @@ -2304,7 +2523,10 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetIdentityNonceMethod()) .addMethod(getGetIdentityContractNonceMethod()) .addMethod(getGetIdentityBalanceMethod()) + .addMethod(getGetIdentitiesBalancesMethod()) .addMethod(getGetIdentityBalanceAndRevisionMethod()) + .addMethod(getGetEvonodesProposedEpochBlocksByIdsMethod()) + .addMethod(getGetEvonodesProposedEpochBlocksByRangeMethod()) .addMethod(getGetProofsMethod()) .addMethod(getGetDataContractMethod()) .addMethod(getGetDataContractHistoryMethod()) diff --git a/packages/dapi-grpc/clients/platform/v0/nodejs/PlatformPromiseClient.js b/packages/dapi-grpc/clients/platform/v0/nodejs/PlatformPromiseClient.js index b2a6d25bb26..a6190b4ac77 100644 --- a/packages/dapi-grpc/clients/platform/v0/nodejs/PlatformPromiseClient.js +++ b/packages/dapi-grpc/clients/platform/v0/nodejs/PlatformPromiseClient.js @@ -62,6 +62,8 @@ const { GetTotalCreditsInPlatformResponse: PBJSGetTotalCreditsInPlatformResponse, GetStatusRequest: PBJSGetStatusRequest, GetStatusResponse: PBJSGetStatusResponse, + GetIdentityBalanceRequest: PBJSGetIdentityBalanceRequest, + GetIdentityBalanceResponse: PBJSGetIdentityBalanceResponse, }, }, }, @@ -88,6 +90,7 @@ const { GetIdentityKeysResponse: ProtocGetIdentityKeysResponse, GetTotalCreditsInPlatformResponse: ProtocGetTotalCreditsInPlatformResponse, GetStatusResponse: ProtocGetStatusResponse, + GetIdentityBalanceResponse: ProtocGetIdentityBalanceResponse, } = require('./platform_protoc'); const getPlatformDefinition = require('../../../../lib/getPlatformDefinition'); @@ -186,6 +189,10 @@ class PlatformPromiseClient { this.client.getStatus.bind(this.client), ); + this.client.getIdentityBalance = promisify( + this.client.getIdentityBalance.bind(this.client), + ); + this.protocolVersion = undefined; } @@ -762,6 +769,35 @@ class PlatformPromiseClient { ); } + getIdentityBalance( + getIdentityBalanceRequest, + metadata = {}, + options = {}, + ) { + if (!isObject(metadata)) { + throw new Error('metadata must be an object'); + } + + return this.client.getIdentityBalance( + getIdentityBalanceRequest, + convertObjectToMetadata(metadata), + { + interceptors: [ + jsonToProtobufInterceptorFactory( + jsonToProtobufFactory( + ProtocGetIdentityBalanceResponse, + PBJSGetIdentityBalanceResponse, + ), + protobufToJsonFactory( + PBJSGetIdentityBalanceRequest, + ), + ), + ], + ...options, + }, + ); + } + /** * @param {string} protocolVersion */ 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 2eaea5245a7..91ba2386507 100644 --- a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js +++ b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js @@ -317,6 +317,39 @@ $root.org = (function() { * @variation 2 */ + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getIdentitiesBalances}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getIdentitiesBalancesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} [response] GetIdentitiesBalancesResponse + */ + + /** + * Calls getIdentitiesBalances. + * @function getIdentitiesBalances + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetIdentitiesBalancesRequest} request GetIdentitiesBalancesRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getIdentitiesBalancesCallback} callback Node-style callback called with the error, if any, and GetIdentitiesBalancesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getIdentitiesBalances = function getIdentitiesBalances(request, callback) { + return this.rpcCall(getIdentitiesBalances, $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest, $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse, request, callback); + }, "name", { value: "getIdentitiesBalances" }); + + /** + * Calls getIdentitiesBalances. + * @function getIdentitiesBalances + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetIdentitiesBalancesRequest} request GetIdentitiesBalancesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getIdentityBalanceAndRevision}. * @memberof org.dash.platform.dapi.v0.Platform @@ -350,6 +383,72 @@ $root.org = (function() { * @variation 2 */ + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getEvonodesProposedEpochBlocksByIds}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getEvonodesProposedEpochBlocksByIdsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} [response] GetEvonodesProposedEpochBlocksResponse + */ + + /** + * Calls getEvonodesProposedEpochBlocksByIds. + * @function getEvonodesProposedEpochBlocksByIds + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksByIdsRequest} request GetEvonodesProposedEpochBlocksByIdsRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getEvonodesProposedEpochBlocksByIdsCallback} callback Node-style callback called with the error, if any, and GetEvonodesProposedEpochBlocksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getEvonodesProposedEpochBlocksByIds = function getEvonodesProposedEpochBlocksByIds(request, callback) { + return this.rpcCall(getEvonodesProposedEpochBlocksByIds, $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest, $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse, request, callback); + }, "name", { value: "getEvonodesProposedEpochBlocksByIds" }); + + /** + * Calls getEvonodesProposedEpochBlocksByIds. + * @function getEvonodesProposedEpochBlocksByIds + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksByIdsRequest} request GetEvonodesProposedEpochBlocksByIdsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getEvonodesProposedEpochBlocksByRange}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getEvonodesProposedEpochBlocksByRangeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} [response] GetEvonodesProposedEpochBlocksResponse + */ + + /** + * Calls getEvonodesProposedEpochBlocksByRange. + * @function getEvonodesProposedEpochBlocksByRange + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksByRangeRequest} request GetEvonodesProposedEpochBlocksByRangeRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getEvonodesProposedEpochBlocksByRangeCallback} callback Node-style callback called with the error, if any, and GetEvonodesProposedEpochBlocksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getEvonodesProposedEpochBlocksByRange = function getEvonodesProposedEpochBlocksByRange(request, callback) { + return this.rpcCall(getEvonodesProposedEpochBlocksByRange, $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest, $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse, request, callback); + }, "name", { value: "getEvonodesProposedEpochBlocksByRange" }); + + /** + * Calls getEvonodesProposedEpochBlocksByRange. + * @function getEvonodesProposedEpochBlocksByRange + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksByRangeRequest} request GetEvonodesProposedEpochBlocksByRangeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getProofs}. * @memberof org.dash.platform.dapi.v0.Platform @@ -11235,6 +11334,3469 @@ $root.org = (function() { return GetIdentitiesContractKeysResponse; })(); + v0.GetEvonodesProposedEpochBlocksByIdsRequest = (function() { + + /** + * Properties of a GetEvonodesProposedEpochBlocksByIdsRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetEvonodesProposedEpochBlocksByIdsRequest + * @property {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.IGetEvonodesProposedEpochBlocksByIdsRequestV0|null} [v0] GetEvonodesProposedEpochBlocksByIdsRequest v0 + */ + + /** + * Constructs a new GetEvonodesProposedEpochBlocksByIdsRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetEvonodesProposedEpochBlocksByIdsRequest. + * @implements IGetEvonodesProposedEpochBlocksByIdsRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksByIdsRequest=} [properties] Properties to set + */ + function GetEvonodesProposedEpochBlocksByIdsRequest(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]]; + } + + /** + * GetEvonodesProposedEpochBlocksByIdsRequest v0. + * @member {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.IGetEvonodesProposedEpochBlocksByIdsRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + * @instance + */ + GetEvonodesProposedEpochBlocksByIdsRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetEvonodesProposedEpochBlocksByIdsRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + * @instance + */ + Object.defineProperty(GetEvonodesProposedEpochBlocksByIdsRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetEvonodesProposedEpochBlocksByIdsRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksByIdsRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} GetEvonodesProposedEpochBlocksByIdsRequest instance + */ + GetEvonodesProposedEpochBlocksByIdsRequest.create = function create(properties) { + return new GetEvonodesProposedEpochBlocksByIdsRequest(properties); + }; + + /** + * Encodes the specified GetEvonodesProposedEpochBlocksByIdsRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksByIdsRequest} message GetEvonodesProposedEpochBlocksByIdsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEvonodesProposedEpochBlocksByIdsRequest.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetEvonodesProposedEpochBlocksByIdsRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksByIdsRequest} message GetEvonodesProposedEpochBlocksByIdsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEvonodesProposedEpochBlocksByIdsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEvonodesProposedEpochBlocksByIdsRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + * @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.GetEvonodesProposedEpochBlocksByIdsRequest} GetEvonodesProposedEpochBlocksByIdsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEvonodesProposedEpochBlocksByIdsRequest.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.GetEvonodesProposedEpochBlocksByIdsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEvonodesProposedEpochBlocksByIdsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} GetEvonodesProposedEpochBlocksByIdsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEvonodesProposedEpochBlocksByIdsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEvonodesProposedEpochBlocksByIdsRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEvonodesProposedEpochBlocksByIdsRequest.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetEvonodesProposedEpochBlocksByIdsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} GetEvonodesProposedEpochBlocksByIdsRequest + */ + GetEvonodesProposedEpochBlocksByIdsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetEvonodesProposedEpochBlocksByIdsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} message GetEvonodesProposedEpochBlocksByIdsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEvonodesProposedEpochBlocksByIdsRequest.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetEvonodesProposedEpochBlocksByIdsRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + * @instance + * @returns {Object.} JSON object + */ + GetEvonodesProposedEpochBlocksByIdsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 = (function() { + + /** + * Properties of a GetEvonodesProposedEpochBlocksByIdsRequestV0. + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + * @interface IGetEvonodesProposedEpochBlocksByIdsRequestV0 + * @property {number|null} [epoch] GetEvonodesProposedEpochBlocksByIdsRequestV0 epoch + * @property {Array.|null} [ids] GetEvonodesProposedEpochBlocksByIdsRequestV0 ids + * @property {boolean|null} [prove] GetEvonodesProposedEpochBlocksByIdsRequestV0 prove + */ + + /** + * Constructs a new GetEvonodesProposedEpochBlocksByIdsRequestV0. + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + * @classdesc Represents a GetEvonodesProposedEpochBlocksByIdsRequestV0. + * @implements IGetEvonodesProposedEpochBlocksByIdsRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.IGetEvonodesProposedEpochBlocksByIdsRequestV0=} [properties] Properties to set + */ + function GetEvonodesProposedEpochBlocksByIdsRequestV0(properties) { + this.ids = []; + 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]]; + } + + /** + * GetEvonodesProposedEpochBlocksByIdsRequestV0 epoch. + * @member {number} epoch + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + * @instance + */ + GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.epoch = 0; + + /** + * GetEvonodesProposedEpochBlocksByIdsRequestV0 ids. + * @member {Array.} ids + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + * @instance + */ + GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.ids = $util.emptyArray; + + /** + * GetEvonodesProposedEpochBlocksByIdsRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + * @instance + */ + GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.prove = false; + + /** + * Creates a new GetEvonodesProposedEpochBlocksByIdsRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.IGetEvonodesProposedEpochBlocksByIdsRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} GetEvonodesProposedEpochBlocksByIdsRequestV0 instance + */ + GetEvonodesProposedEpochBlocksByIdsRequestV0.create = function create(properties) { + return new GetEvonodesProposedEpochBlocksByIdsRequestV0(properties); + }; + + /** + * Encodes the specified GetEvonodesProposedEpochBlocksByIdsRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.IGetEvonodesProposedEpochBlocksByIdsRequestV0} message GetEvonodesProposedEpochBlocksByIdsRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEvonodesProposedEpochBlocksByIdsRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.epoch != null && Object.hasOwnProperty.call(message, "epoch")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.epoch); + if (message.ids != null && message.ids.length) + for (var i = 0; i < message.ids.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.ids[i]); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetEvonodesProposedEpochBlocksByIdsRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.IGetEvonodesProposedEpochBlocksByIdsRequestV0} message GetEvonodesProposedEpochBlocksByIdsRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEvonodesProposedEpochBlocksByIdsRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEvonodesProposedEpochBlocksByIdsRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + * @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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} GetEvonodesProposedEpochBlocksByIdsRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEvonodesProposedEpochBlocksByIdsRequestV0.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.epoch = reader.uint32(); + break; + case 2: + if (!(message.ids && message.ids.length)) + message.ids = []; + message.ids.push(reader.bytes()); + break; + case 3: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEvonodesProposedEpochBlocksByIdsRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} GetEvonodesProposedEpochBlocksByIdsRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEvonodesProposedEpochBlocksByIdsRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEvonodesProposedEpochBlocksByIdsRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEvonodesProposedEpochBlocksByIdsRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.epoch != null && message.hasOwnProperty("epoch")) + if (!$util.isInteger(message.epoch)) + return "epoch: integer expected"; + if (message.ids != null && message.hasOwnProperty("ids")) { + if (!Array.isArray(message.ids)) + return "ids: array expected"; + for (var i = 0; i < message.ids.length; ++i) + if (!(message.ids[i] && typeof message.ids[i].length === "number" || $util.isString(message.ids[i]))) + return "ids: buffer[] expected"; + } + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetEvonodesProposedEpochBlocksByIdsRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} GetEvonodesProposedEpochBlocksByIdsRequestV0 + */ + GetEvonodesProposedEpochBlocksByIdsRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0(); + if (object.epoch != null) + message.epoch = object.epoch >>> 0; + if (object.ids) { + if (!Array.isArray(object.ids)) + throw TypeError(".org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.ids: array expected"); + message.ids = []; + for (var i = 0; i < object.ids.length; ++i) + if (typeof object.ids[i] === "string") + $util.base64.decode(object.ids[i], message.ids[i] = $util.newBuffer($util.base64.length(object.ids[i])), 0); + else if (object.ids[i].length >= 0) + message.ids[i] = object.ids[i]; + } + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetEvonodesProposedEpochBlocksByIdsRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} message GetEvonodesProposedEpochBlocksByIdsRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEvonodesProposedEpochBlocksByIdsRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.ids = []; + if (options.defaults) { + object.epoch = 0; + object.prove = false; + } + if (message.epoch != null && message.hasOwnProperty("epoch")) + object.epoch = message.epoch; + if (message.ids && message.ids.length) { + object.ids = []; + for (var j = 0; j < message.ids.length; ++j) + object.ids[j] = options.bytes === String ? $util.base64.encode(message.ids[j], 0, message.ids[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.ids[j]) : message.ids[j]; + } + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetEvonodesProposedEpochBlocksByIdsRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetEvonodesProposedEpochBlocksByIdsRequestV0; + })(); + + return GetEvonodesProposedEpochBlocksByIdsRequest; + })(); + + v0.GetEvonodesProposedEpochBlocksResponse = (function() { + + /** + * Properties of a GetEvonodesProposedEpochBlocksResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetEvonodesProposedEpochBlocksResponse + * @property {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.IGetEvonodesProposedEpochBlocksResponseV0|null} [v0] GetEvonodesProposedEpochBlocksResponse v0 + */ + + /** + * Constructs a new GetEvonodesProposedEpochBlocksResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetEvonodesProposedEpochBlocksResponse. + * @implements IGetEvonodesProposedEpochBlocksResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksResponse=} [properties] Properties to set + */ + function GetEvonodesProposedEpochBlocksResponse(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]]; + } + + /** + * GetEvonodesProposedEpochBlocksResponse v0. + * @member {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.IGetEvonodesProposedEpochBlocksResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + * @instance + */ + GetEvonodesProposedEpochBlocksResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetEvonodesProposedEpochBlocksResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + * @instance + */ + Object.defineProperty(GetEvonodesProposedEpochBlocksResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetEvonodesProposedEpochBlocksResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} GetEvonodesProposedEpochBlocksResponse instance + */ + GetEvonodesProposedEpochBlocksResponse.create = function create(properties) { + return new GetEvonodesProposedEpochBlocksResponse(properties); + }; + + /** + * Encodes the specified GetEvonodesProposedEpochBlocksResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksResponse} message GetEvonodesProposedEpochBlocksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEvonodesProposedEpochBlocksResponse.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetEvonodesProposedEpochBlocksResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksResponse} message GetEvonodesProposedEpochBlocksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEvonodesProposedEpochBlocksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEvonodesProposedEpochBlocksResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + * @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.GetEvonodesProposedEpochBlocksResponse} GetEvonodesProposedEpochBlocksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEvonodesProposedEpochBlocksResponse.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.GetEvonodesProposedEpochBlocksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEvonodesProposedEpochBlocksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} GetEvonodesProposedEpochBlocksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEvonodesProposedEpochBlocksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEvonodesProposedEpochBlocksResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEvonodesProposedEpochBlocksResponse.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetEvonodesProposedEpochBlocksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} GetEvonodesProposedEpochBlocksResponse + */ + GetEvonodesProposedEpochBlocksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetEvonodesProposedEpochBlocksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} message GetEvonodesProposedEpochBlocksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEvonodesProposedEpochBlocksResponse.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetEvonodesProposedEpochBlocksResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + * @instance + * @returns {Object.} JSON object + */ + GetEvonodesProposedEpochBlocksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 = (function() { + + /** + * Properties of a GetEvonodesProposedEpochBlocksResponseV0. + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + * @interface IGetEvonodesProposedEpochBlocksResponseV0 + * @property {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.IEvonodesProposedBlocks|null} [evonodesProposedBlockCountsInfo] GetEvonodesProposedEpochBlocksResponseV0 evonodesProposedBlockCountsInfo + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetEvonodesProposedEpochBlocksResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetEvonodesProposedEpochBlocksResponseV0 metadata + */ + + /** + * Constructs a new GetEvonodesProposedEpochBlocksResponseV0. + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + * @classdesc Represents a GetEvonodesProposedEpochBlocksResponseV0. + * @implements IGetEvonodesProposedEpochBlocksResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.IGetEvonodesProposedEpochBlocksResponseV0=} [properties] Properties to set + */ + function GetEvonodesProposedEpochBlocksResponseV0(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]]; + } + + /** + * GetEvonodesProposedEpochBlocksResponseV0 evonodesProposedBlockCountsInfo. + * @member {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.IEvonodesProposedBlocks|null|undefined} evonodesProposedBlockCountsInfo + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @instance + */ + GetEvonodesProposedEpochBlocksResponseV0.prototype.evonodesProposedBlockCountsInfo = null; + + /** + * GetEvonodesProposedEpochBlocksResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @instance + */ + GetEvonodesProposedEpochBlocksResponseV0.prototype.proof = null; + + /** + * GetEvonodesProposedEpochBlocksResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @instance + */ + GetEvonodesProposedEpochBlocksResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetEvonodesProposedEpochBlocksResponseV0 result. + * @member {"evonodesProposedBlockCountsInfo"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @instance + */ + Object.defineProperty(GetEvonodesProposedEpochBlocksResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["evonodesProposedBlockCountsInfo", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetEvonodesProposedEpochBlocksResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.IGetEvonodesProposedEpochBlocksResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} GetEvonodesProposedEpochBlocksResponseV0 instance + */ + GetEvonodesProposedEpochBlocksResponseV0.create = function create(properties) { + return new GetEvonodesProposedEpochBlocksResponseV0(properties); + }; + + /** + * Encodes the specified GetEvonodesProposedEpochBlocksResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.IGetEvonodesProposedEpochBlocksResponseV0} message GetEvonodesProposedEpochBlocksResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEvonodesProposedEpochBlocksResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.evonodesProposedBlockCountsInfo != null && Object.hasOwnProperty.call(message, "evonodesProposedBlockCountsInfo")) + $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.encode(message.evonodesProposedBlockCountsInfo, 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 GetEvonodesProposedEpochBlocksResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.IGetEvonodesProposedEpochBlocksResponseV0} message GetEvonodesProposedEpochBlocksResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEvonodesProposedEpochBlocksResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEvonodesProposedEpochBlocksResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} GetEvonodesProposedEpochBlocksResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.evonodesProposedBlockCountsInfo = $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.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 GetEvonodesProposedEpochBlocksResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} GetEvonodesProposedEpochBlocksResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEvonodesProposedEpochBlocksResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEvonodesProposedEpochBlocksResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEvonodesProposedEpochBlocksResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.evonodesProposedBlockCountsInfo != null && message.hasOwnProperty("evonodesProposedBlockCountsInfo")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.verify(message.evonodesProposedBlockCountsInfo); + if (error) + return "evonodesProposedBlockCountsInfo." + 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 GetEvonodesProposedEpochBlocksResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} GetEvonodesProposedEpochBlocksResponseV0 + */ + GetEvonodesProposedEpochBlocksResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0(); + if (object.evonodesProposedBlockCountsInfo != null) { + if (typeof object.evonodesProposedBlockCountsInfo !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.evonodesProposedBlockCountsInfo: object expected"); + message.evonodesProposedBlockCountsInfo = $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.fromObject(object.evonodesProposedBlockCountsInfo); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetEvonodesProposedEpochBlocksResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} message GetEvonodesProposedEpochBlocksResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEvonodesProposedEpochBlocksResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.evonodesProposedBlockCountsInfo != null && message.hasOwnProperty("evonodesProposedBlockCountsInfo")) { + object.evonodesProposedBlockCountsInfo = $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.toObject(message.evonodesProposedBlockCountsInfo, options); + if (options.oneofs) + object.result = "evonodesProposedBlockCountsInfo"; + } + 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 GetEvonodesProposedEpochBlocksResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetEvonodesProposedEpochBlocksResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks = (function() { + + /** + * Properties of an EvonodeProposedBlocks. + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @interface IEvonodeProposedBlocks + * @property {Uint8Array|null} [proTxHash] EvonodeProposedBlocks proTxHash + * @property {number|Long|null} [count] EvonodeProposedBlocks count + */ + + /** + * Constructs a new EvonodeProposedBlocks. + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @classdesc Represents an EvonodeProposedBlocks. + * @implements IEvonodeProposedBlocks + * @constructor + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.IEvonodeProposedBlocks=} [properties] Properties to set + */ + function EvonodeProposedBlocks(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]]; + } + + /** + * EvonodeProposedBlocks proTxHash. + * @member {Uint8Array} proTxHash + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + * @instance + */ + EvonodeProposedBlocks.prototype.proTxHash = $util.newBuffer([]); + + /** + * EvonodeProposedBlocks count. + * @member {number|Long} count + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + * @instance + */ + EvonodeProposedBlocks.prototype.count = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new EvonodeProposedBlocks instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.IEvonodeProposedBlocks=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} EvonodeProposedBlocks instance + */ + EvonodeProposedBlocks.create = function create(properties) { + return new EvonodeProposedBlocks(properties); + }; + + /** + * Encodes the specified EvonodeProposedBlocks message. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.IEvonodeProposedBlocks} message EvonodeProposedBlocks message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvonodeProposedBlocks.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proTxHash != null && Object.hasOwnProperty.call(message, "proTxHash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.proTxHash); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.count); + return writer; + }; + + /** + * Encodes the specified EvonodeProposedBlocks message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.IEvonodeProposedBlocks} message EvonodeProposedBlocks message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvonodeProposedBlocks.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvonodeProposedBlocks message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + * @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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} EvonodeProposedBlocks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvonodeProposedBlocks.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proTxHash = reader.bytes(); + break; + case 2: + message.count = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvonodeProposedBlocks message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} EvonodeProposedBlocks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvonodeProposedBlocks.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvonodeProposedBlocks message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvonodeProposedBlocks.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proTxHash != null && message.hasOwnProperty("proTxHash")) + if (!(message.proTxHash && typeof message.proTxHash.length === "number" || $util.isString(message.proTxHash))) + return "proTxHash: 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 an EvonodeProposedBlocks message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} EvonodeProposedBlocks + */ + EvonodeProposedBlocks.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks(); + if (object.proTxHash != null) + if (typeof object.proTxHash === "string") + $util.base64.decode(object.proTxHash, message.proTxHash = $util.newBuffer($util.base64.length(object.proTxHash)), 0); + else if (object.proTxHash.length >= 0) + message.proTxHash = object.proTxHash; + 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 an EvonodeProposedBlocks message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} message EvonodeProposedBlocks + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvonodeProposedBlocks.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.proTxHash = ""; + else { + object.proTxHash = []; + if (options.bytes !== Array) + object.proTxHash = $util.newBuffer(object.proTxHash); + } + 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.proTxHash != null && message.hasOwnProperty("proTxHash")) + object.proTxHash = options.bytes === String ? $util.base64.encode(message.proTxHash, 0, message.proTxHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.proTxHash) : message.proTxHash; + 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 EvonodeProposedBlocks to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + * @instance + * @returns {Object.} JSON object + */ + EvonodeProposedBlocks.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EvonodeProposedBlocks; + })(); + + GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks = (function() { + + /** + * Properties of an EvonodesProposedBlocks. + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @interface IEvonodesProposedBlocks + * @property {Array.|null} [evonodesProposedBlockCounts] EvonodesProposedBlocks evonodesProposedBlockCounts + */ + + /** + * Constructs a new EvonodesProposedBlocks. + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + * @classdesc Represents an EvonodesProposedBlocks. + * @implements IEvonodesProposedBlocks + * @constructor + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.IEvonodesProposedBlocks=} [properties] Properties to set + */ + function EvonodesProposedBlocks(properties) { + this.evonodesProposedBlockCounts = []; + 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]]; + } + + /** + * EvonodesProposedBlocks evonodesProposedBlockCounts. + * @member {Array.} evonodesProposedBlockCounts + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks + * @instance + */ + EvonodesProposedBlocks.prototype.evonodesProposedBlockCounts = $util.emptyArray; + + /** + * Creates a new EvonodesProposedBlocks instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.IEvonodesProposedBlocks=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} EvonodesProposedBlocks instance + */ + EvonodesProposedBlocks.create = function create(properties) { + return new EvonodesProposedBlocks(properties); + }; + + /** + * Encodes the specified EvonodesProposedBlocks message. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.IEvonodesProposedBlocks} message EvonodesProposedBlocks message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvonodesProposedBlocks.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.evonodesProposedBlockCounts != null && message.evonodesProposedBlockCounts.length) + for (var i = 0; i < message.evonodesProposedBlockCounts.length; ++i) + $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.encode(message.evonodesProposedBlockCounts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EvonodesProposedBlocks message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.IEvonodesProposedBlocks} message EvonodesProposedBlocks message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvonodesProposedBlocks.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvonodesProposedBlocks message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks + * @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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} EvonodesProposedBlocks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvonodesProposedBlocks.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.evonodesProposedBlockCounts && message.evonodesProposedBlockCounts.length)) + message.evonodesProposedBlockCounts = []; + message.evonodesProposedBlockCounts.push($root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvonodesProposedBlocks message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} EvonodesProposedBlocks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvonodesProposedBlocks.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvonodesProposedBlocks message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvonodesProposedBlocks.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.evonodesProposedBlockCounts != null && message.hasOwnProperty("evonodesProposedBlockCounts")) { + if (!Array.isArray(message.evonodesProposedBlockCounts)) + return "evonodesProposedBlockCounts: array expected"; + for (var i = 0; i < message.evonodesProposedBlockCounts.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.verify(message.evonodesProposedBlockCounts[i]); + if (error) + return "evonodesProposedBlockCounts." + error; + } + } + return null; + }; + + /** + * Creates an EvonodesProposedBlocks message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} EvonodesProposedBlocks + */ + EvonodesProposedBlocks.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks(); + if (object.evonodesProposedBlockCounts) { + if (!Array.isArray(object.evonodesProposedBlockCounts)) + throw TypeError(".org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.evonodesProposedBlockCounts: array expected"); + message.evonodesProposedBlockCounts = []; + for (var i = 0; i < object.evonodesProposedBlockCounts.length; ++i) { + if (typeof object.evonodesProposedBlockCounts[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.evonodesProposedBlockCounts: object expected"); + message.evonodesProposedBlockCounts[i] = $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.fromObject(object.evonodesProposedBlockCounts[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EvonodesProposedBlocks message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} message EvonodesProposedBlocks + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvonodesProposedBlocks.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.evonodesProposedBlockCounts = []; + if (message.evonodesProposedBlockCounts && message.evonodesProposedBlockCounts.length) { + object.evonodesProposedBlockCounts = []; + for (var j = 0; j < message.evonodesProposedBlockCounts.length; ++j) + object.evonodesProposedBlockCounts[j] = $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.toObject(message.evonodesProposedBlockCounts[j], options); + } + return object; + }; + + /** + * Converts this EvonodesProposedBlocks to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks + * @instance + * @returns {Object.} JSON object + */ + EvonodesProposedBlocks.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EvonodesProposedBlocks; + })(); + + return GetEvonodesProposedEpochBlocksResponseV0; + })(); + + return GetEvonodesProposedEpochBlocksResponse; + })(); + + v0.GetEvonodesProposedEpochBlocksByRangeRequest = (function() { + + /** + * Properties of a GetEvonodesProposedEpochBlocksByRangeRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetEvonodesProposedEpochBlocksByRangeRequest + * @property {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.IGetEvonodesProposedEpochBlocksByRangeRequestV0|null} [v0] GetEvonodesProposedEpochBlocksByRangeRequest v0 + */ + + /** + * Constructs a new GetEvonodesProposedEpochBlocksByRangeRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetEvonodesProposedEpochBlocksByRangeRequest. + * @implements IGetEvonodesProposedEpochBlocksByRangeRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksByRangeRequest=} [properties] Properties to set + */ + function GetEvonodesProposedEpochBlocksByRangeRequest(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]]; + } + + /** + * GetEvonodesProposedEpochBlocksByRangeRequest v0. + * @member {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.IGetEvonodesProposedEpochBlocksByRangeRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + * @instance + */ + GetEvonodesProposedEpochBlocksByRangeRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetEvonodesProposedEpochBlocksByRangeRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + * @instance + */ + Object.defineProperty(GetEvonodesProposedEpochBlocksByRangeRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetEvonodesProposedEpochBlocksByRangeRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksByRangeRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} GetEvonodesProposedEpochBlocksByRangeRequest instance + */ + GetEvonodesProposedEpochBlocksByRangeRequest.create = function create(properties) { + return new GetEvonodesProposedEpochBlocksByRangeRequest(properties); + }; + + /** + * Encodes the specified GetEvonodesProposedEpochBlocksByRangeRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksByRangeRequest} message GetEvonodesProposedEpochBlocksByRangeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEvonodesProposedEpochBlocksByRangeRequest.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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetEvonodesProposedEpochBlocksByRangeRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetEvonodesProposedEpochBlocksByRangeRequest} message GetEvonodesProposedEpochBlocksByRangeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEvonodesProposedEpochBlocksByRangeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEvonodesProposedEpochBlocksByRangeRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + * @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.GetEvonodesProposedEpochBlocksByRangeRequest} GetEvonodesProposedEpochBlocksByRangeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEvonodesProposedEpochBlocksByRangeRequest.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.GetEvonodesProposedEpochBlocksByRangeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEvonodesProposedEpochBlocksByRangeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} GetEvonodesProposedEpochBlocksByRangeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEvonodesProposedEpochBlocksByRangeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEvonodesProposedEpochBlocksByRangeRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEvonodesProposedEpochBlocksByRangeRequest.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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetEvonodesProposedEpochBlocksByRangeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} GetEvonodesProposedEpochBlocksByRangeRequest + */ + GetEvonodesProposedEpochBlocksByRangeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetEvonodesProposedEpochBlocksByRangeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} message GetEvonodesProposedEpochBlocksByRangeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEvonodesProposedEpochBlocksByRangeRequest.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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetEvonodesProposedEpochBlocksByRangeRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + * @instance + * @returns {Object.} JSON object + */ + GetEvonodesProposedEpochBlocksByRangeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 = (function() { + + /** + * Properties of a GetEvonodesProposedEpochBlocksByRangeRequestV0. + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + * @interface IGetEvonodesProposedEpochBlocksByRangeRequestV0 + * @property {number|null} [epoch] GetEvonodesProposedEpochBlocksByRangeRequestV0 epoch + * @property {number|null} [limit] GetEvonodesProposedEpochBlocksByRangeRequestV0 limit + * @property {Uint8Array|null} [startAfter] GetEvonodesProposedEpochBlocksByRangeRequestV0 startAfter + * @property {Uint8Array|null} [startAt] GetEvonodesProposedEpochBlocksByRangeRequestV0 startAt + * @property {boolean|null} [prove] GetEvonodesProposedEpochBlocksByRangeRequestV0 prove + */ + + /** + * Constructs a new GetEvonodesProposedEpochBlocksByRangeRequestV0. + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + * @classdesc Represents a GetEvonodesProposedEpochBlocksByRangeRequestV0. + * @implements IGetEvonodesProposedEpochBlocksByRangeRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.IGetEvonodesProposedEpochBlocksByRangeRequestV0=} [properties] Properties to set + */ + function GetEvonodesProposedEpochBlocksByRangeRequestV0(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]]; + } + + /** + * GetEvonodesProposedEpochBlocksByRangeRequestV0 epoch. + * @member {number} epoch + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @instance + */ + GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.epoch = 0; + + /** + * GetEvonodesProposedEpochBlocksByRangeRequestV0 limit. + * @member {number} limit + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @instance + */ + GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.limit = 0; + + /** + * GetEvonodesProposedEpochBlocksByRangeRequestV0 startAfter. + * @member {Uint8Array} startAfter + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @instance + */ + GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.startAfter = $util.newBuffer([]); + + /** + * GetEvonodesProposedEpochBlocksByRangeRequestV0 startAt. + * @member {Uint8Array} startAt + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @instance + */ + GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.startAt = $util.newBuffer([]); + + /** + * GetEvonodesProposedEpochBlocksByRangeRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @instance + */ + GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.prove = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetEvonodesProposedEpochBlocksByRangeRequestV0 start. + * @member {"startAfter"|"startAt"|undefined} start + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @instance + */ + Object.defineProperty(GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype, "start", { + get: $util.oneOfGetter($oneOfFields = ["startAfter", "startAt"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetEvonodesProposedEpochBlocksByRangeRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.IGetEvonodesProposedEpochBlocksByRangeRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} GetEvonodesProposedEpochBlocksByRangeRequestV0 instance + */ + GetEvonodesProposedEpochBlocksByRangeRequestV0.create = function create(properties) { + return new GetEvonodesProposedEpochBlocksByRangeRequestV0(properties); + }; + + /** + * Encodes the specified GetEvonodesProposedEpochBlocksByRangeRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.IGetEvonodesProposedEpochBlocksByRangeRequestV0} message GetEvonodesProposedEpochBlocksByRangeRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEvonodesProposedEpochBlocksByRangeRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.epoch != null && Object.hasOwnProperty.call(message, "epoch")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.epoch); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.limit); + if (message.startAfter != null && Object.hasOwnProperty.call(message, "startAfter")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.startAfter); + if (message.startAt != null && Object.hasOwnProperty.call(message, "startAt")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.startAt); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetEvonodesProposedEpochBlocksByRangeRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.IGetEvonodesProposedEpochBlocksByRangeRequestV0} message GetEvonodesProposedEpochBlocksByRangeRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEvonodesProposedEpochBlocksByRangeRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEvonodesProposedEpochBlocksByRangeRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEvonodesProposedEpochBlocksByRangeRequestV0.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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.epoch = reader.uint32(); + break; + case 2: + message.limit = reader.uint32(); + break; + case 3: + message.startAfter = reader.bytes(); + break; + case 4: + message.startAt = reader.bytes(); + break; + case 5: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEvonodesProposedEpochBlocksByRangeRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEvonodesProposedEpochBlocksByRangeRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEvonodesProposedEpochBlocksByRangeRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEvonodesProposedEpochBlocksByRangeRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.epoch != null && message.hasOwnProperty("epoch")) + if (!$util.isInteger(message.epoch)) + return "epoch: integer expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit)) + return "limit: integer expected"; + if (message.startAfter != null && message.hasOwnProperty("startAfter")) { + properties.start = 1; + if (!(message.startAfter && typeof message.startAfter.length === "number" || $util.isString(message.startAfter))) + return "startAfter: buffer expected"; + } + if (message.startAt != null && message.hasOwnProperty("startAt")) { + if (properties.start === 1) + return "start: multiple values"; + properties.start = 1; + if (!(message.startAt && typeof message.startAt.length === "number" || $util.isString(message.startAt))) + return "startAt: buffer expected"; + } + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetEvonodesProposedEpochBlocksByRangeRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} GetEvonodesProposedEpochBlocksByRangeRequestV0 + */ + GetEvonodesProposedEpochBlocksByRangeRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0(); + if (object.epoch != null) + message.epoch = object.epoch >>> 0; + if (object.limit != null) + message.limit = object.limit >>> 0; + if (object.startAfter != null) + if (typeof object.startAfter === "string") + $util.base64.decode(object.startAfter, message.startAfter = $util.newBuffer($util.base64.length(object.startAfter)), 0); + else if (object.startAfter.length >= 0) + message.startAfter = object.startAfter; + if (object.startAt != null) + if (typeof object.startAt === "string") + $util.base64.decode(object.startAt, message.startAt = $util.newBuffer($util.base64.length(object.startAt)), 0); + else if (object.startAt.length >= 0) + message.startAt = object.startAt; + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetEvonodesProposedEpochBlocksByRangeRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} message GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEvonodesProposedEpochBlocksByRangeRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.epoch = 0; + object.limit = 0; + object.prove = false; + } + if (message.epoch != null && message.hasOwnProperty("epoch")) + object.epoch = message.epoch; + if (message.limit != null && message.hasOwnProperty("limit")) + object.limit = message.limit; + if (message.startAfter != null && message.hasOwnProperty("startAfter")) { + object.startAfter = options.bytes === String ? $util.base64.encode(message.startAfter, 0, message.startAfter.length) : options.bytes === Array ? Array.prototype.slice.call(message.startAfter) : message.startAfter; + if (options.oneofs) + object.start = "startAfter"; + } + if (message.startAt != null && message.hasOwnProperty("startAt")) { + object.startAt = options.bytes === String ? $util.base64.encode(message.startAt, 0, message.startAt.length) : options.bytes === Array ? Array.prototype.slice.call(message.startAt) : message.startAt; + if (options.oneofs) + object.start = "startAt"; + } + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetEvonodesProposedEpochBlocksByRangeRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetEvonodesProposedEpochBlocksByRangeRequestV0; + })(); + + return GetEvonodesProposedEpochBlocksByRangeRequest; + })(); + + v0.GetIdentitiesBalancesRequest = (function() { + + /** + * Properties of a GetIdentitiesBalancesRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetIdentitiesBalancesRequest + * @property {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.IGetIdentitiesBalancesRequestV0|null} [v0] GetIdentitiesBalancesRequest v0 + */ + + /** + * Constructs a new GetIdentitiesBalancesRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetIdentitiesBalancesRequest. + * @implements IGetIdentitiesBalancesRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetIdentitiesBalancesRequest=} [properties] Properties to set + */ + function GetIdentitiesBalancesRequest(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]]; + } + + /** + * GetIdentitiesBalancesRequest v0. + * @member {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.IGetIdentitiesBalancesRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + * @instance + */ + GetIdentitiesBalancesRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetIdentitiesBalancesRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + * @instance + */ + Object.defineProperty(GetIdentitiesBalancesRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetIdentitiesBalancesRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesBalancesRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} GetIdentitiesBalancesRequest instance + */ + GetIdentitiesBalancesRequest.create = function create(properties) { + return new GetIdentitiesBalancesRequest(properties); + }; + + /** + * Encodes the specified GetIdentitiesBalancesRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesBalancesRequest} message GetIdentitiesBalancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIdentitiesBalancesRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesBalancesRequest} message GetIdentitiesBalancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesBalancesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentitiesBalancesRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + * @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.GetIdentitiesBalancesRequest} GetIdentitiesBalancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentitiesBalancesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} GetIdentitiesBalancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesBalancesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentitiesBalancesRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetIdentitiesBalancesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} GetIdentitiesBalancesRequest + */ + GetIdentitiesBalancesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetIdentitiesBalancesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} message GetIdentitiesBalancesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetIdentitiesBalancesRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + * @instance + * @returns {Object.} JSON object + */ + GetIdentitiesBalancesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 = (function() { + + /** + * Properties of a GetIdentitiesBalancesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + * @interface IGetIdentitiesBalancesRequestV0 + * @property {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.IGetIdentitiesBalancesByKnownIdentityIds|null} [identitiesIds] GetIdentitiesBalancesRequestV0 identitiesIds + * @property {boolean|null} [prove] GetIdentitiesBalancesRequestV0 prove + */ + + /** + * Constructs a new GetIdentitiesBalancesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + * @classdesc Represents a GetIdentitiesBalancesRequestV0. + * @implements IGetIdentitiesBalancesRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.IGetIdentitiesBalancesRequestV0=} [properties] Properties to set + */ + function GetIdentitiesBalancesRequestV0(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]]; + } + + /** + * GetIdentitiesBalancesRequestV0 identitiesIds. + * @member {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.IGetIdentitiesBalancesByKnownIdentityIds|null|undefined} identitiesIds + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + * @instance + */ + GetIdentitiesBalancesRequestV0.prototype.identitiesIds = null; + + /** + * GetIdentitiesBalancesRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + * @instance + */ + GetIdentitiesBalancesRequestV0.prototype.prove = false; + + /** + * Creates a new GetIdentitiesBalancesRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.IGetIdentitiesBalancesRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} GetIdentitiesBalancesRequestV0 instance + */ + GetIdentitiesBalancesRequestV0.create = function create(properties) { + return new GetIdentitiesBalancesRequestV0(properties); + }; + + /** + * Encodes the specified GetIdentitiesBalancesRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.IGetIdentitiesBalancesRequestV0} message GetIdentitiesBalancesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesBalancesRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.identitiesIds != null && Object.hasOwnProperty.call(message, "identitiesIds")) + $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.encode(message.identitiesIds, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetIdentitiesBalancesRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.IGetIdentitiesBalancesRequestV0} message GetIdentitiesBalancesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesBalancesRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentitiesBalancesRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + * @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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} GetIdentitiesBalancesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesBalancesRequestV0.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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.identitiesIds = $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.decode(reader, reader.uint32()); + break; + case 2: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentitiesBalancesRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} GetIdentitiesBalancesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesBalancesRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentitiesBalancesRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentitiesBalancesRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.identitiesIds != null && message.hasOwnProperty("identitiesIds")) { + var error = $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.verify(message.identitiesIds); + if (error) + return "identitiesIds." + error; + } + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetIdentitiesBalancesRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} GetIdentitiesBalancesRequestV0 + */ + GetIdentitiesBalancesRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0(); + if (object.identitiesIds != null) { + if (typeof object.identitiesIds !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.identitiesIds: object expected"); + message.identitiesIds = $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.fromObject(object.identitiesIds); + } + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetIdentitiesBalancesRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} message GetIdentitiesBalancesRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentitiesBalancesRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.identitiesIds = null; + object.prove = false; + } + if (message.identitiesIds != null && message.hasOwnProperty("identitiesIds")) + object.identitiesIds = $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.toObject(message.identitiesIds, options); + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetIdentitiesBalancesRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetIdentitiesBalancesRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds = (function() { + + /** + * Properties of a GetIdentitiesBalancesByKnownIdentityIds. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + * @interface IGetIdentitiesBalancesByKnownIdentityIds + * @property {Array.|null} [identitiesIds] GetIdentitiesBalancesByKnownIdentityIds identitiesIds + */ + + /** + * Constructs a new GetIdentitiesBalancesByKnownIdentityIds. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + * @classdesc Represents a GetIdentitiesBalancesByKnownIdentityIds. + * @implements IGetIdentitiesBalancesByKnownIdentityIds + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.IGetIdentitiesBalancesByKnownIdentityIds=} [properties] Properties to set + */ + function GetIdentitiesBalancesByKnownIdentityIds(properties) { + this.identitiesIds = []; + 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]]; + } + + /** + * GetIdentitiesBalancesByKnownIdentityIds identitiesIds. + * @member {Array.} identitiesIds + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds + * @instance + */ + GetIdentitiesBalancesByKnownIdentityIds.prototype.identitiesIds = $util.emptyArray; + + /** + * Creates a new GetIdentitiesBalancesByKnownIdentityIds instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.IGetIdentitiesBalancesByKnownIdentityIds=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} GetIdentitiesBalancesByKnownIdentityIds instance + */ + GetIdentitiesBalancesByKnownIdentityIds.create = function create(properties) { + return new GetIdentitiesBalancesByKnownIdentityIds(properties); + }; + + /** + * Encodes the specified GetIdentitiesBalancesByKnownIdentityIds message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.IGetIdentitiesBalancesByKnownIdentityIds} message GetIdentitiesBalancesByKnownIdentityIds message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesBalancesByKnownIdentityIds.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.identitiesIds != null && message.identitiesIds.length) + for (var i = 0; i < message.identitiesIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.identitiesIds[i]); + return writer; + }; + + /** + * Encodes the specified GetIdentitiesBalancesByKnownIdentityIds message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.IGetIdentitiesBalancesByKnownIdentityIds} message GetIdentitiesBalancesByKnownIdentityIds message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesBalancesByKnownIdentityIds.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentitiesBalancesByKnownIdentityIds message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds + * @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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} GetIdentitiesBalancesByKnownIdentityIds + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesBalancesByKnownIdentityIds.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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.identitiesIds && message.identitiesIds.length)) + message.identitiesIds = []; + message.identitiesIds.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentitiesBalancesByKnownIdentityIds message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} GetIdentitiesBalancesByKnownIdentityIds + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesBalancesByKnownIdentityIds.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentitiesBalancesByKnownIdentityIds message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentitiesBalancesByKnownIdentityIds.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.identitiesIds != null && message.hasOwnProperty("identitiesIds")) { + if (!Array.isArray(message.identitiesIds)) + return "identitiesIds: array expected"; + for (var i = 0; i < message.identitiesIds.length; ++i) + if (!(message.identitiesIds[i] && typeof message.identitiesIds[i].length === "number" || $util.isString(message.identitiesIds[i]))) + return "identitiesIds: buffer[] expected"; + } + return null; + }; + + /** + * Creates a GetIdentitiesBalancesByKnownIdentityIds message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} GetIdentitiesBalancesByKnownIdentityIds + */ + GetIdentitiesBalancesByKnownIdentityIds.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds(); + if (object.identitiesIds) { + if (!Array.isArray(object.identitiesIds)) + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.identitiesIds: array expected"); + message.identitiesIds = []; + for (var i = 0; i < object.identitiesIds.length; ++i) + if (typeof object.identitiesIds[i] === "string") + $util.base64.decode(object.identitiesIds[i], message.identitiesIds[i] = $util.newBuffer($util.base64.length(object.identitiesIds[i])), 0); + else if (object.identitiesIds[i].length >= 0) + message.identitiesIds[i] = object.identitiesIds[i]; + } + return message; + }; + + /** + * Creates a plain object from a GetIdentitiesBalancesByKnownIdentityIds message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} message GetIdentitiesBalancesByKnownIdentityIds + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentitiesBalancesByKnownIdentityIds.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.identitiesIds = []; + if (message.identitiesIds && message.identitiesIds.length) { + object.identitiesIds = []; + for (var j = 0; j < message.identitiesIds.length; ++j) + object.identitiesIds[j] = options.bytes === String ? $util.base64.encode(message.identitiesIds[j], 0, message.identitiesIds[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.identitiesIds[j]) : message.identitiesIds[j]; + } + return object; + }; + + /** + * Converts this GetIdentitiesBalancesByKnownIdentityIds to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds + * @instance + * @returns {Object.} JSON object + */ + GetIdentitiesBalancesByKnownIdentityIds.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetIdentitiesBalancesByKnownIdentityIds; + })(); + + return GetIdentitiesBalancesRequestV0; + })(); + + return GetIdentitiesBalancesRequest; + })(); + + v0.GetIdentitiesBalancesResponse = (function() { + + /** + * Properties of a GetIdentitiesBalancesResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetIdentitiesBalancesResponse + * @property {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.IGetIdentitiesBalancesResponseV0|null} [v0] GetIdentitiesBalancesResponse v0 + */ + + /** + * Constructs a new GetIdentitiesBalancesResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetIdentitiesBalancesResponse. + * @implements IGetIdentitiesBalancesResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetIdentitiesBalancesResponse=} [properties] Properties to set + */ + function GetIdentitiesBalancesResponse(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]]; + } + + /** + * GetIdentitiesBalancesResponse v0. + * @member {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.IGetIdentitiesBalancesResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + * @instance + */ + GetIdentitiesBalancesResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetIdentitiesBalancesResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + * @instance + */ + Object.defineProperty(GetIdentitiesBalancesResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetIdentitiesBalancesResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesBalancesResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} GetIdentitiesBalancesResponse instance + */ + GetIdentitiesBalancesResponse.create = function create(properties) { + return new GetIdentitiesBalancesResponse(properties); + }; + + /** + * Encodes the specified GetIdentitiesBalancesResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesBalancesResponse} message GetIdentitiesBalancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesBalancesResponse.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIdentitiesBalancesResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesBalancesResponse} message GetIdentitiesBalancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesBalancesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentitiesBalancesResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + * @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.GetIdentitiesBalancesResponse} GetIdentitiesBalancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesBalancesResponse.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.GetIdentitiesBalancesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentitiesBalancesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} GetIdentitiesBalancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesBalancesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentitiesBalancesResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentitiesBalancesResponse.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetIdentitiesBalancesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} GetIdentitiesBalancesResponse + */ + GetIdentitiesBalancesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetIdentitiesBalancesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} message GetIdentitiesBalancesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentitiesBalancesResponse.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetIdentitiesBalancesResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + * @instance + * @returns {Object.} JSON object + */ + GetIdentitiesBalancesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 = (function() { + + /** + * Properties of a GetIdentitiesBalancesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + * @interface IGetIdentitiesBalancesResponseV0 + * @property {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IIdentitiesBalances|null} [identitiesBalances] GetIdentitiesBalancesResponseV0 identitiesBalances + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetIdentitiesBalancesResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetIdentitiesBalancesResponseV0 metadata + */ + + /** + * Constructs a new GetIdentitiesBalancesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + * @classdesc Represents a GetIdentitiesBalancesResponseV0. + * @implements IGetIdentitiesBalancesResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.IGetIdentitiesBalancesResponseV0=} [properties] Properties to set + */ + function GetIdentitiesBalancesResponseV0(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]]; + } + + /** + * GetIdentitiesBalancesResponseV0 identitiesBalances. + * @member {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IIdentitiesBalances|null|undefined} identitiesBalances + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @instance + */ + GetIdentitiesBalancesResponseV0.prototype.identitiesBalances = null; + + /** + * GetIdentitiesBalancesResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @instance + */ + GetIdentitiesBalancesResponseV0.prototype.proof = null; + + /** + * GetIdentitiesBalancesResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @instance + */ + GetIdentitiesBalancesResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetIdentitiesBalancesResponseV0 result. + * @member {"identitiesBalances"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @instance + */ + Object.defineProperty(GetIdentitiesBalancesResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["identitiesBalances", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetIdentitiesBalancesResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.IGetIdentitiesBalancesResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} GetIdentitiesBalancesResponseV0 instance + */ + GetIdentitiesBalancesResponseV0.create = function create(properties) { + return new GetIdentitiesBalancesResponseV0(properties); + }; + + /** + * Encodes the specified GetIdentitiesBalancesResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.IGetIdentitiesBalancesResponseV0} message GetIdentitiesBalancesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesBalancesResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.identitiesBalances != null && Object.hasOwnProperty.call(message, "identitiesBalances")) + $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.encode(message.identitiesBalances, 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 GetIdentitiesBalancesResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.IGetIdentitiesBalancesResponseV0} message GetIdentitiesBalancesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesBalancesResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentitiesBalancesResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} GetIdentitiesBalancesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesBalancesResponseV0.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.identitiesBalances = $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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 GetIdentitiesBalancesResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} GetIdentitiesBalancesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesBalancesResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentitiesBalancesResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentitiesBalancesResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.identitiesBalances != null && message.hasOwnProperty("identitiesBalances")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.verify(message.identitiesBalances); + if (error) + return "identitiesBalances." + 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 GetIdentitiesBalancesResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} GetIdentitiesBalancesResponseV0 + */ + GetIdentitiesBalancesResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0(); + if (object.identitiesBalances != null) { + if (typeof object.identitiesBalances !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.identitiesBalances: object expected"); + message.identitiesBalances = $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.fromObject(object.identitiesBalances); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetIdentitiesBalancesResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} message GetIdentitiesBalancesResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentitiesBalancesResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.identitiesBalances != null && message.hasOwnProperty("identitiesBalances")) { + object.identitiesBalances = $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.toObject(message.identitiesBalances, options); + if (options.oneofs) + object.result = "identitiesBalances"; + } + 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 GetIdentitiesBalancesResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetIdentitiesBalancesResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentitiesBalancesResponseV0.IdentityBalance = (function() { + + /** + * Properties of an IdentityBalance. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @interface IIdentityBalance + * @property {Uint8Array|null} [identityId] IdentityBalance identityId + * @property {number|Long|null} [balance] IdentityBalance balance + */ + + /** + * Constructs a new IdentityBalance. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @classdesc Represents an IdentityBalance. + * @implements IIdentityBalance + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IIdentityBalance=} [properties] Properties to set + */ + function IdentityBalance(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]]; + } + + /** + * IdentityBalance identityId. + * @member {Uint8Array} identityId + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + * @instance + */ + IdentityBalance.prototype.identityId = $util.newBuffer([]); + + /** + * IdentityBalance balance. + * @member {number|Long} balance + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + * @instance + */ + IdentityBalance.prototype.balance = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new IdentityBalance instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IIdentityBalance=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} IdentityBalance instance + */ + IdentityBalance.create = function create(properties) { + return new IdentityBalance(properties); + }; + + /** + * Encodes the specified IdentityBalance message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IIdentityBalance} message IdentityBalance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityBalance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.identityId != null && Object.hasOwnProperty.call(message, "identityId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.identityId); + if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.balance); + return writer; + }; + + /** + * Encodes the specified IdentityBalance message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IIdentityBalance} message IdentityBalance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityBalance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentityBalance message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + * @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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} IdentityBalance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityBalance.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.identityId = reader.bytes(); + break; + case 2: + message.balance = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentityBalance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} IdentityBalance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityBalance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentityBalance message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentityBalance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.identityId != null && message.hasOwnProperty("identityId")) + if (!(message.identityId && typeof message.identityId.length === "number" || $util.isString(message.identityId))) + return "identityId: buffer expected"; + if (message.balance != null && message.hasOwnProperty("balance")) + if (!$util.isInteger(message.balance) && !(message.balance && $util.isInteger(message.balance.low) && $util.isInteger(message.balance.high))) + return "balance: integer|Long expected"; + return null; + }; + + /** + * Creates an IdentityBalance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} IdentityBalance + */ + IdentityBalance.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance(); + if (object.identityId != null) + if (typeof object.identityId === "string") + $util.base64.decode(object.identityId, message.identityId = $util.newBuffer($util.base64.length(object.identityId)), 0); + else if (object.identityId.length >= 0) + message.identityId = object.identityId; + if (object.balance != null) + if ($util.Long) + (message.balance = $util.Long.fromValue(object.balance)).unsigned = true; + else if (typeof object.balance === "string") + message.balance = parseInt(object.balance, 10); + else if (typeof object.balance === "number") + message.balance = object.balance; + else if (typeof object.balance === "object") + message.balance = new $util.LongBits(object.balance.low >>> 0, object.balance.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from an IdentityBalance message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} message IdentityBalance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentityBalance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.identityId = ""; + else { + object.identityId = []; + if (options.bytes !== Array) + object.identityId = $util.newBuffer(object.identityId); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.balance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.balance = options.longs === String ? "0" : 0; + } + if (message.identityId != null && message.hasOwnProperty("identityId")) + object.identityId = options.bytes === String ? $util.base64.encode(message.identityId, 0, message.identityId.length) : options.bytes === Array ? Array.prototype.slice.call(message.identityId) : message.identityId; + if (message.balance != null && message.hasOwnProperty("balance")) + if (typeof message.balance === "number") + object.balance = options.longs === String ? String(message.balance) : message.balance; + else + object.balance = options.longs === String ? $util.Long.prototype.toString.call(message.balance) : options.longs === Number ? new $util.LongBits(message.balance.low >>> 0, message.balance.high >>> 0).toNumber(true) : message.balance; + return object; + }; + + /** + * Converts this IdentityBalance to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + * @instance + * @returns {Object.} JSON object + */ + IdentityBalance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentityBalance; + })(); + + GetIdentitiesBalancesResponseV0.IdentitiesBalances = (function() { + + /** + * Properties of an IdentitiesBalances. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @interface IIdentitiesBalances + * @property {Array.|null} [entries] IdentitiesBalances entries + */ + + /** + * Constructs a new IdentitiesBalances. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + * @classdesc Represents an IdentitiesBalances. + * @implements IIdentitiesBalances + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IIdentitiesBalances=} [properties] Properties to set + */ + function IdentitiesBalances(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]]; + } + + /** + * IdentitiesBalances entries. + * @member {Array.} entries + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances + * @instance + */ + IdentitiesBalances.prototype.entries = $util.emptyArray; + + /** + * Creates a new IdentitiesBalances instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IIdentitiesBalances=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} IdentitiesBalances instance + */ + IdentitiesBalances.create = function create(properties) { + return new IdentitiesBalances(properties); + }; + + /** + * Encodes the specified IdentitiesBalances message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IIdentitiesBalances} message IdentitiesBalances message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentitiesBalances.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IdentitiesBalances message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IIdentitiesBalances} message IdentitiesBalances message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentitiesBalances.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentitiesBalances message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances + * @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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} IdentitiesBalances + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentitiesBalances.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances(); + 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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentitiesBalances message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} IdentitiesBalances + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentitiesBalances.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentitiesBalances message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentitiesBalances.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates an IdentitiesBalances message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} IdentitiesBalances + */ + IdentitiesBalances.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.entries: object expected"); + message.entries[i] = $root.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.fromObject(object.entries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an IdentitiesBalances message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} message IdentitiesBalances + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentitiesBalances.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.toObject(message.entries[j], options); + } + return object; + }; + + /** + * Converts this IdentitiesBalances to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances + * @instance + * @returns {Object.} JSON object + */ + IdentitiesBalances.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentitiesBalances; + })(); + + return GetIdentitiesBalancesResponseV0; + })(); + + return GetIdentitiesBalancesResponse; + })(); + v0.GetProofsRequest = (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 b1264519d47..746f5210fdb 100644 --- a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js +++ b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js @@ -118,6 +118,29 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpoc goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.ResultCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.StartCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase', null, { proto }); @@ -1191,16 +1214,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1212,16 +1235,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -1233,16 +1256,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse'; } /** * Generated by JsPbCodeGenerator. @@ -1254,16 +1277,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -1275,16 +1298,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks'; } /** * Generated by JsPbCodeGenerator. @@ -1296,16 +1319,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks'; } /** * Generated by JsPbCodeGenerator. @@ -1317,16 +1340,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1338,16 +1361,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsResponse'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -1359,16 +1382,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0'; + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1380,16 +1403,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractRequest'; + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -1401,16 +1424,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0'; + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds'; } /** * Generated by JsPbCodeGenerator. @@ -1422,16 +1445,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractResponse'; + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse'; } /** * Generated by JsPbCodeGenerator. @@ -1443,16 +1466,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0'; + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -1464,16 +1487,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsRequest'; + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance'; } /** * Generated by JsPbCodeGenerator. @@ -1485,16 +1508,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0'; + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances'; } /** * Generated by JsPbCodeGenerator. @@ -1506,16 +1529,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProofsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse'; + proto.org.dash.platform.dapi.v0.GetProofsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1527,16 +1550,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry'; + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -1548,16 +1571,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts'; + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1569,16 +1592,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0'; + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1590,16 +1613,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest'; + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1611,16 +1634,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0'; + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1632,16 +1655,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse'; + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1653,16 +1676,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProofsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0'; + proto.org.dash.platform.dapi.v0.GetProofsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -1674,16 +1697,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry'; + proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -1695,16 +1718,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetDataContractRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory'; + proto.org.dash.platform.dapi.v0.GetDataContractRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1716,16 +1739,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDocumentsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest'; + proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -1737,16 +1760,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0'; + proto.org.dash.platform.dapi.v0.GetDataContractResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractResponse'; } /** * Generated by JsPbCodeGenerator. @@ -1758,16 +1781,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsResponse'; + proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -1779,16 +1802,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0'; + proto.org.dash.platform.dapi.v0.GetDataContractsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1800,16 +1823,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents'; + proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -1821,16 +1844,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest'; + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -1842,16 +1865,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0 = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0'; + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry'; } /** * Generated by JsPbCodeGenerator. @@ -1863,16 +1886,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse'; + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts'; } /** * Generated by JsPbCodeGenerator. @@ -1884,16 +1907,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0'; + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -1905,16 +1928,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest'; + proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1926,16 +1949,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0 = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0 = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0'; + proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -1947,16 +1970,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse'; + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse'; } /** * Generated by JsPbCodeGenerator. @@ -1968,16 +1991,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0'; + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -1989,16 +2012,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest'; + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry'; } /** * Generated by JsPbCodeGenerator. @@ -2010,16 +2033,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0'; + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory'; } /** * Generated by JsPbCodeGenerator. @@ -2031,16 +2054,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse'; + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2052,16 +2075,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock'; + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2073,16 +2096,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetDocumentsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence'; + proto.org.dash.platform.dapi.v0.GetDocumentsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2094,16 +2117,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0'; + proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2115,16 +2138,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest'; + proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents'; } /** * Generated by JsPbCodeGenerator. @@ -2136,16 +2159,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0'; + proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2157,16 +2180,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse'; + proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2178,16 +2201,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0'; + proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2199,16 +2222,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions'; + proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2220,16 +2243,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry'; + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2241,16 +2264,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest'; + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2262,16 +2285,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0'; + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2283,16 +2306,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse'; + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2304,16 +2327,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0'; + proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2325,16 +2348,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals'; + proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2346,16 +2369,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal'; + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2367,16 +2390,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest'; + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock'; } /** * Generated by JsPbCodeGenerator. @@ -2388,16 +2411,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0 = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0'; + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence'; } /** * Generated by JsPbCodeGenerator. @@ -2409,16 +2432,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse'; + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2430,16 +2453,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2451,16 +2474,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2472,16 +2495,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2493,16 +2516,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2514,16 +2537,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions'; } /** * Generated by JsPbCodeGenerator. @@ -2535,16 +2558,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry'; } /** * Generated by JsPbCodeGenerator. @@ -2556,16 +2579,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2577,16 +2600,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2598,16 +2621,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2619,16 +2642,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2640,16 +2663,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals'; } /** * Generated by JsPbCodeGenerator. @@ -2661,16 +2684,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal'; } /** * Generated by JsPbCodeGenerator. @@ -2682,16 +2705,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo'; + proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2703,16 +2726,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse'; + proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2724,16 +2747,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0'; + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2745,16 +2768,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp'; + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2766,16 +2789,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps'; + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos'; } /** * Generated by JsPbCodeGenerator. @@ -2787,16 +2810,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest'; + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo'; } /** * Generated by JsPbCodeGenerator. @@ -2808,16 +2831,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2829,16 +2852,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo'; + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2850,16 +2873,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse'; + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo'; } /** * Generated by JsPbCodeGenerator. @@ -2871,16 +2894,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2892,16 +2915,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo'; + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2913,16 +2936,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders'; + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues'; } /** * Generated by JsPbCodeGenerator. @@ -2934,16 +2957,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2955,16 +2978,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2976,16 +2999,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo'; } /** * Generated by JsPbCodeGenerator. @@ -2997,16 +3020,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo'; } /** * Generated by JsPbCodeGenerator. @@ -3018,16 +3041,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse'; } /** * Generated by JsPbCodeGenerator. @@ -3039,16 +3062,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -3060,16 +3083,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp'; } /** * Generated by JsPbCodeGenerator. @@ -3081,16 +3104,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps'; } /** * Generated by JsPbCodeGenerator. @@ -3102,16 +3125,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest'; } /** * Generated by JsPbCodeGenerator. @@ -3123,16 +3146,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -3144,16 +3167,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo'; } /** * Generated by JsPbCodeGenerator. @@ -3165,16 +3188,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse'; } /** * Generated by JsPbCodeGenerator. @@ -3186,16 +3209,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -3207,16 +3230,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo'; } /** * Generated by JsPbCodeGenerator. @@ -3228,16 +3251,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders'; } /** * Generated by JsPbCodeGenerator. @@ -3249,16 +3272,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender'; } /** * Generated by JsPbCodeGenerator. @@ -3270,16 +3293,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest'; } /** * Generated by JsPbCodeGenerator. @@ -3291,16 +3314,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -3312,16 +3335,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo'; } /** * Generated by JsPbCodeGenerator. @@ -3333,16 +3356,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse'; } /** * Generated by JsPbCodeGenerator. @@ -3354,16 +3377,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -3375,16 +3398,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters'; } /** * Generated by JsPbCodeGenerator. @@ -3396,16 +3419,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest'; } /** * Generated by JsPbCodeGenerator. @@ -3417,16 +3440,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPathElementsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsRequest'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -3438,16 +3461,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo'; } /** * Generated by JsPbCodeGenerator. @@ -3459,16 +3482,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsResponse'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse'; } /** * Generated by JsPbCodeGenerator. @@ -3480,16 +3503,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -3501,16 +3524,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes'; } /** * Generated by JsPbCodeGenerator. @@ -3522,16 +3545,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusRequest'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice'; } /** * Generated by JsPbCodeGenerator. @@ -3543,16 +3566,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote'; } /** * Generated by JsPbCodeGenerator. @@ -3564,16 +3587,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse'; + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest'; } /** * Generated by JsPbCodeGenerator. @@ -3585,16 +3608,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0 = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0 = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0'; + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -3606,16 +3629,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version'; + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse'; } /** * Generated by JsPbCodeGenerator. @@ -3627,16 +3650,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software'; + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -3648,16 +3671,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol'; + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest'; } /** * Generated by JsPbCodeGenerator. @@ -3669,16 +3692,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0 = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash'; + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -3690,16 +3713,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive'; + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse'; } /** * Generated by JsPbCodeGenerator. @@ -3711,16 +3734,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time'; + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -3732,16 +3755,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node'; + proto.org.dash.platform.dapi.v0.GetPathElementsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -3753,16 +3776,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain'; + proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -3774,16 +3797,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network'; + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -3795,85 +3818,3154 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync'; + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0'; } - - - -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} + * 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.Proof.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.Proof.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.repeatedFields_, null); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements'; +} /** - * 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.Proof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * 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.Proof.toObject = function(includeInstance, msg) { - var f, obj = { - grovedbProof: msg.getGrovedbProof_asB64(), - quorumHash: msg.getQuorumHash_asB64(), - signature: msg.getSignature_asB64(), - round: jspb.Message.getFieldWithDefault(msg, 4, 0), - blockIdHash: msg.getBlockIdHash_asB64(), - quorumType: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_); }; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusRequest'; } - - /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.Proof} + * 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.Proof.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.Proof; - return proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.Proof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.Proof} +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0'; +} +/** + * 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.GetStatusResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Version = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Version.Software = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Version.Protocol = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Time = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Node = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Chain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Network = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.StateSync = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync'; +} + + + +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.Proof.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.Proof.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.Proof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.Proof.toObject = function(includeInstance, msg) { + var f, obj = { + grovedbProof: msg.getGrovedbProof_asB64(), + quorumHash: msg.getQuorumHash_asB64(), + signature: msg.getSignature_asB64(), + round: jspb.Message.getFieldWithDefault(msg, 4, 0), + blockIdHash: msg.getBlockIdHash_asB64(), + quorumType: jspb.Message.getFieldWithDefault(msg, 6, 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.Proof} + */ +proto.org.dash.platform.dapi.v0.Proof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.Proof; + return proto.org.dash.platform.dapi.v0.Proof.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.Proof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.Proof} + */ +proto.org.dash.platform.dapi.v0.Proof.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.setGrovedbProof(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setQuorumHash(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setRound(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockIdHash(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setQuorumType(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.Proof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.Proof.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.Proof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGrovedbProof_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getQuorumHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getBlockIdHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getQuorumType(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } +}; + + +/** + * optional bytes grovedb_proof = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getGrovedbProof = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes grovedb_proof = 1; + * This is a type-conversion wrapper around `getGrovedbProof()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getGrovedbProof_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getGrovedbProof())); +}; + + +/** + * optional bytes grovedb_proof = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getGrovedbProof()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getGrovedbProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getGrovedbProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.setGrovedbProof = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes quorum_hash = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes quorum_hash = 2; + * This is a type-conversion wrapper around `getQuorumHash()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getQuorumHash())); +}; + + +/** + * optional bytes quorum_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getQuorumHash()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getQuorumHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.setQuorumHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes signature = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes signature = 3; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional uint32 round = 4; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bytes block_id_hash = 5; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes block_id_hash = 5; + * This is a type-conversion wrapper around `getBlockIdHash()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockIdHash())); +}; + + +/** + * optional bytes block_id_hash = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockIdHash()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockIdHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.setBlockIdHash = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional uint32 quorum_type = 6; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumType = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.setQuorumType = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + + + + +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.ResponseMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.ResponseMetadata.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.ResponseMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + coreChainLockedHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + epoch: jspb.Message.getFieldWithDefault(msg, 3, 0), + timeMs: jspb.Message.getFieldWithDefault(msg, 4, 0), + protocolVersion: jspb.Message.getFieldWithDefault(msg, 5, 0), + chainId: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + 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.ResponseMetadata} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.ResponseMetadata; + return proto.org.dash.platform.dapi.v0.ResponseMetadata.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.ResponseMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.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.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCoreChainLockedHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setEpoch(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimeMs(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setProtocolVersion(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(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.ResponseMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.ResponseMetadata.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.ResponseMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getCoreChainLockedHeight(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getEpoch(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getTimeMs(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getProtocolVersion(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional uint64 height = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 core_chain_locked_height = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getCoreChainLockedHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setCoreChainLockedHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 epoch = 3; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getEpoch = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setEpoch = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 time_ms = 4; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getTimeMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setTimeMs = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint32 protocol_version = 5; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getProtocolVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setProtocolVersion = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string chain_id = 6; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + + + + +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.StateTransitionBroadcastError.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.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.StateTransitionBroadcastError} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + message: jspb.Message.getFieldWithDefault(msg, 2, ""), + data: msg.getData_asB64() + }; + + 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.StateTransitionBroadcastError} + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError; + return proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.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.StateTransitionBroadcastError} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(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.StateTransitionBroadcastError.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.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.StateTransitionBroadcastError} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional uint32 code = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + + + + +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.BroadcastStateTransitionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.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.BroadcastStateTransitionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + stateTransition: msg.getStateTransition_asB64() + }; + + 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.BroadcastStateTransitionRequest} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest; + return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.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.BroadcastStateTransitionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.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.setStateTransition(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.BroadcastStateTransitionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.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.BroadcastStateTransitionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStateTransition_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes state_transition = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.getStateTransition = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes state_transition = 1; + * This is a type-conversion wrapper around `getStateTransition()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.getStateTransition_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStateTransition())); +}; + + +/** + * optional bytes state_transition = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStateTransition()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.getStateTransition_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStateTransition())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} returns this + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.setStateTransition = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +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.BroadcastStateTransitionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.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.BroadcastStateTransitionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + 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.BroadcastStateTransitionResponse} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse; + return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.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.BroadcastStateTransitionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.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.BroadcastStateTransitionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * 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.GetIdentityRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityRequest.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.GetIdentityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityRequest.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.GetIdentityRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.GetIdentityRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityRequest.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.GetIdentityRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.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.GetIdentityRequest.GetIdentityRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.GetIdentityRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityRequest.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.GetIdentityRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.GetIdentityRequest.GetIdentityRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.GetIdentityRequest.GetIdentityRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, 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.GetIdentityRequest.GetIdentityRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.GetIdentityRequest.GetIdentityRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.setId(value); + break; + case 2: + 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.GetIdentityRequest.GetIdentityRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.GetIdentityRequest.GetIdentityRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetIdentityRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.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.GetIdentityNonceRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.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.GetIdentityNonceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.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.GetIdentityNonceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.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.GetIdentityNonceRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.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.GetIdentityNonceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.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.GetIdentityNonceRequest.GetIdentityNonceRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.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.GetIdentityNonceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.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.GetIdentityNonceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.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.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.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.GetIdentityNonceRequest.GetIdentityNonceRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + identityId: msg.getIdentityId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, 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.GetIdentityNonceRequest.GetIdentityNonceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.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.GetIdentityNonceRequest.GetIdentityNonceRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.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.setIdentityId(value); + break; + case 2: + 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.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.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.GetIdentityNonceRequest.GetIdentityNonceRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional bytes identity_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes identity_id = 1; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); +}; + + +/** + * optional bytes identity_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentityId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetIdentityNonceRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.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.GetIdentityContractNonceRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.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.GetIdentityContractNonceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.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.GetIdentityContractNonceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.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.GetIdentityContractNonceRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.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.GetIdentityContractNonceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.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.GetIdentityContractNonceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.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.GetIdentityContractNonceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + identityId: msg.getIdentityId_asB64(), + contractId: msg.getContractId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, 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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.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.setIdentityId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractId(value); + break; + case 3: + 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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional bytes identity_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes identity_id = 1; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); +}; + + +/** + * optional bytes identity_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentityId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes contract_id = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes contract_id = 2; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContractId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bool prove = 3; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional GetIdentityContractNonceRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.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.GetIdentityBalanceRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.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.GetIdentityBalanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.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.GetIdentityBalanceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.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.GetIdentityBalanceRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.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.GetIdentityBalanceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.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.GetIdentityBalanceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.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.GetIdentityBalanceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, 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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.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.setId(value); + break; + case 2: + 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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetIdentityBalanceRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.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.GetIdentityBalanceAndRevisionRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.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.GetIdentityBalanceAndRevisionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.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.GetIdentityBalanceAndRevisionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.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.GetIdentityBalanceAndRevisionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.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.GetIdentityBalanceAndRevisionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, 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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3882,27 +6974,11 @@ proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader = function(msg switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setGrovedbProof(value); + msg.setId(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setQuorumHash(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRound(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBlockIdHash(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setQuorumType(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -3917,9 +6993,9 @@ proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3927,261 +7003,151 @@ proto.org.dash.platform.dapi.v0.Proof.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.Proof} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getGrovedbProof_asU8(); + f = message.getId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getQuorumHash_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getProve(); + if (f) { + writer.writeBool( 2, f ); } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getRound(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getBlockIdHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getQuorumType(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } }; /** - * optional bytes grovedb_proof = 1; + * optional bytes id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getGrovedbProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes grovedb_proof = 1; - * This is a type-conversion wrapper around `getGrovedbProof()` + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getGrovedbProof_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getGrovedbProof())); + this.getId())); }; /** - * optional bytes grovedb_proof = 1; + * optional bytes id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getGrovedbProof()` + * This is a type-conversion wrapper around `getId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getGrovedbProof_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getGrovedbProof())); + this.getId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setGrovedbProof = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.setId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional bytes quorum_hash = 2; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes quorum_hash = 2; - * This is a type-conversion wrapper around `getQuorumHash()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getQuorumHash())); -}; - - -/** - * optional bytes quorum_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getQuorumHash()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getQuorumHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setQuorumHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes signature = 3; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes signature = 3; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignature()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional uint32 round = 4; - * @return {number} + * optional bool prove = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getRound = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setRound = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional bytes block_id_hash = 5; - * @return {string} + * optional GetIdentityBalanceAndRevisionRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0, 1)); }; /** - * optional bytes block_id_hash = 5; - * This is a type-conversion wrapper around `getBlockIdHash()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBlockIdHash())); + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.oneofGroups_[0], value); }; /** - * optional bytes block_id_hash = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBlockIdHash()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBlockIdHash())); + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setBlockIdHash = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * optional uint32 quorum_type = 6; - * @return {number} + * 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.Proof.prototype.getQuorumType = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - +proto.org.dash.platform.dapi.v0.GetIdentityResponse.oneofGroups_ = [[1]]; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * @enum {number} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setQuorumType = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; - +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityResponse.oneofGroups_[0])); +}; @@ -4198,8 +7164,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityResponse.toObject(opt_includeInstance, this); }; @@ -4208,18 +7174,13 @@ proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.toObject = function(o * @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.ResponseMetadata} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.toObject = function(includeInstance, msg) { var f, obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0), - coreChainLockedHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - epoch: jspb.Message.getFieldWithDefault(msg, 3, 0), - timeMs: jspb.Message.getFieldWithDefault(msg, 4, 0), - protocolVersion: jspb.Message.getFieldWithDefault(msg, 5, 0), - chainId: jspb.Message.getFieldWithDefault(msg, 6, "") + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -4233,23 +7194,23 @@ proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject = function(includeInst /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.ResponseMetadata; - return proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityResponse.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.ResponseMetadata} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4257,28 +7218,9 @@ proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader = f var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHeight(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCoreChainLockedHeight(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setEpoch(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimeMs(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setProtocolVersion(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setChainId(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -4293,9 +7235,9 @@ proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader = f * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4303,168 +7245,52 @@ proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.serializeBinary = fun /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.ResponseMetadata} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getHeight(); - if (f !== 0) { - writer.writeUint64( + f = message.getV0(); + if (f != null) { + writer.writeMessage( 1, - f - ); - } - f = message.getCoreChainLockedHeight(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getEpoch(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getTimeMs(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getProtocolVersion(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getChainId(); - if (f.length > 0) { - writer.writeString( - 6, - f + f, + proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.serializeBinaryToWriter ); } }; -/** - * optional uint64 height = 1; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 core_chain_locked_height = 2; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getCoreChainLockedHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setCoreChainLockedHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 epoch = 3; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getEpoch = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setEpoch = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 time_ms = 4; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getTimeMs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setTimeMs = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 protocol_version = 5; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getProtocolVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + * 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.ResponseMetadata.prototype.setProtocolVersion = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_ = [[1,2]]; /** - * optional string chain_id = 6; - * @return {string} + * @enum {number} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getChainId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITY: 1, + PROOF: 2 }; - /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + * @return {proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setChainId = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0])); }; - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -4478,8 +7304,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObject(opt_includeInstance, this); }; @@ -4488,15 +7314,15 @@ proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.toObject * @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.StateTransitionBroadcastError} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - data: msg.getData_asB64() + identity: msg.getIdentity_asB64(), + 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) { @@ -4510,23 +7336,23 @@ proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.toObject = functio /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError; - return proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.StateTransitionBroadcastError} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4534,16 +7360,18 @@ proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryF var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCode(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setIdentity(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); + 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 = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); + 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(); @@ -4558,9 +7386,9 @@ proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryF * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4568,268 +7396,234 @@ proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.serializ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCode(); - if (f !== 0) { - writer.writeUint32( + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBytes( 1, f ); } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( + f = message.getProof(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter ); } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( 3, - f + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter ); } }; /** - * optional uint32 code = 1; - * @return {number} + * optional bytes identity = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getIdentity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + * optional bytes identity = 1; + * This is a type-conversion wrapper around `getIdentity()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getIdentity_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentity())); }; /** - * optional string message = 2; - * @return {string} + * optional bytes identity = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentity()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getIdentity_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentity())); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.setIdentity = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0], value); }; /** - * optional bytes data = 3; - * @return {string} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearIdentity = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0], undefined); }; /** - * optional bytes data = 3; - * This is a type-conversion wrapper around `getData()` - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasIdentity = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes data = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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 {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this - */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0], value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; - -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} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * 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.BroadcastStateTransitionRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.toObject = function(includeInstance, msg) { - var f, obj = { - stateTransition: msg.getStateTransition_asB64() - }; +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest; - return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.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.setStateTransition(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional GetIdentityResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0, 1)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStateTransition_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityResponse.oneofGroups_[0], value); }; /** - * optional bytes state_transition = 1; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} returns this */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.getStateTransition = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * optional bytes state_transition = 1; - * This is a type-conversion wrapper around `getStateTransition()` - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.getStateTransition_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStateTransition())); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * optional bytes state_transition = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStateTransition()` - * @return {!Uint8Array} + * 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.BroadcastStateTransitionRequest.prototype.getStateTransition_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStateTransition())); -}; - +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.oneofGroups_ = [[1]]; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} returns this + * @enum {number} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.setStateTransition = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; - +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.oneofGroups_[0])); +}; @@ -4846,8 +7640,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.toObject(opt_includeInstance, this); }; @@ -4856,13 +7650,13 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.prototype.toObj * @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.BroadcastStateTransitionResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.toObject = function(includeInstance, msg) { var f, obj = { - + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -4876,29 +7670,34 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.toObject = func /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse; - return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.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.BroadcastStateTransitionResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.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.GetIdentityNonceResponse.GetIdentityNonceResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinaryFromReader); + msg.setV0(value); + break; default: reader.skipField(); break; @@ -4912,9 +7711,9 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBina * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4922,12 +7721,20 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.prototype.seria /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.serializeBinaryToWriter + ); + } }; @@ -4940,21 +7747,22 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.serializeBinary * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITY_NONCE: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0])); }; @@ -4972,8 +7780,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.toObject(opt_includeInstance, this); }; @@ -4982,13 +7790,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.toObject = function * @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.GetIdentityRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.toObject(includeInstance, f) + identityNonce: 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) { @@ -5002,23 +7812,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityRequest.toObject = function(includeIn /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityRequest; - return proto.org.dash.platform.dapi.v0.GetIdentityRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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.GetIdentityRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5026,9 +7836,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityRequest.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setIdentityNonce(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(); @@ -5043,9 +7862,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityRequest.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5053,231 +7872,172 @@ proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.serializeBinary = f /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = /** @type {number} */ (jspb.Message.getField(message, 1)); if (f != null) { - writer.writeMessage( + writer.writeUint64( 1, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, f, - proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.serializeBinaryToWriter + 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.GetIdentityRequest.GetIdentityRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.GetIdentityRequest.GetIdentityRequestV0} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional uint64 identity_nonce = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.toObject = function(includeInstance, msg) { - var f, obj = { - id: msg.getId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getIdentityNonce = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.setIdentityNonce = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0], value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.setId(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearIdentityNonce = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0], undefined); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasIdentityNonce = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 2, - f - ); - } +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; /** - * optional bytes id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0], value); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * optional bytes id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} returns this + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; /** - * optional bool prove = 2; - * @return {boolean} + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional GetIdentityRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} + * optional GetIdentityNonceResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -5286,7 +8046,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.clearV0 = function( * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -5300,21 +8060,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.hasV0 = function() * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.oneofGroups_[0])); }; @@ -5332,8 +8092,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.toObject(opt_includeInstance, this); }; @@ -5342,13 +8102,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.toObject = fun * @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.GetIdentityNonceRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -5362,23 +8122,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.toObject = function(incl /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest; - return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.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.GetIdentityNonceRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5386,8 +8146,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.deserializeBinaryFromRea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -5403,9 +8163,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.deserializeBinaryFromRea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5413,24 +8173,50 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.serializeBinar /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITY_CONTRACT_NONCE: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5446,8 +8232,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.toObject(opt_includeInstance, this); }; @@ -5456,14 +8242,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV * @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.GetIdentityNonceRequest.GetIdentityNonceRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - identityId: msg.getIdentityId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + identityContractNonce: 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) { @@ -5477,23 +8264,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityNonceRequest.GetIdentityNonceRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5501,12 +8288,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentityId(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setIdentityContractNonce(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + 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(); @@ -5521,9 +8314,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5531,113 +8324,172 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( 1, f ); } - f = message.getProve(); - if (f) { - writer.writeBool( + f = message.getProof(); + if (f != null) { + writer.writeMessage( 2, - f + 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 bytes identity_id = 1; - * @return {string} + * optional uint64 identity_contract_nonce = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getIdentityId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getIdentityContractNonce = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * optional bytes identity_id = 1; - * This is a type-conversion wrapper around `getIdentityId()` - * @return {string} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getIdentityId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.setIdentityContractNonce = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0], value); }; /** - * optional bytes identity_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentityId()` - * @return {!Uint8Array} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearIdentityContractNonce = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0], undefined); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.setIdentityId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasIdentityContractNonce = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bool prove = 2; + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} returns this + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; /** - * optional GetIdentityNonceRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} returns this + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentityContractNonceResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -5646,7 +8498,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.clearV0 = func * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -5660,21 +8512,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.hasV0 = functi * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.oneofGroups_[0])); }; @@ -5692,8 +8544,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.toObject(opt_includeInstance, this); }; @@ -5702,13 +8554,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.toObje * @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.GetIdentityContractNonceRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -5722,23 +8574,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.toObject = funct /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest; - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.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.GetIdentityContractNonceRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5746,8 +8598,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinar var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -5763,9 +8615,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinar * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5773,24 +8625,50 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.serial /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + BALANCE: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5806,8 +8684,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.toObject(opt_includeInstance, this); }; @@ -5816,15 +8694,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContr * @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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - identityId: msg.getIdentityId_asB64(), - contractId: msg.getContractId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + balance: 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) { @@ -5838,23 +8716,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContr /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5862,16 +8740,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContr var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentityId(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setBalance(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); + 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 = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + 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(); @@ -5886,9 +8766,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContr * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5896,172 +8776,321 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( 1, f ); } - f = message.getContractId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getProof(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter ); } - f = message.getProve(); - if (f) { - writer.writeBool( + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( 3, - f + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter ); } }; /** - * optional bytes identity_id = 1; - * @return {string} + * optional uint64 balance = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getIdentityId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * optional bytes identity_id = 1; - * This is a type-conversion wrapper around `getIdentityId()` - * @return {string} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getIdentityId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.setBalance = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0], value); }; /** - * optional bytes identity_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentityId()` - * @return {!Uint8Array} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.clearBalance = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0], undefined); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.setIdentityId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasBalance = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes contract_id = 2; - * @return {string} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; /** - * optional bytes contract_id = 2; - * This is a type-conversion wrapper around `getContractId()` - * @return {string} + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * optional bytes contract_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractId()` - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} returns this + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; /** - * optional bool prove = 3; + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentityBalanceResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.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.GetIdentityBalanceAndRevisionResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.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.GetIdentityBalanceAndRevisionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.toObject(opt_includeInstance, this); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} returns 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.GetIdentityBalanceAndRevisionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional GetIdentityContractNonceRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializeBinaryFromReader(msg, reader); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.oneofGroups_[0], value); + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Returns whether this field is set. - * @return {boolean} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.serializeBinaryToWriter + ); + } }; @@ -6074,21 +9103,22 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.hasV0 * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + BALANCE_AND_REVISION: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_[0])); }; @@ -6106,8 +9136,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject(opt_includeInstance, this); }; @@ -6116,13 +9146,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.toObject = f * @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.GetIdentityBalanceRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.toObject(includeInstance, f) + balanceAndRevision: (f = msg.getBalanceAndRevision()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.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) { @@ -6136,23 +9168,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.toObject = function(in /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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.GetIdentityBalanceRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6160,9 +9192,19 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinaryFromR var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinaryFromReader); + msg.setBalanceAndRevision(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(); @@ -6177,9 +9219,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinaryFromR * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6187,18 +9229,34 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.serializeBin /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getBalanceAndRevision(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.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 ); } }; @@ -6220,8 +9278,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.toObject(opt_includeInstance, this); }; @@ -6230,14 +9288,14 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ * @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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + balance: jspb.Message.getFieldWithDefault(msg, 1, 0), + revision: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -6251,23 +9309,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6275,12 +9333,12 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setBalance(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setRevision(value); break; default: reader.skipField(); @@ -6295,9 +9353,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6305,22 +9363,22 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getBalance(); + if (f !== 0) { + writer.writeUint64( 1, f ); } - f = message.getProve(); - if (f) { - writer.writeBool( + f = message.getRevision(); + if (f !== 0) { + writer.writeUint64( 2, f ); @@ -6329,90 +9387,103 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ /** - * optional bytes id = 1; - * @return {string} + * optional uint64 balance = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.setBalance = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` - * @return {string} + * optional uint64 revision = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.getRevision = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * optional bytes id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` - * @return {!Uint8Array} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.setRevision = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} returns this + * optional BalanceAndRevision balance_and_revision = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.getBalanceAndRevision = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision, 1)); }; /** - * optional bool prove = 2; - * @return {boolean} + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.setBalanceAndRevision = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearBalanceAndRevision = function() { + return this.setBalanceAndRevision(undefined); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasBalanceAndRevision = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional GetIdentityBalanceRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; @@ -6420,150 +9491,112 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.clearV0 = fu * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != 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 + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +}; + /** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; - -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} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * 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.GetIdentityBalanceAndRevisionRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional GetIdentityBalanceAndRevisionResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.toObject = function(includeInstance, msg) { - var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0, 1)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.deserializeBinaryFromReader(msg, reader); + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.oneofGroups_[0], value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinaryFromReader); - msg.setV0(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * 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.GetIdentityBalanceAndRevisionRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.serializeBinaryToWriter - ); - } -}; +proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_ = [[1,2,3]]; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.KeyRequestType.RequestCase = { + REQUEST_NOT_SET: 0, + ALL_KEYS: 1, + SPECIFIC_KEYS: 2, + SEARCH_KEY: 3 +}; +/** + * @return {proto.org.dash.platform.dapi.v0.KeyRequestType.RequestCase} + */ +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getRequestCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.KeyRequestType.RequestCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0])); +}; @@ -6580,8 +9613,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.KeyRequestType.toObject(opt_includeInstance, this); }; @@ -6590,14 +9623,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentity * @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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.KeyRequestType} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.KeyRequestType.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + allKeys: (f = msg.getAllKeys()) && proto.org.dash.platform.dapi.v0.AllKeys.toObject(includeInstance, f), + specificKeys: (f = msg.getSpecificKeys()) && proto.org.dash.platform.dapi.v0.SpecificKeys.toObject(includeInstance, f), + searchKey: (f = msg.getSearchKey()) && proto.org.dash.platform.dapi.v0.SearchKey.toObject(includeInstance, f) }; if (includeInstance) { @@ -6611,23 +9645,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentity /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.KeyRequestType; + return proto.org.dash.platform.dapi.v0.KeyRequestType.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.KeyRequestType} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6635,12 +9669,19 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentity var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); + var value = new proto.org.dash.platform.dapi.v0.AllKeys; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinaryFromReader); + msg.setAllKeys(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = new proto.org.dash.platform.dapi.v0.SpecificKeys; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader); + msg.setSpecificKeys(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.SearchKey; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader); + msg.setSearchKey(value); break; default: reader.skipField(); @@ -6655,9 +9696,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentity * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6665,114 +9706,138 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentity /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.KeyRequestType} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getAllKeys(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter ); } - f = message.getProve(); - if (f) { - writer.writeBool( + f = message.getSpecificKeys(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.org.dash.platform.dapi.v0.SpecificKeys.serializeBinaryToWriter + ); + } + f = message.getSearchKey(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter ); } }; /** - * optional bytes id = 1; - * @return {string} + * optional AllKeys all_keys = 1; + * @return {?proto.org.dash.platform.dapi.v0.AllKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getAllKeys = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.AllKeys} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.AllKeys, 1)); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` - * @return {string} + * @param {?proto.org.dash.platform.dapi.v0.AllKeys|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this +*/ +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.setAllKeys = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearAllKeys = function() { + return this.setAllKeys(undefined); }; /** - * optional bytes id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.hasAllKeys = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this + * optional SpecificKeys specific_keys = 2; + * @return {?proto.org.dash.platform.dapi.v0.SpecificKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getSpecificKeys = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.SpecificKeys} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.SpecificKeys, 2)); }; /** - * optional bool prove = 2; - * @return {boolean} + * @param {?proto.org.dash.platform.dapi.v0.SpecificKeys|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this +*/ +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.setSpecificKeys = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSpecificKeys = function() { + return this.setSpecificKeys(undefined); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.hasSpecificKeys = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional GetIdentityBalanceAndRevisionRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} + * optional SearchKey search_key = 3; + * @return {?proto.org.dash.platform.dapi.v0.SearchKey} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0, 1)); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getSearchKey = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.SearchKey} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.SearchKey, 3)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.SearchKey|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.setSearchKey = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSearchKey = function() { + return this.setSearchKey(undefined); }; @@ -6780,36 +9845,119 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.c * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.hasSearchKey = function() { + return jspb.Message.getField(this, 3) != null; }; + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * 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 + * 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.GetIdentityResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.AllKeys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.AllKeys.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.AllKeys} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.AllKeys.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + 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.AllKeys} + */ +proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.AllKeys; + return proto.org.dash.platform.dapi.v0.AllKeys.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.AllKeys} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.AllKeys} + */ +proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.AllKeys.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + /** - * @enum {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.AllKeys} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; + + /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityResponse.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.SpecificKeys.repeatedFields_ = [1]; @@ -6826,8 +9974,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.SpecificKeys.toObject(opt_includeInstance, this); }; @@ -6836,13 +9984,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.toObject = functio * @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.GetIdentityResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.SpecificKeys} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.SpecificKeys.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObject(includeInstance, f) + keyIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { @@ -6856,23 +10004,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.toObject = function(includeI /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityResponse; - return proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.SpecificKeys; + return proto.org.dash.platform.dapi.v0.SpecificKeys.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.GetIdentityResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.SpecificKeys} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6880,9 +10028,10 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinaryFromReader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinaryFromReader); - msg.setV0(value); + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]); + for (var i = 0; i < values.length; i++) { + msg.addKeyIds(values[i]); + } break; default: reader.skipField(); @@ -6897,9 +10046,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinaryFromReader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.SpecificKeys.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6907,52 +10056,62 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.serializeBinary = /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} message + * @param {!proto.org.dash.platform.dapi.v0.SpecificKeys} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.SpecificKeys.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getKeyIdsList(); + if (f.length > 0) { + writer.writePackedUint32( 1, - f, - proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.serializeBinaryToWriter + f ); } }; +/** + * repeated uint32 key_ids = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.getKeyIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + /** - * 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 + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.setKeyIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + /** - * @enum {number} + * @param {number} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - IDENTITY: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.addKeyIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.clearKeyIdsList = function() { + return this.setKeyIdsList([]); }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -6966,8 +10125,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.SearchKey.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.SearchKey.toObject(opt_includeInstance, this); }; @@ -6976,15 +10135,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.protot * @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.GetIdentityResponse.GetIdentityResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.SearchKey} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.SearchKey.toObject = function(includeInstance, msg) { var f, obj = { - identity: msg.getIdentity_asB64(), - 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) + purposeMapMap: (f = msg.getPurposeMapMap()) ? f.toObject(includeInstance, proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject) : [] }; if (includeInstance) { @@ -6998,23 +10155,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObje /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.SearchKey} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.SearchKey; + return proto.org.dash.platform.dapi.v0.SearchKey.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.GetIdentityResponse.GetIdentityResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.SearchKey} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.SearchKey} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7022,18 +10179,10 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deseri var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentity(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); + var value = msg.getPurposeMapMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader, 0, new proto.org.dash.platform.dapi.v0.SecurityLevelMap()); + }); break; default: reader.skipField(); @@ -7048,217 +10197,190 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deseri * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.SearchKey.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.GetIdentityResponse.GetIdentityResponseV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeBytes( - 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 bytes identity = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getIdentity = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes identity = 1; - * This is a type-conversion wrapper around `getIdentity()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getIdentity_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentity())); -}; - - -/** - * optional bytes identity = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentity()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getIdentity_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentity())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.setIdentity = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearIdentity = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasIdentity = function() { - return jspb.Message.getField(this, 1) != null; + proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.SearchKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getProof = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); +proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPurposeMapMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.org.dash.platform.dapi.v0.SecurityLevelMap.serializeBinaryToWriter); + } }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0], value); + * map purpose_map = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.org.dash.platform.dapi.v0.SearchKey.prototype.getPurposeMapMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.org.dash.platform.dapi.v0.SecurityLevelMap)); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this + * Clears values from the map. The map will be non-null. + * @return {!proto.org.dash.platform.dapi.v0.SearchKey} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); -}; +proto.org.dash.platform.dapi.v0.SearchKey.prototype.clearPurposeMapMap = function() { + this.getPurposeMapMap().clear(); + return this;}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Returns whether this field is set. - * @return {boolean} + * 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.GetIdentityResponse.GetIdentityResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject(opt_includeInstance, this); }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * 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.SecurityLevelMap} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getMetadata = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject = function(includeInstance, msg) { + var f, obj = { + securityLevelMapMap: (f = msg.getSecurityLevelMapMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} + */ +proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.SecurityLevelMap; + return proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader(msg, reader); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getSecurityLevelMapMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readEnum, null, 0, 0); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Returns whether this field is set. - * @return {boolean} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.SecurityLevelMap.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional GetIdentityResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0, 1)); +proto.org.dash.platform.dapi.v0.SecurityLevelMap.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSecurityLevelMapMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeEnum); + } }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityResponse.oneofGroups_[0], value); + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType = { + CURRENT_KEY_OF_KIND_REQUEST: 0, + ALL_KEYS_OF_KIND_REQUEST: 1 }; - /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} returns this + * map security_level_map = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.getSecurityLevelMapMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + null)); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears values from the map. The map will be non-null. + * @return {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; -}; +proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.clearSecurityLevelMapMap = function() { + this.getSecurityLevelMapMap().clear(); + return this;}; @@ -7270,21 +10392,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.hasV0 = function() * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.oneofGroups_[0])); }; @@ -7302,8 +10424,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.toObject(opt_includeInstance, this); }; @@ -7312,13 +10434,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.toObject = fu * @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.GetIdentityNonceResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -7332,23 +10454,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.toObject = function(inc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse; - return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.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.GetIdentityNonceResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7356,8 +10478,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinaryFromRe var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -7373,9 +10495,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinaryFromRe * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7383,49 +10505,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.serializeBina /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - IDENTITY_NONCE: 1, - PROOF: 2 + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.serializeBinaryToWriter + ); + } }; -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase} - */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0])); -}; + @@ -7442,8 +10538,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.toObject(opt_includeInstance, this); }; @@ -7452,15 +10548,17 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons * @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.GetIdentityNonceResponse.GetIdentityNonceResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - identityNonce: 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) + identityId: msg.getIdentityId_asB64(), + requestType: (f = msg.getRequestType()) && proto.org.dash.platform.dapi.v0.KeyRequestType.toObject(includeInstance, f), + limit: (f = msg.getLimit()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), + offset: (f = msg.getOffset()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) }; if (includeInstance) { @@ -7474,23 +10572,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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.GetIdentityNonceResponse.GetIdentityNonceResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7498,18 +10596,27 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setIdentityNonce(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setIdentityId(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); + var value = new proto.org.dash.platform.dapi.v0.KeyRequestType; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader); + msg.setRequestType(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); + var value = new google_protobuf_wrappers_pb.UInt32Value; + reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); + msg.setLimit(value); + break; + case 4: + var value = new google_protobuf_wrappers_pb.UInt32Value; + reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); + msg.setOffset(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -7524,9 +10631,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7534,99 +10641,249 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeUint64( + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getProof(); + f = message.getRequestType(); if (f != null) { writer.writeMessage( 2, f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter ); } - f = message.getMetadata(); + f = message.getLimit(); if (f != null) { writer.writeMessage( 3, f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter + ); + } + f = message.getOffset(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 5, + f ); } }; /** - * optional uint64 identity_nonce = 1; - * @return {number} + * optional bytes identity_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getIdentityNonce = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * optional bytes identity_id = 1; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.setIdentityNonce = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); +}; + + +/** + * optional bytes identity_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentityId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional KeyRequestType request_type = 2; + * @return {?proto.org.dash.platform.dapi.v0.KeyRequestType} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getRequestType = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.KeyRequestType} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.KeyRequestType, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.KeyRequestType|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setRequestType = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.clearRequestType = function() { + return this.setRequestType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.hasRequestType = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.UInt32Value limit = 3; + * @return {?proto.google.protobuf.UInt32Value} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getLimit = function() { + return /** @type{?proto.google.protobuf.UInt32Value} */ ( + jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 3)); +}; + + +/** + * @param {?proto.google.protobuf.UInt32Value|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setLimit = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.clearLimit = function() { + return this.setLimit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.hasLimit = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.UInt32Value offset = 4; + * @return {?proto.google.protobuf.UInt32Value} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getOffset = function() { + return /** @type{?proto.google.protobuf.UInt32Value} */ ( + jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 4)); +}; + + +/** + * @param {?proto.google.protobuf.UInt32Value|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setOffset = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.clearOffset = function() { + return this.setOffset(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.hasOffset = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * optional bool prove = 5; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearIdentityNonce = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0], undefined); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasIdentityNonce = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * optional GetIdentityKeysRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getProof = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.clearV0 = function() { + return this.setV0(undefined); }; @@ -7634,82 +10891,147 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * 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.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getMetadata = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); -}; +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.oneofGroups_ = [[1]]; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.oneofGroups_[0])); }; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * 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.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.toObject(opt_includeInstance, this); }; /** - * Returns whether this field is set. - * @return {boolean} + * 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.GetIdentityKeysResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional GetIdentityNonceResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinaryFromReader(msg, reader); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.oneofGroups_[0], value); + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Returns whether this field is set. - * @return {boolean} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.serializeBinaryToWriter + ); + } }; @@ -7722,21 +11044,22 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.hasV0 = funct * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + KEYS: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_[0])); }; @@ -7754,8 +11077,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.toObject(opt_includeInstance, this); }; @@ -7764,13 +11087,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.toObj * @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.GetIdentityContractNonceResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.toObject(includeInstance, f) + keys: (f = msg.getKeys()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.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) { @@ -7784,23 +11109,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.toObject = func /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse; - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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.GetIdentityContractNonceResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7808,9 +11133,19 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBina var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinaryFromReader); + msg.setKeys(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(); @@ -7825,9 +11160,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBina * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7835,18 +11170,34 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.seria /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getKeys(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.serializeBinaryToWriter + ); + } + f = message.getProof(); if (f != null) { writer.writeMessage( - 1, + 2, f, - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.serializeBinaryToWriter + 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 ); } }; @@ -7854,30 +11205,11 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.serializeBinary /** - * 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>} + * List of repeated fields within this message type. + * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - IDENTITY_CONTRACT_NONCE: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.ResultCase} - */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.repeatedFields_ = [1]; @@ -7894,8 +11226,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.toObject(opt_includeInstance, this); }; @@ -7904,15 +11236,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont * @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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.toObject = function(includeInstance, msg) { var f, obj = { - identityContractNonce: 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) + keysBytesList: msg.getKeysBytesList_asB64() }; if (includeInstance) { @@ -7926,23 +11256,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys; + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7950,18 +11280,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setIdentityContractNonce(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); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addKeysBytes(value); break; default: reader.skipField(); @@ -7976,9 +11296,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7986,62 +11306,108 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeUint64( + f = message.getKeysBytesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( 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 identity_contract_nonce = 1; - * @return {number} + * repeated bytes keys_bytes = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getIdentityContractNonce = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * repeated bytes keys_bytes = 1; + * This is a type-conversion wrapper around `getKeysBytesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.setIdentityContractNonce = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getKeysBytesList())); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * repeated bytes keys_bytes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKeysBytesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearIdentityContractNonce = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0], undefined); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getKeysBytesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.setKeysBytesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.addKeysBytes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.clearKeysBytesList = function() { + return this.setKeysBytesList([]); +}; + + +/** + * optional Keys keys = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getKeys = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.setKeys = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.clearKeys = function() { + return this.setKeys(undefined); }; @@ -8049,7 +11415,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasIdentityContractNonce = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasKeys = function() { return jspb.Message.getField(this, 1) != null; }; @@ -8058,7 +11424,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -8066,18 +11432,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -8086,7 +11452,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -8095,7 +11461,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -8103,18 +11469,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -8123,35 +11489,35 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetIdentityContractNonceResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} + * optional GetIdentityKeysResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -8160,7 +11526,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.clear * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -8174,21 +11540,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.hasV0 * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.oneofGroups_[0])); }; @@ -8206,8 +11572,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.toObject(opt_includeInstance, this); }; @@ -8216,13 +11582,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.toObject = * @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.GetIdentityBalanceResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -8236,23 +11602,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.toObject = function(i /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest; + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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.GetIdentityBalanceResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8260,8 +11626,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinaryFrom var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -8277,9 +11643,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinaryFrom * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8287,18 +11653,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.serializeBi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.serializeBinaryToWriter ); } }; @@ -8306,30 +11672,11 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.serializeBinaryToWrit /** - * 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>} + * List of repeated fields within this message type. + * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - BALANCE: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.ResultCase} - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.repeatedFields_ = [1,4]; @@ -8346,8 +11693,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.toObject(opt_includeInstance, this); }; @@ -8356,15 +11703,17 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceRes * @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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - balance: 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) + identitiesIdsList: msg.getIdentitiesIdsList_asB64(), + contractId: msg.getContractId_asB64(), + documentTypeName: jspb.Message.getFieldWithDefault(msg, 3, ""), + purposesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, + prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) }; if (includeInstance) { @@ -8378,23 +11727,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceRes /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8402,18 +11751,26 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceRes var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBalance(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIdentitiesIds(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); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractId(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); + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentTypeName(value); + break; + case 4: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addPurposes(values[i]); + } + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -8425,75 +11782,190 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceRes /** - * Serializes the message to binary data (in protobuf wire format). + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentitiesIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = message.getPurposesList(); + if (f.length > 0) { + writer.writePackedEnum( + 4, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * repeated bytes identities_ids = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getIdentitiesIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes identities_ids = 1; + * This is a type-conversion wrapper around `getIdentitiesIdsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getIdentitiesIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIdentitiesIdsList())); +}; + + +/** + * repeated bytes identities_ids = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentitiesIdsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getIdentitiesIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdentitiesIdsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setIdentitiesIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.addIdentitiesIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearIdentitiesIdsList = function() { + return this.setIdentitiesIdsList([]); +}; + + +/** + * optional bytes contract_id = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes contract_id = 2; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContractId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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 - ); - } +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * optional uint64 balance = 1; - * @return {number} + * optional string document_type_name = 3; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getDocumentTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.setBalance = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setDocumentTypeName = function(value) { + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.clearBalance = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0], undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearDocumentTypeName = function() { + return jspb.Message.setField(this, 3, undefined); }; @@ -8501,109 +11973,90 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceRes * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasBalance = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.hasDocumentTypeName = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * repeated KeyPurpose purposes = 4; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getPurposesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setPurposesList = function(value) { + return jspb.Message.setField(this, 4, value || []); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!proto.org.dash.platform.dapi.v0.KeyPurpose} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.addPurposes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearPurposesList = function() { + return this.setPurposesList([]); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + * optional bool prove = 5; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); }; /** - * optional GetIdentityBalanceResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} + * optional GetIdentitiesContractKeysRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -8612,7 +12065,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.clearV0 = f * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -8626,21 +12079,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.hasV0 = fun * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.oneofGroups_[0])); }; @@ -8658,8 +12111,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.toObject(opt_includeInstance, this); }; @@ -8668,13 +12121,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype. * @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.GetIdentityBalanceAndRevisionResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -8688,23 +12141,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse; + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.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.GetIdentityBalanceAndRevisionResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8712,8 +12165,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -8729,9 +12182,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8739,18 +12192,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.serializeBinaryToWriter ); } }; @@ -8765,22 +12218,22 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.serializeB * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase = { RESULT_NOT_SET: 0, - BALANCE_AND_REVISION: 1, + IDENTITIES_KEYS: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_[0])); }; @@ -8798,8 +12251,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.toObject(opt_includeInstance, this); }; @@ -8808,13 +12261,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit * @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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - balanceAndRevision: (f = msg.getBalanceAndRevision()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.toObject(includeInstance, f), + identitiesKeys: (f = msg.getIdentitiesKeys()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.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) }; @@ -8830,23 +12283,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8854,9 +12307,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinaryFromReader); - msg.setBalanceAndRevision(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinaryFromReader); + msg.setIdentitiesKeys(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -8881,9 +12334,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8891,18 +12344,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBalanceAndRevision(); + f = message.getIdentitiesKeys(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.serializeBinaryToWriter ); } f = message.getProof(); @@ -8925,6 +12378,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.repeatedFields_ = [2]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -8940,8 +12400,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.toObject(opt_includeInstance, this); }; @@ -8950,14 +12410,14 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit * @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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.toObject = function(includeInstance, msg) { var f, obj = { - balance: jspb.Message.getFieldWithDefault(msg, 1, 0), - revision: jspb.Message.getFieldWithDefault(msg, 2, 0) + purpose: jspb.Message.getFieldWithDefault(msg, 1, 0), + keysBytesList: msg.getKeysBytesList_asB64() }; if (includeInstance) { @@ -8971,23 +12431,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys; + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8995,12 +12455,12 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBalance(value); + var value = /** @type {!proto.org.dash.platform.dapi.v0.KeyPurpose} */ (reader.readEnum()); + msg.setPurpose(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRevision(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addKeysBytes(value); break; default: reader.skipField(); @@ -9015,9 +12475,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9025,22 +12485,22 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBalance(); - if (f !== 0) { - writer.writeUint64( + f = message.getPurpose(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = message.getRevision(); - if (f !== 0) { - writer.writeUint64( + f = message.getKeysBytesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( 2, f ); @@ -9049,216 +12509,305 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit /** - * optional uint64 balance = 1; - * @return {number} + * optional KeyPurpose purpose = 1; + * @return {!proto.org.dash.platform.dapi.v0.KeyPurpose} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getPurpose = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.KeyPurpose} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} returns this + * @param {!proto.org.dash.platform.dapi.v0.KeyPurpose} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.setPurpose = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional uint64 revision = 2; - * @return {number} + * repeated bytes keys_bytes = 2; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.getRevision = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} returns this + * repeated bytes keys_bytes = 2; + * This is a type-conversion wrapper around `getKeysBytesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.setRevision = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getKeysBytesList())); }; /** - * optional BalanceAndRevision balance_and_revision = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} + * repeated bytes keys_bytes = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKeysBytesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.getBalanceAndRevision = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getKeysBytesList())); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.setBalanceAndRevision = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_[0], value); + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.setKeysBytesList = function(value) { + return jspb.Message.setField(this, 2, value || []); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearBalanceAndRevision = function() { - return this.setBalanceAndRevision(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.addKeysBytes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasBalanceAndRevision = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.clearKeysBytesList = function() { + return this.setKeysBytesList([]); }; + /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.getProof = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.repeatedFields_ = [2]; + + + +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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject(opt_includeInstance, this); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_[0], value); + * 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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject = function(includeInstance, msg) { + var f, obj = { + identityId: msg.getIdentityId_asB64(), + keysList: jspb.Message.toObjectList(msg.getKeysList(), + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys; + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinaryFromReader(msg, reader); }; /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.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.setIdentityId(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.deserializeBinaryFromReader); + msg.addKeys(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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getKeysList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter + ); + } }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * optional bytes identity_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.getMetadata = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * optional bytes identity_id = 1; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this + * optional bytes identity_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentityId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional GetIdentityBalanceAndRevisionResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} + * repeated PurposeKeys keys = 2; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getKeysList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys, 2)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} returns this + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.setKeysList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} returns this + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.addKeys = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.clearKeysList = function() { + return this.setKeysList([]); }; /** - * 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>} + * List of repeated fields within this message type. + * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_ = [[1,2,3]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.KeyRequestType.RequestCase = { - REQUEST_NOT_SET: 0, - ALL_KEYS: 1, - SPECIFIC_KEYS: 2, - SEARCH_KEY: 3 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.KeyRequestType.RequestCase} - */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getRequestCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.KeyRequestType.RequestCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.repeatedFields_ = [1]; @@ -9275,8 +12824,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.KeyRequestType.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.toObject(opt_includeInstance, this); }; @@ -9285,15 +12834,14 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.toObject = function(opt * @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.KeyRequestType} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.KeyRequestType.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.toObject = function(includeInstance, msg) { var f, obj = { - allKeys: (f = msg.getAllKeys()) && proto.org.dash.platform.dapi.v0.AllKeys.toObject(includeInstance, f), - specificKeys: (f = msg.getSpecificKeys()) && proto.org.dash.platform.dapi.v0.SpecificKeys.toObject(includeInstance, f), - searchKey: (f = msg.getSearchKey()) && proto.org.dash.platform.dapi.v0.SearchKey.toObject(includeInstance, f) + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject, includeInstance) }; if (includeInstance) { @@ -9307,23 +12855,23 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.toObject = function(includeInstan /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.KeyRequestType; - return proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys; + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.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.KeyRequestType} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9331,19 +12879,9 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader = fun var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.AllKeys; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinaryFromReader); - msg.setAllKeys(value); - break; - case 2: - var value = new proto.org.dash.platform.dapi.v0.SpecificKeys; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader); - msg.setSpecificKeys(value); - break; - case 3: - var value = new proto.org.dash.platform.dapi.v0.SearchKey; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader); - msg.setSearchKey(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinaryFromReader); + msg.addEntries(value); break; default: reader.skipField(); @@ -9358,74 +12896,133 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader = fun * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.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.KeyRequestType} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdentityKeys entries = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + +/** + * optional IdentitiesKeys identities_keys = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.getIdentitiesKeys = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.setIdentitiesKeys = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearIdentitiesKeys = function() { + return this.setIdentitiesKeys(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAllKeys(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter - ); - } - f = message.getSpecificKeys(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.org.dash.platform.dapi.v0.SpecificKeys.serializeBinaryToWriter - ); - } - f = message.getSearchKey(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasIdentitiesKeys = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional AllKeys all_keys = 1; - * @return {?proto.org.dash.platform.dapi.v0.AllKeys} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getAllKeys = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.AllKeys} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.AllKeys, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.AllKeys|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.setAllKeys = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearAllKeys = function() { - return this.setAllKeys(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; @@ -9433,36 +13030,36 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearAllKeys = function * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.hasAllKeys = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional SpecificKeys specific_keys = 2; - * @return {?proto.org.dash.platform.dapi.v0.SpecificKeys} + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getSpecificKeys = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.SpecificKeys} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.SpecificKeys, 2)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.SpecificKeys|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.setSpecificKeys = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.KeyRequestType} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSpecificKeys = function() { - return this.setSpecificKeys(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; @@ -9470,36 +13067,36 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSpecificKeys = fun * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.hasSpecificKeys = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional SearchKey search_key = 3; - * @return {?proto.org.dash.platform.dapi.v0.SearchKey} + * optional GetIdentitiesContractKeysResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getSearchKey = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.SearchKey} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.SearchKey, 3)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.SearchKey|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} returns this */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.setSearchKey = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} returns this */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSearchKey = function() { - return this.setSearchKey(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; @@ -9507,12 +13104,37 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSearchKey = functi * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.hasSearchKey = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.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.GetEvonodesProposedEpochBlocksByIdsRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -9528,8 +13150,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.AllKeys.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.AllKeys.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.toObject(opt_includeInstance, this); }; @@ -9538,13 +13160,13 @@ proto.org.dash.platform.dapi.v0.AllKeys.prototype.toObject = function(opt_includ * @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.AllKeys} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.AllKeys.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.toObject = function(includeInstance, msg) { var f, obj = { - + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -9558,29 +13180,34 @@ proto.org.dash.platform.dapi.v0.AllKeys.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.AllKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} */ -proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.AllKeys; - return proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.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.AllKeys} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.AllKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} */ -proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.deserializeBinaryFromReader); + msg.setV0(value); + break; default: reader.skipField(); break; @@ -9594,9 +13221,9 @@ proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.AllKeys.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9604,12 +13231,20 @@ proto.org.dash.platform.dapi.v0.AllKeys.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.AllKeys} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.serializeBinaryToWriter + ); + } }; @@ -9619,7 +13254,7 @@ proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter = function(messa * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.SpecificKeys.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.repeatedFields_ = [2]; @@ -9636,8 +13271,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.SpecificKeys.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.toObject(opt_includeInstance, this); }; @@ -9646,13 +13281,15 @@ proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.toObject = function(opt_i * @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.SpecificKeys} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.SpecificKeys.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - keyIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), + idsList: msg.getIdsList_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -9666,23 +13303,23 @@ proto.org.dash.platform.dapi.v0.SpecificKeys.toObject = function(includeInstance /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} */ -proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.SpecificKeys; - return proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.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.SpecificKeys} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} */ -proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9690,10 +13327,16 @@ proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader = funct var field = reader.getFieldNumber(); switch (field) { case 1: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]); - for (var i = 0; i < values.length; i++) { - msg.addKeyIds(values[i]); - } + var value = /** @type {number} */ (reader.readUint32()); + msg.setEpoch(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIds(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -9708,9 +13351,9 @@ proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader = funct * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.SpecificKeys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9718,192 +13361,195 @@ proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.serializeBinary = functio /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.SpecificKeys} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.SpecificKeys.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeyIdsList(); - if (f.length > 0) { - writer.writePackedUint32( + f = message.getEpoch(); + if (f !== 0) { + writer.writeUint32( 1, f ); } + f = message.getIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 3, + f + ); + } }; /** - * repeated uint32 key_ids = 1; - * @return {!Array} + * optional uint32 epoch = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getEpoch = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setEpoch = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated bytes ids = 2; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * repeated bytes ids = 2; + * This is a type-conversion wrapper around `getIdsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIdsList())); +}; + + +/** + * repeated bytes ids = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.getKeyIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdsList())); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.setKeyIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); }; /** - * @param {number} value + * @param {!(string|Uint8Array)} value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.addKeyIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.addIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.clearKeyIdsList = function() { - return this.setKeyIdsList([]); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.clearIdsList = function() { + return this.setIdsList([]); }; - - - -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} + * optional bool prove = 3; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.SearchKey.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.SearchKey.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * 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.SearchKey} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.SearchKey.toObject = function(includeInstance, msg) { - var f, obj = { - purposeMapMap: (f = msg.getPurposeMapMap()) ? f.toObject(includeInstance, proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.SearchKey} + * optional GetEvonodesProposedEpochBlocksByIdsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} */ -proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.SearchKey; - return proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0, 1)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.SearchKey} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.SearchKey} - */ -proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = msg.getPurposeMapMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader, 0, new proto.org.dash.platform.dapi.v0.SecurityLevelMap()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; + * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.oneofGroups_[0], value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} returns this */ -proto.org.dash.platform.dapi.v0.SearchKey.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.SearchKey} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPurposeMapMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.org.dash.platform.dapi.v0.SecurityLevelMap.serializeBinaryToWriter); - } +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * map purpose_map = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * 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.SearchKey.prototype.getPurposeMapMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.org.dash.platform.dapi.v0.SecurityLevelMap)); -}; - +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.oneofGroups_ = [[1]]; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.org.dash.platform.dapi.v0.SearchKey} returns this + * @enum {number} */ -proto.org.dash.platform.dapi.v0.SearchKey.prototype.clearPurposeMapMap = function() { - this.getPurposeMapMap().clear(); - return this;}; - +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; +/** + * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.oneofGroups_[0])); +}; @@ -9920,8 +13566,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.toObject(opt_includeInstance, this); }; @@ -9930,13 +13576,13 @@ proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.toObject = function(o * @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.SecurityLevelMap} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.toObject = function(includeInstance, msg) { var f, obj = { - securityLevelMapMap: (f = msg.getSecurityLevelMapMap()) ? f.toObject(includeInstance, undefined) : [] + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -9950,23 +13596,23 @@ proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject = function(includeInst /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.SecurityLevelMap; - return proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.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.SecurityLevelMap} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9974,10 +13620,9 @@ proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader = f var field = reader.getFieldNumber(); switch (field) { case 1: - var value = msg.getSecurityLevelMapMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readEnum, null, 0, 0); - }); + var value = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -9992,9 +13637,9 @@ proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader = f * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.SecurityLevelMap.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10002,49 +13647,23 @@ proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.serializeBinary = fun /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSecurityLevelMapMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeEnum); + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.serializeBinaryToWriter + ); } }; -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType = { - CURRENT_KEY_OF_KIND_REQUEST: 0, - ALL_KEYS_OF_KIND_REQUEST: 1 -}; - -/** - * map security_level_map = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.getSecurityLevelMapMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} returns this - */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.clearSecurityLevelMapMap = function() { - this.getSecurityLevelMapMap().clear(); - return this;}; - - /** * Oneof group definitions for this message. Each group defines the field @@ -10054,21 +13673,22 @@ proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.clearSecurityLevelMap * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + EVONODES_PROPOSED_BLOCK_COUNTS_INFO: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.oneofGroups_[0])); }; @@ -10086,8 +13706,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.toObject(opt_includeInstance, this); }; @@ -10096,13 +13716,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.toObject = func * @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.GetIdentityKeysRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.toObject(includeInstance, f) + evonodesProposedBlockCountsInfo: (f = msg.getEvonodesProposedBlockCountsInfo()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.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) { @@ -10116,23 +13738,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.toObject = function(inclu /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest; - return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetIdentityKeysRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10140,9 +13762,19 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinaryFromRead var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.deserializeBinaryFromReader); + msg.setEvonodesProposedBlockCountsInfo(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(); @@ -10157,9 +13789,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinaryFromRead * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10167,18 +13799,34 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.serializeBinary /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getEvonodesProposedBlockCountsInfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.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( - 1, + 3, f, - proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter ); } }; @@ -10200,8 +13848,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.toObject(opt_includeInstance, this); }; @@ -10210,17 +13858,14 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. * @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.GetIdentityKeysRequest.GetIdentityKeysRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.toObject = function(includeInstance, msg) { var f, obj = { - identityId: msg.getIdentityId_asB64(), - requestType: (f = msg.getRequestType()) && proto.org.dash.platform.dapi.v0.KeyRequestType.toObject(includeInstance, f), - limit: (f = msg.getLimit()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), - offset: (f = msg.getOffset()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + proTxHash: msg.getProTxHash_asB64(), + count: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -10234,23 +13879,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.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.GetIdentityKeysRequest.GetIdentityKeysRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10259,26 +13904,11 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentityId(value); + msg.setProTxHash(value); break; case 2: - var value = new proto.org.dash.platform.dapi.v0.KeyRequestType; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader); - msg.setRequestType(value); - break; - case 3: - var value = new google_protobuf_wrappers_pb.UInt32Value; - reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); - msg.setLimit(value); - break; - case 4: - var value = new google_protobuf_wrappers_pb.UInt32Value; - reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); - msg.setOffset(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setCount(value); break; default: reader.skipField(); @@ -10293,9 +13923,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10303,47 +13933,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); + f = message.getProTxHash_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getRequestType(); - if (f != null) { - writer.writeMessage( + f = message.getCount(); + if (f !== 0) { + writer.writeUint64( 2, - f, - proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter - ); - } - f = message.getLimit(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter - ); - } - f = message.getOffset(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 5, f ); } @@ -10351,238 +13957,72 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. /** - * optional bytes identity_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes identity_id = 1; - * This is a type-conversion wrapper around `getIdentityId()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentityId())); -}; - - -/** - * optional bytes identity_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentityId()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setIdentityId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional KeyRequestType request_type = 2; - * @return {?proto.org.dash.platform.dapi.v0.KeyRequestType} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getRequestType = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.KeyRequestType} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.KeyRequestType, 2)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.KeyRequestType|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setRequestType = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.clearRequestType = function() { - return this.setRequestType(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.hasRequestType = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional google.protobuf.UInt32Value limit = 3; - * @return {?proto.google.protobuf.UInt32Value} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getLimit = function() { - return /** @type{?proto.google.protobuf.UInt32Value} */ ( - jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 3)); -}; - - -/** - * @param {?proto.google.protobuf.UInt32Value|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setLimit = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.clearLimit = function() { - return this.setLimit(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.hasLimit = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional google.protobuf.UInt32Value offset = 4; - * @return {?proto.google.protobuf.UInt32Value} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getOffset = function() { - return /** @type{?proto.google.protobuf.UInt32Value} */ ( - jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 4)); -}; - - -/** - * @param {?proto.google.protobuf.UInt32Value|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setOffset = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.clearOffset = function() { - return this.setOffset(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.hasOffset = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional bool prove = 5; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * optional GetIdentityKeysRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} + * optional bytes pro_tx_hash = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.oneofGroups_[0], value); + * optional bytes pro_tx_hash = 1; + * This is a type-conversion wrapper around `getProTxHash()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProTxHash())); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} returns this + * optional bytes pro_tx_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProTxHash()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProTxHash())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.setProTxHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; - /** - * 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 + * optional uint64 count = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + /** - * @enum {number} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.setCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; + + /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.repeatedFields_ = [1]; @@ -10599,8 +14039,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.toObject(opt_includeInstance, this); }; @@ -10609,13 +14049,14 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.toObject = fun * @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.GetIdentityKeysResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.toObject(includeInstance, f) + evonodesProposedBlockCountsList: jspb.Message.toObjectList(msg.getEvonodesProposedBlockCountsList(), + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.toObject, includeInstance) }; if (includeInstance) { @@ -10629,23 +14070,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.toObject = function(incl /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse; - return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.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.GetIdentityKeysResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10653,9 +14094,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinaryFromRea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.deserializeBinaryFromReader); + msg.addEvonodesProposedBlockCounts(value); break; default: reader.skipField(); @@ -10670,9 +14111,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinaryFromRea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10680,23 +14121,209 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.serializeBinar /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getEvonodesProposedBlockCountsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.serializeBinaryToWriter ); } }; +/** + * repeated EvonodeProposedBlocks evonodes_proposed_block_counts = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.getEvonodesProposedBlockCountsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.setEvonodesProposedBlockCountsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.addEvonodesProposedBlockCounts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.clearEvonodesProposedBlockCountsList = function() { + return this.setEvonodesProposedBlockCountsList([]); +}; + + +/** + * optional EvonodesProposedBlocks evonodes_proposed_block_counts_info = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.getEvonodesProposedBlockCountsInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.setEvonodesProposedBlockCountsInfo = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.clearEvonodesProposedBlockCountsInfo = function() { + return this.setEvonodesProposedBlockCountsInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.hasEvonodesProposedBlockCountsInfo = 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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetEvonodesProposedEpochBlocksResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + /** * Oneof group definitions for this message. Each group defines the field @@ -10706,22 +14333,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.serializeBinaryToWriter * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - KEYS: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.oneofGroups_[0])); }; @@ -10739,8 +14365,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.toObject(opt_includeInstance, this); }; @@ -10749,15 +14375,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV * @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.GetIdentityKeysResponse.GetIdentityKeysResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.toObject = function(includeInstance, msg) { var f, obj = { - keys: (f = msg.getKeys()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.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) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -10771,43 +14395,33 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinaryFromReader); - msg.setKeys(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); + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -10822,9 +14436,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10832,34 +14446,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeys(); + f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.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 + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.serializeBinaryToWriter ); } }; @@ -10867,11 +14465,30 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV /** - * List of repeated fields within this message type. - * @private {!Array} + * 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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_ = [[3,4]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.StartCase = { + START_NOT_SET: 0, + START_AFTER: 3, + START_AT: 4 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.StartCase} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.StartCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_[0])); +}; @@ -10888,8 +14505,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.toObject(opt_includeInstance, this); }; @@ -10898,13 +14515,17 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV * @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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - keysBytesList: msg.getKeysBytesList_asB64() + epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), + limit: jspb.Message.getFieldWithDefault(msg, 2, 0), + startAfter: msg.getStartAfter_asB64(), + startAt: msg.getStartAt_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) }; if (includeInstance) { @@ -10918,23 +14539,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys; - return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10942,8 +14563,24 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setEpoch(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLimit(value); + break; + case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addKeysBytes(value); + msg.setStartAfter(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStartAt(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -10958,9 +14595,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10968,182 +14605,212 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeysBytesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( + f = message.getEpoch(); + if (f !== 0) { + writer.writeUint32( 1, f ); } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes( + 3, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeBytes( + 4, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 5, + f + ); + } }; /** - * repeated bytes keys_bytes = 1; - * @return {!Array} + * optional uint32 epoch = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getEpoch = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * repeated bytes keys_bytes = 1; - * This is a type-conversion wrapper around `getKeysBytesList()` - * @return {!Array} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getKeysBytesList())); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setEpoch = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * repeated bytes keys_bytes = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKeysBytesList()` - * @return {!Array} + * optional uint32 limit = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getKeysBytesList())); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.setKeysBytesList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setLimit = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.addKeysBytes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.clearLimit = function() { + return jspb.Message.setField(this, 2, undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.clearKeysBytesList = function() { - return this.setKeysBytesList([]); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasLimit = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional Keys keys = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} + * optional bytes start_after = 3; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getKeys = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys, 1)); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.setKeys = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_[0], value); + * optional bytes start_after = 3; + * This is a type-conversion wrapper around `getStartAfter()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartAfter())); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this + * optional bytes start_after = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStartAfter()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.clearKeys = function() { - return this.setKeys(undefined); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartAfter())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasKeys = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setStartAfter = function(value) { + return jspb.Message.setOneofField(this, 3, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_[0], value); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getProof = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.clearStartAfter = function() { + return jspb.Message.setOneofField(this, 3, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_[0], undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_[0], value); + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasStartAfter = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this + * optional bytes start_at = 4; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes start_at = 4; + * This is a type-conversion wrapper around `getStartAt()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartAt())); }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * optional bytes start_at = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStartAt()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getMetadata = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartAt())); }; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setStartAt = function(value) { + return jspb.Message.setOneofField(this, 4, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_[0], value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.clearStartAt = function() { + return jspb.Message.setOneofField(this, 4, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_[0], undefined); }; @@ -11151,35 +14818,53 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasStartAt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bool prove = 5; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); }; /** - * optional GetIdentityKeysResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} + * optional GetEvonodesProposedEpochBlocksByRangeRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -11188,7 +14873,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.clearV0 = func * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -11202,21 +14887,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.hasV0 = functi * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.oneofGroups_[0])); }; @@ -11234,8 +14919,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.toObject(opt_includeInstance, this); }; @@ -11244,13 +14929,13 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.toObj * @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.GetIdentitiesContractKeysRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -11264,23 +14949,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.toObject = func /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest; - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest; + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.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.GetIdentitiesContractKeysRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11288,8 +14973,8 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.deserializeBina var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -11305,9 +14990,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.deserializeBina * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11315,31 +15000,24 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.seria /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter ); } }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.repeatedFields_ = [1,4]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -11355,8 +15033,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.toObject(opt_includeInstance, this); }; @@ -11365,17 +15043,14 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo * @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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - identitiesIdsList: msg.getIdentitiesIdsList_asB64(), - contractId: msg.getContractId_asB64(), - documentTypeName: jspb.Message.getFieldWithDefault(msg, 3, ""), - purposesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, - prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + identitiesIds: (f = msg.getIdentitiesIds()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.toObject(includeInstance, f), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -11389,23 +15064,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11413,24 +15088,11 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIdentitiesIds(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.deserializeBinaryFromReader); + msg.setIdentitiesIds(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentTypeName(value); - break; - case 4: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); - for (var i = 0; i < values.length; i++) { - msg.addPurposes(values[i]); - } - break; - case 5: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -11447,9 +15109,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11457,268 +15119,289 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentitiesIdsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 1, - f - ); - } - f = message.getContractId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 3)); + f = message.getIdentitiesIds(); if (f != null) { - writer.writeString( - 3, - f - ); - } - f = message.getPurposesList(); - if (f.length > 0) { - writer.writePackedEnum( - 4, - f + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.serializeBinaryToWriter ); } f = message.getProve(); if (f) { writer.writeBool( - 5, + 2, f ); } }; -/** - * repeated bytes identities_ids = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getIdentitiesIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - /** - * repeated bytes identities_ids = 1; - * This is a type-conversion wrapper around `getIdentitiesIdsList()` - * @return {!Array} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getIdentitiesIdsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIdentitiesIdsList())); -}; +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * repeated bytes identities_ids = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentitiesIdsList()` - * @return {!Array} + * 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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getIdentitiesIdsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getIdentitiesIdsList())); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.toObject(opt_includeInstance, this); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns 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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setIdentitiesIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.toObject = function(includeInstance, msg) { + var f, obj = { + identitiesIdsList: msg.getIdentitiesIdsList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.addIdentitiesIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds; + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.deserializeBinaryFromReader(msg, reader); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearIdentitiesIdsList = function() { - return this.setIdentitiesIdsList([]); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.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.addIdentitiesIds(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional bytes contract_id = 2; - * @return {string} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional bytes contract_id = 2; - * This is a type-conversion wrapper around `getContractId()` - * @return {string} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentitiesIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } }; /** - * optional bytes contract_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractId()` - * @return {!Uint8Array} + * repeated bytes identities_ids = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.getIdentitiesIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * repeated bytes identities_ids = 1; + * This is a type-conversion wrapper around `getIdentitiesIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.getIdentitiesIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIdentitiesIdsList())); }; /** - * optional string document_type_name = 3; - * @return {string} + * repeated bytes identities_ids = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentitiesIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getDocumentTypeName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.getIdentitiesIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdentitiesIdsList())); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setDocumentTypeName = function(value) { - return jspb.Message.setField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.setIdentitiesIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearDocumentTypeName = function() { - return jspb.Message.setField(this, 3, undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.addIdentitiesIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.hasDocumentTypeName = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.clearIdentitiesIdsList = function() { + return this.setIdentitiesIdsList([]); }; /** - * repeated KeyPurpose purposes = 4; - * @return {!Array} + * optional GetIdentitiesBalancesByKnownIdentityIds identities_ids = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getPurposesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getIdentitiesIds = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds, 1)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setPurposesList = function(value) { - return jspb.Message.setField(this, 4, value || []); + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.setIdentitiesIds = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.KeyPurpose} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.addPurposes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.clearIdentitiesIds = function() { + return this.setIdentitiesIds(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearPurposesList = function() { - return this.setPurposesList([]); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.hasIdentitiesIds = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bool prove = 5; + * optional bool prove = 2; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional GetIdentitiesContractKeysRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} + * optional GetIdentitiesBalancesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -11727,7 +15410,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.clear * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -11741,21 +15424,21 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.hasV0 * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.oneofGroups_[0])); }; @@ -11773,8 +15456,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.toObject(opt_includeInstance, this); }; @@ -11783,13 +15466,13 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.toOb * @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.GetIdentitiesContractKeysResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -11803,23 +15486,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.toObject = fun /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse; - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse; + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetIdentitiesContractKeysResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11827,8 +15510,8 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBin var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -11844,9 +15527,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBin * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11854,18 +15537,18 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.seri /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.serializeBinaryToWriter ); } }; @@ -11880,22 +15563,22 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.serializeBinar * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase = { RESULT_NOT_SET: 0, - IDENTITIES_KEYS: 1, + IDENTITIES_BALANCES: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_[0])); }; @@ -11913,8 +15596,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.toObject(opt_includeInstance, this); }; @@ -11923,13 +15606,13 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * @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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - identitiesKeys: (f = msg.getIdentitiesKeys()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.toObject(includeInstance, f), + identitiesBalances: (f = msg.getIdentitiesBalances()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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) }; @@ -11945,23 +15628,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11969,161 +15652,20 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinaryFromReader); - msg.setIdentitiesKeys(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.deserializeBinaryFromReader); + msg.setIdentitiesBalances(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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIdentitiesKeys(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.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 - ); - } -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.repeatedFields_ = [2]; - - - -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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.toObject = function(includeInstance, msg) { - var f, obj = { - purpose: jspb.Message.getFieldWithDefault(msg, 1, 0), - keysBytesList: msg.getKeysBytesList_asB64() - }; - - 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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys; - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.org.dash.platform.dapi.v0.KeyPurpose} */ (reader.readEnum()); - msg.setPurpose(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addKeysBytes(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; @@ -12137,9 +15679,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12147,116 +15689,40 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPurpose(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getIdentitiesBalances(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.serializeBinaryToWriter ); } - f = message.getKeysBytesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( + f = message.getProof(); + if (f != null) { + writer.writeMessage( 2, - f + 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 KeyPurpose purpose = 1; - * @return {!proto.org.dash.platform.dapi.v0.KeyPurpose} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getPurpose = function() { - return /** @type {!proto.org.dash.platform.dapi.v0.KeyPurpose} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.org.dash.platform.dapi.v0.KeyPurpose} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.setPurpose = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * repeated bytes keys_bytes = 2; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * repeated bytes keys_bytes = 2; - * This is a type-conversion wrapper around `getKeysBytesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getKeysBytesList())); -}; - - -/** - * repeated bytes keys_bytes = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKeysBytesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getKeysBytesList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.setKeysBytesList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.addKeysBytes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.clearKeysBytesList = function() { - return this.setKeysBytesList([]); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.repeatedFields_ = [2]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -12272,8 +15738,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.toObject(opt_includeInstance, this); }; @@ -12282,15 +15748,14 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * @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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.toObject = function(includeInstance, msg) { var f, obj = { identityId: msg.getIdentityId_asB64(), - keysList: jspb.Message.toObjectList(msg.getKeysList(), - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.toObject, includeInstance) + balance: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -12304,23 +15769,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys; - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance; + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12332,9 +15797,8 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC msg.setIdentityId(value); break; case 2: - var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.deserializeBinaryFromReader); - msg.addKeys(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setBalance(value); break; default: reader.skipField(); @@ -12349,9 +15813,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12359,11 +15823,11 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIdentityId_asU8(); if (f.length > 0) { @@ -12372,12 +15836,11 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC f ); } - f = message.getKeysList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( 2, - f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter + f ); } }; @@ -12387,7 +15850,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * optional bytes identity_id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getIdentityId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -12397,7 +15860,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * This is a type-conversion wrapper around `getIdentityId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getIdentityId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getIdentityId())); }; @@ -12410,7 +15873,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * This is a type-conversion wrapper around `getIdentityId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getIdentityId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getIdentityId())); }; @@ -12418,48 +15881,46 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.setIdentityId = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.setIdentityId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * repeated PurposeKeys keys = 2; - * @return {!Array} + * optional uint64 balance = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getKeysList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys, 2)); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.setKeysList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.setBalance = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.addKeys = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.clearBalance = function() { + return jspb.Message.setField(this, 2, undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.clearKeysList = function() { - return this.setKeysList([]); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.hasBalance = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -12469,7 +15930,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.repeatedFields_ = [1]; @@ -12486,8 +15947,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.toObject(opt_includeInstance, this); }; @@ -12496,14 +15957,14 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * @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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.toObject = function(includeInstance, msg) { var f, obj = { entriesList: jspb.Message.toObjectList(msg.getEntriesList(), - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject, includeInstance) + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.toObject, includeInstance) }; if (includeInstance) { @@ -12517,23 +15978,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys; - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances; + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12541,8 +16002,8 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.deserializeBinaryFromReader); msg.addEntries(value); break; default: @@ -12558,9 +16019,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12568,86 +16029,86 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getEntriesList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter ); } }; /** - * repeated IdentityKeys entries = 1; - * @return {!Array} + * repeated IdentityBalance entries = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.getEntriesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance, 1)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} returns this + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.setEntriesList = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.setEntriesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys=} opt_value + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance=} opt_value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.addEntries = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.clearEntriesList = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.clearEntriesList = function() { return this.setEntriesList([]); }; /** - * optional IdentitiesKeys identities_keys = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} + * optional IdentitiesBalances identities_balances = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.getIdentitiesKeys = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.getIdentitiesBalances = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.setIdentitiesKeys = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.setIdentitiesBalances = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearIdentitiesKeys = function() { - return this.setIdentitiesKeys(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearIdentitiesBalances = function() { + return this.setIdentitiesBalances(undefined); }; @@ -12655,7 +16116,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasIdentitiesKeys = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasIdentitiesBalances = function() { return jspb.Message.getField(this, 1) != null; }; @@ -12664,7 +16125,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -12672,18 +16133,18 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -12692,7 +16153,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -12701,7 +16162,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -12709,18 +16170,18 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -12729,35 +16190,35 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetIdentitiesContractKeysResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} + * optional GetIdentitiesBalancesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -12766,7 +16227,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.clea * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; 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 820658fd6a0..d6a635ad223 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 @@ -71,6 +71,16 @@ CF_EXTERN_C_BEGIN @class GetEpochsInfoResponse_GetEpochsInfoResponseV0; @class GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo; @class GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos; +@class GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0; +@class GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0; +@class GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0; +@class GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks; +@class GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks; +@class GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0; +@class GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds; +@class GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0; +@class GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances; +@class GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance; @class GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0; @class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0; @class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys; @@ -1352,6 +1362,350 @@ GPB_FINAL @interface GetIdentitiesContractKeysResponse_GetIdentitiesContractKeys @end +#pragma mark - GetEvonodesProposedEpochBlocksByIdsRequest + +typedef GPB_ENUM(GetEvonodesProposedEpochBlocksByIdsRequest_FieldNumber) { + GetEvonodesProposedEpochBlocksByIdsRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetEvonodesProposedEpochBlocksByIdsRequest_Version_OneOfCase) { + GetEvonodesProposedEpochBlocksByIdsRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetEvonodesProposedEpochBlocksByIdsRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetEvonodesProposedEpochBlocksByIdsRequest : GPBMessage + +@property(nonatomic, readonly) GetEvonodesProposedEpochBlocksByIdsRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetEvonodesProposedEpochBlocksByIdsRequest_ClearVersionOneOfCase(GetEvonodesProposedEpochBlocksByIdsRequest *message); + +#pragma mark - GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0 + +typedef GPB_ENUM(GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0_FieldNumber) { + GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0_FieldNumber_Epoch = 1, + GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0_FieldNumber_IdsArray = 2, + GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0_FieldNumber_Prove = 3, +}; + +GPB_FINAL @interface GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0 : GPBMessage + +@property(nonatomic, readwrite) uint32_t epoch; + +/** IDs of the evonodes for which we want to get their proposed blocks */ +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *idsArray; +/** The number of items in @c idsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger idsArray_Count; + +/** Flag to request a proof as the response */ +@property(nonatomic, readwrite) BOOL prove; + +@end + +#pragma mark - GetEvonodesProposedEpochBlocksResponse + +typedef GPB_ENUM(GetEvonodesProposedEpochBlocksResponse_FieldNumber) { + GetEvonodesProposedEpochBlocksResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetEvonodesProposedEpochBlocksResponse_Version_OneOfCase) { + GetEvonodesProposedEpochBlocksResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetEvonodesProposedEpochBlocksResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetEvonodesProposedEpochBlocksResponse : GPBMessage + +@property(nonatomic, readonly) GetEvonodesProposedEpochBlocksResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetEvonodesProposedEpochBlocksResponse_ClearVersionOneOfCase(GetEvonodesProposedEpochBlocksResponse *message); + +#pragma mark - GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 + +typedef GPB_ENUM(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_FieldNumber) { + GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_FieldNumber_EvonodesProposedBlockCountsInfo = 1, + GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_FieldNumber_Proof = 2, + GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_FieldNumber_Metadata = 3, +}; + +typedef GPB_ENUM(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_Result_OneOfCase) { + GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_Result_OneOfCase_EvonodesProposedBlockCountsInfo = 1, + GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_Result_OneOfCase resultOneOfCase; + +/** The actual result */ +@property(nonatomic, readwrite, strong, null_resettable) GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks *evonodesProposedBlockCountsInfo; + +/** Proof of the keys data, 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 GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_ClearResultOneOfCase(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 *message); + +#pragma mark - GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks + +typedef GPB_ENUM(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks_FieldNumber) { + GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks_FieldNumber_ProTxHash = 1, + GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks_FieldNumber_Count = 2, +}; + +GPB_FINAL @interface GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *proTxHash; + +@property(nonatomic, readwrite) uint64_t count; + +@end + +#pragma mark - GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks + +typedef GPB_ENUM(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks_FieldNumber) { + GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks_FieldNumber_EvonodesProposedBlockCountsArray = 1, +}; + +GPB_FINAL @interface GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *evonodesProposedBlockCountsArray; +/** The number of items in @c evonodesProposedBlockCountsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger evonodesProposedBlockCountsArray_Count; + +@end + +#pragma mark - GetEvonodesProposedEpochBlocksByRangeRequest + +typedef GPB_ENUM(GetEvonodesProposedEpochBlocksByRangeRequest_FieldNumber) { + GetEvonodesProposedEpochBlocksByRangeRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetEvonodesProposedEpochBlocksByRangeRequest_Version_OneOfCase) { + GetEvonodesProposedEpochBlocksByRangeRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetEvonodesProposedEpochBlocksByRangeRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetEvonodesProposedEpochBlocksByRangeRequest : GPBMessage + +@property(nonatomic, readonly) GetEvonodesProposedEpochBlocksByRangeRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetEvonodesProposedEpochBlocksByRangeRequest_ClearVersionOneOfCase(GetEvonodesProposedEpochBlocksByRangeRequest *message); + +#pragma mark - GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 + +typedef GPB_ENUM(GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_FieldNumber) { + GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_FieldNumber_Epoch = 1, + GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_FieldNumber_Limit = 2, + GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_FieldNumber_StartAfter = 3, + GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_FieldNumber_StartAt = 4, + GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_FieldNumber_Prove = 5, +}; + +typedef GPB_ENUM(GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_Start_OneOfCase) { + GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_Start_OneOfCase_GPBUnsetOneOfCase = 0, + GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_Start_OneOfCase_StartAfter = 3, + GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_Start_OneOfCase_StartAt = 4, +}; + +GPB_FINAL @interface GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 : GPBMessage + +/** The epoch we are querying for */ +@property(nonatomic, readwrite) uint32_t epoch; + +/** Maximum number of evonodes proposed epoch blocks to return */ +@property(nonatomic, readwrite) uint32_t limit; + +@property(nonatomic, readwrite) BOOL hasLimit; +@property(nonatomic, readonly) GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_Start_OneOfCase startOneOfCase; + +/** Start retrieval after this document */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *startAfter; + +/** Start retrieval at this document */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *startAt; + +/** Flag to request a proof as the response */ +@property(nonatomic, readwrite) BOOL prove; + +@end + +/** + * Clears whatever value was set for the oneof 'start'. + **/ +void GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_ClearStartOneOfCase(GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 *message); + +#pragma mark - GetIdentitiesBalancesRequest + +typedef GPB_ENUM(GetIdentitiesBalancesRequest_FieldNumber) { + GetIdentitiesBalancesRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetIdentitiesBalancesRequest_Version_OneOfCase) { + GetIdentitiesBalancesRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetIdentitiesBalancesRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetIdentitiesBalancesRequest : GPBMessage + +@property(nonatomic, readonly) GetIdentitiesBalancesRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetIdentitiesBalancesRequest_ClearVersionOneOfCase(GetIdentitiesBalancesRequest *message); + +#pragma mark - GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0 + +typedef GPB_ENUM(GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_FieldNumber) { + GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_FieldNumber_IdentitiesIds = 1, + GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_FieldNumber_Prove = 2, +}; + +GPB_FINAL @interface GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0 : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds *identitiesIds; +/** Test to see if @c identitiesIds has been set. */ +@property(nonatomic, readwrite) BOOL hasIdentitiesIds; + +@property(nonatomic, readwrite) BOOL prove; + +@end + +#pragma mark - GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds + +typedef GPB_ENUM(GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds_FieldNumber) { + GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds_FieldNumber_IdentitiesIdsArray = 1, +}; + +GPB_FINAL @interface GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *identitiesIdsArray; +/** The number of items in @c identitiesIdsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger identitiesIdsArray_Count; + +@end + +#pragma mark - GetIdentitiesBalancesResponse + +typedef GPB_ENUM(GetIdentitiesBalancesResponse_FieldNumber) { + GetIdentitiesBalancesResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetIdentitiesBalancesResponse_Version_OneOfCase) { + GetIdentitiesBalancesResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetIdentitiesBalancesResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetIdentitiesBalancesResponse : GPBMessage + +@property(nonatomic, readonly) GetIdentitiesBalancesResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetIdentitiesBalancesResponse_ClearVersionOneOfCase(GetIdentitiesBalancesResponse *message); + +#pragma mark - GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 + +typedef GPB_ENUM(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_FieldNumber) { + GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_FieldNumber_IdentitiesBalances = 1, + GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_FieldNumber_Proof = 2, + GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_FieldNumber_Metadata = 3, +}; + +typedef GPB_ENUM(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_Result_OneOfCase) { + GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_Result_OneOfCase_IdentitiesBalances = 1, + GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_Result_OneOfCase resultOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances *identitiesBalances; + +@property(nonatomic, readwrite, strong, null_resettable) Proof *proof; + +@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 GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_ClearResultOneOfCase(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 *message); + +#pragma mark - GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance + +typedef GPB_ENUM(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance_FieldNumber) { + GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance_FieldNumber_IdentityId = 1, + GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance_FieldNumber_Balance = 2, +}; + +GPB_FINAL @interface GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *identityId; + +@property(nonatomic, readwrite) uint64_t balance; + +@property(nonatomic, readwrite) BOOL hasBalance; +@end + +#pragma mark - GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances + +typedef GPB_ENUM(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances_FieldNumber) { + GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances_FieldNumber_EntriesArray = 1, +}; + +GPB_FINAL @interface GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances : 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 - GetProofsRequest typedef GPB_ENUM(GetProofsRequest_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 4137e426d19..7d1ef92f7ad 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 @@ -91,6 +91,21 @@ GPBObjCClassDeclaration(GetEpochsInfoResponse_GetEpochsInfoResponseV0); GPBObjCClassDeclaration(GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo); GPBObjCClassDeclaration(GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos); +GPBObjCClassDeclaration(GetEvonodesProposedEpochBlocksByIdsRequest); +GPBObjCClassDeclaration(GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0); +GPBObjCClassDeclaration(GetEvonodesProposedEpochBlocksByRangeRequest); +GPBObjCClassDeclaration(GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0); +GPBObjCClassDeclaration(GetEvonodesProposedEpochBlocksResponse); +GPBObjCClassDeclaration(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0); +GPBObjCClassDeclaration(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks); +GPBObjCClassDeclaration(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks); +GPBObjCClassDeclaration(GetIdentitiesBalancesRequest); +GPBObjCClassDeclaration(GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0); +GPBObjCClassDeclaration(GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds); +GPBObjCClassDeclaration(GetIdentitiesBalancesResponse); +GPBObjCClassDeclaration(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0); +GPBObjCClassDeclaration(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances); +GPBObjCClassDeclaration(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance); GPBObjCClassDeclaration(GetIdentitiesContractKeysRequest); GPBObjCClassDeclaration(GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0); GPBObjCClassDeclaration(GetIdentitiesContractKeysResponse); @@ -2989,6 +3004,927 @@ + (GPBDescriptor *)descriptor { @end +#pragma mark - GetEvonodesProposedEpochBlocksByIdsRequest + +@implementation GetEvonodesProposedEpochBlocksByIdsRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetEvonodesProposedEpochBlocksByIdsRequest__storage_ { + uint32_t _has_storage_[2]; + GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0 *v0; +} GetEvonodesProposedEpochBlocksByIdsRequest__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(GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0), + .number = GetEvonodesProposedEpochBlocksByIdsRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetEvonodesProposedEpochBlocksByIdsRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetEvonodesProposedEpochBlocksByIdsRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetEvonodesProposedEpochBlocksByIdsRequest__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 GetEvonodesProposedEpochBlocksByIdsRequest_ClearVersionOneOfCase(GetEvonodesProposedEpochBlocksByIdsRequest *message) { + GPBDescriptor *descriptor = [GetEvonodesProposedEpochBlocksByIdsRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0 + +@implementation GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0 + +@dynamic epoch; +@dynamic idsArray, idsArray_Count; +@dynamic prove; + +typedef struct GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0__storage_ { + uint32_t _has_storage_[1]; + uint32_t epoch; + NSMutableArray *idsArray; +} GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0__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 = "epoch", + .dataTypeSpecific.clazz = Nil, + .number = GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0_FieldNumber_Epoch, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0__storage_, epoch), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + { + .name = "idsArray", + .dataTypeSpecific.clazz = Nil, + .number = GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0_FieldNumber_IdsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0__storage_, idsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeBytes, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0_FieldNumber_Prove, + .hasIndex = 1, + .offset = 2, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetEvonodesProposedEpochBlocksByIdsRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetEvonodesProposedEpochBlocksResponse + +@implementation GetEvonodesProposedEpochBlocksResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetEvonodesProposedEpochBlocksResponse__storage_ { + uint32_t _has_storage_[2]; + GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 *v0; +} GetEvonodesProposedEpochBlocksResponse__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(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0), + .number = GetEvonodesProposedEpochBlocksResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetEvonodesProposedEpochBlocksResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetEvonodesProposedEpochBlocksResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetEvonodesProposedEpochBlocksResponse__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 GetEvonodesProposedEpochBlocksResponse_ClearVersionOneOfCase(GetEvonodesProposedEpochBlocksResponse *message) { + GPBDescriptor *descriptor = [GetEvonodesProposedEpochBlocksResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 + +@implementation GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 + +@dynamic resultOneOfCase; +@dynamic evonodesProposedBlockCountsInfo; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0__storage_ { + uint32_t _has_storage_[2]; + GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks *evonodesProposedBlockCountsInfo; + Proof *proof; + ResponseMetadata *metadata; +} GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0__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 = "evonodesProposedBlockCountsInfo", + .dataTypeSpecific.clazz = GPBObjCClass(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks), + .number = GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_FieldNumber_EvonodesProposedBlockCountsInfo, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0__storage_, evonodesProposedBlockCountsInfo), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0__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(GetEvonodesProposedEpochBlocksResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_ClearResultOneOfCase(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 *message) { + GPBDescriptor *descriptor = [GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks + +@implementation GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks + +@dynamic proTxHash; +@dynamic count; + +typedef struct GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks__storage_ { + uint32_t _has_storage_[1]; + NSData *proTxHash; + uint64_t count; +} GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks__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 = "proTxHash", + .dataTypeSpecific.clazz = Nil, + .number = GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks_FieldNumber_ProTxHash, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks__storage_, proTxHash), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "count", + .dataTypeSpecific.clazz = Nil, + .number = GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks_FieldNumber_Count, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks__storage_, count), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks + +@implementation GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks + +@dynamic evonodesProposedBlockCountsArray, evonodesProposedBlockCountsArray_Count; + +typedef struct GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *evonodesProposedBlockCountsArray; +} GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks__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 = "evonodesProposedBlockCountsArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks), + .number = GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks_FieldNumber_EvonodesProposedBlockCountsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks__storage_, evonodesProposedBlockCountsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetEvonodesProposedEpochBlocksByRangeRequest + +@implementation GetEvonodesProposedEpochBlocksByRangeRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetEvonodesProposedEpochBlocksByRangeRequest__storage_ { + uint32_t _has_storage_[2]; + GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 *v0; +} GetEvonodesProposedEpochBlocksByRangeRequest__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(GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0), + .number = GetEvonodesProposedEpochBlocksByRangeRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetEvonodesProposedEpochBlocksByRangeRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetEvonodesProposedEpochBlocksByRangeRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetEvonodesProposedEpochBlocksByRangeRequest__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 GetEvonodesProposedEpochBlocksByRangeRequest_ClearVersionOneOfCase(GetEvonodesProposedEpochBlocksByRangeRequest *message) { + GPBDescriptor *descriptor = [GetEvonodesProposedEpochBlocksByRangeRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 + +@implementation GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 + +@dynamic startOneOfCase; +@dynamic epoch; +@dynamic hasLimit, limit; +@dynamic startAfter; +@dynamic startAt; +@dynamic prove; + +typedef struct GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0__storage_ { + uint32_t _has_storage_[2]; + uint32_t epoch; + uint32_t limit; + NSData *startAfter; + NSData *startAt; +} GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0__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 = "epoch", + .dataTypeSpecific.clazz = Nil, + .number = GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_FieldNumber_Epoch, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0__storage_, epoch), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + { + .name = "limit", + .dataTypeSpecific.clazz = Nil, + .number = GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_FieldNumber_Limit, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0__storage_, limit), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeUInt32, + }, + { + .name = "startAfter", + .dataTypeSpecific.clazz = Nil, + .number = GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_FieldNumber_StartAfter, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0__storage_, startAfter), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBytes, + }, + { + .name = "startAt", + .dataTypeSpecific.clazz = Nil, + .number = GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_FieldNumber_StartAt, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0__storage_, startAt), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBytes, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_FieldNumber_Prove, + .hasIndex = 2, + .offset = 3, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "start", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetEvonodesProposedEpochBlocksByRangeRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0_ClearStartOneOfCase(GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 *message) { + GPBDescriptor *descriptor = [GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentitiesBalancesRequest + +@implementation GetIdentitiesBalancesRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetIdentitiesBalancesRequest__storage_ { + uint32_t _has_storage_[2]; + GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0 *v0; +} GetIdentitiesBalancesRequest__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(GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0), + .number = GetIdentitiesBalancesRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentitiesBalancesRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesBalancesRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesBalancesRequest__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 GetIdentitiesBalancesRequest_ClearVersionOneOfCase(GetIdentitiesBalancesRequest *message) { + GPBDescriptor *descriptor = [GetIdentitiesBalancesRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0 + +@implementation GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0 + +@dynamic hasIdentitiesIds, identitiesIds; +@dynamic prove; + +typedef struct GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0__storage_ { + uint32_t _has_storage_[1]; + GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds *identitiesIds; +} GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0__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 = "identitiesIds", + .dataTypeSpecific.clazz = GPBObjCClass(GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds), + .number = GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_FieldNumber_IdentitiesIds, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0__storage_, identitiesIds), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_FieldNumber_Prove, + .hasIndex = 1, + .offset = 2, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentitiesBalancesRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds + +@implementation GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds + +@dynamic identitiesIdsArray, identitiesIdsArray_Count; + +typedef struct GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *identitiesIdsArray; +} GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds__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 = "identitiesIdsArray", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds_FieldNumber_IdentitiesIdsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds__storage_, identitiesIdsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeBytes, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0_GetIdentitiesBalancesByKnownIdentityIds__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentitiesBalancesResponse + +@implementation GetIdentitiesBalancesResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetIdentitiesBalancesResponse__storage_ { + uint32_t _has_storage_[2]; + GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 *v0; +} GetIdentitiesBalancesResponse__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(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0), + .number = GetIdentitiesBalancesResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentitiesBalancesResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesBalancesResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesBalancesResponse__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 GetIdentitiesBalancesResponse_ClearVersionOneOfCase(GetIdentitiesBalancesResponse *message) { + GPBDescriptor *descriptor = [GetIdentitiesBalancesResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 + +@implementation GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 + +@dynamic resultOneOfCase; +@dynamic identitiesBalances; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0__storage_ { + uint32_t _has_storage_[2]; + GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances *identitiesBalances; + Proof *proof; + ResponseMetadata *metadata; +} GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0__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 = "identitiesBalances", + .dataTypeSpecific.clazz = GPBObjCClass(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances), + .number = GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_FieldNumber_IdentitiesBalances, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0__storage_, identitiesBalances), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0__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(GetIdentitiesBalancesResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_ClearResultOneOfCase(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 *message) { + GPBDescriptor *descriptor = [GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance + +@implementation GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance + +@dynamic identityId; +@dynamic hasBalance, balance; + +typedef struct GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance__storage_ { + uint32_t _has_storage_[1]; + NSData *identityId; + uint64_t balance; +} GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance__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 = "identityId", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance_FieldNumber_IdentityId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance__storage_, identityId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "balance", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance_FieldNumber_Balance, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance__storage_, balance), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeUInt64, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances + +@implementation GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances + +@dynamic entriesArray, entriesArray_Count; + +typedef struct GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *entriesArray; +} GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances__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(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance), + .number = GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances_FieldNumber_EntriesArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances__storage_, entriesArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + #pragma mark - GetProofsRequest @implementation GetProofsRequest 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 4559260d1e3..fb69ec2af84 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 @@ -36,6 +36,11 @@ @class GetDocumentsResponse; @class GetEpochsInfoRequest; @class GetEpochsInfoResponse; +@class GetEvonodesProposedEpochBlocksByIdsRequest; +@class GetEvonodesProposedEpochBlocksByRangeRequest; +@class GetEvonodesProposedEpochBlocksResponse; +@class GetIdentitiesBalancesRequest; +@class GetIdentitiesBalancesResponse; @class GetIdentitiesContractKeysRequest; @class GetIdentitiesContractKeysResponse; @class GetIdentityBalanceAndRevisionRequest; @@ -128,10 +133,22 @@ NS_ASSUME_NONNULL_BEGIN - (GRPCUnaryProtoCall *)getIdentityBalanceWithMessage:(GetIdentityBalanceRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; +#pragma mark getIdentitiesBalances(GetIdentitiesBalancesRequest) returns (GetIdentitiesBalancesResponse) + +- (GRPCUnaryProtoCall *)getIdentitiesBalancesWithMessage:(GetIdentitiesBalancesRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + #pragma mark getIdentityBalanceAndRevision(GetIdentityBalanceAndRevisionRequest) returns (GetIdentityBalanceAndRevisionResponse) - (GRPCUnaryProtoCall *)getIdentityBalanceAndRevisionWithMessage:(GetIdentityBalanceAndRevisionRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; +#pragma mark getEvonodesProposedEpochBlocksByIds(GetEvonodesProposedEpochBlocksByIdsRequest) returns (GetEvonodesProposedEpochBlocksResponse) + +- (GRPCUnaryProtoCall *)getEvonodesProposedEpochBlocksByIdsWithMessage:(GetEvonodesProposedEpochBlocksByIdsRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + +#pragma mark getEvonodesProposedEpochBlocksByRange(GetEvonodesProposedEpochBlocksByRangeRequest) returns (GetEvonodesProposedEpochBlocksResponse) + +- (GRPCUnaryProtoCall *)getEvonodesProposedEpochBlocksByRangeWithMessage:(GetEvonodesProposedEpochBlocksByRangeRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + #pragma mark getProofs(GetProofsRequest) returns (GetProofsResponse) - (GRPCUnaryProtoCall *)getProofsWithMessage:(GetProofsRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; @@ -284,6 +301,13 @@ NS_ASSUME_NONNULL_BEGIN - (GRPCProtoCall *)RPCTogetIdentityBalanceWithRequest:(GetIdentityBalanceRequest *)request handler:(void(^)(GetIdentityBalanceResponse *_Nullable response, NSError *_Nullable error))handler; +#pragma mark getIdentitiesBalances(GetIdentitiesBalancesRequest) returns (GetIdentitiesBalancesResponse) + +- (void)getIdentitiesBalancesWithRequest:(GetIdentitiesBalancesRequest *)request handler:(void(^)(GetIdentitiesBalancesResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetIdentitiesBalancesWithRequest:(GetIdentitiesBalancesRequest *)request handler:(void(^)(GetIdentitiesBalancesResponse *_Nullable response, NSError *_Nullable error))handler; + + #pragma mark getIdentityBalanceAndRevision(GetIdentityBalanceAndRevisionRequest) returns (GetIdentityBalanceAndRevisionResponse) - (void)getIdentityBalanceAndRevisionWithRequest:(GetIdentityBalanceAndRevisionRequest *)request handler:(void(^)(GetIdentityBalanceAndRevisionResponse *_Nullable response, NSError *_Nullable error))handler; @@ -291,6 +315,20 @@ NS_ASSUME_NONNULL_BEGIN - (GRPCProtoCall *)RPCTogetIdentityBalanceAndRevisionWithRequest:(GetIdentityBalanceAndRevisionRequest *)request handler:(void(^)(GetIdentityBalanceAndRevisionResponse *_Nullable response, NSError *_Nullable error))handler; +#pragma mark getEvonodesProposedEpochBlocksByIds(GetEvonodesProposedEpochBlocksByIdsRequest) returns (GetEvonodesProposedEpochBlocksResponse) + +- (void)getEvonodesProposedEpochBlocksByIdsWithRequest:(GetEvonodesProposedEpochBlocksByIdsRequest *)request handler:(void(^)(GetEvonodesProposedEpochBlocksResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetEvonodesProposedEpochBlocksByIdsWithRequest:(GetEvonodesProposedEpochBlocksByIdsRequest *)request handler:(void(^)(GetEvonodesProposedEpochBlocksResponse *_Nullable response, NSError *_Nullable error))handler; + + +#pragma mark getEvonodesProposedEpochBlocksByRange(GetEvonodesProposedEpochBlocksByRangeRequest) returns (GetEvonodesProposedEpochBlocksResponse) + +- (void)getEvonodesProposedEpochBlocksByRangeWithRequest:(GetEvonodesProposedEpochBlocksByRangeRequest *)request handler:(void(^)(GetEvonodesProposedEpochBlocksResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetEvonodesProposedEpochBlocksByRangeWithRequest:(GetEvonodesProposedEpochBlocksByRangeRequest *)request handler:(void(^)(GetEvonodesProposedEpochBlocksResponse *_Nullable response, NSError *_Nullable error))handler; + + #pragma mark getProofs(GetProofsRequest) returns (GetProofsResponse) - (void)getProofsWithRequest:(GetProofsRequest *)request handler:(void(^)(GetProofsResponse *_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 02b5d731d5f..df7dcb06e02 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 @@ -210,6 +210,26 @@ - (GRPCUnaryProtoCall *)getIdentityBalanceWithMessage:(GetIdentityBalanceRequest responseClass:[GetIdentityBalanceResponse class]]; } +#pragma mark getIdentitiesBalances(GetIdentitiesBalancesRequest) returns (GetIdentitiesBalancesResponse) + +- (void)getIdentitiesBalancesWithRequest:(GetIdentitiesBalancesRequest *)request handler:(void(^)(GetIdentitiesBalancesResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetIdentitiesBalancesWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetIdentitiesBalancesWithRequest:(GetIdentitiesBalancesRequest *)request handler:(void(^)(GetIdentitiesBalancesResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getIdentitiesBalances" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetIdentitiesBalancesResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getIdentitiesBalancesWithMessage:(GetIdentitiesBalancesRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getIdentitiesBalances" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetIdentitiesBalancesResponse class]]; +} + #pragma mark getIdentityBalanceAndRevision(GetIdentityBalanceAndRevisionRequest) returns (GetIdentityBalanceAndRevisionResponse) - (void)getIdentityBalanceAndRevisionWithRequest:(GetIdentityBalanceAndRevisionRequest *)request handler:(void(^)(GetIdentityBalanceAndRevisionResponse *_Nullable response, NSError *_Nullable error))handler{ @@ -230,6 +250,46 @@ - (GRPCUnaryProtoCall *)getIdentityBalanceAndRevisionWithMessage:(GetIdentityBal responseClass:[GetIdentityBalanceAndRevisionResponse class]]; } +#pragma mark getEvonodesProposedEpochBlocksByIds(GetEvonodesProposedEpochBlocksByIdsRequest) returns (GetEvonodesProposedEpochBlocksResponse) + +- (void)getEvonodesProposedEpochBlocksByIdsWithRequest:(GetEvonodesProposedEpochBlocksByIdsRequest *)request handler:(void(^)(GetEvonodesProposedEpochBlocksResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetEvonodesProposedEpochBlocksByIdsWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetEvonodesProposedEpochBlocksByIdsWithRequest:(GetEvonodesProposedEpochBlocksByIdsRequest *)request handler:(void(^)(GetEvonodesProposedEpochBlocksResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getEvonodesProposedEpochBlocksByIds" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetEvonodesProposedEpochBlocksResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getEvonodesProposedEpochBlocksByIdsWithMessage:(GetEvonodesProposedEpochBlocksByIdsRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getEvonodesProposedEpochBlocksByIds" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetEvonodesProposedEpochBlocksResponse class]]; +} + +#pragma mark getEvonodesProposedEpochBlocksByRange(GetEvonodesProposedEpochBlocksByRangeRequest) returns (GetEvonodesProposedEpochBlocksResponse) + +- (void)getEvonodesProposedEpochBlocksByRangeWithRequest:(GetEvonodesProposedEpochBlocksByRangeRequest *)request handler:(void(^)(GetEvonodesProposedEpochBlocksResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetEvonodesProposedEpochBlocksByRangeWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetEvonodesProposedEpochBlocksByRangeWithRequest:(GetEvonodesProposedEpochBlocksByRangeRequest *)request handler:(void(^)(GetEvonodesProposedEpochBlocksResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getEvonodesProposedEpochBlocksByRange" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetEvonodesProposedEpochBlocksResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getEvonodesProposedEpochBlocksByRangeWithMessage:(GetEvonodesProposedEpochBlocksByRangeRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getEvonodesProposedEpochBlocksByRange" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetEvonodesProposedEpochBlocksResponse class]]; +} + #pragma mark getProofs(GetProofsRequest) returns (GetProofsResponse) - (void)getProofsWithRequest:(GetProofsRequest *)request handler:(void(^)(GetProofsResponse *_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 29b49dcdf2d..e28c4f3249e 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\"\x90\x01\n\x10ResponseMetadata\x12\x0e\n\x06height\x18\x01 \x01(\x04\x12 \n\x18\x63ore_chain_locked_height\x18\x02 \x01(\r\x12\r\n\x05\x65poch\x18\x03 \x01(\r\x12\x0f\n\x07time_ms\x18\x04 \x01(\x04\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\"\xb8\x02\n\x18GetIdentityNonceResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0H\x00\x1a\xb2\x01\n\x1aGetIdentityNonceResponseV0\x12\x18\n\x0eidentity_nonce\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\"\xe1\x02\n GetIdentityContractNonceResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0H\x00\x1a\xc3\x01\n\"GetIdentityContractNonceResponseV0\x12!\n\x17identity_contract_nonce\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\"\xb9\x02\n\x1aGetIdentityBalanceResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0H\x00\x1a\xad\x01\n\x1cGetIdentityBalanceResponseV0\x12\x11\n\x07\x62\x61lance\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\"\xa9\x04\n%GetIdentityBalanceAndRevisionResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0H\x00\x1a\xfc\x02\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\x37\n\x12\x42\x61lanceAndRevision\x12\x0f\n\x07\x62\x61lance\x18\x01 \x01(\x04\x12\x10\n\x08revision\x18\x02 \x01(\x04\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\"\xcb\x0b\n\x10GetProofsRequest\x12L\n\x02v0\x18\x01 \x01(\x0b\x32>.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0H\x00\x1a\xdd\n\n\x12GetProofsRequestV0\x12\x62\n\nidentities\x18\x01 \x03(\x0b\x32N.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest\x12\x61\n\tcontracts\x18\x02 \x03(\x0b\x32N.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest\x12\x61\n\tdocuments\x18\x03 \x03(\x0b\x32N.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest\x12_\n\x05votes\x18\x04 \x03(\x0b\x32P.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest\x1a\xd5\x02\n\x0f\x44ocumentRequest\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12#\n\x1b\x64ocument_type_keeps_history\x18\x03 \x01(\x08\x12\x13\n\x0b\x64ocument_id\x18\x04 \x01(\x0c\x12\x89\x01\n\x19\x64ocument_contested_status\x18\x05 \x01(\x0e\x32\x66.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus\"P\n\x17\x44ocumentContestedStatus\x12\x11\n\rNOT_CONTESTED\x10\x00\x12\x13\n\x0fMAYBE_CONTESTED\x10\x01\x12\r\n\tCONTESTED\x10\x02\x1a\xd1\x01\n\x0fIdentityRequest\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12i\n\x0crequest_type\x18\x02 \x01(\x0e\x32S.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type\">\n\x04Type\x12\x11\n\rFULL_IDENTITY\x10\x00\x12\x0b\n\x07\x42\x41LANCE\x10\x01\x12\x08\n\x04KEYS\x10\x02\x12\x0c\n\x08REVISION\x10\x03\x1a&\n\x0f\x43ontractRequest\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x1a\xe7\x02\n\x11VoteStatusRequest\x12\xa5\x01\n&contested_resource_vote_status_request\x18\x01 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequestH\x00\x1a\x99\x01\n\"ContestedResourceVoteStatusRequest\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\x18\n\x10voter_identifier\x18\x05 \x01(\x0c\x42\x0e\n\x0crequest_typeB\t\n\x07version\"\x82\x02\n\x11GetProofsResponse\x12N\n\x02v0\x18\x01 \x01(\x0b\x32@.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0H\x00\x1a\x91\x01\n\x13GetProofsResponseV0\x12\x31\n\x05proof\x18\x01 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x02 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\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\"\xc1\x02\n\x1dGetDataContractHistoryRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0H\x00\x1a\xac\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\x13\n\x0bstart_at_ms\x18\x04 \x01(\x04\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xae\x05\n\x1eGetDataContractHistoryResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0H\x00\x1a\x96\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\x37\n\x18\x44\x61taContractHistoryEntry\x12\x0c\n\x04\x64\x61te\x18\x01 \x01(\x04\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\"\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\"\x91\x05\n\x15GetEpochsInfoResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0H\x00\x1a\x94\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\x9e\x01\n\tEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1a\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x12\n\nstart_time\x18\x04 \x01(\x04\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\"\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\"\xca\x05\n\x1cGetVotePollsByEndDateRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0H\x00\x1a\xb8\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\x1a\x45\n\x0fStartAtTimeInfo\x12\x15\n\rstart_time_ms\x18\x01 \x01(\x04\x12\x1b\n\x13start_time_included\x18\x02 \x01(\x08\x1a?\n\rEndAtTimeInfo\x12\x13\n\x0b\x65nd_time_ms\x18\x01 \x01(\x04\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\"\xff\x05\n\x1dGetVotePollsByEndDateResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0H\x00\x1a\xea\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\x1aR\n\x1eSerializedVotePollsByTimestamp\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\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\"\x8c\x0c\n%GetContestedResourceVoteStateResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0H\x00\x1a\xdf\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\xd2\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\x12%\n\x1d\x66inished_at_core_block_height\x18\x04 \x01(\r\x12!\n\x19\x66inished_at_block_time_ms\x18\x05 \x01(\x04\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\"\xe9\x02\n&GetPrefundedSpecializedBalanceResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0H\x00\x1a\xb9\x01\n(GetPrefundedSpecializedBalanceResponseV0\x12\x11\n\x07\x62\x61lance\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\"\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\"\xd5\x02\n!GetTotalCreditsInPlatformResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0H\x00\x1a\xb4\x01\n#GetTotalCreditsInPlatformResponseV0\x12\x11\n\x07\x63redits\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\"\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\"\x9c\x10\n\x11GetStatusResponse\x12N\n\x02v0\x18\x01 \x01(\x0b\x32@.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0H\x00\x1a\xab\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\xee\x04\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\xb8\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\x1as\n\x04Time\x12\r\n\x05local\x18\x01 \x01(\x04\x12\x12\n\x05\x62lock\x18\x02 \x01(\x04H\x00\x88\x01\x01\x12\x14\n\x07genesis\x18\x03 \x01(\x04H\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\xa7\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\x1b\n\x13latest_block_height\x18\x04 \x01(\x04\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\x1d\n\x15\x65\x61rliest_block_height\x18\x07 \x01(\x04\x12\x1d\n\x15max_peer_block_height\x18\t \x01(\x04\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\xe9\x01\n\tStateSync\x12\x19\n\x11total_synced_time\x18\x01 \x01(\x04\x12\x16\n\x0eremaining_time\x18\x02 \x01(\x04\x12\x17\n\x0ftotal_snapshots\x18\x03 \x01(\r\x12\x1e\n\x16\x63hunk_process_avg_time\x18\x04 \x01(\x04\x12\x17\n\x0fsnapshot_height\x18\x05 \x01(\x04\x12\x1d\n\x15snapshot_chunks_count\x18\x06 \x01(\x04\x12\x19\n\x11\x62\x61\x63kfilled_blocks\x18\x07 \x01(\x04\x12\x1d\n\x15\x62\x61\x63kfill_blocks_total\x18\x08 \x01(\x04\x42\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\xa2\x1f\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\xa2\x01\n\x1dgetIdentityBalanceAndRevision\x12?.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest\x1a@.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse\x12\x66\n\tgetProofs\x12+.org.dash.platform.dapi.v0.GetProofsRequest\x1a,.org.dash.platform.dapi.v0.GetProofsResponse\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\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\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.GetStatusResponseb\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\"\x90\x01\n\x10ResponseMetadata\x12\x0e\n\x06height\x18\x01 \x01(\x04\x12 \n\x18\x63ore_chain_locked_height\x18\x02 \x01(\r\x12\r\n\x05\x65poch\x18\x03 \x01(\r\x12\x0f\n\x07time_ms\x18\x04 \x01(\x04\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\"\xb8\x02\n\x18GetIdentityNonceResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0H\x00\x1a\xb2\x01\n\x1aGetIdentityNonceResponseV0\x12\x18\n\x0eidentity_nonce\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\"\xe1\x02\n GetIdentityContractNonceResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0H\x00\x1a\xc3\x01\n\"GetIdentityContractNonceResponseV0\x12!\n\x17identity_contract_nonce\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\"\xb9\x02\n\x1aGetIdentityBalanceResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0H\x00\x1a\xad\x01\n\x1cGetIdentityBalanceResponseV0\x12\x11\n\x07\x62\x61lance\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\"\xa9\x04\n%GetIdentityBalanceAndRevisionResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0H\x00\x1a\xfc\x02\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\x37\n\x12\x42\x61lanceAndRevision\x12\x0f\n\x07\x62\x61lance\x18\x01 \x01(\x04\x12\x10\n\x08revision\x18\x02 \x01(\x04\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\"\x95\x02\n*GetEvonodesProposedEpochBlocksByIdsRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0H\x00\x1aY\n,GetEvonodesProposedEpochBlocksByIdsRequestV0\x12\r\n\x05\x65poch\x18\x01 \x01(\r\x12\x0b\n\x03ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\x8e\x06\n&GetEvonodesProposedEpochBlocksResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0H\x00\x1a\xde\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\r\n\x05\x63ount\x18\x02 \x01(\x04\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\"\xe3\x02\n,GetEvonodesProposedEpochBlocksByRangeRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0H\x00\x1a\xa0\x01\n.GetEvonodesProposedEpochBlocksByRangeRequestV0\x12\r\n\x05\x65poch\x18\x01 \x01(\r\x12\x12\n\x05limit\x18\x02 \x01(\rH\x01\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_limitB\t\n\x07version\"\x9d\x03\n\x1cGetIdentitiesBalancesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0H\x00\x1a\x8b\x02\n\x1eGetIdentitiesBalancesRequestV0\x12\x96\x01\n\x0eidentities_ids\x18\x01 \x01(\x0b\x32~.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds\x12\r\n\x05prove\x18\x02 \x01(\x08\x1a\x41\n\'GetIdentitiesBalancesByKnownIdentityIds\x12\x16\n\x0eidentities_ids\x18\x01 \x03(\x0c\x42\t\n\x07version\"\x9b\x05\n\x1dGetIdentitiesBalancesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0H\x00\x1a\x86\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\x1aH\n\x0fIdentityBalance\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\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\"\xcb\x0b\n\x10GetProofsRequest\x12L\n\x02v0\x18\x01 \x01(\x0b\x32>.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0H\x00\x1a\xdd\n\n\x12GetProofsRequestV0\x12\x62\n\nidentities\x18\x01 \x03(\x0b\x32N.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest\x12\x61\n\tcontracts\x18\x02 \x03(\x0b\x32N.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest\x12\x61\n\tdocuments\x18\x03 \x03(\x0b\x32N.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest\x12_\n\x05votes\x18\x04 \x03(\x0b\x32P.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest\x1a\xd5\x02\n\x0f\x44ocumentRequest\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12#\n\x1b\x64ocument_type_keeps_history\x18\x03 \x01(\x08\x12\x13\n\x0b\x64ocument_id\x18\x04 \x01(\x0c\x12\x89\x01\n\x19\x64ocument_contested_status\x18\x05 \x01(\x0e\x32\x66.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus\"P\n\x17\x44ocumentContestedStatus\x12\x11\n\rNOT_CONTESTED\x10\x00\x12\x13\n\x0fMAYBE_CONTESTED\x10\x01\x12\r\n\tCONTESTED\x10\x02\x1a\xd1\x01\n\x0fIdentityRequest\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12i\n\x0crequest_type\x18\x02 \x01(\x0e\x32S.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type\">\n\x04Type\x12\x11\n\rFULL_IDENTITY\x10\x00\x12\x0b\n\x07\x42\x41LANCE\x10\x01\x12\x08\n\x04KEYS\x10\x02\x12\x0c\n\x08REVISION\x10\x03\x1a&\n\x0f\x43ontractRequest\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x1a\xe7\x02\n\x11VoteStatusRequest\x12\xa5\x01\n&contested_resource_vote_status_request\x18\x01 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequestH\x00\x1a\x99\x01\n\"ContestedResourceVoteStatusRequest\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\x18\n\x10voter_identifier\x18\x05 \x01(\x0c\x42\x0e\n\x0crequest_typeB\t\n\x07version\"\x82\x02\n\x11GetProofsResponse\x12N\n\x02v0\x18\x01 \x01(\x0b\x32@.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0H\x00\x1a\x91\x01\n\x13GetProofsResponseV0\x12\x31\n\x05proof\x18\x01 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x02 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\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\"\xc1\x02\n\x1dGetDataContractHistoryRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0H\x00\x1a\xac\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\x13\n\x0bstart_at_ms\x18\x04 \x01(\x04\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xae\x05\n\x1eGetDataContractHistoryResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0H\x00\x1a\x96\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\x37\n\x18\x44\x61taContractHistoryEntry\x12\x0c\n\x04\x64\x61te\x18\x01 \x01(\x04\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\"\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\"\x91\x05\n\x15GetEpochsInfoResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0H\x00\x1a\x94\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\x9e\x01\n\tEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1a\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x12\n\nstart_time\x18\x04 \x01(\x04\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\"\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\"\xca\x05\n\x1cGetVotePollsByEndDateRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0H\x00\x1a\xb8\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\x1a\x45\n\x0fStartAtTimeInfo\x12\x15\n\rstart_time_ms\x18\x01 \x01(\x04\x12\x1b\n\x13start_time_included\x18\x02 \x01(\x08\x1a?\n\rEndAtTimeInfo\x12\x13\n\x0b\x65nd_time_ms\x18\x01 \x01(\x04\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\"\xff\x05\n\x1dGetVotePollsByEndDateResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0H\x00\x1a\xea\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\x1aR\n\x1eSerializedVotePollsByTimestamp\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\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\"\x8c\x0c\n%GetContestedResourceVoteStateResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0H\x00\x1a\xdf\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\xd2\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\x12%\n\x1d\x66inished_at_core_block_height\x18\x04 \x01(\r\x12!\n\x19\x66inished_at_block_time_ms\x18\x05 \x01(\x04\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\"\xe9\x02\n&GetPrefundedSpecializedBalanceResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0H\x00\x1a\xb9\x01\n(GetPrefundedSpecializedBalanceResponseV0\x12\x11\n\x07\x62\x61lance\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\"\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\"\xd5\x02\n!GetTotalCreditsInPlatformResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0H\x00\x1a\xb4\x01\n#GetTotalCreditsInPlatformResponseV0\x12\x11\n\x07\x63redits\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\"\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\"\x9c\x10\n\x11GetStatusResponse\x12N\n\x02v0\x18\x01 \x01(\x0b\x32@.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0H\x00\x1a\xab\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\xee\x04\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\xb8\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\x1as\n\x04Time\x12\r\n\x05local\x18\x01 \x01(\x04\x12\x12\n\x05\x62lock\x18\x02 \x01(\x04H\x00\x88\x01\x01\x12\x14\n\x07genesis\x18\x03 \x01(\x04H\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\xa7\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\x1b\n\x13latest_block_height\x18\x04 \x01(\x04\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\x1d\n\x15\x65\x61rliest_block_height\x18\x07 \x01(\x04\x12\x1d\n\x15max_peer_block_height\x18\t \x01(\x04\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\xe9\x01\n\tStateSync\x12\x19\n\x11total_synced_time\x18\x01 \x01(\x04\x12\x16\n\x0eremaining_time\x18\x02 \x01(\x04\x12\x17\n\x0ftotal_snapshots\x18\x03 \x01(\r\x12\x1e\n\x16\x63hunk_process_avg_time\x18\x04 \x01(\x04\x12\x17\n\x0fsnapshot_height\x18\x05 \x01(\x04\x12\x1d\n\x15snapshot_chunks_count\x18\x06 \x01(\x04\x12\x19\n\x11\x62\x61\x63kfilled_blocks\x18\x07 \x01(\x04\x12\x1d\n\x15\x62\x61\x63kfill_blocks_total\x18\x08 \x01(\x04\x42\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\x97#\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\x12\x66\n\tgetProofs\x12+.org.dash.platform.dapi.v0.GetProofsRequest\x1a,.org.dash.platform.dapi.v0.GetProofsResponse\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\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\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.GetStatusResponseb\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=28325, - serialized_end=28415, + serialized_start=30834, + serialized_end=30924, ) _sym_db.RegisterEnumDescriptor(_KEYPURPOSE) @@ -125,8 +125,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=7011, - serialized_end=7091, + serialized_start=9520, + serialized_end=9600, ) _sym_db.RegisterEnumDescriptor(_GETPROOFSREQUEST_GETPROOFSREQUESTV0_DOCUMENTREQUEST_DOCUMENTCONTESTEDSTATUS) @@ -160,8 +160,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=7241, - serialized_end=7303, + serialized_start=9750, + serialized_end=9812, ) _sym_db.RegisterEnumDescriptor(_GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYREQUEST_TYPE) @@ -190,8 +190,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=19256, - serialized_end=19329, + serialized_start=21765, + serialized_end=21838, ) _sym_db.RegisterEnumDescriptor(_GETCONTESTEDRESOURCEVOTESTATEREQUEST_GETCONTESTEDRESOURCEVOTESTATEREQUESTV0_RESULTTYPE) @@ -220,8 +220,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=20243, - serialized_end=20322, + serialized_start=22752, + serialized_end=22831, ) _sym_db.RegisterEnumDescriptor(_GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_FINISHEDVOTEINFO_FINISHEDVOTEOUTCOME) @@ -250,8 +250,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=23951, - serialized_end=24012, + serialized_start=26460, + serialized_end=26521, ) _sym_db.RegisterEnumDescriptor(_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_RESOURCEVOTECHOICE_VOTECHOICETYPE) @@ -2106,6 +2106,617 @@ ) +_GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUESTV0 = _descriptor.Descriptor( + name='GetEvonodesProposedEpochBlocksByIdsRequestV0', + full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='epoch', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.epoch', index=0, + number=1, type=13, cpp_type=3, 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='ids', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.ids', index=1, + number=2, type=12, cpp_type=9, 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), + _descriptor.FieldDescriptor( + name='prove', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prove', index=2, + number=3, 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=6410, + serialized_end=6499, +) + +_GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST = _descriptor.Descriptor( + name='GetEvonodesProposedEpochBlocksByIdsRequest', + full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest', + 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.GetEvonodesProposedEpochBlocksByIdsRequest.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=[_GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=6233, + serialized_end=6510, +) + + +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0_EVONODEPROPOSEDBLOCKS = _descriptor.Descriptor( + name='EvonodeProposedBlocks', + full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='pro_tx_hash', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.pro_tx_hash', 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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.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=7016, + serialized_end=7075, +) + +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0_EVONODESPROPOSEDBLOCKS = _descriptor.Descriptor( + name='EvonodesProposedBlocks', + full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='evonodes_proposed_block_counts', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.evonodes_proposed_block_counts', 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=7078, + serialized_end=7274, +) + +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0 = _descriptor.Descriptor( + name='GetEvonodesProposedEpochBlocksResponseV0', + full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='evonodes_proposed_block_counts_info', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.evonodes_proposed_block_counts_info', 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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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=[_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0_EVONODEPROPOSEDBLOCKS, _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0_EVONODESPROPOSEDBLOCKS, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=6678, + serialized_end=7284, +) + +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE = _descriptor.Descriptor( + name='GetEvonodesProposedEpochBlocksResponse', + full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse', + 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.GetEvonodesProposedEpochBlocksResponse.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=[_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=6513, + serialized_end=7295, +) + + +_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0 = _descriptor.Descriptor( + name='GetEvonodesProposedEpochBlocksByRangeRequestV0', + full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='epoch', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.epoch', index=0, + number=1, type=13, cpp_type=3, 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='limit', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.limit', index=1, + number=2, type=13, cpp_type=3, 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='start_after', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.start_after', 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='start_at', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.start_at', index=3, + number=4, 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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.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=[ + _descriptor.OneofDescriptor( + name='start', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.start', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_limit', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0._limit', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=7482, + serialized_end=7642, +) + +_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST = _descriptor.Descriptor( + name='GetEvonodesProposedEpochBlocksByRangeRequest', + full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest', + 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.GetEvonodesProposedEpochBlocksByRangeRequest.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=[_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=7298, + serialized_end=7653, +) + + +_GETIDENTITIESBALANCESREQUEST_GETIDENTITIESBALANCESREQUESTV0_GETIDENTITIESBALANCESBYKNOWNIDENTITYIDS = _descriptor.Descriptor( + name='GetIdentitiesBalancesByKnownIdentityIds', + full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='identities_ids', full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.identities_ids', index=0, + number=1, type=12, cpp_type=9, 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=7993, + serialized_end=8058, +) + +_GETIDENTITIESBALANCESREQUEST_GETIDENTITIESBALANCESREQUESTV0 = _descriptor.Descriptor( + name='GetIdentitiesBalancesRequestV0', + full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='identities_ids', full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.identities_ids', 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='prove', full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prove', index=1, + number=2, 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=[_GETIDENTITIESBALANCESREQUEST_GETIDENTITIESBALANCESREQUESTV0_GETIDENTITIESBALANCESBYKNOWNIDENTITYIDS, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=7791, + serialized_end=8058, +) + +_GETIDENTITIESBALANCESREQUEST = _descriptor.Descriptor( + name='GetIdentitiesBalancesRequest', + full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest', + 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.GetIdentitiesBalancesRequest.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=[_GETIDENTITIESBALANCESREQUEST_GETIDENTITIESBALANCESREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=7656, + serialized_end=8069, +) + + +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITYBALANCE = _descriptor.Descriptor( + name='IdentityBalance', + full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='identity_id', full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.identity_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='balance', full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.balance', 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=[ + _descriptor.OneofDescriptor( + name='_balance', full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance._balance', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=8500, + serialized_end=8572, +) + +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITIESBALANCES = _descriptor.Descriptor( + name='IdentitiesBalances', + full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances', + 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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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=8575, + serialized_end=8718, +) + +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0 = _descriptor.Descriptor( + name='GetIdentitiesBalancesResponseV0', + full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='identities_balances', full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.identities_balances', 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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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=[_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITYBALANCE, _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITIESBALANCES, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=8210, + serialized_end=8728, +) + +_GETIDENTITIESBALANCESRESPONSE = _descriptor.Descriptor( + name='GetIdentitiesBalancesResponse', + full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse', + 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.GetIdentitiesBalancesResponse.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=[_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=8072, + serialized_end=8739, +) + + _GETPROOFSREQUEST_GETPROOFSREQUESTV0_DOCUMENTREQUEST = _descriptor.Descriptor( name='DocumentRequest', full_name='org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest', @@ -2162,8 +2773,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6750, - serialized_end=7091, + serialized_start=9259, + serialized_end=9600, ) _GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYREQUEST = _descriptor.Descriptor( @@ -2201,8 +2812,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7094, - serialized_end=7303, + serialized_start=9603, + serialized_end=9812, ) _GETPROOFSREQUEST_GETPROOFSREQUESTV0_CONTRACTREQUEST = _descriptor.Descriptor( @@ -2232,8 +2843,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7305, - serialized_end=7343, + serialized_start=9814, + serialized_end=9852, ) _GETPROOFSREQUEST_GETPROOFSREQUESTV0_VOTESTATUSREQUEST_CONTESTEDRESOURCEVOTESTATUSREQUEST = _descriptor.Descriptor( @@ -2291,8 +2902,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7536, - serialized_end=7689, + serialized_start=10045, + serialized_end=10198, ) _GETPROOFSREQUEST_GETPROOFSREQUESTV0_VOTESTATUSREQUEST = _descriptor.Descriptor( @@ -2327,8 +2938,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=7346, - serialized_end=7705, + serialized_start=9855, + serialized_end=10214, ) _GETPROOFSREQUEST_GETPROOFSREQUESTV0 = _descriptor.Descriptor( @@ -2379,8 +2990,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6332, - serialized_end=7705, + serialized_start=8841, + serialized_end=10214, ) _GETPROOFSREQUEST = _descriptor.Descriptor( @@ -2415,8 +3026,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=6233, - serialized_end=7716, + serialized_start=8742, + serialized_end=10225, ) @@ -2459,8 +3070,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=7821, - serialized_end=7966, + serialized_start=10330, + serialized_end=10475, ) _GETPROOFSRESPONSE = _descriptor.Descriptor( @@ -2495,8 +3106,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=7719, - serialized_end=7977, + serialized_start=10228, + serialized_end=10486, ) @@ -2534,8 +3145,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8096, - serialized_end=8149, + serialized_start=10605, + serialized_end=10658, ) _GETDATACONTRACTREQUEST = _descriptor.Descriptor( @@ -2570,8 +3181,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=7980, - serialized_end=8160, + serialized_start=10489, + serialized_end=10669, ) @@ -2621,8 +3232,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=8283, - serialized_end=8459, + serialized_start=10792, + serialized_end=10968, ) _GETDATACONTRACTRESPONSE = _descriptor.Descriptor( @@ -2657,8 +3268,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=8163, - serialized_end=8470, + serialized_start=10672, + serialized_end=10979, ) @@ -2696,8 +3307,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8592, - serialized_end=8647, + serialized_start=11101, + serialized_end=11156, ) _GETDATACONTRACTSREQUEST = _descriptor.Descriptor( @@ -2732,8 +3343,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=8473, - serialized_end=8658, + serialized_start=10982, + serialized_end=11167, ) @@ -2771,8 +3382,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8783, - serialized_end=8874, + serialized_start=11292, + serialized_end=11383, ) _GETDATACONTRACTSRESPONSE_DATACONTRACTS = _descriptor.Descriptor( @@ -2802,8 +3413,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8876, - serialized_end=8993, + serialized_start=11385, + serialized_end=11502, ) _GETDATACONTRACTSRESPONSE_GETDATACONTRACTSRESPONSEV0 = _descriptor.Descriptor( @@ -2852,8 +3463,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=8996, - serialized_end=9241, + serialized_start=11505, + serialized_end=11750, ) _GETDATACONTRACTSRESPONSE = _descriptor.Descriptor( @@ -2888,8 +3499,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=8661, - serialized_end=9252, + serialized_start=11170, + serialized_end=11761, ) @@ -2948,8 +3559,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9393, - serialized_end=9565, + serialized_start=11902, + serialized_end=12074, ) _GETDATACONTRACTHISTORYREQUEST = _descriptor.Descriptor( @@ -2984,8 +3595,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=9255, - serialized_end=9576, + serialized_start=11764, + serialized_end=12085, ) @@ -3023,8 +3634,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10016, - serialized_end=10071, + serialized_start=12525, + serialized_end=12580, ) _GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0_DATACONTRACTHISTORY = _descriptor.Descriptor( @@ -3054,8 +3665,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10074, - serialized_end=10244, + serialized_start=12583, + serialized_end=12753, ) _GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0 = _descriptor.Descriptor( @@ -3104,8 +3715,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=9720, - serialized_end=10254, + serialized_start=12229, + serialized_end=12763, ) _GETDATACONTRACTHISTORYRESPONSE = _descriptor.Descriptor( @@ -3140,8 +3751,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=9579, - serialized_end=10265, + serialized_start=12088, + serialized_end=12774, ) @@ -3226,8 +3837,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10376, - serialized_end=10563, + serialized_start=12885, + serialized_end=13072, ) _GETDOCUMENTSREQUEST = _descriptor.Descriptor( @@ -3262,8 +3873,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10268, - serialized_end=10574, + serialized_start=12777, + serialized_end=13083, ) @@ -3294,8 +3905,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10931, - serialized_end=10961, + serialized_start=13440, + serialized_end=13470, ) _GETDOCUMENTSRESPONSE_GETDOCUMENTSRESPONSEV0 = _descriptor.Descriptor( @@ -3344,8 +3955,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10688, - serialized_end=10971, + serialized_start=13197, + serialized_end=13480, ) _GETDOCUMENTSRESPONSE = _descriptor.Descriptor( @@ -3380,8 +3991,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10577, - serialized_end=10982, + serialized_start=13086, + serialized_end=13491, ) @@ -3419,8 +4030,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11134, - serialized_end=11211, + serialized_start=13643, + serialized_end=13720, ) _GETIDENTITYBYPUBLICKEYHASHREQUEST = _descriptor.Descriptor( @@ -3455,8 +4066,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10985, - serialized_end=11222, + serialized_start=13494, + serialized_end=13731, ) @@ -3506,8 +4117,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11378, - serialized_end=11560, + serialized_start=13887, + serialized_end=14069, ) _GETIDENTITYBYPUBLICKEYHASHRESPONSE = _descriptor.Descriptor( @@ -3542,8 +4153,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11225, - serialized_end=11571, + serialized_start=13734, + serialized_end=14080, ) @@ -3581,8 +4192,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11729, - serialized_end=11814, + serialized_start=14238, + serialized_end=14323, ) _WAITFORSTATETRANSITIONRESULTREQUEST = _descriptor.Descriptor( @@ -3617,8 +4228,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11574, - serialized_end=11825, + serialized_start=14083, + serialized_end=14334, ) @@ -3668,8 +4279,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11987, - serialized_end=12226, + serialized_start=14496, + serialized_end=14735, ) _WAITFORSTATETRANSITIONRESULTRESPONSE = _descriptor.Descriptor( @@ -3704,8 +4315,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11828, - serialized_end=12237, + serialized_start=14337, + serialized_end=14746, ) @@ -3743,8 +4354,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12365, - serialized_end=12425, + serialized_start=14874, + serialized_end=14934, ) _GETCONSENSUSPARAMSREQUEST = _descriptor.Descriptor( @@ -3779,8 +4390,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12240, - serialized_end=12436, + serialized_start=14749, + serialized_end=14945, ) @@ -3825,8 +4436,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12567, - serialized_end=12647, + serialized_start=15076, + serialized_end=15156, ) _GETCONSENSUSPARAMSRESPONSE_CONSENSUSPARAMSEVIDENCE = _descriptor.Descriptor( @@ -3870,8 +4481,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12649, - serialized_end=12747, + serialized_start=15158, + serialized_end=15256, ) _GETCONSENSUSPARAMSRESPONSE_GETCONSENSUSPARAMSRESPONSEV0 = _descriptor.Descriptor( @@ -3908,8 +4519,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12750, - serialized_end=12968, + serialized_start=15259, + serialized_end=15477, ) _GETCONSENSUSPARAMSRESPONSE = _descriptor.Descriptor( @@ -3944,8 +4555,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12439, - serialized_end=12979, + serialized_start=14948, + serialized_end=15488, ) @@ -3976,8 +4587,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13143, - serialized_end=13199, + serialized_start=15652, + serialized_end=15708, ) _GETPROTOCOLVERSIONUPGRADESTATEREQUEST = _descriptor.Descriptor( @@ -4012,8 +4623,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12982, - serialized_end=13210, + serialized_start=15491, + serialized_end=15719, ) @@ -4044,8 +4655,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13675, - serialized_end=13825, + serialized_start=16184, + serialized_end=16334, ) _GETPROTOCOLVERSIONUPGRADESTATERESPONSE_GETPROTOCOLVERSIONUPGRADESTATERESPONSEV0_VERSIONENTRY = _descriptor.Descriptor( @@ -4082,8 +4693,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13827, - serialized_end=13885, + serialized_start=16336, + serialized_end=16394, ) _GETPROTOCOLVERSIONUPGRADESTATERESPONSE_GETPROTOCOLVERSIONUPGRADESTATERESPONSEV0 = _descriptor.Descriptor( @@ -4132,8 +4743,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13378, - serialized_end=13895, + serialized_start=15887, + serialized_end=16404, ) _GETPROTOCOLVERSIONUPGRADESTATERESPONSE = _descriptor.Descriptor( @@ -4168,8 +4779,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13213, - serialized_end=13906, + serialized_start=15722, + serialized_end=16415, ) @@ -4214,8 +4825,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14086, - serialized_end=14189, + serialized_start=16595, + serialized_end=16698, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSREQUEST = _descriptor.Descriptor( @@ -4250,8 +4861,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13909, - serialized_end=14200, + serialized_start=16418, + serialized_end=16709, ) @@ -4282,8 +4893,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14703, - serialized_end=14878, + serialized_start=17212, + serialized_end=17387, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSEV0_VERSIONSIGNAL = _descriptor.Descriptor( @@ -4320,8 +4931,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14880, - serialized_end=14933, + serialized_start=17389, + serialized_end=17442, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSEV0 = _descriptor.Descriptor( @@ -4370,8 +4981,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=14384, - serialized_end=14943, + serialized_start=16893, + serialized_end=17452, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE = _descriptor.Descriptor( @@ -4406,8 +5017,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=14203, - serialized_end=14954, + serialized_start=16712, + serialized_end=17463, ) @@ -4459,8 +5070,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15067, - serialized_end=15191, + serialized_start=17576, + serialized_end=17700, ) _GETEPOCHSINFOREQUEST = _descriptor.Descriptor( @@ -4495,8 +5106,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=14957, - serialized_end=15202, + serialized_start=17466, + serialized_end=17711, ) @@ -4527,8 +5138,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15563, - serialized_end=15680, + serialized_start=18072, + serialized_end=18189, ) _GETEPOCHSINFORESPONSE_GETEPOCHSINFORESPONSEV0_EPOCHINFO = _descriptor.Descriptor( @@ -4593,8 +5204,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15683, - serialized_end=15841, + serialized_start=18192, + serialized_end=18350, ) _GETEPOCHSINFORESPONSE_GETEPOCHSINFORESPONSEV0 = _descriptor.Descriptor( @@ -4643,8 +5254,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=15319, - serialized_end=15851, + serialized_start=17828, + serialized_end=18360, ) _GETEPOCHSINFORESPONSE = _descriptor.Descriptor( @@ -4679,8 +5290,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=15205, - serialized_end=15862, + serialized_start=17714, + serialized_end=18371, ) @@ -4718,8 +5329,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=16357, - serialized_end=16426, + serialized_start=18866, + serialized_end=18935, ) _GETCONTESTEDRESOURCESREQUEST_GETCONTESTEDRESOURCESREQUESTV0 = _descriptor.Descriptor( @@ -4815,8 +5426,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=16000, - serialized_end=16460, + serialized_start=18509, + serialized_end=18969, ) _GETCONTESTEDRESOURCESREQUEST = _descriptor.Descriptor( @@ -4851,8 +5462,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=15865, - serialized_end=16471, + serialized_start=18374, + serialized_end=18980, ) @@ -4883,8 +5494,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=16913, - serialized_end=16973, + serialized_start=19422, + serialized_end=19482, ) _GETCONTESTEDRESOURCESRESPONSE_GETCONTESTEDRESOURCESRESPONSEV0 = _descriptor.Descriptor( @@ -4933,8 +5544,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=16612, - serialized_end=16983, + serialized_start=19121, + serialized_end=19492, ) _GETCONTESTEDRESOURCESRESPONSE = _descriptor.Descriptor( @@ -4969,8 +5580,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=16474, - serialized_end=16994, + serialized_start=18983, + serialized_end=19503, ) @@ -5008,8 +5619,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17507, - serialized_end=17576, + serialized_start=20016, + serialized_end=20085, ) _GETVOTEPOLLSBYENDDATEREQUEST_GETVOTEPOLLSBYENDDATEREQUESTV0_ENDATTIMEINFO = _descriptor.Descriptor( @@ -5046,8 +5657,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17578, - serialized_end=17641, + serialized_start=20087, + serialized_end=20150, ) _GETVOTEPOLLSBYENDDATEREQUEST_GETVOTEPOLLSBYENDDATEREQUESTV0 = _descriptor.Descriptor( @@ -5132,8 +5743,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=17132, - serialized_end=17700, + serialized_start=19641, + serialized_end=20209, ) _GETVOTEPOLLSBYENDDATEREQUEST = _descriptor.Descriptor( @@ -5168,8 +5779,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=16997, - serialized_end=17711, + serialized_start=19506, + serialized_end=20220, ) @@ -5207,8 +5818,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18160, - serialized_end=18242, + serialized_start=20669, + serialized_end=20751, ) _GETVOTEPOLLSBYENDDATERESPONSE_GETVOTEPOLLSBYENDDATERESPONSEV0_SERIALIZEDVOTEPOLLSBYTIMESTAMPS = _descriptor.Descriptor( @@ -5245,8 +5856,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18245, - serialized_end=18460, + serialized_start=20754, + serialized_end=20969, ) _GETVOTEPOLLSBYENDDATERESPONSE_GETVOTEPOLLSBYENDDATERESPONSEV0 = _descriptor.Descriptor( @@ -5295,8 +5906,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=17852, - serialized_end=18470, + serialized_start=20361, + serialized_end=20979, ) _GETVOTEPOLLSBYENDDATERESPONSE = _descriptor.Descriptor( @@ -5331,8 +5942,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=17714, - serialized_end=18481, + serialized_start=20223, + serialized_end=20990, ) @@ -5370,8 +5981,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=19170, - serialized_end=19254, + serialized_start=21679, + serialized_end=21763, ) _GETCONTESTEDRESOURCEVOTESTATEREQUEST_GETCONTESTEDRESOURCEVOTESTATEREQUESTV0 = _descriptor.Descriptor( @@ -5468,8 +6079,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=18643, - serialized_end=19368, + serialized_start=21152, + serialized_end=21877, ) _GETCONTESTEDRESOURCEVOTESTATEREQUEST = _descriptor.Descriptor( @@ -5504,8 +6115,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=18484, - serialized_end=19379, + serialized_start=20993, + serialized_end=21888, ) @@ -5577,8 +6188,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=19879, - serialized_end=20345, + serialized_start=22388, + serialized_end=22854, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_CONTESTEDRESOURCECONTENDERS = _descriptor.Descriptor( @@ -5644,8 +6255,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=20348, - serialized_end=20800, + serialized_start=22857, + serialized_end=23309, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_CONTENDER = _descriptor.Descriptor( @@ -5699,8 +6310,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=20802, - serialized_end=20909, + serialized_start=23311, + serialized_end=23418, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0 = _descriptor.Descriptor( @@ -5749,8 +6360,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=19544, - serialized_end=20919, + serialized_start=22053, + serialized_end=23428, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE = _descriptor.Descriptor( @@ -5785,8 +6396,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=19382, - serialized_end=20930, + serialized_start=21891, + serialized_end=23439, ) @@ -5824,8 +6435,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=19170, - serialized_end=19254, + serialized_start=21679, + serialized_end=21763, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST_GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUESTV0 = _descriptor.Descriptor( @@ -5921,8 +6532,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=21117, - serialized_end=21647, + serialized_start=23626, + serialized_end=24156, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST = _descriptor.Descriptor( @@ -5957,8 +6568,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=20933, - serialized_end=21658, + serialized_start=23442, + serialized_end=24167, ) @@ -5996,8 +6607,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=22198, - serialized_end=22265, + serialized_start=24707, + serialized_end=24774, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE_GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSEV0 = _descriptor.Descriptor( @@ -6046,8 +6657,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=21848, - serialized_end=22275, + serialized_start=24357, + serialized_end=24784, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE = _descriptor.Descriptor( @@ -6082,8 +6693,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=21661, - serialized_end=22286, + serialized_start=24170, + serialized_end=24795, ) @@ -6121,8 +6732,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=22835, - serialized_end=22932, + serialized_start=25344, + serialized_end=25441, ) _GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST_GETCONTESTEDRESOURCEIDENTITYVOTESREQUESTV0 = _descriptor.Descriptor( @@ -6192,8 +6803,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=22460, - serialized_end=22963, + serialized_start=24969, + serialized_end=25472, ) _GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST = _descriptor.Descriptor( @@ -6228,8 +6839,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=22289, - serialized_end=22974, + serialized_start=24798, + serialized_end=25483, ) @@ -6267,8 +6878,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=23477, - serialized_end=23724, + serialized_start=25986, + serialized_end=26233, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_RESOURCEVOTECHOICE = _descriptor.Descriptor( @@ -6311,8 +6922,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=23727, - serialized_end=24028, + serialized_start=26236, + serialized_end=26537, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_CONTESTEDRESOURCEIDENTITYVOTE = _descriptor.Descriptor( @@ -6363,8 +6974,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=24031, - serialized_end=24308, + serialized_start=26540, + serialized_end=26817, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0 = _descriptor.Descriptor( @@ -6413,8 +7024,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=23151, - serialized_end=24318, + serialized_start=25660, + serialized_end=26827, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE = _descriptor.Descriptor( @@ -6449,8 +7060,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=22977, - serialized_end=24329, + serialized_start=25486, + serialized_end=26838, ) @@ -6488,8 +7099,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=24493, - serialized_end=24561, + serialized_start=27002, + serialized_end=27070, ) _GETPREFUNDEDSPECIALIZEDBALANCEREQUEST = _descriptor.Descriptor( @@ -6524,8 +7135,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=24332, - serialized_end=24572, + serialized_start=26841, + serialized_end=27081, ) @@ -6575,8 +7186,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=24740, - serialized_end=24925, + serialized_start=27249, + serialized_end=27434, ) _GETPREFUNDEDSPECIALIZEDBALANCERESPONSE = _descriptor.Descriptor( @@ -6611,8 +7222,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=24575, - serialized_end=24936, + serialized_start=27084, + serialized_end=27445, ) @@ -6643,8 +7254,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=25085, - serialized_end=25136, + serialized_start=27594, + serialized_end=27645, ) _GETTOTALCREDITSINPLATFORMREQUEST = _descriptor.Descriptor( @@ -6679,8 +7290,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=24939, - serialized_end=25147, + serialized_start=27448, + serialized_end=27656, ) @@ -6730,8 +7341,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=25300, - serialized_end=25480, + serialized_start=27809, + serialized_end=27989, ) _GETTOTALCREDITSINPLATFORMRESPONSE = _descriptor.Descriptor( @@ -6766,8 +7377,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=25150, - serialized_end=25491, + serialized_start=27659, + serialized_end=28000, ) @@ -6812,8 +7423,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=25610, - serialized_end=25679, + serialized_start=28119, + serialized_end=28188, ) _GETPATHELEMENTSREQUEST = _descriptor.Descriptor( @@ -6848,8 +7459,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=25494, - serialized_end=25690, + serialized_start=28003, + serialized_end=28199, ) @@ -6880,8 +7491,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=26063, - serialized_end=26091, + serialized_start=28572, + serialized_end=28600, ) _GETPATHELEMENTSRESPONSE_GETPATHELEMENTSRESPONSEV0 = _descriptor.Descriptor( @@ -6930,8 +7541,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=25813, - serialized_end=26101, + serialized_start=28322, + serialized_end=28610, ) _GETPATHELEMENTSRESPONSE = _descriptor.Descriptor( @@ -6966,8 +7577,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=25693, - serialized_end=26112, + serialized_start=28202, + serialized_end=28621, ) @@ -6991,8 +7602,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=26213, - serialized_end=26233, + serialized_start=28722, + serialized_end=28742, ) _GETSTATUSREQUEST = _descriptor.Descriptor( @@ -7027,8 +7638,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=26115, - serialized_end=26244, + serialized_start=28624, + serialized_end=28753, ) @@ -7083,8 +7694,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27121, - serialized_end=27215, + serialized_start=29630, + serialized_end=29724, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL_TENDERDASH = _descriptor.Descriptor( @@ -7121,8 +7732,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=27448, - serialized_end=27488, + serialized_start=29957, + serialized_end=29997, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL_DRIVE = _descriptor.Descriptor( @@ -7159,8 +7770,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=27490, - serialized_end=27530, + serialized_start=29999, + serialized_end=30039, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL = _descriptor.Descriptor( @@ -7197,8 +7808,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=27218, - serialized_end=27530, + serialized_start=29727, + serialized_end=30039, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION = _descriptor.Descriptor( @@ -7235,8 +7846,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=26908, - serialized_end=27530, + serialized_start=29417, + serialized_end=30039, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_TIME = _descriptor.Descriptor( @@ -7302,8 +7913,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27532, - serialized_end=27647, + serialized_start=30041, + serialized_end=30156, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_NODE = _descriptor.Descriptor( @@ -7345,8 +7956,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27649, - serialized_end=27709, + serialized_start=30158, + serialized_end=30218, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_CHAIN = _descriptor.Descriptor( @@ -7437,8 +8048,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27712, - serialized_end=28007, + serialized_start=30221, + serialized_end=30516, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_NETWORK = _descriptor.Descriptor( @@ -7482,8 +8093,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=28009, - serialized_end=28076, + serialized_start=30518, + serialized_end=30585, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_STATESYNC = _descriptor.Descriptor( @@ -7562,8 +8173,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=28079, - serialized_end=28312, + serialized_start=30588, + serialized_end=30821, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0 = _descriptor.Descriptor( @@ -7628,8 +8239,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=26349, - serialized_end=28312, + serialized_start=28858, + serialized_end=30821, ) _GETSTATUSRESPONSE = _descriptor.Descriptor( @@ -7664,8 +8275,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=26247, - serialized_end=28323, + serialized_start=28756, + serialized_end=30832, ) _GETIDENTITYREQUEST_GETIDENTITYREQUESTV0.containing_type = _GETIDENTITYREQUEST @@ -7831,6 +8442,69 @@ _GETIDENTITIESCONTRACTKEYSRESPONSE.oneofs_by_name['version'].fields.append( _GETIDENTITIESCONTRACTKEYSRESPONSE.fields_by_name['v0']) _GETIDENTITIESCONTRACTKEYSRESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITIESCONTRACTKEYSRESPONSE.oneofs_by_name['version'] +_GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUESTV0.containing_type = _GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST +_GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST.fields_by_name['v0'].message_type = _GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUESTV0 +_GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST.oneofs_by_name['version'].fields.append( + _GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST.fields_by_name['v0']) +_GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST.fields_by_name['v0'].containing_oneof = _GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST.oneofs_by_name['version'] +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0_EVONODEPROPOSEDBLOCKS.containing_type = _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0 +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0_EVONODESPROPOSEDBLOCKS.fields_by_name['evonodes_proposed_block_counts'].message_type = _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0_EVONODEPROPOSEDBLOCKS +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0_EVONODESPROPOSEDBLOCKS.containing_type = _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0 +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0.fields_by_name['evonodes_proposed_block_counts_info'].message_type = _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0_EVONODESPROPOSEDBLOCKS +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0.containing_type = _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0.fields_by_name['evonodes_proposed_block_counts_info']) +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0.fields_by_name['evonodes_proposed_block_counts_info'].containing_oneof = _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0.oneofs_by_name['result'] +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0.fields_by_name['proof']) +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0.oneofs_by_name['result'] +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE.fields_by_name['v0'].message_type = _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0 +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE.oneofs_by_name['version'].fields.append( + _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE.fields_by_name['v0']) +_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE.fields_by_name['v0'].containing_oneof = _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE.oneofs_by_name['version'] +_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0.containing_type = _GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST +_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0.oneofs_by_name['start'].fields.append( + _GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0.fields_by_name['start_after']) +_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0.fields_by_name['start_after'].containing_oneof = _GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0.oneofs_by_name['start'] +_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0.oneofs_by_name['start'].fields.append( + _GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0.fields_by_name['start_at']) +_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0.fields_by_name['start_at'].containing_oneof = _GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0.oneofs_by_name['start'] +_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0.oneofs_by_name['_limit'].fields.append( + _GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0.fields_by_name['limit']) +_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0.fields_by_name['limit'].containing_oneof = _GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0.oneofs_by_name['_limit'] +_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST.fields_by_name['v0'].message_type = _GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0 +_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST.oneofs_by_name['version'].fields.append( + _GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST.fields_by_name['v0']) +_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST.fields_by_name['v0'].containing_oneof = _GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST.oneofs_by_name['version'] +_GETIDENTITIESBALANCESREQUEST_GETIDENTITIESBALANCESREQUESTV0_GETIDENTITIESBALANCESBYKNOWNIDENTITYIDS.containing_type = _GETIDENTITIESBALANCESREQUEST_GETIDENTITIESBALANCESREQUESTV0 +_GETIDENTITIESBALANCESREQUEST_GETIDENTITIESBALANCESREQUESTV0.fields_by_name['identities_ids'].message_type = _GETIDENTITIESBALANCESREQUEST_GETIDENTITIESBALANCESREQUESTV0_GETIDENTITIESBALANCESBYKNOWNIDENTITYIDS +_GETIDENTITIESBALANCESREQUEST_GETIDENTITIESBALANCESREQUESTV0.containing_type = _GETIDENTITIESBALANCESREQUEST +_GETIDENTITIESBALANCESREQUEST.fields_by_name['v0'].message_type = _GETIDENTITIESBALANCESREQUEST_GETIDENTITIESBALANCESREQUESTV0 +_GETIDENTITIESBALANCESREQUEST.oneofs_by_name['version'].fields.append( + _GETIDENTITIESBALANCESREQUEST.fields_by_name['v0']) +_GETIDENTITIESBALANCESREQUEST.fields_by_name['v0'].containing_oneof = _GETIDENTITIESBALANCESREQUEST.oneofs_by_name['version'] +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITYBALANCE.containing_type = _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0 +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITYBALANCE.oneofs_by_name['_balance'].fields.append( + _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITYBALANCE.fields_by_name['balance']) +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITYBALANCE.fields_by_name['balance'].containing_oneof = _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITYBALANCE.oneofs_by_name['_balance'] +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITIESBALANCES.fields_by_name['entries'].message_type = _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITYBALANCE +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITIESBALANCES.containing_type = _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0 +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0.fields_by_name['identities_balances'].message_type = _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITIESBALANCES +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0.containing_type = _GETIDENTITIESBALANCESRESPONSE +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0.fields_by_name['identities_balances']) +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0.fields_by_name['identities_balances'].containing_oneof = _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0.oneofs_by_name['result'] +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0.fields_by_name['proof']) +_GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0.oneofs_by_name['result'] +_GETIDENTITIESBALANCESRESPONSE.fields_by_name['v0'].message_type = _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0 +_GETIDENTITIESBALANCESRESPONSE.oneofs_by_name['version'].fields.append( + _GETIDENTITIESBALANCESRESPONSE.fields_by_name['v0']) +_GETIDENTITIESBALANCESRESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITIESBALANCESRESPONSE.oneofs_by_name['version'] _GETPROOFSREQUEST_GETPROOFSREQUESTV0_DOCUMENTREQUEST.fields_by_name['document_contested_status'].enum_type = _GETPROOFSREQUEST_GETPROOFSREQUESTV0_DOCUMENTREQUEST_DOCUMENTCONTESTEDSTATUS _GETPROOFSREQUEST_GETPROOFSREQUESTV0_DOCUMENTREQUEST.containing_type = _GETPROOFSREQUEST_GETPROOFSREQUESTV0 _GETPROOFSREQUEST_GETPROOFSREQUESTV0_DOCUMENTREQUEST_DOCUMENTCONTESTEDSTATUS.containing_type = _GETPROOFSREQUEST_GETPROOFSREQUESTV0_DOCUMENTREQUEST @@ -8387,6 +9061,11 @@ DESCRIPTOR.message_types_by_name['GetIdentityKeysResponse'] = _GETIDENTITYKEYSRESPONSE DESCRIPTOR.message_types_by_name['GetIdentitiesContractKeysRequest'] = _GETIDENTITIESCONTRACTKEYSREQUEST DESCRIPTOR.message_types_by_name['GetIdentitiesContractKeysResponse'] = _GETIDENTITIESCONTRACTKEYSRESPONSE +DESCRIPTOR.message_types_by_name['GetEvonodesProposedEpochBlocksByIdsRequest'] = _GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST +DESCRIPTOR.message_types_by_name['GetEvonodesProposedEpochBlocksResponse'] = _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE +DESCRIPTOR.message_types_by_name['GetEvonodesProposedEpochBlocksByRangeRequest'] = _GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST +DESCRIPTOR.message_types_by_name['GetIdentitiesBalancesRequest'] = _GETIDENTITIESBALANCESREQUEST +DESCRIPTOR.message_types_by_name['GetIdentitiesBalancesResponse'] = _GETIDENTITIESBALANCESRESPONSE DESCRIPTOR.message_types_by_name['GetProofsRequest'] = _GETPROOFSREQUEST DESCRIPTOR.message_types_by_name['GetProofsResponse'] = _GETPROOFSRESPONSE DESCRIPTOR.message_types_by_name['GetDataContractRequest'] = _GETDATACONTRACTREQUEST @@ -8766,6 +9445,121 @@ _sym_db.RegisterMessage(GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys) _sym_db.RegisterMessage(GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys) +GetEvonodesProposedEpochBlocksByIdsRequest = _reflection.GeneratedProtocolMessageType('GetEvonodesProposedEpochBlocksByIdsRequest', (_message.Message,), { + + 'GetEvonodesProposedEpochBlocksByIdsRequestV0' : _reflection.GeneratedProtocolMessageType('GetEvonodesProposedEpochBlocksByIdsRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0) + }) + , + 'DESCRIPTOR' : _GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest) + }) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksByIdsRequest) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0) + +GetEvonodesProposedEpochBlocksResponse = _reflection.GeneratedProtocolMessageType('GetEvonodesProposedEpochBlocksResponse', (_message.Message,), { + + 'GetEvonodesProposedEpochBlocksResponseV0' : _reflection.GeneratedProtocolMessageType('GetEvonodesProposedEpochBlocksResponseV0', (_message.Message,), { + + 'EvonodeProposedBlocks' : _reflection.GeneratedProtocolMessageType('EvonodeProposedBlocks', (_message.Message,), { + 'DESCRIPTOR' : _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0_EVONODEPROPOSEDBLOCKS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks) + }) + , + + 'EvonodesProposedBlocks' : _reflection.GeneratedProtocolMessageType('EvonodesProposedBlocks', (_message.Message,), { + 'DESCRIPTOR' : _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0_EVONODESPROPOSEDBLOCKS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks) + }) + , + 'DESCRIPTOR' : _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0) + }) + , + 'DESCRIPTOR' : _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse) + }) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksResponse) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks) + +GetEvonodesProposedEpochBlocksByRangeRequest = _reflection.GeneratedProtocolMessageType('GetEvonodesProposedEpochBlocksByRangeRequest', (_message.Message,), { + + 'GetEvonodesProposedEpochBlocksByRangeRequestV0' : _reflection.GeneratedProtocolMessageType('GetEvonodesProposedEpochBlocksByRangeRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0) + }) + , + 'DESCRIPTOR' : _GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest) + }) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksByRangeRequest) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0) + +GetIdentitiesBalancesRequest = _reflection.GeneratedProtocolMessageType('GetIdentitiesBalancesRequest', (_message.Message,), { + + 'GetIdentitiesBalancesRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentitiesBalancesRequestV0', (_message.Message,), { + + 'GetIdentitiesBalancesByKnownIdentityIds' : _reflection.GeneratedProtocolMessageType('GetIdentitiesBalancesByKnownIdentityIds', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITIESBALANCESREQUEST_GETIDENTITIESBALANCESREQUESTV0_GETIDENTITIESBALANCESBYKNOWNIDENTITYIDS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds) + }) + , + 'DESCRIPTOR' : _GETIDENTITIESBALANCESREQUEST_GETIDENTITIESBALANCESREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITIESBALANCESREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest) + }) +_sym_db.RegisterMessage(GetIdentitiesBalancesRequest) +_sym_db.RegisterMessage(GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0) +_sym_db.RegisterMessage(GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds) + +GetIdentitiesBalancesResponse = _reflection.GeneratedProtocolMessageType('GetIdentitiesBalancesResponse', (_message.Message,), { + + 'GetIdentitiesBalancesResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentitiesBalancesResponseV0', (_message.Message,), { + + 'IdentityBalance' : _reflection.GeneratedProtocolMessageType('IdentityBalance', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITYBALANCE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance) + }) + , + + 'IdentitiesBalances' : _reflection.GeneratedProtocolMessageType('IdentitiesBalances', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITIESBALANCES, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances) + }) + , + 'DESCRIPTOR' : _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITIESBALANCESRESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse) + }) +_sym_db.RegisterMessage(GetIdentitiesBalancesResponse) +_sym_db.RegisterMessage(GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0) +_sym_db.RegisterMessage(GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance) +_sym_db.RegisterMessage(GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances) + GetProofsRequest = _reflection.GeneratedProtocolMessageType('GetProofsRequest', (_message.Message,), { 'GetProofsRequestV0' : _reflection.GeneratedProtocolMessageType('GetProofsRequestV0', (_message.Message,), { @@ -9737,8 +10531,8 @@ index=0, serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_start=28418, - serialized_end=32420, + serialized_start=30927, + serialized_end=35430, methods=[ _descriptor.MethodDescriptor( name='broadcastStateTransition', @@ -9810,20 +10604,50 @@ serialized_options=None, create_key=_descriptor._internal_create_key, ), + _descriptor.MethodDescriptor( + name='getIdentitiesBalances', + full_name='org.dash.platform.dapi.v0.Platform.getIdentitiesBalances', + index=7, + containing_service=None, + input_type=_GETIDENTITIESBALANCESREQUEST, + output_type=_GETIDENTITIESBALANCESRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), _descriptor.MethodDescriptor( name='getIdentityBalanceAndRevision', full_name='org.dash.platform.dapi.v0.Platform.getIdentityBalanceAndRevision', - index=7, + index=8, containing_service=None, input_type=_GETIDENTITYBALANCEANDREVISIONREQUEST, output_type=_GETIDENTITYBALANCEANDREVISIONRESPONSE, serialized_options=None, create_key=_descriptor._internal_create_key, ), + _descriptor.MethodDescriptor( + name='getEvonodesProposedEpochBlocksByIds', + full_name='org.dash.platform.dapi.v0.Platform.getEvonodesProposedEpochBlocksByIds', + index=9, + containing_service=None, + input_type=_GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST, + output_type=_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='getEvonodesProposedEpochBlocksByRange', + full_name='org.dash.platform.dapi.v0.Platform.getEvonodesProposedEpochBlocksByRange', + index=10, + containing_service=None, + input_type=_GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST, + output_type=_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), _descriptor.MethodDescriptor( name='getProofs', full_name='org.dash.platform.dapi.v0.Platform.getProofs', - index=8, + index=11, containing_service=None, input_type=_GETPROOFSREQUEST, output_type=_GETPROOFSRESPONSE, @@ -9833,7 +10657,7 @@ _descriptor.MethodDescriptor( name='getDataContract', full_name='org.dash.platform.dapi.v0.Platform.getDataContract', - index=9, + index=12, containing_service=None, input_type=_GETDATACONTRACTREQUEST, output_type=_GETDATACONTRACTRESPONSE, @@ -9843,7 +10667,7 @@ _descriptor.MethodDescriptor( name='getDataContractHistory', full_name='org.dash.platform.dapi.v0.Platform.getDataContractHistory', - index=10, + index=13, containing_service=None, input_type=_GETDATACONTRACTHISTORYREQUEST, output_type=_GETDATACONTRACTHISTORYRESPONSE, @@ -9853,7 +10677,7 @@ _descriptor.MethodDescriptor( name='getDataContracts', full_name='org.dash.platform.dapi.v0.Platform.getDataContracts', - index=11, + index=14, containing_service=None, input_type=_GETDATACONTRACTSREQUEST, output_type=_GETDATACONTRACTSRESPONSE, @@ -9863,7 +10687,7 @@ _descriptor.MethodDescriptor( name='getDocuments', full_name='org.dash.platform.dapi.v0.Platform.getDocuments', - index=12, + index=15, containing_service=None, input_type=_GETDOCUMENTSREQUEST, output_type=_GETDOCUMENTSRESPONSE, @@ -9873,7 +10697,7 @@ _descriptor.MethodDescriptor( name='getIdentityByPublicKeyHash', full_name='org.dash.platform.dapi.v0.Platform.getIdentityByPublicKeyHash', - index=13, + index=16, containing_service=None, input_type=_GETIDENTITYBYPUBLICKEYHASHREQUEST, output_type=_GETIDENTITYBYPUBLICKEYHASHRESPONSE, @@ -9883,7 +10707,7 @@ _descriptor.MethodDescriptor( name='waitForStateTransitionResult', full_name='org.dash.platform.dapi.v0.Platform.waitForStateTransitionResult', - index=14, + index=17, containing_service=None, input_type=_WAITFORSTATETRANSITIONRESULTREQUEST, output_type=_WAITFORSTATETRANSITIONRESULTRESPONSE, @@ -9893,7 +10717,7 @@ _descriptor.MethodDescriptor( name='getConsensusParams', full_name='org.dash.platform.dapi.v0.Platform.getConsensusParams', - index=15, + index=18, containing_service=None, input_type=_GETCONSENSUSPARAMSREQUEST, output_type=_GETCONSENSUSPARAMSRESPONSE, @@ -9903,7 +10727,7 @@ _descriptor.MethodDescriptor( name='getProtocolVersionUpgradeState', full_name='org.dash.platform.dapi.v0.Platform.getProtocolVersionUpgradeState', - index=16, + index=19, containing_service=None, input_type=_GETPROTOCOLVERSIONUPGRADESTATEREQUEST, output_type=_GETPROTOCOLVERSIONUPGRADESTATERESPONSE, @@ -9913,7 +10737,7 @@ _descriptor.MethodDescriptor( name='getProtocolVersionUpgradeVoteStatus', full_name='org.dash.platform.dapi.v0.Platform.getProtocolVersionUpgradeVoteStatus', - index=17, + index=20, containing_service=None, input_type=_GETPROTOCOLVERSIONUPGRADEVOTESTATUSREQUEST, output_type=_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE, @@ -9923,7 +10747,7 @@ _descriptor.MethodDescriptor( name='getEpochsInfo', full_name='org.dash.platform.dapi.v0.Platform.getEpochsInfo', - index=18, + index=21, containing_service=None, input_type=_GETEPOCHSINFOREQUEST, output_type=_GETEPOCHSINFORESPONSE, @@ -9933,7 +10757,7 @@ _descriptor.MethodDescriptor( name='getContestedResources', full_name='org.dash.platform.dapi.v0.Platform.getContestedResources', - index=19, + index=22, containing_service=None, input_type=_GETCONTESTEDRESOURCESREQUEST, output_type=_GETCONTESTEDRESOURCESRESPONSE, @@ -9943,7 +10767,7 @@ _descriptor.MethodDescriptor( name='getContestedResourceVoteState', full_name='org.dash.platform.dapi.v0.Platform.getContestedResourceVoteState', - index=20, + index=23, containing_service=None, input_type=_GETCONTESTEDRESOURCEVOTESTATEREQUEST, output_type=_GETCONTESTEDRESOURCEVOTESTATERESPONSE, @@ -9953,7 +10777,7 @@ _descriptor.MethodDescriptor( name='getContestedResourceVotersForIdentity', full_name='org.dash.platform.dapi.v0.Platform.getContestedResourceVotersForIdentity', - index=21, + index=24, containing_service=None, input_type=_GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST, output_type=_GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE, @@ -9963,7 +10787,7 @@ _descriptor.MethodDescriptor( name='getContestedResourceIdentityVotes', full_name='org.dash.platform.dapi.v0.Platform.getContestedResourceIdentityVotes', - index=22, + index=25, containing_service=None, input_type=_GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST, output_type=_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE, @@ -9973,7 +10797,7 @@ _descriptor.MethodDescriptor( name='getVotePollsByEndDate', full_name='org.dash.platform.dapi.v0.Platform.getVotePollsByEndDate', - index=23, + index=26, containing_service=None, input_type=_GETVOTEPOLLSBYENDDATEREQUEST, output_type=_GETVOTEPOLLSBYENDDATERESPONSE, @@ -9983,7 +10807,7 @@ _descriptor.MethodDescriptor( name='getPrefundedSpecializedBalance', full_name='org.dash.platform.dapi.v0.Platform.getPrefundedSpecializedBalance', - index=24, + index=27, containing_service=None, input_type=_GETPREFUNDEDSPECIALIZEDBALANCEREQUEST, output_type=_GETPREFUNDEDSPECIALIZEDBALANCERESPONSE, @@ -9993,7 +10817,7 @@ _descriptor.MethodDescriptor( name='getTotalCreditsInPlatform', full_name='org.dash.platform.dapi.v0.Platform.getTotalCreditsInPlatform', - index=25, + index=28, containing_service=None, input_type=_GETTOTALCREDITSINPLATFORMREQUEST, output_type=_GETTOTALCREDITSINPLATFORMRESPONSE, @@ -10003,7 +10827,7 @@ _descriptor.MethodDescriptor( name='getPathElements', full_name='org.dash.platform.dapi.v0.Platform.getPathElements', - index=26, + index=29, containing_service=None, input_type=_GETPATHELEMENTSREQUEST, output_type=_GETPATHELEMENTSRESPONSE, @@ -10013,7 +10837,7 @@ _descriptor.MethodDescriptor( name='getStatus', full_name='org.dash.platform.dapi.v0.Platform.getStatus', - index=27, + index=30, containing_service=None, input_type=_GETSTATUSREQUEST, output_type=_GETSTATUSRESPONSE, 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 41b144905ab..4c1c93e8350 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 @@ -49,11 +49,26 @@ def __init__(self, channel): request_serializer=platform__pb2.GetIdentityBalanceRequest.SerializeToString, response_deserializer=platform__pb2.GetIdentityBalanceResponse.FromString, ) + self.getIdentitiesBalances = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getIdentitiesBalances', + request_serializer=platform__pb2.GetIdentitiesBalancesRequest.SerializeToString, + response_deserializer=platform__pb2.GetIdentitiesBalancesResponse.FromString, + ) self.getIdentityBalanceAndRevision = channel.unary_unary( '/org.dash.platform.dapi.v0.Platform/getIdentityBalanceAndRevision', request_serializer=platform__pb2.GetIdentityBalanceAndRevisionRequest.SerializeToString, response_deserializer=platform__pb2.GetIdentityBalanceAndRevisionResponse.FromString, ) + self.getEvonodesProposedEpochBlocksByIds = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getEvonodesProposedEpochBlocksByIds', + request_serializer=platform__pb2.GetEvonodesProposedEpochBlocksByIdsRequest.SerializeToString, + response_deserializer=platform__pb2.GetEvonodesProposedEpochBlocksResponse.FromString, + ) + self.getEvonodesProposedEpochBlocksByRange = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getEvonodesProposedEpochBlocksByRange', + request_serializer=platform__pb2.GetEvonodesProposedEpochBlocksByRangeRequest.SerializeToString, + response_deserializer=platform__pb2.GetEvonodesProposedEpochBlocksResponse.FromString, + ) self.getProofs = channel.unary_unary( '/org.dash.platform.dapi.v0.Platform/getProofs', request_serializer=platform__pb2.GetProofsRequest.SerializeToString, @@ -201,12 +216,30 @@ def getIdentityBalance(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def getIdentitiesBalances(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 getIdentityBalanceAndRevision(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 getEvonodesProposedEpochBlocksByIds(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 getEvonodesProposedEpochBlocksByRange(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 getProofs(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -370,11 +403,26 @@ def add_PlatformServicer_to_server(servicer, server): request_deserializer=platform__pb2.GetIdentityBalanceRequest.FromString, response_serializer=platform__pb2.GetIdentityBalanceResponse.SerializeToString, ), + 'getIdentitiesBalances': grpc.unary_unary_rpc_method_handler( + servicer.getIdentitiesBalances, + request_deserializer=platform__pb2.GetIdentitiesBalancesRequest.FromString, + response_serializer=platform__pb2.GetIdentitiesBalancesResponse.SerializeToString, + ), 'getIdentityBalanceAndRevision': grpc.unary_unary_rpc_method_handler( servicer.getIdentityBalanceAndRevision, request_deserializer=platform__pb2.GetIdentityBalanceAndRevisionRequest.FromString, response_serializer=platform__pb2.GetIdentityBalanceAndRevisionResponse.SerializeToString, ), + 'getEvonodesProposedEpochBlocksByIds': grpc.unary_unary_rpc_method_handler( + servicer.getEvonodesProposedEpochBlocksByIds, + request_deserializer=platform__pb2.GetEvonodesProposedEpochBlocksByIdsRequest.FromString, + response_serializer=platform__pb2.GetEvonodesProposedEpochBlocksResponse.SerializeToString, + ), + 'getEvonodesProposedEpochBlocksByRange': grpc.unary_unary_rpc_method_handler( + servicer.getEvonodesProposedEpochBlocksByRange, + request_deserializer=platform__pb2.GetEvonodesProposedEpochBlocksByRangeRequest.FromString, + response_serializer=platform__pb2.GetEvonodesProposedEpochBlocksResponse.SerializeToString, + ), 'getProofs': grpc.unary_unary_rpc_method_handler( servicer.getProofs, request_deserializer=platform__pb2.GetProofsRequest.FromString, @@ -604,6 +652,23 @@ def getIdentityBalance(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def getIdentitiesBalances(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/getIdentitiesBalances', + platform__pb2.GetIdentitiesBalancesRequest.SerializeToString, + platform__pb2.GetIdentitiesBalancesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def getIdentityBalanceAndRevision(request, target, @@ -621,6 +686,40 @@ def getIdentityBalanceAndRevision(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def getEvonodesProposedEpochBlocksByIds(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/getEvonodesProposedEpochBlocksByIds', + platform__pb2.GetEvonodesProposedEpochBlocksByIdsRequest.SerializeToString, + platform__pb2.GetEvonodesProposedEpochBlocksResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def getEvonodesProposedEpochBlocksByRange(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/getEvonodesProposedEpochBlocksByRange', + platform__pb2.GetEvonodesProposedEpochBlocksByRangeRequest.SerializeToString, + platform__pb2.GetEvonodesProposedEpochBlocksResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def getProofs(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 3f5cab20696..b0172714184 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 @@ -1320,6 +1320,461 @@ export namespace GetIdentitiesContractKeysResponse { } } +export class GetEvonodesProposedEpochBlocksByIdsRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 | undefined; + setV0(value?: GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0): void; + + getVersionCase(): GetEvonodesProposedEpochBlocksByIdsRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetEvonodesProposedEpochBlocksByIdsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetEvonodesProposedEpochBlocksByIdsRequest): GetEvonodesProposedEpochBlocksByIdsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetEvonodesProposedEpochBlocksByIdsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetEvonodesProposedEpochBlocksByIdsRequest; + static deserializeBinaryFromReader(message: GetEvonodesProposedEpochBlocksByIdsRequest, reader: jspb.BinaryReader): GetEvonodesProposedEpochBlocksByIdsRequest; +} + +export namespace GetEvonodesProposedEpochBlocksByIdsRequest { + export type AsObject = { + v0?: GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.AsObject, + } + + export class GetEvonodesProposedEpochBlocksByIdsRequestV0 extends jspb.Message { + getEpoch(): number; + setEpoch(value: number): void; + + clearIdsList(): void; + getIdsList(): Array; + getIdsList_asU8(): Array; + getIdsList_asB64(): Array; + setIdsList(value: Array): void; + addIds(value: Uint8Array | string, index?: number): Uint8Array | string; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetEvonodesProposedEpochBlocksByIdsRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetEvonodesProposedEpochBlocksByIdsRequestV0): GetEvonodesProposedEpochBlocksByIdsRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetEvonodesProposedEpochBlocksByIdsRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetEvonodesProposedEpochBlocksByIdsRequestV0; + static deserializeBinaryFromReader(message: GetEvonodesProposedEpochBlocksByIdsRequestV0, reader: jspb.BinaryReader): GetEvonodesProposedEpochBlocksByIdsRequestV0; + } + + export namespace GetEvonodesProposedEpochBlocksByIdsRequestV0 { + export type AsObject = { + epoch: number, + idsList: Array, + prove: boolean, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetEvonodesProposedEpochBlocksResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 | undefined; + setV0(value?: GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0): void; + + getVersionCase(): GetEvonodesProposedEpochBlocksResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetEvonodesProposedEpochBlocksResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetEvonodesProposedEpochBlocksResponse): GetEvonodesProposedEpochBlocksResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetEvonodesProposedEpochBlocksResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetEvonodesProposedEpochBlocksResponse; + static deserializeBinaryFromReader(message: GetEvonodesProposedEpochBlocksResponse, reader: jspb.BinaryReader): GetEvonodesProposedEpochBlocksResponse; +} + +export namespace GetEvonodesProposedEpochBlocksResponse { + export type AsObject = { + v0?: GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.AsObject, + } + + export class GetEvonodesProposedEpochBlocksResponseV0 extends jspb.Message { + hasEvonodesProposedBlockCountsInfo(): boolean; + clearEvonodesProposedBlockCountsInfo(): void; + getEvonodesProposedBlockCountsInfo(): GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks | undefined; + setEvonodesProposedBlockCountsInfo(value?: GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetEvonodesProposedEpochBlocksResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetEvonodesProposedEpochBlocksResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetEvonodesProposedEpochBlocksResponseV0): GetEvonodesProposedEpochBlocksResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetEvonodesProposedEpochBlocksResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetEvonodesProposedEpochBlocksResponseV0; + static deserializeBinaryFromReader(message: GetEvonodesProposedEpochBlocksResponseV0, reader: jspb.BinaryReader): GetEvonodesProposedEpochBlocksResponseV0; + } + + export namespace GetEvonodesProposedEpochBlocksResponseV0 { + export type AsObject = { + evonodesProposedBlockCountsInfo?: GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export class EvonodeProposedBlocks extends jspb.Message { + getProTxHash(): Uint8Array | string; + getProTxHash_asU8(): Uint8Array; + getProTxHash_asB64(): string; + setProTxHash(value: Uint8Array | string): void; + + getCount(): number; + setCount(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EvonodeProposedBlocks.AsObject; + static toObject(includeInstance: boolean, msg: EvonodeProposedBlocks): EvonodeProposedBlocks.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EvonodeProposedBlocks, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EvonodeProposedBlocks; + static deserializeBinaryFromReader(message: EvonodeProposedBlocks, reader: jspb.BinaryReader): EvonodeProposedBlocks; + } + + export namespace EvonodeProposedBlocks { + export type AsObject = { + proTxHash: Uint8Array | string, + count: number, + } + } + + export class EvonodesProposedBlocks extends jspb.Message { + clearEvonodesProposedBlockCountsList(): void; + getEvonodesProposedBlockCountsList(): Array; + setEvonodesProposedBlockCountsList(value: Array): void; + addEvonodesProposedBlockCounts(value?: GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks, index?: number): GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EvonodesProposedBlocks.AsObject; + static toObject(includeInstance: boolean, msg: EvonodesProposedBlocks): EvonodesProposedBlocks.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EvonodesProposedBlocks, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EvonodesProposedBlocks; + static deserializeBinaryFromReader(message: EvonodesProposedBlocks, reader: jspb.BinaryReader): EvonodesProposedBlocks; + } + + export namespace EvonodesProposedBlocks { + export type AsObject = { + evonodesProposedBlockCountsList: Array, + } + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + EVONODES_PROPOSED_BLOCK_COUNTS_INFO = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetEvonodesProposedEpochBlocksByRangeRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 | undefined; + setV0(value?: GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0): void; + + getVersionCase(): GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetEvonodesProposedEpochBlocksByRangeRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetEvonodesProposedEpochBlocksByRangeRequest): GetEvonodesProposedEpochBlocksByRangeRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetEvonodesProposedEpochBlocksByRangeRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetEvonodesProposedEpochBlocksByRangeRequest; + static deserializeBinaryFromReader(message: GetEvonodesProposedEpochBlocksByRangeRequest, reader: jspb.BinaryReader): GetEvonodesProposedEpochBlocksByRangeRequest; +} + +export namespace GetEvonodesProposedEpochBlocksByRangeRequest { + export type AsObject = { + v0?: GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.AsObject, + } + + export class GetEvonodesProposedEpochBlocksByRangeRequestV0 extends jspb.Message { + getEpoch(): number; + setEpoch(value: number): void; + + hasLimit(): boolean; + clearLimit(): void; + getLimit(): number; + setLimit(value: number): void; + + hasStartAfter(): boolean; + clearStartAfter(): void; + getStartAfter(): Uint8Array | string; + getStartAfter_asU8(): Uint8Array; + getStartAfter_asB64(): string; + setStartAfter(value: Uint8Array | string): void; + + hasStartAt(): boolean; + clearStartAt(): void; + getStartAt(): Uint8Array | string; + getStartAt_asU8(): Uint8Array; + getStartAt_asB64(): string; + setStartAt(value: Uint8Array | string): void; + + getProve(): boolean; + setProve(value: boolean): void; + + getStartCase(): GetEvonodesProposedEpochBlocksByRangeRequestV0.StartCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetEvonodesProposedEpochBlocksByRangeRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetEvonodesProposedEpochBlocksByRangeRequestV0): GetEvonodesProposedEpochBlocksByRangeRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetEvonodesProposedEpochBlocksByRangeRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetEvonodesProposedEpochBlocksByRangeRequestV0; + static deserializeBinaryFromReader(message: GetEvonodesProposedEpochBlocksByRangeRequestV0, reader: jspb.BinaryReader): GetEvonodesProposedEpochBlocksByRangeRequestV0; + } + + export namespace GetEvonodesProposedEpochBlocksByRangeRequestV0 { + export type AsObject = { + epoch: number, + limit: number, + startAfter: Uint8Array | string, + startAt: Uint8Array | string, + prove: boolean, + } + + export enum StartCase { + START_NOT_SET = 0, + START_AFTER = 3, + START_AT = 4, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetIdentitiesBalancesRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 | undefined; + setV0(value?: GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0): void; + + getVersionCase(): GetIdentitiesBalancesRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentitiesBalancesRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentitiesBalancesRequest): GetIdentitiesBalancesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentitiesBalancesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentitiesBalancesRequest; + static deserializeBinaryFromReader(message: GetIdentitiesBalancesRequest, reader: jspb.BinaryReader): GetIdentitiesBalancesRequest; +} + +export namespace GetIdentitiesBalancesRequest { + export type AsObject = { + v0?: GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.AsObject, + } + + export class GetIdentitiesBalancesRequestV0 extends jspb.Message { + hasIdentitiesIds(): boolean; + clearIdentitiesIds(): void; + getIdentitiesIds(): GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds | undefined; + setIdentitiesIds(value?: GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds): void; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentitiesBalancesRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentitiesBalancesRequestV0): GetIdentitiesBalancesRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentitiesBalancesRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentitiesBalancesRequestV0; + static deserializeBinaryFromReader(message: GetIdentitiesBalancesRequestV0, reader: jspb.BinaryReader): GetIdentitiesBalancesRequestV0; + } + + export namespace GetIdentitiesBalancesRequestV0 { + export type AsObject = { + identitiesIds?: GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.AsObject, + prove: boolean, + } + + export class GetIdentitiesBalancesByKnownIdentityIds extends jspb.Message { + clearIdentitiesIdsList(): void; + getIdentitiesIdsList(): Array; + getIdentitiesIdsList_asU8(): Array; + getIdentitiesIdsList_asB64(): Array; + setIdentitiesIdsList(value: Array): void; + addIdentitiesIds(value: Uint8Array | string, index?: number): Uint8Array | string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentitiesBalancesByKnownIdentityIds.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentitiesBalancesByKnownIdentityIds): GetIdentitiesBalancesByKnownIdentityIds.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentitiesBalancesByKnownIdentityIds, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentitiesBalancesByKnownIdentityIds; + static deserializeBinaryFromReader(message: GetIdentitiesBalancesByKnownIdentityIds, reader: jspb.BinaryReader): GetIdentitiesBalancesByKnownIdentityIds; + } + + export namespace GetIdentitiesBalancesByKnownIdentityIds { + export type AsObject = { + identitiesIdsList: Array, + } + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetIdentitiesBalancesResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 | undefined; + setV0(value?: GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0): void; + + getVersionCase(): GetIdentitiesBalancesResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentitiesBalancesResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentitiesBalancesResponse): GetIdentitiesBalancesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentitiesBalancesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentitiesBalancesResponse; + static deserializeBinaryFromReader(message: GetIdentitiesBalancesResponse, reader: jspb.BinaryReader): GetIdentitiesBalancesResponse; +} + +export namespace GetIdentitiesBalancesResponse { + export type AsObject = { + v0?: GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.AsObject, + } + + export class GetIdentitiesBalancesResponseV0 extends jspb.Message { + hasIdentitiesBalances(): boolean; + clearIdentitiesBalances(): void; + getIdentitiesBalances(): GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances | undefined; + setIdentitiesBalances(value?: GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetIdentitiesBalancesResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentitiesBalancesResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentitiesBalancesResponseV0): GetIdentitiesBalancesResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentitiesBalancesResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentitiesBalancesResponseV0; + static deserializeBinaryFromReader(message: GetIdentitiesBalancesResponseV0, reader: jspb.BinaryReader): GetIdentitiesBalancesResponseV0; + } + + export namespace GetIdentitiesBalancesResponseV0 { + export type AsObject = { + identitiesBalances?: GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export class IdentityBalance extends jspb.Message { + getIdentityId(): Uint8Array | string; + getIdentityId_asU8(): Uint8Array; + getIdentityId_asB64(): string; + setIdentityId(value: Uint8Array | string): void; + + hasBalance(): boolean; + clearBalance(): void; + getBalance(): number; + setBalance(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdentityBalance.AsObject; + static toObject(includeInstance: boolean, msg: IdentityBalance): IdentityBalance.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdentityBalance, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdentityBalance; + static deserializeBinaryFromReader(message: IdentityBalance, reader: jspb.BinaryReader): IdentityBalance; + } + + export namespace IdentityBalance { + export type AsObject = { + identityId: Uint8Array | string, + balance: number, + } + } + + export class IdentitiesBalances extends jspb.Message { + clearEntriesList(): void; + getEntriesList(): Array; + setEntriesList(value: Array): void; + addEntries(value?: GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance, index?: number): GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdentitiesBalances.AsObject; + static toObject(includeInstance: boolean, msg: IdentitiesBalances): IdentitiesBalances.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdentitiesBalances, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdentitiesBalances; + static deserializeBinaryFromReader(message: IdentitiesBalances, reader: jspb.BinaryReader): IdentitiesBalances; + } + + export namespace IdentitiesBalances { + export type AsObject = { + entriesList: Array, + } + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + IDENTITIES_BALANCES = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + export class GetProofsRequest 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 b1264519d47..746f5210fdb 100644 --- a/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js +++ b/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js @@ -118,6 +118,29 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpoc goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.ResultCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.StartCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase', null, { proto }); @@ -1191,16 +1214,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1212,16 +1235,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -1233,16 +1256,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse'; } /** * Generated by JsPbCodeGenerator. @@ -1254,16 +1277,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -1275,16 +1298,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks'; } /** * Generated by JsPbCodeGenerator. @@ -1296,16 +1319,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks'; } /** * Generated by JsPbCodeGenerator. @@ -1317,16 +1340,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1338,16 +1361,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsResponse'; + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -1359,16 +1382,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0'; + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1380,16 +1403,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractRequest'; + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -1401,16 +1424,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0'; + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds'; } /** * Generated by JsPbCodeGenerator. @@ -1422,16 +1445,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractResponse'; + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse'; } /** * Generated by JsPbCodeGenerator. @@ -1443,16 +1466,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0'; + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -1464,16 +1487,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsRequest'; + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance'; } /** * Generated by JsPbCodeGenerator. @@ -1485,16 +1508,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0'; + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances'; } /** * Generated by JsPbCodeGenerator. @@ -1506,16 +1529,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProofsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse'; + proto.org.dash.platform.dapi.v0.GetProofsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1527,16 +1550,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry'; + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -1548,16 +1571,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts'; + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1569,16 +1592,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0'; + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1590,16 +1613,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest'; + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1611,16 +1634,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0'; + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1632,16 +1655,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse'; + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1653,16 +1676,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProofsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0'; + proto.org.dash.platform.dapi.v0.GetProofsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -1674,16 +1697,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry'; + proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -1695,16 +1718,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetDataContractRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory'; + proto.org.dash.platform.dapi.v0.GetDataContractRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1716,16 +1739,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDocumentsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest'; + proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -1737,16 +1760,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0'; + proto.org.dash.platform.dapi.v0.GetDataContractResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractResponse'; } /** * Generated by JsPbCodeGenerator. @@ -1758,16 +1781,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsResponse'; + proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -1779,16 +1802,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0'; + proto.org.dash.platform.dapi.v0.GetDataContractsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1800,16 +1823,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents'; + proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -1821,16 +1844,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest'; + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -1842,16 +1865,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0 = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0'; + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry'; } /** * Generated by JsPbCodeGenerator. @@ -1863,16 +1886,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse'; + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts'; } /** * Generated by JsPbCodeGenerator. @@ -1884,16 +1907,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0'; + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -1905,16 +1928,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest'; + proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest'; } /** * Generated by JsPbCodeGenerator. @@ -1926,16 +1949,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0 = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0 = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0'; + proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -1947,16 +1970,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse'; + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse'; } /** * Generated by JsPbCodeGenerator. @@ -1968,16 +1991,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0'; + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -1989,16 +2012,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest'; + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry'; } /** * Generated by JsPbCodeGenerator. @@ -2010,16 +2033,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0'; + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.displayName = 'proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory'; } /** * Generated by JsPbCodeGenerator. @@ -2031,16 +2054,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse'; + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2052,16 +2075,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock'; + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2073,16 +2096,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetDocumentsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence'; + proto.org.dash.platform.dapi.v0.GetDocumentsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2094,16 +2117,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0'; + proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2115,16 +2138,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest'; + proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents'; } /** * Generated by JsPbCodeGenerator. @@ -2136,16 +2159,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0'; + proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2157,16 +2180,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse'; + proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2178,16 +2201,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0'; + proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2199,16 +2222,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions'; + proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2220,16 +2243,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry'; + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2241,16 +2264,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest'; + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2262,16 +2285,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0'; + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2283,16 +2306,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse'; + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2304,16 +2327,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0'; + proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2325,16 +2348,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals'; + proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2346,16 +2369,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal'; + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2367,16 +2390,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest'; + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock'; } /** * Generated by JsPbCodeGenerator. @@ -2388,16 +2411,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0 = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0'; + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence'; } /** * Generated by JsPbCodeGenerator. @@ -2409,16 +2432,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse'; + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2430,16 +2453,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2451,16 +2474,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2472,16 +2495,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2493,16 +2516,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2514,16 +2537,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions'; } /** * Generated by JsPbCodeGenerator. @@ -2535,16 +2558,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry'; } /** * Generated by JsPbCodeGenerator. @@ -2556,16 +2579,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2577,16 +2600,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2598,16 +2621,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2619,16 +2642,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2640,16 +2663,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals'; } /** * Generated by JsPbCodeGenerator. @@ -2661,16 +2684,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo'; + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.displayName = 'proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal'; } /** * Generated by JsPbCodeGenerator. @@ -2682,16 +2705,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo'; + proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2703,16 +2726,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse'; + proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2724,16 +2747,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0'; + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2745,16 +2768,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp'; + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2766,16 +2789,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps'; + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos'; } /** * Generated by JsPbCodeGenerator. @@ -2787,16 +2810,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest'; + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo'; } /** * Generated by JsPbCodeGenerator. @@ -2808,16 +2831,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2829,16 +2852,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo'; + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2850,16 +2873,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse'; + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo'; } /** * Generated by JsPbCodeGenerator. @@ -2871,16 +2894,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse'; } /** * Generated by JsPbCodeGenerator. @@ -2892,16 +2915,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo'; + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -2913,16 +2936,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders'; + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues'; } /** * Generated by JsPbCodeGenerator. @@ -2934,16 +2957,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest'; } /** * Generated by JsPbCodeGenerator. @@ -2955,16 +2978,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -2976,16 +2999,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo'; } /** * Generated by JsPbCodeGenerator. @@ -2997,16 +3020,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo'; } /** * Generated by JsPbCodeGenerator. @@ -3018,16 +3041,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse'; } /** * Generated by JsPbCodeGenerator. @@ -3039,16 +3062,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -3060,16 +3083,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp'; } /** * Generated by JsPbCodeGenerator. @@ -3081,16 +3104,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest'; + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.displayName = 'proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps'; } /** * Generated by JsPbCodeGenerator. @@ -3102,16 +3125,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest'; } /** * Generated by JsPbCodeGenerator. @@ -3123,16 +3146,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -3144,16 +3167,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo'; } /** * Generated by JsPbCodeGenerator. @@ -3165,16 +3188,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse'; } /** * Generated by JsPbCodeGenerator. @@ -3186,16 +3209,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -3207,16 +3230,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo'; } /** * Generated by JsPbCodeGenerator. @@ -3228,16 +3251,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders'; } /** * Generated by JsPbCodeGenerator. @@ -3249,16 +3272,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender'; } /** * Generated by JsPbCodeGenerator. @@ -3270,16 +3293,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest'; } /** * Generated by JsPbCodeGenerator. @@ -3291,16 +3314,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -3312,16 +3335,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo'; } /** * Generated by JsPbCodeGenerator. @@ -3333,16 +3356,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse'; } /** * Generated by JsPbCodeGenerator. @@ -3354,16 +3377,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -3375,16 +3398,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse'; + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters'; } /** * Generated by JsPbCodeGenerator. @@ -3396,16 +3419,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest'; } /** * Generated by JsPbCodeGenerator. @@ -3417,16 +3440,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPathElementsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsRequest'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -3438,16 +3461,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo'; } /** * Generated by JsPbCodeGenerator. @@ -3459,16 +3482,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsResponse'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse'; } /** * Generated by JsPbCodeGenerator. @@ -3480,16 +3503,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -3501,16 +3524,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.repeatedFields_, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes'; } /** * Generated by JsPbCodeGenerator. @@ -3522,16 +3545,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusRequest, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusRequest'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice'; } /** * Generated by JsPbCodeGenerator. @@ -3543,16 +3566,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0'; + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.displayName = 'proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote'; } /** * Generated by JsPbCodeGenerator. @@ -3564,16 +3587,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse'; + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest'; } /** * Generated by JsPbCodeGenerator. @@ -3585,16 +3608,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0 = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0 = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0'; + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -3606,16 +3629,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version'; + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse'; } /** * Generated by JsPbCodeGenerator. @@ -3627,16 +3650,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software'; + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -3648,16 +3671,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol'; + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest'; } /** * Generated by JsPbCodeGenerator. @@ -3669,16 +3692,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash = function(opt_data) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0 = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash'; + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -3690,16 +3713,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive'; + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse'; } /** * Generated by JsPbCodeGenerator. @@ -3711,16 +3734,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time'; + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0'; } /** * Generated by JsPbCodeGenerator. @@ -3732,16 +3755,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node'; + proto.org.dash.platform.dapi.v0.GetPathElementsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -3753,16 +3776,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.repeatedFields_, null); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain'; + proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0'; } /** * Generated by JsPbCodeGenerator. @@ -3774,16 +3797,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network'; + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -3795,85 +3818,3154 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_); }; -goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync, jspb.Message); +goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync'; + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0'; } - - - -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} + * 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.Proof.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.Proof.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.repeatedFields_, null); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.displayName = 'proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements'; +} /** - * 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.Proof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * 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.Proof.toObject = function(includeInstance, msg) { - var f, obj = { - grovedbProof: msg.getGrovedbProof_asB64(), - quorumHash: msg.getQuorumHash_asB64(), - signature: msg.getSignature_asB64(), - round: jspb.Message.getFieldWithDefault(msg, 4, 0), - blockIdHash: msg.getBlockIdHash_asB64(), - quorumType: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_); }; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusRequest'; } - - /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.Proof} + * 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.Proof.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.Proof; - return proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.Proof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.Proof} +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0'; +} +/** + * 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.GetStatusResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Version = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Version.Software = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Version.Protocol = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Time = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Node = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Chain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.Network = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network'; +} +/** + * 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.GetStatusResponse.GetStatusResponseV0.StateSync = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.displayName = 'proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync'; +} + + + +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.Proof.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.Proof.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.Proof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.Proof.toObject = function(includeInstance, msg) { + var f, obj = { + grovedbProof: msg.getGrovedbProof_asB64(), + quorumHash: msg.getQuorumHash_asB64(), + signature: msg.getSignature_asB64(), + round: jspb.Message.getFieldWithDefault(msg, 4, 0), + blockIdHash: msg.getBlockIdHash_asB64(), + quorumType: jspb.Message.getFieldWithDefault(msg, 6, 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.Proof} + */ +proto.org.dash.platform.dapi.v0.Proof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.Proof; + return proto.org.dash.platform.dapi.v0.Proof.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.Proof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.Proof} + */ +proto.org.dash.platform.dapi.v0.Proof.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.setGrovedbProof(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setQuorumHash(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setRound(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockIdHash(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setQuorumType(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.Proof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.Proof.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.Proof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGrovedbProof_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getQuorumHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getBlockIdHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getQuorumType(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } +}; + + +/** + * optional bytes grovedb_proof = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getGrovedbProof = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes grovedb_proof = 1; + * This is a type-conversion wrapper around `getGrovedbProof()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getGrovedbProof_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getGrovedbProof())); +}; + + +/** + * optional bytes grovedb_proof = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getGrovedbProof()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getGrovedbProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getGrovedbProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.setGrovedbProof = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes quorum_hash = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes quorum_hash = 2; + * This is a type-conversion wrapper around `getQuorumHash()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getQuorumHash())); +}; + + +/** + * optional bytes quorum_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getQuorumHash()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getQuorumHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.setQuorumHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes signature = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes signature = 3; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional uint32 round = 4; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bytes block_id_hash = 5; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes block_id_hash = 5; + * This is a type-conversion wrapper around `getBlockIdHash()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockIdHash())); +}; + + +/** + * optional bytes block_id_hash = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockIdHash()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockIdHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.setBlockIdHash = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional uint32 quorum_type = 6; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumType = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + */ +proto.org.dash.platform.dapi.v0.Proof.prototype.setQuorumType = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + + + + +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.ResponseMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.ResponseMetadata.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.ResponseMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + coreChainLockedHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + epoch: jspb.Message.getFieldWithDefault(msg, 3, 0), + timeMs: jspb.Message.getFieldWithDefault(msg, 4, 0), + protocolVersion: jspb.Message.getFieldWithDefault(msg, 5, 0), + chainId: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + 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.ResponseMetadata} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.ResponseMetadata; + return proto.org.dash.platform.dapi.v0.ResponseMetadata.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.ResponseMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.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.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCoreChainLockedHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setEpoch(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimeMs(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setProtocolVersion(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(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.ResponseMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.ResponseMetadata.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.ResponseMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getCoreChainLockedHeight(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getEpoch(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getTimeMs(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getProtocolVersion(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional uint64 height = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 core_chain_locked_height = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getCoreChainLockedHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setCoreChainLockedHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 epoch = 3; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getEpoch = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setEpoch = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 time_ms = 4; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getTimeMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setTimeMs = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint32 protocol_version = 5; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getProtocolVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setProtocolVersion = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string chain_id = 6; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + */ +proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + + + + +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.StateTransitionBroadcastError.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.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.StateTransitionBroadcastError} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + message: jspb.Message.getFieldWithDefault(msg, 2, ""), + data: msg.getData_asB64() + }; + + 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.StateTransitionBroadcastError} + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError; + return proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.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.StateTransitionBroadcastError} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(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.StateTransitionBroadcastError.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.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.StateTransitionBroadcastError} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional uint32 code = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + */ +proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + + + + +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.BroadcastStateTransitionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.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.BroadcastStateTransitionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + stateTransition: msg.getStateTransition_asB64() + }; + + 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.BroadcastStateTransitionRequest} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest; + return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.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.BroadcastStateTransitionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.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.setStateTransition(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.BroadcastStateTransitionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.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.BroadcastStateTransitionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStateTransition_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes state_transition = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.getStateTransition = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes state_transition = 1; + * This is a type-conversion wrapper around `getStateTransition()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.getStateTransition_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStateTransition())); +}; + + +/** + * optional bytes state_transition = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStateTransition()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.getStateTransition_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStateTransition())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} returns this + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.setStateTransition = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +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.BroadcastStateTransitionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.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.BroadcastStateTransitionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + 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.BroadcastStateTransitionResponse} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse; + return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.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.BroadcastStateTransitionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.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.BroadcastStateTransitionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * 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.GetIdentityRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityRequest.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.GetIdentityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityRequest.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.GetIdentityRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.GetIdentityRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityRequest.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.GetIdentityRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.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.GetIdentityRequest.GetIdentityRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.GetIdentityRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityRequest.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.GetIdentityRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.GetIdentityRequest.GetIdentityRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.GetIdentityRequest.GetIdentityRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, 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.GetIdentityRequest.GetIdentityRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.GetIdentityRequest.GetIdentityRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.setId(value); + break; + case 2: + 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.GetIdentityRequest.GetIdentityRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.GetIdentityRequest.GetIdentityRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetIdentityRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityRequest.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.GetIdentityNonceRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.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.GetIdentityNonceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.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.GetIdentityNonceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.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.GetIdentityNonceRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.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.GetIdentityNonceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.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.GetIdentityNonceRequest.GetIdentityNonceRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.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.GetIdentityNonceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.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.GetIdentityNonceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.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.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.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.GetIdentityNonceRequest.GetIdentityNonceRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + identityId: msg.getIdentityId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, 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.GetIdentityNonceRequest.GetIdentityNonceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.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.GetIdentityNonceRequest.GetIdentityNonceRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.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.setIdentityId(value); + break; + case 2: + 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.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.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.GetIdentityNonceRequest.GetIdentityNonceRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional bytes identity_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes identity_id = 1; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); +}; + + +/** + * optional bytes identity_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentityId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetIdentityNonceRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.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.GetIdentityContractNonceRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.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.GetIdentityContractNonceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.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.GetIdentityContractNonceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.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.GetIdentityContractNonceRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.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.GetIdentityContractNonceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.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.GetIdentityContractNonceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.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.GetIdentityContractNonceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + identityId: msg.getIdentityId_asB64(), + contractId: msg.getContractId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, 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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.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.setIdentityId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractId(value); + break; + case 3: + 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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional bytes identity_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes identity_id = 1; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); +}; + + +/** + * optional bytes identity_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentityId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes contract_id = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes contract_id = 2; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContractId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bool prove = 3; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional GetIdentityContractNonceRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.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.GetIdentityBalanceRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.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.GetIdentityBalanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.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.GetIdentityBalanceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.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.GetIdentityBalanceRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.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.GetIdentityBalanceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.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.GetIdentityBalanceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.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.GetIdentityBalanceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, 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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.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.setId(value); + break; + case 2: + 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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetIdentityBalanceRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.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.GetIdentityBalanceAndRevisionRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.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.GetIdentityBalanceAndRevisionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.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.GetIdentityBalanceAndRevisionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.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.GetIdentityBalanceAndRevisionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.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.GetIdentityBalanceAndRevisionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, 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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3882,27 +6974,11 @@ proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader = function(msg switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setGrovedbProof(value); + msg.setId(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setQuorumHash(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRound(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBlockIdHash(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setQuorumType(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -3917,9 +6993,9 @@ proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3927,261 +7003,151 @@ proto.org.dash.platform.dapi.v0.Proof.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.Proof} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getGrovedbProof_asU8(); + f = message.getId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getQuorumHash_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getProve(); + if (f) { + writer.writeBool( 2, f ); } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getRound(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getBlockIdHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getQuorumType(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } }; /** - * optional bytes grovedb_proof = 1; + * optional bytes id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getGrovedbProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes grovedb_proof = 1; - * This is a type-conversion wrapper around `getGrovedbProof()` + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getGrovedbProof_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getGrovedbProof())); + this.getId())); }; /** - * optional bytes grovedb_proof = 1; + * optional bytes id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getGrovedbProof()` + * This is a type-conversion wrapper around `getId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getGrovedbProof_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getGrovedbProof())); + this.getId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setGrovedbProof = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.setId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional bytes quorum_hash = 2; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes quorum_hash = 2; - * This is a type-conversion wrapper around `getQuorumHash()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getQuorumHash())); -}; - - -/** - * optional bytes quorum_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getQuorumHash()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getQuorumHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setQuorumHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes signature = 3; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes signature = 3; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignature()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional uint32 round = 4; - * @return {number} + * optional bool prove = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getRound = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setRound = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional bytes block_id_hash = 5; - * @return {string} + * optional GetIdentityBalanceAndRevisionRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0, 1)); }; /** - * optional bytes block_id_hash = 5; - * This is a type-conversion wrapper around `getBlockIdHash()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBlockIdHash())); + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.oneofGroups_[0], value); }; /** - * optional bytes block_id_hash = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBlockIdHash()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBlockIdHash())); + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setBlockIdHash = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * optional uint32 quorum_type = 6; - * @return {number} + * 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.Proof.prototype.getQuorumType = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - +proto.org.dash.platform.dapi.v0.GetIdentityResponse.oneofGroups_ = [[1]]; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * @enum {number} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setQuorumType = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; - +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityResponse.oneofGroups_[0])); +}; @@ -4198,8 +7164,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityResponse.toObject(opt_includeInstance, this); }; @@ -4208,18 +7174,13 @@ proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.toObject = function(o * @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.ResponseMetadata} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.toObject = function(includeInstance, msg) { var f, obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0), - coreChainLockedHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - epoch: jspb.Message.getFieldWithDefault(msg, 3, 0), - timeMs: jspb.Message.getFieldWithDefault(msg, 4, 0), - protocolVersion: jspb.Message.getFieldWithDefault(msg, 5, 0), - chainId: jspb.Message.getFieldWithDefault(msg, 6, "") + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -4233,23 +7194,23 @@ proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject = function(includeInst /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.ResponseMetadata; - return proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityResponse.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.ResponseMetadata} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4257,28 +7218,9 @@ proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader = f var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHeight(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCoreChainLockedHeight(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setEpoch(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimeMs(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setProtocolVersion(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setChainId(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -4293,9 +7235,9 @@ proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader = f * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4303,168 +7245,52 @@ proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.serializeBinary = fun /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.ResponseMetadata} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getHeight(); - if (f !== 0) { - writer.writeUint64( + f = message.getV0(); + if (f != null) { + writer.writeMessage( 1, - f - ); - } - f = message.getCoreChainLockedHeight(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getEpoch(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getTimeMs(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getProtocolVersion(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getChainId(); - if (f.length > 0) { - writer.writeString( - 6, - f + f, + proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.serializeBinaryToWriter ); } }; -/** - * optional uint64 height = 1; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 core_chain_locked_height = 2; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getCoreChainLockedHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setCoreChainLockedHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 epoch = 3; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getEpoch = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setEpoch = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 time_ms = 4; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getTimeMs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setTimeMs = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 protocol_version = 5; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getProtocolVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + * 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.ResponseMetadata.prototype.setProtocolVersion = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_ = [[1,2]]; /** - * optional string chain_id = 6; - * @return {string} + * @enum {number} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getChainId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITY: 1, + PROOF: 2 }; - /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + * @return {proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setChainId = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0])); }; - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -4478,8 +7304,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObject(opt_includeInstance, this); }; @@ -4488,15 +7314,15 @@ proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.toObject * @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.StateTransitionBroadcastError} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - data: msg.getData_asB64() + identity: msg.getIdentity_asB64(), + 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) { @@ -4510,23 +7336,23 @@ proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.toObject = functio /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError; - return proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.StateTransitionBroadcastError} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4534,16 +7360,18 @@ proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryF var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCode(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setIdentity(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); + 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 = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); + 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(); @@ -4558,9 +7386,9 @@ proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryF * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4568,268 +7396,234 @@ proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.serializ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCode(); - if (f !== 0) { - writer.writeUint32( + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBytes( 1, f ); } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( + f = message.getProof(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter ); } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( 3, - f + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter ); } }; /** - * optional uint32 code = 1; - * @return {number} + * optional bytes identity = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getIdentity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + * optional bytes identity = 1; + * This is a type-conversion wrapper around `getIdentity()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getIdentity_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentity())); }; /** - * optional string message = 2; - * @return {string} + * optional bytes identity = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentity()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getIdentity_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentity())); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.setIdentity = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0], value); }; /** - * optional bytes data = 3; - * @return {string} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearIdentity = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0], undefined); }; /** - * optional bytes data = 3; - * This is a type-conversion wrapper around `getData()` - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasIdentity = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes data = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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 {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this - */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0], value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; - -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} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * 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.BroadcastStateTransitionRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.toObject = function(includeInstance, msg) { - var f, obj = { - stateTransition: msg.getStateTransition_asB64() - }; +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest; - return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.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.setStateTransition(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional GetIdentityResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0, 1)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStateTransition_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityResponse.oneofGroups_[0], value); }; /** - * optional bytes state_transition = 1; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} returns this */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.getStateTransition = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * optional bytes state_transition = 1; - * This is a type-conversion wrapper around `getStateTransition()` - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.getStateTransition_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStateTransition())); +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * optional bytes state_transition = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStateTransition()` - * @return {!Uint8Array} + * 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.BroadcastStateTransitionRequest.prototype.getStateTransition_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStateTransition())); -}; - +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.oneofGroups_ = [[1]]; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} returns this + * @enum {number} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.setStateTransition = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; - +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.oneofGroups_[0])); +}; @@ -4846,8 +7640,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.toObject(opt_includeInstance, this); }; @@ -4856,13 +7650,13 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.prototype.toObj * @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.BroadcastStateTransitionResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.toObject = function(includeInstance, msg) { var f, obj = { - + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -4876,29 +7670,34 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.toObject = func /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse; - return proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.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.BroadcastStateTransitionResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.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.GetIdentityNonceResponse.GetIdentityNonceResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinaryFromReader); + msg.setV0(value); + break; default: reader.skipField(); break; @@ -4912,9 +7711,9 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBina * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4922,12 +7721,20 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.prototype.seria /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.serializeBinaryToWriter + ); + } }; @@ -4940,21 +7747,22 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.serializeBinary * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITY_NONCE: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0])); }; @@ -4972,8 +7780,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.toObject(opt_includeInstance, this); }; @@ -4982,13 +7790,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.toObject = function * @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.GetIdentityRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.toObject(includeInstance, f) + identityNonce: 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) { @@ -5002,23 +7812,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityRequest.toObject = function(includeIn /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityRequest; - return proto.org.dash.platform.dapi.v0.GetIdentityRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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.GetIdentityRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5026,9 +7836,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityRequest.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setIdentityNonce(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(); @@ -5043,9 +7862,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityRequest.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5053,231 +7872,172 @@ proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.serializeBinary = f /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = /** @type {number} */ (jspb.Message.getField(message, 1)); if (f != null) { - writer.writeMessage( + writer.writeUint64( 1, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, f, - proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.serializeBinaryToWriter + 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.GetIdentityRequest.GetIdentityRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.GetIdentityRequest.GetIdentityRequestV0} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional uint64 identity_nonce = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.toObject = function(includeInstance, msg) { - var f, obj = { - id: msg.getId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getIdentityNonce = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.setIdentityNonce = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0], value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.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.setId(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearIdentityNonce = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0], undefined); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasIdentityNonce = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 2, - f - ); - } +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; /** - * optional bytes id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0], value); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * optional bytes id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} returns this + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; /** - * optional bool prove = 2; - * @return {boolean} + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional GetIdentityRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} + * optional GetIdentityNonceResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -5286,7 +8046,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.clearV0 = function( * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -5300,21 +8060,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.hasV0 = function() * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.oneofGroups_[0])); }; @@ -5332,8 +8092,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.toObject(opt_includeInstance, this); }; @@ -5342,13 +8102,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.toObject = fun * @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.GetIdentityNonceRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -5362,23 +8122,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.toObject = function(incl /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest; - return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.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.GetIdentityNonceRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5386,8 +8146,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.deserializeBinaryFromRea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -5403,9 +8163,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.deserializeBinaryFromRea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5413,24 +8173,50 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.serializeBinar /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITY_CONTRACT_NONCE: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5446,8 +8232,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.toObject(opt_includeInstance, this); }; @@ -5456,14 +8242,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV * @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.GetIdentityNonceRequest.GetIdentityNonceRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - identityId: msg.getIdentityId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + identityContractNonce: 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) { @@ -5477,23 +8264,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityNonceRequest.GetIdentityNonceRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5501,12 +8288,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentityId(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setIdentityContractNonce(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + 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(); @@ -5521,9 +8314,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5531,113 +8324,172 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( 1, f ); } - f = message.getProve(); - if (f) { - writer.writeBool( + f = message.getProof(); + if (f != null) { + writer.writeMessage( 2, - f + 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 bytes identity_id = 1; - * @return {string} + * optional uint64 identity_contract_nonce = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getIdentityId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getIdentityContractNonce = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * optional bytes identity_id = 1; - * This is a type-conversion wrapper around `getIdentityId()` - * @return {string} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getIdentityId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.setIdentityContractNonce = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0], value); }; /** - * optional bytes identity_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentityId()` - * @return {!Uint8Array} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearIdentityContractNonce = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0], undefined); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.setIdentityId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasIdentityContractNonce = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bool prove = 2; + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} returns this + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; /** - * optional GetIdentityNonceRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} returns this + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentityContractNonceResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -5646,7 +8498,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.clearV0 = func * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -5660,21 +8512,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.hasV0 = functi * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.oneofGroups_[0])); }; @@ -5692,8 +8544,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.toObject(opt_includeInstance, this); }; @@ -5702,13 +8554,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.toObje * @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.GetIdentityContractNonceRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -5722,23 +8574,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.toObject = funct /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest; - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.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.GetIdentityContractNonceRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5746,8 +8598,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinar var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -5763,9 +8615,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinar * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5773,24 +8625,50 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.serial /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + BALANCE: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5806,8 +8684,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.toObject(opt_includeInstance, this); }; @@ -5816,15 +8694,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContr * @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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - identityId: msg.getIdentityId_asB64(), - contractId: msg.getContractId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + balance: 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) { @@ -5838,23 +8716,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContr /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5862,16 +8740,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContr var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentityId(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setBalance(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); + 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 = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + 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(); @@ -5886,9 +8766,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContr * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5896,172 +8776,321 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( 1, f ); } - f = message.getContractId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getProof(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter ); } - f = message.getProve(); - if (f) { - writer.writeBool( + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( 3, - f + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter ); } }; /** - * optional bytes identity_id = 1; - * @return {string} + * optional uint64 balance = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getIdentityId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * optional bytes identity_id = 1; - * This is a type-conversion wrapper around `getIdentityId()` - * @return {string} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getIdentityId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.setBalance = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0], value); }; /** - * optional bytes identity_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentityId()` - * @return {!Uint8Array} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.clearBalance = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0], undefined); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.setIdentityId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasBalance = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes contract_id = 2; - * @return {string} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; /** - * optional bytes contract_id = 2; - * This is a type-conversion wrapper around `getContractId()` - * @return {string} + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * optional bytes contract_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractId()` - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} returns this + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; /** - * optional bool prove = 3; + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentityBalanceResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.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.GetIdentityBalanceAndRevisionResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.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.GetIdentityBalanceAndRevisionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.toObject(opt_includeInstance, this); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} returns 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.GetIdentityBalanceAndRevisionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional GetIdentityContractNonceRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializeBinaryFromReader(msg, reader); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.oneofGroups_[0], value); + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Returns whether this field is set. - * @return {boolean} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.serializeBinaryToWriter + ); + } }; @@ -6074,21 +9103,22 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.hasV0 * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + BALANCE_AND_REVISION: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_[0])); }; @@ -6106,8 +9136,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject(opt_includeInstance, this); }; @@ -6116,13 +9146,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.toObject = f * @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.GetIdentityBalanceRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.toObject(includeInstance, f) + balanceAndRevision: (f = msg.getBalanceAndRevision()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.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) { @@ -6136,23 +9168,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.toObject = function(in /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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.GetIdentityBalanceRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6160,9 +9192,19 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinaryFromR var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinaryFromReader); + msg.setBalanceAndRevision(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(); @@ -6177,9 +9219,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinaryFromR * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6187,18 +9229,34 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.serializeBin /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getBalanceAndRevision(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.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 ); } }; @@ -6220,8 +9278,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.toObject(opt_includeInstance, this); }; @@ -6230,14 +9288,14 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ * @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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + balance: jspb.Message.getFieldWithDefault(msg, 1, 0), + revision: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -6251,23 +9309,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision; + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6275,12 +9333,12 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setBalance(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setRevision(value); break; default: reader.skipField(); @@ -6295,9 +9353,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6305,22 +9363,22 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getBalance(); + if (f !== 0) { + writer.writeUint64( 1, f ); } - f = message.getProve(); - if (f) { - writer.writeBool( + f = message.getRevision(); + if (f !== 0) { + writer.writeUint64( 2, f ); @@ -6329,90 +9387,103 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ /** - * optional bytes id = 1; - * @return {string} + * optional uint64 balance = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.setBalance = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` - * @return {string} + * optional uint64 revision = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.getRevision = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * optional bytes id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` - * @return {!Uint8Array} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.setRevision = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} returns this + * optional BalanceAndRevision balance_and_revision = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.getBalanceAndRevision = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision, 1)); }; /** - * optional bool prove = 2; - * @return {boolean} + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.setBalanceAndRevision = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearBalanceAndRevision = function() { + return this.setBalanceAndRevision(undefined); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasBalanceAndRevision = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional GetIdentityBalanceRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; @@ -6420,150 +9491,112 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.clearV0 = fu * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != 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 + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +}; + /** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; - -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} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * 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.GetIdentityBalanceAndRevisionRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional GetIdentityBalanceAndRevisionResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.toObject = function(includeInstance, msg) { - var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0, 1)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.deserializeBinaryFromReader(msg, reader); + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.oneofGroups_[0], value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinaryFromReader); - msg.setV0(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * 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.GetIdentityBalanceAndRevisionRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.serializeBinaryToWriter - ); - } -}; +proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_ = [[1,2,3]]; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.KeyRequestType.RequestCase = { + REQUEST_NOT_SET: 0, + ALL_KEYS: 1, + SPECIFIC_KEYS: 2, + SEARCH_KEY: 3 +}; +/** + * @return {proto.org.dash.platform.dapi.v0.KeyRequestType.RequestCase} + */ +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getRequestCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.KeyRequestType.RequestCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0])); +}; @@ -6580,8 +9613,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.KeyRequestType.toObject(opt_includeInstance, this); }; @@ -6590,14 +9623,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentity * @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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.KeyRequestType} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.KeyRequestType.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + allKeys: (f = msg.getAllKeys()) && proto.org.dash.platform.dapi.v0.AllKeys.toObject(includeInstance, f), + specificKeys: (f = msg.getSpecificKeys()) && proto.org.dash.platform.dapi.v0.SpecificKeys.toObject(includeInstance, f), + searchKey: (f = msg.getSearchKey()) && proto.org.dash.platform.dapi.v0.SearchKey.toObject(includeInstance, f) }; if (includeInstance) { @@ -6611,23 +9645,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentity /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.KeyRequestType; + return proto.org.dash.platform.dapi.v0.KeyRequestType.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.KeyRequestType} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6635,12 +9669,19 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentity var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); + var value = new proto.org.dash.platform.dapi.v0.AllKeys; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinaryFromReader); + msg.setAllKeys(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = new proto.org.dash.platform.dapi.v0.SpecificKeys; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader); + msg.setSpecificKeys(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.SearchKey; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader); + msg.setSearchKey(value); break; default: reader.skipField(); @@ -6655,9 +9696,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentity * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6665,114 +9706,138 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentity /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.KeyRequestType} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getAllKeys(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter ); } - f = message.getProve(); - if (f) { - writer.writeBool( + f = message.getSpecificKeys(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.org.dash.platform.dapi.v0.SpecificKeys.serializeBinaryToWriter + ); + } + f = message.getSearchKey(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter ); } }; /** - * optional bytes id = 1; - * @return {string} + * optional AllKeys all_keys = 1; + * @return {?proto.org.dash.platform.dapi.v0.AllKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getAllKeys = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.AllKeys} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.AllKeys, 1)); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` - * @return {string} + * @param {?proto.org.dash.platform.dapi.v0.AllKeys|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this +*/ +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.setAllKeys = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearAllKeys = function() { + return this.setAllKeys(undefined); }; /** - * optional bytes id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.hasAllKeys = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this + * optional SpecificKeys specific_keys = 2; + * @return {?proto.org.dash.platform.dapi.v0.SpecificKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getSpecificKeys = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.SpecificKeys} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.SpecificKeys, 2)); }; /** - * optional bool prove = 2; - * @return {boolean} + * @param {?proto.org.dash.platform.dapi.v0.SpecificKeys|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this +*/ +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.setSpecificKeys = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSpecificKeys = function() { + return this.setSpecificKeys(undefined); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.hasSpecificKeys = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional GetIdentityBalanceAndRevisionRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} + * optional SearchKey search_key = 3; + * @return {?proto.org.dash.platform.dapi.v0.SearchKey} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0, 1)); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getSearchKey = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.SearchKey} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.SearchKey, 3)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.SearchKey|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.setSearchKey = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSearchKey = function() { + return this.setSearchKey(undefined); }; @@ -6780,36 +9845,119 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.c * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.hasSearchKey = function() { + return jspb.Message.getField(this, 3) != null; }; + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * 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 + * 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.GetIdentityResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.AllKeys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.AllKeys.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.AllKeys} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.AllKeys.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + 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.AllKeys} + */ +proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.AllKeys; + return proto.org.dash.platform.dapi.v0.AllKeys.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.AllKeys} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.AllKeys} + */ +proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.AllKeys.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + /** - * @enum {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.AllKeys} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; + + /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityResponse.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.SpecificKeys.repeatedFields_ = [1]; @@ -6826,8 +9974,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.SpecificKeys.toObject(opt_includeInstance, this); }; @@ -6836,13 +9984,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.toObject = functio * @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.GetIdentityResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.SpecificKeys} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.SpecificKeys.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObject(includeInstance, f) + keyIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { @@ -6856,23 +10004,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.toObject = function(includeI /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityResponse; - return proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.SpecificKeys; + return proto.org.dash.platform.dapi.v0.SpecificKeys.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.GetIdentityResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.SpecificKeys} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6880,9 +10028,10 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinaryFromReader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinaryFromReader); - msg.setV0(value); + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]); + for (var i = 0; i < values.length; i++) { + msg.addKeyIds(values[i]); + } break; default: reader.skipField(); @@ -6897,9 +10046,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinaryFromReader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.SpecificKeys.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6907,52 +10056,62 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.serializeBinary = /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} message + * @param {!proto.org.dash.platform.dapi.v0.SpecificKeys} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.SpecificKeys.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getKeyIdsList(); + if (f.length > 0) { + writer.writePackedUint32( 1, - f, - proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.serializeBinaryToWriter + f ); } }; +/** + * repeated uint32 key_ids = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.getKeyIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + /** - * 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 + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.setKeyIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + /** - * @enum {number} + * @param {number} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - IDENTITY: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.addKeyIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.clearKeyIdsList = function() { + return this.setKeyIdsList([]); }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -6966,8 +10125,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.SearchKey.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.SearchKey.toObject(opt_includeInstance, this); }; @@ -6976,15 +10135,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.protot * @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.GetIdentityResponse.GetIdentityResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.SearchKey} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.SearchKey.toObject = function(includeInstance, msg) { var f, obj = { - identity: msg.getIdentity_asB64(), - 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) + purposeMapMap: (f = msg.getPurposeMapMap()) ? f.toObject(includeInstance, proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject) : [] }; if (includeInstance) { @@ -6998,23 +10155,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObje /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.SearchKey} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.SearchKey; + return proto.org.dash.platform.dapi.v0.SearchKey.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.GetIdentityResponse.GetIdentityResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.SearchKey} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.SearchKey} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7022,18 +10179,10 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deseri var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentity(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); + var value = msg.getPurposeMapMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader, 0, new proto.org.dash.platform.dapi.v0.SecurityLevelMap()); + }); break; default: reader.skipField(); @@ -7048,217 +10197,190 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deseri * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.SearchKey.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.GetIdentityResponse.GetIdentityResponseV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeBytes( - 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 bytes identity = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getIdentity = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes identity = 1; - * This is a type-conversion wrapper around `getIdentity()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getIdentity_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentity())); -}; - - -/** - * optional bytes identity = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentity()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getIdentity_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentity())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.setIdentity = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearIdentity = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasIdentity = function() { - return jspb.Message.getField(this, 1) != null; + proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.SearchKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getProof = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); +proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPurposeMapMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.org.dash.platform.dapi.v0.SecurityLevelMap.serializeBinaryToWriter); + } }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_[0], value); + * map purpose_map = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.org.dash.platform.dapi.v0.SearchKey.prototype.getPurposeMapMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.org.dash.platform.dapi.v0.SecurityLevelMap)); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this + * Clears values from the map. The map will be non-null. + * @return {!proto.org.dash.platform.dapi.v0.SearchKey} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); -}; +proto.org.dash.platform.dapi.v0.SearchKey.prototype.clearPurposeMapMap = function() { + this.getPurposeMapMap().clear(); + return this;}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Returns whether this field is set. - * @return {boolean} + * 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.GetIdentityResponse.GetIdentityResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject(opt_includeInstance, this); }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * 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.SecurityLevelMap} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.getMetadata = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject = function(includeInstance, msg) { + var f, obj = { + securityLevelMapMap: (f = msg.getSecurityLevelMapMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} + */ +proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.SecurityLevelMap; + return proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader(msg, reader); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getSecurityLevelMapMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readEnum, null, 0, 0); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Returns whether this field is set. - * @return {boolean} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.SecurityLevelMap.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional GetIdentityResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0, 1)); +proto.org.dash.platform.dapi.v0.SecurityLevelMap.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSecurityLevelMapMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeEnum); + } }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityResponse.oneofGroups_[0], value); + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType = { + CURRENT_KEY_OF_KIND_REQUEST: 0, + ALL_KEYS_OF_KIND_REQUEST: 1 }; - /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} returns this + * map security_level_map = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.getSecurityLevelMapMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + null)); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears values from the map. The map will be non-null. + * @return {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; -}; +proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.clearSecurityLevelMapMap = function() { + this.getSecurityLevelMapMap().clear(); + return this;}; @@ -7270,21 +10392,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.hasV0 = function() * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.oneofGroups_[0])); }; @@ -7302,8 +10424,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.toObject(opt_includeInstance, this); }; @@ -7312,13 +10434,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.toObject = fu * @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.GetIdentityNonceResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -7332,23 +10454,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.toObject = function(inc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse; - return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.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.GetIdentityNonceResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7356,8 +10478,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinaryFromRe var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -7373,9 +10495,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinaryFromRe * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7383,49 +10505,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.serializeBina /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - IDENTITY_NONCE: 1, - PROOF: 2 + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.serializeBinaryToWriter + ); + } }; -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase} - */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0])); -}; + @@ -7442,8 +10538,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.toObject(opt_includeInstance, this); }; @@ -7452,15 +10548,17 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons * @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.GetIdentityNonceResponse.GetIdentityNonceResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - identityNonce: 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) + identityId: msg.getIdentityId_asB64(), + requestType: (f = msg.getRequestType()) && proto.org.dash.platform.dapi.v0.KeyRequestType.toObject(includeInstance, f), + limit: (f = msg.getLimit()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), + offset: (f = msg.getOffset()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) }; if (includeInstance) { @@ -7474,23 +10572,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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.GetIdentityNonceResponse.GetIdentityNonceResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7498,18 +10596,27 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setIdentityNonce(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setIdentityId(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); + var value = new proto.org.dash.platform.dapi.v0.KeyRequestType; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader); + msg.setRequestType(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); + var value = new google_protobuf_wrappers_pb.UInt32Value; + reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); + msg.setLimit(value); + break; + case 4: + var value = new google_protobuf_wrappers_pb.UInt32Value; + reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); + msg.setOffset(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -7524,9 +10631,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7534,99 +10641,249 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeUint64( + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getProof(); + f = message.getRequestType(); if (f != null) { writer.writeMessage( 2, f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter ); } - f = message.getMetadata(); + f = message.getLimit(); if (f != null) { writer.writeMessage( 3, f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter + ); + } + f = message.getOffset(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 5, + f ); } }; /** - * optional uint64 identity_nonce = 1; - * @return {number} + * optional bytes identity_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getIdentityNonce = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * optional bytes identity_id = 1; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.setIdentityNonce = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); +}; + + +/** + * optional bytes identity_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentityId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional KeyRequestType request_type = 2; + * @return {?proto.org.dash.platform.dapi.v0.KeyRequestType} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getRequestType = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.KeyRequestType} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.KeyRequestType, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.KeyRequestType|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setRequestType = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.clearRequestType = function() { + return this.setRequestType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.hasRequestType = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.UInt32Value limit = 3; + * @return {?proto.google.protobuf.UInt32Value} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getLimit = function() { + return /** @type{?proto.google.protobuf.UInt32Value} */ ( + jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 3)); +}; + + +/** + * @param {?proto.google.protobuf.UInt32Value|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setLimit = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.clearLimit = function() { + return this.setLimit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.hasLimit = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.UInt32Value offset = 4; + * @return {?proto.google.protobuf.UInt32Value} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getOffset = function() { + return /** @type{?proto.google.protobuf.UInt32Value} */ ( + jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 4)); +}; + + +/** + * @param {?proto.google.protobuf.UInt32Value|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setOffset = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.clearOffset = function() { + return this.setOffset(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.hasOffset = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * optional bool prove = 5; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearIdentityNonce = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0], undefined); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasIdentityNonce = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * optional GetIdentityKeysRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getProof = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.clearV0 = function() { + return this.setV0(undefined); }; @@ -7634,82 +10891,147 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * 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.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getMetadata = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); -}; +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.oneofGroups_ = [[1]]; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.oneofGroups_[0])); }; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * 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.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.toObject(opt_includeInstance, this); }; /** - * Returns whether this field is set. - * @return {boolean} + * 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.GetIdentityKeysResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional GetIdentityNonceResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinaryFromReader(msg, reader); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.oneofGroups_[0], value); + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Returns whether this field is set. - * @return {boolean} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.serializeBinaryToWriter + ); + } }; @@ -7722,21 +11044,22 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.hasV0 = funct * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + KEYS: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_[0])); }; @@ -7754,8 +11077,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.toObject(opt_includeInstance, this); }; @@ -7764,13 +11087,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.toObj * @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.GetIdentityContractNonceResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.toObject(includeInstance, f) + keys: (f = msg.getKeys()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.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) { @@ -7784,23 +11109,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.toObject = func /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse; - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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.GetIdentityContractNonceResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7808,9 +11133,19 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBina var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinaryFromReader); + msg.setKeys(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(); @@ -7825,9 +11160,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBina * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7835,18 +11170,34 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.seria /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getKeys(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.serializeBinaryToWriter + ); + } + f = message.getProof(); if (f != null) { writer.writeMessage( - 1, + 2, f, - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.serializeBinaryToWriter + 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 ); } }; @@ -7854,30 +11205,11 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.serializeBinary /** - * 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>} + * List of repeated fields within this message type. + * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - IDENTITY_CONTRACT_NONCE: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.ResultCase} - */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.repeatedFields_ = [1]; @@ -7894,8 +11226,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.toObject(opt_includeInstance, this); }; @@ -7904,15 +11236,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont * @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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.toObject = function(includeInstance, msg) { var f, obj = { - identityContractNonce: 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) + keysBytesList: msg.getKeysBytesList_asB64() }; if (includeInstance) { @@ -7926,23 +11256,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys; + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7950,18 +11280,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setIdentityContractNonce(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); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addKeysBytes(value); break; default: reader.skipField(); @@ -7976,9 +11296,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7986,62 +11306,108 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeUint64( + f = message.getKeysBytesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( 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 identity_contract_nonce = 1; - * @return {number} + * repeated bytes keys_bytes = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getIdentityContractNonce = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * repeated bytes keys_bytes = 1; + * This is a type-conversion wrapper around `getKeysBytesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.setIdentityContractNonce = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getKeysBytesList())); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * repeated bytes keys_bytes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKeysBytesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearIdentityContractNonce = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0], undefined); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getKeysBytesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.setKeysBytesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.addKeysBytes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.clearKeysBytesList = function() { + return this.setKeysBytesList([]); +}; + + +/** + * optional Keys keys = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getKeys = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.setKeys = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.clearKeys = function() { + return this.setKeys(undefined); }; @@ -8049,7 +11415,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasIdentityContractNonce = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasKeys = function() { return jspb.Message.getField(this, 1) != null; }; @@ -8058,7 +11424,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -8066,18 +11432,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -8086,7 +11452,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -8095,7 +11461,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -8103,18 +11469,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -8123,35 +11489,35 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityCont * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetIdentityContractNonceResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} + * optional GetIdentityKeysResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -8160,7 +11526,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.clear * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -8174,21 +11540,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.hasV0 * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.oneofGroups_[0])); }; @@ -8206,8 +11572,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.toObject(opt_includeInstance, this); }; @@ -8216,13 +11582,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.toObject = * @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.GetIdentityBalanceResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -8236,23 +11602,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.toObject = function(i /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest; + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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.GetIdentityBalanceResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8260,8 +11626,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinaryFrom var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -8277,9 +11643,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinaryFrom * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8287,18 +11653,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.serializeBi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.serializeBinaryToWriter ); } }; @@ -8306,30 +11672,11 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.serializeBinaryToWrit /** - * 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>} + * List of repeated fields within this message type. + * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - BALANCE: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.ResultCase} - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.repeatedFields_ = [1,4]; @@ -8346,8 +11693,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.toObject(opt_includeInstance, this); }; @@ -8356,15 +11703,17 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceRes * @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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - balance: 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) + identitiesIdsList: msg.getIdentitiesIdsList_asB64(), + contractId: msg.getContractId_asB64(), + documentTypeName: jspb.Message.getFieldWithDefault(msg, 3, ""), + purposesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, + prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) }; if (includeInstance) { @@ -8378,23 +11727,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceRes /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8402,18 +11751,26 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceRes var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBalance(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIdentitiesIds(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); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractId(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); + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentTypeName(value); + break; + case 4: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addPurposes(values[i]); + } + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -8425,75 +11782,190 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceRes /** - * Serializes the message to binary data (in protobuf wire format). + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentitiesIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = message.getPurposesList(); + if (f.length > 0) { + writer.writePackedEnum( + 4, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * repeated bytes identities_ids = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getIdentitiesIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes identities_ids = 1; + * This is a type-conversion wrapper around `getIdentitiesIdsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getIdentitiesIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIdentitiesIdsList())); +}; + + +/** + * repeated bytes identities_ids = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentitiesIdsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getIdentitiesIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdentitiesIdsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setIdentitiesIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.addIdentitiesIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearIdentitiesIdsList = function() { + return this.setIdentitiesIdsList([]); +}; + + +/** + * optional bytes contract_id = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes contract_id = 2; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContractId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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 - ); - } +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * optional uint64 balance = 1; - * @return {number} + * optional string document_type_name = 3; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getDocumentTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.setBalance = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setDocumentTypeName = function(value) { + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.clearBalance = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0], undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearDocumentTypeName = function() { + return jspb.Message.setField(this, 3, undefined); }; @@ -8501,109 +11973,90 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceRes * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasBalance = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.hasDocumentTypeName = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * repeated KeyPurpose purposes = 4; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getPurposesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setPurposesList = function(value) { + return jspb.Message.setField(this, 4, value || []); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!proto.org.dash.platform.dapi.v0.KeyPurpose} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.addPurposes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearPurposesList = function() { + return this.setPurposesList([]); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + * optional bool prove = 5; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); }; /** - * optional GetIdentityBalanceResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} + * optional GetIdentitiesContractKeysRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -8612,7 +12065,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.clearV0 = f * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -8626,21 +12079,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.hasV0 = fun * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.oneofGroups_[0])); }; @@ -8658,8 +12111,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.toObject(opt_includeInstance, this); }; @@ -8668,13 +12121,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype. * @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.GetIdentityBalanceAndRevisionResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -8688,23 +12141,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse; + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.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.GetIdentityBalanceAndRevisionResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8712,8 +12165,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -8729,9 +12182,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8739,18 +12192,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.serializeBinaryToWriter ); } }; @@ -8765,22 +12218,22 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.serializeB * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase = { RESULT_NOT_SET: 0, - BALANCE_AND_REVISION: 1, + IDENTITIES_KEYS: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_[0])); }; @@ -8798,8 +12251,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.toObject(opt_includeInstance, this); }; @@ -8808,13 +12261,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit * @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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - balanceAndRevision: (f = msg.getBalanceAndRevision()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.toObject(includeInstance, f), + identitiesKeys: (f = msg.getIdentitiesKeys()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.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) }; @@ -8830,23 +12283,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8854,9 +12307,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinaryFromReader); - msg.setBalanceAndRevision(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinaryFromReader); + msg.setIdentitiesKeys(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -8881,9 +12334,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8891,18 +12344,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBalanceAndRevision(); + f = message.getIdentitiesKeys(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.serializeBinaryToWriter ); } f = message.getProof(); @@ -8925,6 +12378,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.repeatedFields_ = [2]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -8940,8 +12400,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.toObject(opt_includeInstance, this); }; @@ -8950,14 +12410,14 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit * @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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.toObject = function(includeInstance, msg) { var f, obj = { - balance: jspb.Message.getFieldWithDefault(msg, 1, 0), - revision: jspb.Message.getFieldWithDefault(msg, 2, 0) + purpose: jspb.Message.getFieldWithDefault(msg, 1, 0), + keysBytesList: msg.getKeysBytesList_asB64() }; if (includeInstance) { @@ -8971,23 +12431,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision; - return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys; + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8995,12 +12455,12 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBalance(value); + var value = /** @type {!proto.org.dash.platform.dapi.v0.KeyPurpose} */ (reader.readEnum()); + msg.setPurpose(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRevision(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addKeysBytes(value); break; default: reader.skipField(); @@ -9015,9 +12475,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9025,22 +12485,22 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBalance(); - if (f !== 0) { - writer.writeUint64( + f = message.getPurpose(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = message.getRevision(); - if (f !== 0) { - writer.writeUint64( + f = message.getKeysBytesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( 2, f ); @@ -9049,216 +12509,305 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentit /** - * optional uint64 balance = 1; - * @return {number} + * optional KeyPurpose purpose = 1; + * @return {!proto.org.dash.platform.dapi.v0.KeyPurpose} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getPurpose = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.KeyPurpose} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} returns this + * @param {!proto.org.dash.platform.dapi.v0.KeyPurpose} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.setPurpose = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional uint64 revision = 2; - * @return {number} + * repeated bytes keys_bytes = 2; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.getRevision = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} returns this + * repeated bytes keys_bytes = 2; + * This is a type-conversion wrapper around `getKeysBytesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.setRevision = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getKeysBytesList())); }; /** - * optional BalanceAndRevision balance_and_revision = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} + * repeated bytes keys_bytes = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKeysBytesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.getBalanceAndRevision = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getKeysBytesList())); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.setBalanceAndRevision = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_[0], value); + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.setKeysBytesList = function(value) { + return jspb.Message.setField(this, 2, value || []); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearBalanceAndRevision = function() { - return this.setBalanceAndRevision(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.addKeysBytes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasBalanceAndRevision = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.clearKeysBytesList = function() { + return this.setKeysBytesList([]); }; + /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.getProof = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.repeatedFields_ = [2]; + + + +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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject(opt_includeInstance, this); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_[0], value); + * 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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject = function(includeInstance, msg) { + var f, obj = { + identityId: msg.getIdentityId_asB64(), + keysList: jspb.Message.toObjectList(msg.getKeysList(), + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys; + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinaryFromReader(msg, reader); }; /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.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.setIdentityId(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.deserializeBinaryFromReader); + msg.addKeys(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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getKeysList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter + ); + } }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * optional bytes identity_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.getMetadata = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * optional bytes identity_id = 1; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this + * optional bytes identity_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentityId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional GetIdentityBalanceAndRevisionResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} + * repeated PurposeKeys keys = 2; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getKeysList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys, 2)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} returns this + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.setKeysList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} returns this + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.addKeys = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.clearKeysList = function() { + return this.setKeysList([]); }; /** - * 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>} + * List of repeated fields within this message type. + * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_ = [[1,2,3]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.KeyRequestType.RequestCase = { - REQUEST_NOT_SET: 0, - ALL_KEYS: 1, - SPECIFIC_KEYS: 2, - SEARCH_KEY: 3 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.KeyRequestType.RequestCase} - */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getRequestCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.KeyRequestType.RequestCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.repeatedFields_ = [1]; @@ -9275,8 +12824,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.KeyRequestType.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.toObject(opt_includeInstance, this); }; @@ -9285,15 +12834,14 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.toObject = function(opt * @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.KeyRequestType} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.KeyRequestType.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.toObject = function(includeInstance, msg) { var f, obj = { - allKeys: (f = msg.getAllKeys()) && proto.org.dash.platform.dapi.v0.AllKeys.toObject(includeInstance, f), - specificKeys: (f = msg.getSpecificKeys()) && proto.org.dash.platform.dapi.v0.SpecificKeys.toObject(includeInstance, f), - searchKey: (f = msg.getSearchKey()) && proto.org.dash.platform.dapi.v0.SearchKey.toObject(includeInstance, f) + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject, includeInstance) }; if (includeInstance) { @@ -9307,23 +12855,23 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.toObject = function(includeInstan /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.KeyRequestType; - return proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys; + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.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.KeyRequestType} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9331,19 +12879,9 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader = fun var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.AllKeys; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinaryFromReader); - msg.setAllKeys(value); - break; - case 2: - var value = new proto.org.dash.platform.dapi.v0.SpecificKeys; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader); - msg.setSpecificKeys(value); - break; - case 3: - var value = new proto.org.dash.platform.dapi.v0.SearchKey; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader); - msg.setSearchKey(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinaryFromReader); + msg.addEntries(value); break; default: reader.skipField(); @@ -9358,74 +12896,133 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader = fun * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.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.KeyRequestType} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdentityKeys entries = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + +/** + * optional IdentitiesKeys identities_keys = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.getIdentitiesKeys = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.setIdentitiesKeys = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearIdentitiesKeys = function() { + return this.setIdentitiesKeys(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAllKeys(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter - ); - } - f = message.getSpecificKeys(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.org.dash.platform.dapi.v0.SpecificKeys.serializeBinaryToWriter - ); - } - f = message.getSearchKey(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasIdentitiesKeys = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional AllKeys all_keys = 1; - * @return {?proto.org.dash.platform.dapi.v0.AllKeys} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getAllKeys = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.AllKeys} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.AllKeys, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.AllKeys|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.setAllKeys = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearAllKeys = function() { - return this.setAllKeys(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; @@ -9433,36 +13030,36 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearAllKeys = function * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.hasAllKeys = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional SpecificKeys specific_keys = 2; - * @return {?proto.org.dash.platform.dapi.v0.SpecificKeys} + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getSpecificKeys = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.SpecificKeys} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.SpecificKeys, 2)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.SpecificKeys|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.setSpecificKeys = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.KeyRequestType} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSpecificKeys = function() { - return this.setSpecificKeys(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; @@ -9470,36 +13067,36 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSpecificKeys = fun * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.hasSpecificKeys = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional SearchKey search_key = 3; - * @return {?proto.org.dash.platform.dapi.v0.SearchKey} + * optional GetIdentitiesContractKeysResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.getSearchKey = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.SearchKey} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.SearchKey, 3)); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.SearchKey|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} returns this */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.setSearchKey = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.org.dash.platform.dapi.v0.KeyRequestType.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} returns this */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSearchKey = function() { - return this.setSearchKey(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; @@ -9507,12 +13104,37 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSearchKey = functi * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.hasSearchKey = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.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.GetEvonodesProposedEpochBlocksByIdsRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -9528,8 +13150,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.AllKeys.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.AllKeys.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.toObject(opt_includeInstance, this); }; @@ -9538,13 +13160,13 @@ proto.org.dash.platform.dapi.v0.AllKeys.prototype.toObject = function(opt_includ * @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.AllKeys} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.AllKeys.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.toObject = function(includeInstance, msg) { var f, obj = { - + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -9558,29 +13180,34 @@ proto.org.dash.platform.dapi.v0.AllKeys.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.AllKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} */ -proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.AllKeys; - return proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.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.AllKeys} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.AllKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} */ -proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.deserializeBinaryFromReader); + msg.setV0(value); + break; default: reader.skipField(); break; @@ -9594,9 +13221,9 @@ proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.AllKeys.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9604,12 +13231,20 @@ proto.org.dash.platform.dapi.v0.AllKeys.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.AllKeys} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.serializeBinaryToWriter + ); + } }; @@ -9619,7 +13254,7 @@ proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter = function(messa * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.SpecificKeys.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.repeatedFields_ = [2]; @@ -9636,8 +13271,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.SpecificKeys.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.toObject(opt_includeInstance, this); }; @@ -9646,13 +13281,15 @@ proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.toObject = function(opt_i * @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.SpecificKeys} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.SpecificKeys.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - keyIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), + idsList: msg.getIdsList_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -9666,23 +13303,23 @@ proto.org.dash.platform.dapi.v0.SpecificKeys.toObject = function(includeInstance /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} */ -proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.SpecificKeys; - return proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.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.SpecificKeys} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} */ -proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9690,10 +13327,16 @@ proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader = funct var field = reader.getFieldNumber(); switch (field) { case 1: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]); - for (var i = 0; i < values.length; i++) { - msg.addKeyIds(values[i]); - } + var value = /** @type {number} */ (reader.readUint32()); + msg.setEpoch(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIds(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -9708,9 +13351,9 @@ proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader = funct * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.SpecificKeys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9718,192 +13361,195 @@ proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.serializeBinary = functio /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.SpecificKeys} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.SpecificKeys.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeyIdsList(); - if (f.length > 0) { - writer.writePackedUint32( + f = message.getEpoch(); + if (f !== 0) { + writer.writeUint32( 1, f ); } + f = message.getIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 3, + f + ); + } }; /** - * repeated uint32 key_ids = 1; - * @return {!Array} + * optional uint32 epoch = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getEpoch = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setEpoch = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated bytes ids = 2; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * repeated bytes ids = 2; + * This is a type-conversion wrapper around `getIdsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIdsList())); +}; + + +/** + * repeated bytes ids = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.getKeyIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdsList())); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.setKeyIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); }; /** - * @param {number} value + * @param {!(string|Uint8Array)} value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.addKeyIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.addIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.clearKeyIdsList = function() { - return this.setKeyIdsList([]); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.clearIdsList = function() { + return this.setIdsList([]); }; - - - -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} + * optional bool prove = 3; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.SearchKey.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.SearchKey.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * 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.SearchKey} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.SearchKey.toObject = function(includeInstance, msg) { - var f, obj = { - purposeMapMap: (f = msg.getPurposeMapMap()) ? f.toObject(includeInstance, proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.SearchKey} + * optional GetEvonodesProposedEpochBlocksByIdsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} */ -proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.SearchKey; - return proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0, 1)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.SearchKey} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.SearchKey} - */ -proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = msg.getPurposeMapMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader, 0, new proto.org.dash.platform.dapi.v0.SecurityLevelMap()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; + * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.oneofGroups_[0], value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} returns this */ -proto.org.dash.platform.dapi.v0.SearchKey.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.SearchKey} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPurposeMapMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.org.dash.platform.dapi.v0.SecurityLevelMap.serializeBinaryToWriter); - } +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * map purpose_map = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * 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.SearchKey.prototype.getPurposeMapMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.org.dash.platform.dapi.v0.SecurityLevelMap)); -}; - +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.oneofGroups_ = [[1]]; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.org.dash.platform.dapi.v0.SearchKey} returns this + * @enum {number} */ -proto.org.dash.platform.dapi.v0.SearchKey.prototype.clearPurposeMapMap = function() { - this.getPurposeMapMap().clear(); - return this;}; - +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; +/** + * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.oneofGroups_[0])); +}; @@ -9920,8 +13566,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.toObject(opt_includeInstance, this); }; @@ -9930,13 +13576,13 @@ proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.toObject = function(o * @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.SecurityLevelMap} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.toObject = function(includeInstance, msg) { var f, obj = { - securityLevelMapMap: (f = msg.getSecurityLevelMapMap()) ? f.toObject(includeInstance, undefined) : [] + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -9950,23 +13596,23 @@ proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject = function(includeInst /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.SecurityLevelMap; - return proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.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.SecurityLevelMap} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9974,10 +13620,9 @@ proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader = f var field = reader.getFieldNumber(); switch (field) { case 1: - var value = msg.getSecurityLevelMapMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readEnum, null, 0, 0); - }); + var value = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -9992,9 +13637,9 @@ proto.org.dash.platform.dapi.v0.SecurityLevelMap.deserializeBinaryFromReader = f * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.SecurityLevelMap.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10002,49 +13647,23 @@ proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.serializeBinary = fun /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSecurityLevelMapMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeEnum); + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.serializeBinaryToWriter + ); } }; -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType = { - CURRENT_KEY_OF_KIND_REQUEST: 0, - ALL_KEYS_OF_KIND_REQUEST: 1 -}; - -/** - * map security_level_map = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.getSecurityLevelMapMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} returns this - */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.clearSecurityLevelMapMap = function() { - this.getSecurityLevelMapMap().clear(); - return this;}; - - /** * Oneof group definitions for this message. Each group defines the field @@ -10054,21 +13673,22 @@ proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.clearSecurityLevelMap * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + EVONODES_PROPOSED_BLOCK_COUNTS_INFO: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.oneofGroups_[0])); }; @@ -10086,8 +13706,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.toObject(opt_includeInstance, this); }; @@ -10096,13 +13716,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.toObject = func * @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.GetIdentityKeysRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.toObject(includeInstance, f) + evonodesProposedBlockCountsInfo: (f = msg.getEvonodesProposedBlockCountsInfo()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.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) { @@ -10116,23 +13738,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.toObject = function(inclu /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest; - return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetIdentityKeysRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10140,9 +13762,19 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinaryFromRead var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.deserializeBinaryFromReader); + msg.setEvonodesProposedBlockCountsInfo(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(); @@ -10157,9 +13789,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinaryFromRead * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10167,18 +13799,34 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.serializeBinary /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getEvonodesProposedBlockCountsInfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.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( - 1, + 3, f, - proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter ); } }; @@ -10200,8 +13848,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.toObject(opt_includeInstance, this); }; @@ -10210,17 +13858,14 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. * @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.GetIdentityKeysRequest.GetIdentityKeysRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.toObject = function(includeInstance, msg) { var f, obj = { - identityId: msg.getIdentityId_asB64(), - requestType: (f = msg.getRequestType()) && proto.org.dash.platform.dapi.v0.KeyRequestType.toObject(includeInstance, f), - limit: (f = msg.getLimit()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), - offset: (f = msg.getOffset()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + proTxHash: msg.getProTxHash_asB64(), + count: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -10234,23 +13879,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.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.GetIdentityKeysRequest.GetIdentityKeysRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10259,26 +13904,11 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentityId(value); + msg.setProTxHash(value); break; case 2: - var value = new proto.org.dash.platform.dapi.v0.KeyRequestType; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader); - msg.setRequestType(value); - break; - case 3: - var value = new google_protobuf_wrappers_pb.UInt32Value; - reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); - msg.setLimit(value); - break; - case 4: - var value = new google_protobuf_wrappers_pb.UInt32Value; - reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); - msg.setOffset(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setCount(value); break; default: reader.skipField(); @@ -10293,9 +13923,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10303,47 +13933,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); + f = message.getProTxHash_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getRequestType(); - if (f != null) { - writer.writeMessage( + f = message.getCount(); + if (f !== 0) { + writer.writeUint64( 2, - f, - proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter - ); - } - f = message.getLimit(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter - ); - } - f = message.getOffset(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 5, f ); } @@ -10351,238 +13957,72 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. /** - * optional bytes identity_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes identity_id = 1; - * This is a type-conversion wrapper around `getIdentityId()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentityId())); -}; - - -/** - * optional bytes identity_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentityId()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setIdentityId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional KeyRequestType request_type = 2; - * @return {?proto.org.dash.platform.dapi.v0.KeyRequestType} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getRequestType = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.KeyRequestType} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.KeyRequestType, 2)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.KeyRequestType|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setRequestType = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.clearRequestType = function() { - return this.setRequestType(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.hasRequestType = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional google.protobuf.UInt32Value limit = 3; - * @return {?proto.google.protobuf.UInt32Value} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getLimit = function() { - return /** @type{?proto.google.protobuf.UInt32Value} */ ( - jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 3)); -}; - - -/** - * @param {?proto.google.protobuf.UInt32Value|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setLimit = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.clearLimit = function() { - return this.setLimit(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.hasLimit = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional google.protobuf.UInt32Value offset = 4; - * @return {?proto.google.protobuf.UInt32Value} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getOffset = function() { - return /** @type{?proto.google.protobuf.UInt32Value} */ ( - jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 4)); -}; - - -/** - * @param {?proto.google.protobuf.UInt32Value|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setOffset = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.clearOffset = function() { - return this.setOffset(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.hasOffset = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional bool prove = 5; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * optional GetIdentityKeysRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} + * optional bytes pro_tx_hash = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.oneofGroups_[0], value); + * optional bytes pro_tx_hash = 1; + * This is a type-conversion wrapper around `getProTxHash()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProTxHash())); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} returns this + * optional bytes pro_tx_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProTxHash()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProTxHash())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.setProTxHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; - /** - * 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 + * optional uint64 count = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + /** - * @enum {number} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.setCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; + + /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.repeatedFields_ = [1]; @@ -10599,8 +14039,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.toObject(opt_includeInstance, this); }; @@ -10609,13 +14049,14 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.toObject = fun * @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.GetIdentityKeysResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.toObject(includeInstance, f) + evonodesProposedBlockCountsList: jspb.Message.toObjectList(msg.getEvonodesProposedBlockCountsList(), + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.toObject, includeInstance) }; if (includeInstance) { @@ -10629,23 +14070,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.toObject = function(incl /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse; - return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.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.GetIdentityKeysResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10653,9 +14094,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinaryFromRea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.deserializeBinaryFromReader); + msg.addEvonodesProposedBlockCounts(value); break; default: reader.skipField(); @@ -10670,9 +14111,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinaryFromRea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10680,23 +14121,209 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.serializeBinar /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getEvonodesProposedBlockCountsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.serializeBinaryToWriter ); } }; +/** + * repeated EvonodeProposedBlocks evonodes_proposed_block_counts = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.getEvonodesProposedBlockCountsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.setEvonodesProposedBlockCountsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.addEvonodesProposedBlockCounts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.clearEvonodesProposedBlockCountsList = function() { + return this.setEvonodesProposedBlockCountsList([]); +}; + + +/** + * optional EvonodesProposedBlocks evonodes_proposed_block_counts_info = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.getEvonodesProposedBlockCountsInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.setEvonodesProposedBlockCountsInfo = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.clearEvonodesProposedBlockCountsInfo = function() { + return this.setEvonodesProposedBlockCountsInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.hasEvonodesProposedBlockCountsInfo = 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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetEvonodesProposedEpochBlocksResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + /** * Oneof group definitions for this message. Each group defines the field @@ -10706,22 +14333,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.serializeBinaryToWriter * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - KEYS: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.oneofGroups_[0])); }; @@ -10739,8 +14365,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.toObject(opt_includeInstance, this); }; @@ -10749,15 +14375,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV * @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.GetIdentityKeysResponse.GetIdentityKeysResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.toObject = function(includeInstance, msg) { var f, obj = { - keys: (f = msg.getKeys()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.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) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -10771,43 +14395,33 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinaryFromReader); - msg.setKeys(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); + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -10822,9 +14436,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10832,34 +14446,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeys(); + f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.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 + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.serializeBinaryToWriter ); } }; @@ -10867,11 +14465,30 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV /** - * List of repeated fields within this message type. - * @private {!Array} + * 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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_ = [[3,4]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.StartCase = { + START_NOT_SET: 0, + START_AFTER: 3, + START_AT: 4 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.StartCase} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.StartCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_[0])); +}; @@ -10888,8 +14505,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.toObject(opt_includeInstance, this); }; @@ -10898,13 +14515,17 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV * @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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - keysBytesList: msg.getKeysBytesList_asB64() + epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), + limit: jspb.Message.getFieldWithDefault(msg, 2, 0), + startAfter: msg.getStartAfter_asB64(), + startAt: msg.getStartAt_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) }; if (includeInstance) { @@ -10918,23 +14539,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys; - return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0; + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10942,8 +14563,24 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setEpoch(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLimit(value); + break; + case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addKeysBytes(value); + msg.setStartAfter(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStartAt(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -10958,9 +14595,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10968,182 +14605,212 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} message + * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeysBytesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( + f = message.getEpoch(); + if (f !== 0) { + writer.writeUint32( 1, f ); } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes( + 3, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeBytes( + 4, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 5, + f + ); + } }; /** - * repeated bytes keys_bytes = 1; - * @return {!Array} + * optional uint32 epoch = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getEpoch = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * repeated bytes keys_bytes = 1; - * This is a type-conversion wrapper around `getKeysBytesList()` - * @return {!Array} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getKeysBytesList())); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setEpoch = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * repeated bytes keys_bytes = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKeysBytesList()` - * @return {!Array} + * optional uint32 limit = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getKeysBytesList())); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.setKeysBytesList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setLimit = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.addKeysBytes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.clearLimit = function() { + return jspb.Message.setField(this, 2, undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.clearKeysBytesList = function() { - return this.setKeysBytesList([]); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasLimit = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional Keys keys = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} + * optional bytes start_after = 3; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getKeys = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys, 1)); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.setKeys = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_[0], value); + * optional bytes start_after = 3; + * This is a type-conversion wrapper around `getStartAfter()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartAfter())); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this + * optional bytes start_after = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStartAfter()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.clearKeys = function() { - return this.setKeys(undefined); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartAfter())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasKeys = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setStartAfter = function(value) { + return jspb.Message.setOneofField(this, 3, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_[0], value); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getProof = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.clearStartAfter = function() { + return jspb.Message.setOneofField(this, 3, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_[0], undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.oneofGroups_[0], value); + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasStartAfter = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this + * optional bytes start_at = 4; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes start_at = 4; + * This is a type-conversion wrapper around `getStartAt()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartAt())); }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * optional bytes start_at = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStartAt()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.getMetadata = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartAt())); }; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setStartAt = function(value) { + return jspb.Message.setOneofField(this, 4, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_[0], value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.clearStartAt = function() { + return jspb.Message.setOneofField(this, 4, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_[0], undefined); }; @@ -11151,35 +14818,53 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasStartAt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bool prove = 5; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); }; /** - * optional GetIdentityKeysResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} + * optional GetEvonodesProposedEpochBlocksByRangeRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -11188,7 +14873,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.clearV0 = func * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -11202,21 +14887,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.hasV0 = functi * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.oneofGroups_[0])); }; @@ -11234,8 +14919,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.toObject(opt_includeInstance, this); }; @@ -11244,13 +14929,13 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.toObj * @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.GetIdentitiesContractKeysRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -11264,23 +14949,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.toObject = func /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest; - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest; + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.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.GetIdentitiesContractKeysRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11288,8 +14973,8 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.deserializeBina var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -11305,9 +14990,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.deserializeBina * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11315,31 +15000,24 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.seria /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter ); } }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.repeatedFields_ = [1,4]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -11355,8 +15033,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.toObject(opt_includeInstance, this); }; @@ -11365,17 +15043,14 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo * @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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - identitiesIdsList: msg.getIdentitiesIdsList_asB64(), - contractId: msg.getContractId_asB64(), - documentTypeName: jspb.Message.getFieldWithDefault(msg, 3, ""), - purposesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, - prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + identitiesIds: (f = msg.getIdentitiesIds()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.toObject(includeInstance, f), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -11389,23 +15064,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11413,24 +15088,11 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIdentitiesIds(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.deserializeBinaryFromReader); + msg.setIdentitiesIds(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentTypeName(value); - break; - case 4: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); - for (var i = 0; i < values.length; i++) { - msg.addPurposes(values[i]); - } - break; - case 5: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -11447,9 +15109,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11457,268 +15119,289 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentitiesIdsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 1, - f - ); - } - f = message.getContractId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 3)); + f = message.getIdentitiesIds(); if (f != null) { - writer.writeString( - 3, - f - ); - } - f = message.getPurposesList(); - if (f.length > 0) { - writer.writePackedEnum( - 4, - f + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.serializeBinaryToWriter ); } f = message.getProve(); if (f) { writer.writeBool( - 5, + 2, f ); } }; -/** - * repeated bytes identities_ids = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getIdentitiesIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - /** - * repeated bytes identities_ids = 1; - * This is a type-conversion wrapper around `getIdentitiesIdsList()` - * @return {!Array} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getIdentitiesIdsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIdentitiesIdsList())); -}; +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * repeated bytes identities_ids = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentitiesIdsList()` - * @return {!Array} + * 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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getIdentitiesIdsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getIdentitiesIdsList())); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.toObject(opt_includeInstance, this); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns 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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setIdentitiesIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.toObject = function(includeInstance, msg) { + var f, obj = { + identitiesIdsList: msg.getIdentitiesIdsList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.addIdentitiesIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds; + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.deserializeBinaryFromReader(msg, reader); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearIdentitiesIdsList = function() { - return this.setIdentitiesIdsList([]); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.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.addIdentitiesIds(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional bytes contract_id = 2; - * @return {string} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional bytes contract_id = 2; - * This is a type-conversion wrapper around `getContractId()` - * @return {string} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentitiesIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } }; /** - * optional bytes contract_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractId()` - * @return {!Uint8Array} + * repeated bytes identities_ids = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.getIdentitiesIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * repeated bytes identities_ids = 1; + * This is a type-conversion wrapper around `getIdentitiesIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.getIdentitiesIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIdentitiesIdsList())); }; /** - * optional string document_type_name = 3; - * @return {string} + * repeated bytes identities_ids = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentitiesIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getDocumentTypeName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.getIdentitiesIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdentitiesIdsList())); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setDocumentTypeName = function(value) { - return jspb.Message.setField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.setIdentitiesIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearDocumentTypeName = function() { - return jspb.Message.setField(this, 3, undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.addIdentitiesIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.hasDocumentTypeName = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds.prototype.clearIdentitiesIdsList = function() { + return this.setIdentitiesIdsList([]); }; /** - * repeated KeyPurpose purposes = 4; - * @return {!Array} + * optional GetIdentitiesBalancesByKnownIdentityIds identities_ids = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getPurposesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getIdentitiesIds = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds, 1)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setPurposesList = function(value) { - return jspb.Message.setField(this, 4, value || []); + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.GetIdentitiesBalancesByKnownIdentityIds|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.setIdentitiesIds = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.KeyPurpose} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.addPurposes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.clearIdentitiesIds = function() { + return this.setIdentitiesIds(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearPurposesList = function() { - return this.setPurposesList([]); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.hasIdentitiesIds = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bool prove = 5; + * optional bool prove = 2; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional GetIdentitiesContractKeysRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} + * optional GetIdentitiesBalancesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -11727,7 +15410,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.clear * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -11741,21 +15424,21 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.hasV0 * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.oneofGroups_[0])); }; @@ -11773,8 +15456,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.toObject(opt_includeInstance, this); }; @@ -11783,13 +15466,13 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.toOb * @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.GetIdentitiesContractKeysResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -11803,23 +15486,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.toObject = fun /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse; - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse; + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetIdentitiesContractKeysResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11827,8 +15510,8 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBin var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -11844,9 +15527,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBin * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11854,18 +15537,18 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.seri /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.serializeBinaryToWriter ); } }; @@ -11880,22 +15563,22 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.serializeBinar * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase = { RESULT_NOT_SET: 0, - IDENTITIES_KEYS: 1, + IDENTITIES_BALANCES: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_[0])); }; @@ -11913,8 +15596,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.toObject(opt_includeInstance, this); }; @@ -11923,13 +15606,13 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * @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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - identitiesKeys: (f = msg.getIdentitiesKeys()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.toObject(includeInstance, f), + identitiesBalances: (f = msg.getIdentitiesBalances()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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) }; @@ -11945,23 +15628,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11969,161 +15652,20 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinaryFromReader); - msg.setIdentitiesKeys(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.deserializeBinaryFromReader); + msg.setIdentitiesBalances(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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIdentitiesKeys(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.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 - ); - } -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.repeatedFields_ = [2]; - - - -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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.toObject = function(includeInstance, msg) { - var f, obj = { - purpose: jspb.Message.getFieldWithDefault(msg, 1, 0), - keysBytesList: msg.getKeysBytesList_asB64() - }; - - 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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys; - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.org.dash.platform.dapi.v0.KeyPurpose} */ (reader.readEnum()); - msg.setPurpose(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addKeysBytes(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; @@ -12137,9 +15679,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12147,116 +15689,40 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPurpose(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getIdentitiesBalances(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.serializeBinaryToWriter ); } - f = message.getKeysBytesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( + f = message.getProof(); + if (f != null) { + writer.writeMessage( 2, - f + 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 KeyPurpose purpose = 1; - * @return {!proto.org.dash.platform.dapi.v0.KeyPurpose} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getPurpose = function() { - return /** @type {!proto.org.dash.platform.dapi.v0.KeyPurpose} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.org.dash.platform.dapi.v0.KeyPurpose} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.setPurpose = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * repeated bytes keys_bytes = 2; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * repeated bytes keys_bytes = 2; - * This is a type-conversion wrapper around `getKeysBytesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getKeysBytesList())); -}; - - -/** - * repeated bytes keys_bytes = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKeysBytesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getKeysBytesList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.setKeysBytesList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.addKeysBytes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.clearKeysBytesList = function() { - return this.setKeysBytesList([]); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.repeatedFields_ = [2]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -12272,8 +15738,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.toObject(opt_includeInstance, this); }; @@ -12282,15 +15748,14 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * @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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.toObject = function(includeInstance, msg) { var f, obj = { identityId: msg.getIdentityId_asB64(), - keysList: jspb.Message.toObjectList(msg.getKeysList(), - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.toObject, includeInstance) + balance: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -12304,23 +15769,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys; - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance; + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12332,9 +15797,8 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC msg.setIdentityId(value); break; case 2: - var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.deserializeBinaryFromReader); - msg.addKeys(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setBalance(value); break; default: reader.skipField(); @@ -12349,9 +15813,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12359,11 +15823,11 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIdentityId_asU8(); if (f.length > 0) { @@ -12372,12 +15836,11 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC f ); } - f = message.getKeysList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( 2, - f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter + f ); } }; @@ -12387,7 +15850,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * optional bytes identity_id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getIdentityId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -12397,7 +15860,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * This is a type-conversion wrapper around `getIdentityId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getIdentityId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getIdentityId())); }; @@ -12410,7 +15873,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * This is a type-conversion wrapper around `getIdentityId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getIdentityId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getIdentityId())); }; @@ -12418,48 +15881,46 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.setIdentityId = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.setIdentityId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * repeated PurposeKeys keys = 2; - * @return {!Array} + * optional uint64 balance = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getKeysList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys, 2)); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.setKeysList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.setBalance = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.addKeys = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.clearBalance = function() { + return jspb.Message.setField(this, 2, undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.clearKeysList = function() { - return this.setKeysList([]); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.hasBalance = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -12469,7 +15930,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.repeatedFields_ = [1]; @@ -12486,8 +15947,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.toObject(opt_includeInstance, this); }; @@ -12496,14 +15957,14 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * @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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.toObject = function(includeInstance, msg) { var f, obj = { entriesList: jspb.Message.toObjectList(msg.getEntriesList(), - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject, includeInstance) + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.toObject, includeInstance) }; if (includeInstance) { @@ -12517,23 +15978,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys; - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances; + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12541,8 +16002,8 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.deserializeBinaryFromReader); msg.addEntries(value); break; default: @@ -12558,9 +16019,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12568,86 +16029,86 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getEntriesList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter ); } }; /** - * repeated IdentityKeys entries = 1; - * @return {!Array} + * repeated IdentityBalance entries = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.getEntriesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance, 1)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} returns this + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.setEntriesList = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.setEntriesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys=} opt_value + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance=} opt_value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.addEntries = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.clearEntriesList = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.clearEntriesList = function() { return this.setEntriesList([]); }; /** - * optional IdentitiesKeys identities_keys = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} + * optional IdentitiesBalances identities_balances = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.getIdentitiesKeys = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.getIdentitiesBalances = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.setIdentitiesKeys = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.setIdentitiesBalances = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearIdentitiesKeys = function() { - return this.setIdentitiesKeys(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearIdentitiesBalances = function() { + return this.setIdentitiesBalances(undefined); }; @@ -12655,7 +16116,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasIdentitiesKeys = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasIdentitiesBalances = function() { return jspb.Message.getField(this, 1) != null; }; @@ -12664,7 +16125,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -12672,18 +16133,18 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -12692,7 +16153,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -12701,7 +16162,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -12709,18 +16170,18 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -12729,35 +16190,35 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetIdentitiesContractKeysResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} + * optional GetIdentitiesBalancesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -12766,7 +16227,7 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.clea * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; 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 3458c3d9af5..6488351eb15 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 @@ -67,6 +67,15 @@ type PlatformgetIdentityBalance = { readonly responseType: typeof platform_pb.GetIdentityBalanceResponse; }; +type PlatformgetIdentitiesBalances = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetIdentitiesBalancesRequest; + readonly responseType: typeof platform_pb.GetIdentitiesBalancesResponse; +}; + type PlatformgetIdentityBalanceAndRevision = { readonly methodName: string; readonly service: typeof Platform; @@ -76,6 +85,24 @@ type PlatformgetIdentityBalanceAndRevision = { readonly responseType: typeof platform_pb.GetIdentityBalanceAndRevisionResponse; }; +type PlatformgetEvonodesProposedEpochBlocksByIds = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetEvonodesProposedEpochBlocksByIdsRequest; + readonly responseType: typeof platform_pb.GetEvonodesProposedEpochBlocksResponse; +}; + +type PlatformgetEvonodesProposedEpochBlocksByRange = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetEvonodesProposedEpochBlocksByRangeRequest; + readonly responseType: typeof platform_pb.GetEvonodesProposedEpochBlocksResponse; +}; + type PlatformgetProofs = { readonly methodName: string; readonly service: typeof Platform; @@ -265,7 +292,10 @@ export class Platform { static readonly getIdentityNonce: PlatformgetIdentityNonce; static readonly getIdentityContractNonce: PlatformgetIdentityContractNonce; static readonly getIdentityBalance: PlatformgetIdentityBalance; + static readonly getIdentitiesBalances: PlatformgetIdentitiesBalances; static readonly getIdentityBalanceAndRevision: PlatformgetIdentityBalanceAndRevision; + static readonly getEvonodesProposedEpochBlocksByIds: PlatformgetEvonodesProposedEpochBlocksByIds; + static readonly getEvonodesProposedEpochBlocksByRange: PlatformgetEvonodesProposedEpochBlocksByRange; static readonly getProofs: PlatformgetProofs; static readonly getDataContract: PlatformgetDataContract; static readonly getDataContractHistory: PlatformgetDataContractHistory; @@ -383,6 +413,15 @@ export class PlatformClient { requestMessage: platform_pb.GetIdentityBalanceRequest, callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityBalanceResponse|null) => void ): UnaryResponse; + getIdentitiesBalances( + requestMessage: platform_pb.GetIdentitiesBalancesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesBalancesResponse|null) => void + ): UnaryResponse; + getIdentitiesBalances( + requestMessage: platform_pb.GetIdentitiesBalancesRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesBalancesResponse|null) => void + ): UnaryResponse; getIdentityBalanceAndRevision( requestMessage: platform_pb.GetIdentityBalanceAndRevisionRequest, metadata: grpc.Metadata, @@ -392,6 +431,24 @@ export class PlatformClient { requestMessage: platform_pb.GetIdentityBalanceAndRevisionRequest, callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityBalanceAndRevisionResponse|null) => void ): UnaryResponse; + getEvonodesProposedEpochBlocksByIds( + requestMessage: platform_pb.GetEvonodesProposedEpochBlocksByIdsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetEvonodesProposedEpochBlocksResponse|null) => void + ): UnaryResponse; + getEvonodesProposedEpochBlocksByIds( + requestMessage: platform_pb.GetEvonodesProposedEpochBlocksByIdsRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetEvonodesProposedEpochBlocksResponse|null) => void + ): UnaryResponse; + getEvonodesProposedEpochBlocksByRange( + requestMessage: platform_pb.GetEvonodesProposedEpochBlocksByRangeRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetEvonodesProposedEpochBlocksResponse|null) => void + ): UnaryResponse; + getEvonodesProposedEpochBlocksByRange( + requestMessage: platform_pb.GetEvonodesProposedEpochBlocksByRangeRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetEvonodesProposedEpochBlocksResponse|null) => void + ): UnaryResponse; getProofs( requestMessage: platform_pb.GetProofsRequest, 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 8728cdcd3f2..103a394fea5 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 @@ -73,6 +73,15 @@ Platform.getIdentityBalance = { responseType: platform_pb.GetIdentityBalanceResponse }; +Platform.getIdentitiesBalances = { + methodName: "getIdentitiesBalances", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetIdentitiesBalancesRequest, + responseType: platform_pb.GetIdentitiesBalancesResponse +}; + Platform.getIdentityBalanceAndRevision = { methodName: "getIdentityBalanceAndRevision", service: Platform, @@ -82,6 +91,24 @@ Platform.getIdentityBalanceAndRevision = { responseType: platform_pb.GetIdentityBalanceAndRevisionResponse }; +Platform.getEvonodesProposedEpochBlocksByIds = { + methodName: "getEvonodesProposedEpochBlocksByIds", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetEvonodesProposedEpochBlocksByIdsRequest, + responseType: platform_pb.GetEvonodesProposedEpochBlocksResponse +}; + +Platform.getEvonodesProposedEpochBlocksByRange = { + methodName: "getEvonodesProposedEpochBlocksByRange", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetEvonodesProposedEpochBlocksByRangeRequest, + responseType: platform_pb.GetEvonodesProposedEpochBlocksResponse +}; + Platform.getProofs = { methodName: "getProofs", service: Platform, @@ -486,6 +513,37 @@ PlatformClient.prototype.getIdentityBalance = function getIdentityBalance(reques }; }; +PlatformClient.prototype.getIdentitiesBalances = function getIdentitiesBalances(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getIdentitiesBalances, { + 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.getIdentityBalanceAndRevision = function getIdentityBalanceAndRevision(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; @@ -517,6 +575,68 @@ PlatformClient.prototype.getIdentityBalanceAndRevision = function getIdentityBal }; }; +PlatformClient.prototype.getEvonodesProposedEpochBlocksByIds = function getEvonodesProposedEpochBlocksByIds(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getEvonodesProposedEpochBlocksByIds, { + 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.getEvonodesProposedEpochBlocksByRange = function getEvonodesProposedEpochBlocksByRange(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getEvonodesProposedEpochBlocksByRange, { + 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.getProofs = function getProofs(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/packages/dapi-grpc/package.json b/packages/dapi-grpc/package.json index dee6105ae4e..6a98fbc74be 100644 --- a/packages/dapi-grpc/package.json +++ b/packages/dapi-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dapi-grpc", - "version": "1.2.0", + "version": "1.3.0-dev.5", "description": "DAPI GRPC definition file and generated clients", "browser": "browser.js", "main": "node.js", diff --git a/packages/dapi-grpc/protos/platform/v0/platform.proto b/packages/dapi-grpc/protos/platform/v0/platform.proto index ef8b7b008a5..b690d3f7cce 100644 --- a/packages/dapi-grpc/protos/platform/v0/platform.proto +++ b/packages/dapi-grpc/protos/platform/v0/platform.proto @@ -16,8 +16,14 @@ service Platform { rpc getIdentityContractNonce(GetIdentityContractNonceRequest) returns (GetIdentityContractNonceResponse); rpc getIdentityBalance(GetIdentityBalanceRequest) returns (GetIdentityBalanceResponse); + rpc getIdentitiesBalances(GetIdentitiesBalancesRequest) + returns (GetIdentitiesBalancesResponse); rpc getIdentityBalanceAndRevision(GetIdentityBalanceAndRevisionRequest) returns (GetIdentityBalanceAndRevisionResponse); + rpc getEvonodesProposedEpochBlocksByIds(GetEvonodesProposedEpochBlocksByIdsRequest) + returns (GetEvonodesProposedEpochBlocksResponse); + rpc getEvonodesProposedEpochBlocksByRange(GetEvonodesProposedEpochBlocksByRangeRequest) + returns (GetEvonodesProposedEpochBlocksResponse); rpc getProofs(GetProofsRequest) returns (GetProofsResponse); rpc getDataContract(GetDataContractRequest) returns (GetDataContractResponse); rpc getDataContractHistory(GetDataContractHistoryRequest) @@ -307,6 +313,85 @@ message GetIdentitiesContractKeysResponse { oneof version { GetIdentitiesContractKeysResponseV0 v0 = 1; } } +message GetEvonodesProposedEpochBlocksByIdsRequest { + + message GetEvonodesProposedEpochBlocksByIdsRequestV0 { + optional uint32 epoch = 1; // The epoch we are querying for, if none is set, get current epoch + repeated bytes ids = 2; // IDs of the evonodes for which we want to get their proposed blocks + bool prove = 3; // Flag to request a proof as the response + } + + oneof version { GetEvonodesProposedEpochBlocksByIdsRequestV0 v0 = 1; } +} + +message GetEvonodesProposedEpochBlocksResponse { + + message GetEvonodesProposedEpochBlocksResponseV0 { + message EvonodeProposedBlocks { + bytes pro_tx_hash = 1; + uint64 count = 2; + } + + message EvonodesProposedBlocks { + repeated EvonodeProposedBlocks evonodes_proposed_block_counts = 1; + } + + oneof result { + EvonodesProposedBlocks evonodes_proposed_block_counts_info = 1; // The actual result + Proof proof = 2; // Proof of the keys data, if requested + } + ResponseMetadata metadata = 3; // Metadata about the blockchain state + } + oneof version { GetEvonodesProposedEpochBlocksResponseV0 v0 = 1; } +} + +message GetEvonodesProposedEpochBlocksByRangeRequest { + + message GetEvonodesProposedEpochBlocksByRangeRequestV0 { + optional uint32 epoch = 1; // The epoch we are querying for, if none is set, get current epoch + optional uint32 limit = 2; // Maximum number of evonodes proposed epoch blocks to return + oneof start { + bytes start_after = 3; // Start retrieval after this document + bytes start_at = 4; // Start retrieval at this document + } + bool prove = 5; // Flag to request a proof as the response + } + + oneof version { GetEvonodesProposedEpochBlocksByRangeRequestV0 v0 = 1; } +} + +message GetIdentitiesBalancesRequest { + message GetIdentitiesBalancesRequestV0 { + repeated bytes ids = 1; + bool prove = 2; + } + + oneof version { + GetIdentitiesBalancesRequestV0 v0 = 1; + } +} + +message GetIdentitiesBalancesResponse { + message GetIdentitiesBalancesResponseV0 { + message IdentityBalance { + bytes identity_id = 1; + optional uint64 balance = 2; + } + + message IdentitiesBalances { + repeated IdentityBalance entries = 1; + }; + + oneof result { + IdentitiesBalances identities_balances = 1; + Proof proof = 2; + } + ResponseMetadata metadata = 3; + } + + oneof version { GetIdentitiesBalancesResponseV0 v0 = 1; } +} + message GetProofsRequest { message GetProofsRequestV0 { // DocumentRequest specifies a request for a document proof diff --git a/packages/dapi-grpc/test/unit/clients/platform/v0/nodejs/PlatformPromiseClient.spec.js b/packages/dapi-grpc/test/unit/clients/platform/v0/nodejs/PlatformPromiseClient.spec.js index 5987cbfd0f4..fc3eb575fad 100644 --- a/packages/dapi-grpc/test/unit/clients/platform/v0/nodejs/PlatformPromiseClient.spec.js +++ b/packages/dapi-grpc/test/unit/clients/platform/v0/nodejs/PlatformPromiseClient.spec.js @@ -22,6 +22,7 @@ describe('PlatformPromiseClient', () => { getIdentityContractNonce: this.sinon.stub().resolves(response), getIdentityNonce: this.sinon.stub().resolves(response), getIdentityKeys: this.sinon.stub().resolves(response), + getIdentityBalance: this.sinon.stub().resolves(response), }; }); @@ -170,4 +171,14 @@ describe('PlatformPromiseClient', () => { .to.be.calledOnceWith(request); }); }); + + describe('#getIdentityBalance', () => { + it('should get identity balance', async () => { + const result = await platformPromiseClient.getIdentityBalance(request); + + expect(result).to.equal(response); + expect(platformPromiseClient.client.getIdentityBalance) + .to.be.calledOnceWith(request); + }); + }); }); diff --git a/packages/dapi/package.json b/packages/dapi/package.json index 5cd25232e30..705de5b733f 100644 --- a/packages/dapi/package.json +++ b/packages/dapi/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/dapi", "private": true, - "version": "1.2.0", + "version": "1.3.0-dev.5", "description": "A decentralized API for the Dash network", "scripts": { "api": "node scripts/api.js", diff --git a/packages/dash-spv/package.json b/packages/dash-spv/package.json index a3c91c351c1..a67498dce6c 100644 --- a/packages/dash-spv/package.json +++ b/packages/dash-spv/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dash-spv", - "version": "2.2.0", + "version": "2.3.0-dev.5", "description": "Repository containing SPV functions used by @dashevo", "main": "index.js", "scripts": { diff --git a/packages/dashmate/README.md b/packages/dashmate/README.md index 85d81066973..96f04dc39bc 100644 --- a/packages/dashmate/README.md +++ b/packages/dashmate/README.md @@ -19,6 +19,7 @@ Distribution package for Dash node installation - [Restart node](#restart-node) - [Show node status](#show-node-status) - [Execute Core CLI command](#execute-core-cli-command) + - [Doctor](#doctor) - [Reset node data](#reset-node-data) - [Full node](#full-node) - [Node groups](#node-groups) @@ -277,6 +278,55 @@ $ dashmate core cli "getblockcount" 1337 ``` +### Doctor + +The `doctor` command analyzes the node configuration and state to provide a list of potential problems and solutions. + +``` +Dashmate node diagnostic. Bring your node to the doctor + +USAGE + $ dashmate doctor [--config ] [-v] [-s ] + +FLAGS + -s, --samples= path to the samples archive + -v, --verbose use verbose mode for output + --config= configuration name to use + +DESCRIPTION + Dashmate node diagnostic. Bring your node to the doctor + +COMMANDS + doctor report Dashmate node diagnostic report +``` + +The `doctor report` command collects all useful debugging info into a `.tar.gz` archive in your current working directory. + +The archive will include: + +- System information +- The node configuration +- Service logs, metrics and status + +Collected data will not contain any private information which is already not available publicly. +All sensitive data like private keys or passwords is obfuscated. + +``` +Dashmate node diagnostic report + +USAGE + $ dashmate doctor report [--config ] [-v] + +FLAGS + -v, --verbose use verbose mode for output + --config= configuration name to use + +DESCRIPTION + Dashmate node diagnostic report + + The command collects diagnostic information and creates an obfuscated archive for further investigation +``` + ### Reset node data The `reset` command removes all data corresponding to the specified config and allows you to start a node from scratch. @@ -340,29 +390,6 @@ DESCRIPTION Reindex Core data ``` -### Full node -It is also possible to start a full node instead of a masternode. Modify the config setting as follows: -```bash -dashmate config set core.masternode.enable false -``` -### Doctor - -The `doctor` command collects all useful debugging info into a .tar archive in your current working directory. - -Archive will contain all core and platform debugging data and logs for each running service. - -``` -USAGE - $ dashmate doctor [--config ] [-v] - -FLAGS - -v, --verbose use verbose mode for output - --config= configuration name to use - -DESCRIPTION - Generate a report about masternode -``` - ### Full node It is also possible to start a full node instead of a masternode. Modify the config setting as follows: ```bash diff --git a/packages/dashmate/configs/defaults/getBaseConfigFactory.js b/packages/dashmate/configs/defaults/getBaseConfigFactory.js index 3d689e1b787..ec9565d4c9f 100644 --- a/packages/dashmate/configs/defaults/getBaseConfigFactory.js +++ b/packages/dashmate/configs/defaults/getBaseConfigFactory.js @@ -14,7 +14,7 @@ const { version } = JSON.parse(fs.readFileSync(path.join(PACKAGE_ROOT_DIR, 'pack * @param {HomeDir} homeDir * @returns {getBaseConfig} */ -export default function getBaseConfigFactory(homeDir) { +export default function getBaseConfigFactory() { const prereleaseTag = semver.prerelease(version) === null ? '' : `-${semver.prerelease(version)[0]}`; const dockerImageVersion = `${semver.major(version)}${prereleaseTag}`; @@ -134,12 +134,17 @@ export default function getBaseConfigFactory(homeDir) { }, }, log: { - file: { - categories: [], - path: homeDir.joinPath('logs', 'base', 'core.log'), + filePath: null, + debug: { + enabled: false, + ips: false, + sourceLocations: false, + threadNames: false, + timeMicros: false, + includeOnly: [], + exclude: [], }, }, - logIps: 0, indexes: [], }, platform: { @@ -306,7 +311,7 @@ export default function getBaseConfigFactory(homeDir) { tenderdash: { mode: 'full', docker: { - image: 'dashpay/tenderdash:1', + image: 'dashpay/tenderdash:fix-wrong-proposer-at-round', }, p2p: { host: '0.0.0.0', diff --git a/packages/dashmate/configs/defaults/getMainnetConfigFactory.js b/packages/dashmate/configs/defaults/getMainnetConfigFactory.js index f4ed9aa7850..0f83c4a7a13 100644 --- a/packages/dashmate/configs/defaults/getMainnetConfigFactory.js +++ b/packages/dashmate/configs/defaults/getMainnetConfigFactory.js @@ -26,13 +26,6 @@ export default function getMainnetConfigFactory(homeDir, getBaseConfig) { subnet: '172.26.24.0/24', }, }, - core: { - log: { - file: { - path: homeDir.joinPath('logs', 'mainnet', 'core.log'), - }, - }, - }, network: NETWORK_MAINNET, platform: { enable: false, diff --git a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js index a8189912023..a8aec0152b1 100644 --- a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js +++ b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js @@ -30,11 +30,6 @@ export default function getTestnetConfigFactory(homeDir, getBaseConfig) { rpc: { port: 19998, }, - log: { - file: { - path: homeDir.joinPath('logs', 'testnet', 'core.log'), - }, - }, spork: { address: 'yjPtiKh2uwk3bDutTEA2q9mCtXyiZRWn55', }, diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index 5e7763009ca..db6d8d6aee4 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -853,6 +853,46 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs) }); return configFile; }, + '1.3.0-dev.3': (configFile) => { + Object.entries(configFile.configs) + .forEach(([, options]) => { + options.platform.drive.abci.docker.image = 'dashpay/drive:1-dev'; + options.platform.dapi.api.docker.image = 'dashpay/dapi:1-dev'; + + // Update core log settings + options.core.log.filePath = null; + options.core.log.debug = { + enabled: false, + ips: !!options.core.logIps, + sourceLocations: false, + threadNames: false, + timeMicros: false, + includeOnly: [], + exclude: [], + }; + + // If debug log was enabled + if (options.core.log.file.categories.length > 0) { + options.core.log.filePath = options.core.log.file.path; + options.core.log.debug.enabled = true; + + if (!options.core.log.file.categories.includes('all')) { + options.core.log.debug.includeOnly = options.core.log.file.categories; + } + } + + delete options.core.log.file; + delete options.core.logIps; + }); + return configFile; + }, + '1.3.0-dev.6': (configFile) => { + Object.entries(configFile.configs) + .forEach(([, options]) => { + options.platform.drive.tenderdash.docker.image = 'dashpay/tenderdash:fix-wrong-proposer-at-round'; + }); + return configFile; + }, }; } diff --git a/packages/dashmate/docker-compose.insight_api.yml b/packages/dashmate/docker-compose.insight_api.yml index fc1b30f12b6..b6e52bdea52 100644 --- a/packages/dashmate/docker-compose.insight_api.yml +++ b/packages/dashmate/docker-compose.insight_api.yml @@ -1,11 +1,19 @@ --- +x-default-logging: &default-logging + driver: local + options: + max-size: "500m" + max-file: "5" + compress: "true" + services: core_insight: image: ${CORE_INSIGHT_DOCKER_IMAGE:?err} labels: org.dashmate.service.title: "Core Insight API" restart: unless-stopped + logging: *default-logging ports: - 127.0.0.1:${CORE_INSIGHT_PORT:?err}:${CORE_INSIGHT_PORT:?err} depends_on: diff --git a/packages/dashmate/docker-compose.insight_ui.yml b/packages/dashmate/docker-compose.insight_ui.yml index f7a6c238e89..9db1ae84175 100644 --- a/packages/dashmate/docker-compose.insight_ui.yml +++ b/packages/dashmate/docker-compose.insight_ui.yml @@ -1,11 +1,19 @@ --- +x-default-logging: &default-logging + driver: local + options: + max-size: "500m" + max-file: "5" + compress: "true" + services: core_insight: image: ${CORE_INSIGHT_UI_DOCKER_IMAGE:?err} labels: org.dashmate.service.title: "Core Insight UI" restart: unless-stopped + logging: *default-logging ports: - 127.0.0.1:${CORE_INSIGHT_PORT:?err}:${CORE_INSIGHT_PORT:?err} depends_on: diff --git a/packages/dashmate/docker-compose.rate_limiter.metrics.yml b/packages/dashmate/docker-compose.rate_limiter.metrics.yml index 74c9a8190a7..8d0c3a85de6 100644 --- a/packages/dashmate/docker-compose.rate_limiter.metrics.yml +++ b/packages/dashmate/docker-compose.rate_limiter.metrics.yml @@ -1,11 +1,19 @@ --- +x-default-logging: &default-logging + driver: local + options: + max-size: "500m" + max-file: "5" + compress: "true" + services: gateway_rate_limiter_metrics: image: ${PLATFORM_GATEWAY_RATE_LIMITER_METRICS_DOCKER_IMAGE:?err} labels: org.dashmate.service.title: "Gateway rate limiter metrics exporter" restart: unless-stopped + logging: *default-logging entrypoint: /bin/statsd_exporter command: - "--statsd.mapping-config=/etc/statsd-exporter/config.yaml" diff --git a/packages/dashmate/docker-compose.rate_limiter.yml b/packages/dashmate/docker-compose.rate_limiter.yml index 75384ca1299..036589b6bb0 100644 --- a/packages/dashmate/docker-compose.rate_limiter.yml +++ b/packages/dashmate/docker-compose.rate_limiter.yml @@ -1,5 +1,12 @@ --- +x-default-logging: &default-logging + driver: local + options: + max-size: "500m" + max-file: "5" + compress: "true" + services: gateway: depends_on: @@ -9,10 +16,11 @@ services: - gateway_rate_limiter gateway_rate_limiter: + image: ${PLATFORM_GATEWAY_RATE_LIMITER_DOCKER_IMAGE:?err} labels: org.dashmate.service.title: "Gateway rate limiter" restart: unless-stopped - image: ${PLATFORM_GATEWAY_RATE_LIMITER_DOCKER_IMAGE:?err} + logging: *default-logging command: /bin/ratelimit depends_on: - gateway_rate_limiter_redis @@ -45,6 +53,7 @@ services: labels: org.dashmate.service.title: "Gateway rate limiter storage" restart: unless-stopped + logging: *default-logging image: redis:alpine expose: - 6379 diff --git a/packages/dashmate/docker-compose.yml b/packages/dashmate/docker-compose.yml index b267658716e..67aae0bfa94 100644 --- a/packages/dashmate/docker-compose.yml +++ b/packages/dashmate/docker-compose.yml @@ -1,11 +1,19 @@ --- +x-default-logging: &default-logging + driver: local + options: + max-size: "500m" + max-file: "5" + compress: "true" + services: dashmate_helper: image: ${DASHMATE_HELPER_DOCKER_IMAGE:?err} labels: org.dashmate.service.title: "Dashmate Helper" restart: unless-stopped + logging: *default-logging environment: - LOCAL_UID=${LOCAL_UID:?err} - LOCAL_GID=${LOCAL_GID:?err} @@ -23,13 +31,13 @@ services: labels: org.dashmate.service.title: "Core" restart: unless-stopped + logging: *default-logging ports: - ${CORE_P2P_HOST:?err}:${CORE_P2P_PORT:?err}:${CORE_P2P_PORT:?err} - ${CORE_RPC_HOST:?err}:${CORE_RPC_PORT:?err}:${CORE_RPC_PORT:?err} volumes: - core_data:/home/dash - ${DASHMATE_HOME_DIR:?err}/${CONFIG_NAME:?err}/core/dash.conf:/home/dash/.dashcore/dash.conf:ro - - ${CORE_LOG_DIRECTORY_PATH:?err}:/var/log/dash command: - dashd stop_grace_period: 30s @@ -46,6 +54,7 @@ services: labels: org.dashmate.service.title: "Drive ABCI" restart: unless-stopped + logging: *default-logging volumes: - drive_abci_data:/var/lib/dash/rs-drive-abci/db environment: @@ -102,6 +111,7 @@ services: labels: org.dashmate.service.title: "Drive Tenderdash" restart: unless-stopped + logging: *default-logging depends_on: - drive_abci ports: @@ -112,7 +122,6 @@ services: volumes: - drive_tenderdash:/tenderdash - ${DASHMATE_HOME_DIR:?err}/${CONFIG_NAME:?err}/platform/drive/tenderdash:/tenderdash/config:ro - - ${PLATFORM_DRIVE_TENDERDASH_LOG_DIRECTORY_PATH:?err}:/var/log/tenderdash stop_grace_period: 10s profiles: - platform @@ -122,6 +131,7 @@ services: labels: org.dashmate.service.title: "DAPI API" restart: unless-stopped + logging: *default-logging deploy: mode: replicated replicas: ${PLATFORM_DAPI_API_DOCKER_DEPLOY_REPLICAS:-1} @@ -156,6 +166,7 @@ services: labels: org.dashmate.service.title: "DAPI Transactions Filter Stream" restart: unless-stopped + logging: *default-logging deploy: mode: replicated replicas: ${PLATFORM_DAPI_API_DOCKER_DEPLOY_REPLICAS:-1} @@ -184,6 +195,7 @@ services: labels: org.dashmate.service.title: "Gateway" restart: unless-stopped + logging: *default-logging ports: # HTTP entry point to the platform. # Supports HTTP1 and HTTP2 diff --git a/packages/dashmate/package.json b/packages/dashmate/package.json index 7eb809be737..0d382c15e83 100644 --- a/packages/dashmate/package.json +++ b/packages/dashmate/package.json @@ -1,6 +1,6 @@ { "name": "dashmate", - "version": "1.2.0", + "version": "1.3.0-dev.5", "description": "Distribution package for Dash node installation", "scripts": { "lint": "eslint .", @@ -159,6 +159,9 @@ }, "wallet": { "description": "Wallet related commands" + }, + "doctor": { + "description": "Node diagnostics and reporting" } }, "topicSeparator": " " diff --git a/packages/dashmate/src/commands/doctor.js b/packages/dashmate/src/commands/doctor.js deleted file mode 100644 index c66e18c754d..00000000000 --- a/packages/dashmate/src/commands/doctor.js +++ /dev/null @@ -1,281 +0,0 @@ -import process from 'process'; -import { Flags } from '@oclif/core'; -import { Listr } from 'listr2'; -import chalk from 'chalk'; -import ConfigBaseCommand from '../oclif/command/ConfigBaseCommand.js'; -import Report from '../doctor/report.js'; -import { DASHMATE_VERSION } from '../constants.js'; -import obfuscateConfig from '../config/obfuscateConfig.js'; -import MuteOneLineError from '../oclif/errors/MuteOneLineError.js'; -import hideString from '../util/hideString.js'; -import obfuscateObjectRecursive from '../util/obfuscateObjectRecursive.js'; - -/** - * - * @param {string} url - * @return {Promise} - */ -async function fetchTextOrError(url) { - try { - const response = await fetch(url); - - return await response.text(); - } catch (e) { - return e.toString(); - } -} - -export default class DoctorCommand extends ConfigBaseCommand { - static description = 'Dashmate node diagnostic. Bring your node to a doctor'; - - static flags = { - ...ConfigBaseCommand.flags, - verbose: Flags.boolean({ char: 'v', description: 'use verbose mode for output', default: false }), - }; - - /** - * @param {Object} args - * @param {Object} flags - * @param createRpcClient - * @param {DockerCompose} dockerCompose - * @param {getConnectionHost} getConnectionHost - * @param {Config} config - * @param createTenderdashRpcClient - * @param getServiceList - * @param getOperatingSystemInfo - * @return {Promise} - */ - async runWithDependencies( - args, - { verbose: isVerbose }, - createRpcClient, - dockerCompose, - getConnectionHost, - config, - createTenderdashRpcClient, - getServiceList, - getOperatingSystemInfo, - ) { - const tasks = new Listr( - [ - { - task: async (ctx, task) => { - const agreement = await task.prompt({ - type: 'toggle', - name: 'confirm', - header: chalk` Dashmate is going to collect all necessary debug data from the node to create a report, including: - - - System information - - The node configuration - - Service logs, metrics and status - - Collected data will contain only anonymous information. All sensitive data like private keys or passwords is obfuscated. - - The report will be created as an TAR archive in {bold.cyanBright ${process.cwd()}} - You can use the report to analyze your node condition yourself or send it to the Dash Core Group ({underline.cyanBright support@dash.org}) in case you need help.\n`, - message: 'Create a report?', - enabled: 'Yes', - disabled: 'No', - }); - - if (!agreement) { - throw new Error('Operation is cancelled'); - } - - ctx.report = new Report(); - }, - }, - { - title: 'System information', - task: async (ctx) => { - const osInfo = await getOperatingSystemInfo(); - - ctx.report.setSystemInfo(osInfo); - }, - }, - { - title: 'The node configuration', - task: async (ctx) => { - ctx.report.setDashmateVersion(DASHMATE_VERSION); - ctx.report.setDashmateConfig(obfuscateConfig(config)); - }, - }, - { - title: 'Core status', - task: async (ctx) => { - const rpcClient = createRpcClient({ - port: config.get('core.rpc.port'), - user: 'dashmate', - pass: config.get('core.rpc.users.dashmate.password'), - host: await getConnectionHost(config, 'core', 'core.rpc.host'), - }); - - const coreCalls = [ - rpcClient.getBestChainLock(), - rpcClient.quorum('listextended'), - rpcClient.getBlockchainInfo(), - rpcClient.getPeerInfo(), - ]; - - if (config.get('core.masternode.enable')) { - coreCalls.push(rpcClient.masternode('status')); - } - - const [ - getBestChainLock, - quorums, - getBlockchainInfo, - getPeerInfo, - masternodeStatus, - ] = (await Promise.allSettled(coreCalls)).map((e) => e.value?.result || e.reason); - - ctx.report.setServiceInfo('core', 'bestChainLock', getBestChainLock); - ctx.report.setServiceInfo('core', 'quorums', quorums); - ctx.report.setServiceInfo('core', 'blockchainInfo', getBlockchainInfo); - ctx.report.setServiceInfo('core', 'peerInfo', getPeerInfo); - ctx.report.setServiceInfo('core', 'masternodeStatus', masternodeStatus); - }, - }, - { - title: 'Tenderdash status', - enabled: () => config.get('platform.enable'), - task: async (ctx) => { - const tenderdashRPCClient = createTenderdashRpcClient({ - host: config.get('platform.drive.tenderdash.rpc.host'), - port: config.get('platform.drive.tenderdash.rpc.port'), - }); - - // Tenderdash requires to pass all params, so we use basic fetch - async function fetchValidators() { - const url = `http://${config.get('platform.drive.tenderdash.rpc.host')}:${config.get('platform.drive.tenderdash.rpc.port')}/validators?request_quorum_info=true`; - const response = await fetch(url, 'GET'); - return response.json(); - } - - const [ - status, - genesis, - peers, - abciInfo, - consensusState, - validators, - ] = await Promise.allSettled([ - tenderdashRPCClient.request('status', []), - tenderdashRPCClient.request('genesis', []), - tenderdashRPCClient.request('net_info', []), - tenderdashRPCClient.request('abci_info', []), - tenderdashRPCClient.request('dump_consensus_state', []), - fetchValidators(), - ]); - - ctx.report.setServiceInfo('drive_tenderdash', 'status', status); - ctx.report.setServiceInfo('drive_tenderdash', 'validators', validators); - ctx.report.setServiceInfo('drive_tenderdash', 'genesis', genesis); - ctx.report.setServiceInfo('drive_tenderdash', 'peers', peers); - ctx.report.setServiceInfo('drive_tenderdash', 'abciInfo', abciInfo); - ctx.report.setServiceInfo('drive_tenderdash', 'consensusState', consensusState); - }, - }, - { - title: 'Metrics', - enabled: () => config.get('platform.enable'), - task: async (ctx, task) => { - if (config.get('platform.drive.tenderdash.metrics.enabled')) { - // eslint-disable-next-line no-param-reassign - task.output = 'Reading Tenderdash metrics'; - - const url = `http://${config.get('platform.drive.tenderdash.rpc.host')}:${config.get('platform.drive.tenderdash.rpc.port')}/metrics`; - - const result = fetchTextOrError(url); - - ctx.report.setServiceInfo('drive_tenderdash', 'metrics', result); - } - - if (config.get('platform.drive.abci.metrics.enabled')) { - // eslint-disable-next-line no-param-reassign - task.output = 'Reading Drive metrics'; - - const url = `http://${config.get('platform.drive.abci.rpc.host')}:${config.get('platform.drive.abci.rpc.port')}/metrics`; - - const result = fetchTextOrError(url); - - ctx.report.setServiceInfo('drive_abci', 'metrics', result); - } - - if (config.get('platform.gateway.metrics.enabled')) { - // eslint-disable-next-line no-param-reassign - task.output = 'Reading Gateway metrics'; - - const url = `http://${config.get('platform.gateway.metrics.host')}:${config.get('platform.gateway.metrics.port')}/metrics`; - - const result = fetchTextOrError(url); - - ctx.report.setServiceInfo('gateway', 'metrics', result); - } - }, - }, - { - title: 'Logs', - task: async (ctx, task) => { - const services = await getServiceList(config); - - // eslint-disable-next-line no-param-reassign - task.output = `Pulling logs from ${services.map((e) => e.name)}`; - - await Promise.all( - services.map(async (service) => { - const [inspect, logs] = (await Promise.allSettled([ - dockerCompose.inspectService(config, service.name), - dockerCompose.logs(config, [service.name]), - ])).map((e) => e.value || e.reason); - - // Hide username & external ip from logs - logs.out = logs.out.replaceAll(process.env.USER, hideString(process.env.USER)); - logs.err = logs.err.replaceAll(process.env.USER, hideString(process.env.USER)); - - // Hide username & external ip from inspect - obfuscateObjectRecursive(inspect, (_field, value) => (typeof value === 'string' - ? value.replaceAll(process.env.USER, hideString(process.env.USER)) : value)); - - ctx.report.setServiceInfo(service.name, 'stdOut', logs.out); - ctx.report.setServiceInfo(service.name, 'stdErr', logs.err); - ctx.report.setServiceInfo(service.name, 'dockerInspect', inspect); - }), - ); - }, - }, - { - title: 'Create an archive', - task: async (ctx, task) => { - const archivePath = process.cwd(); - - await ctx.report.archive(archivePath); - - // eslint-disable-next-line no-param-reassign - task.output = chalk`Saved to {bold.cyanBright ${archivePath}/dashmate-report-${ctx.report.date.toISOString()}.tar.gz}`; - }, - options: { - persistentOutput: true, - }, - }, - ], - { - renderer: isVerbose ? 'verbose' : 'default', - rendererOptions: { - clearOutput: false, - showTimer: isVerbose, - bottomBar: true, - removeEmptyLines: false, - }, - }, - ); - - try { - await tasks.run({ - isVerbose, - }); - } catch (e) { - throw new MuteOneLineError(e); - } - } -} diff --git a/packages/dashmate/src/commands/doctor/index.js b/packages/dashmate/src/commands/doctor/index.js new file mode 100644 index 00000000000..f4ecd4dba82 --- /dev/null +++ b/packages/dashmate/src/commands/doctor/index.js @@ -0,0 +1,146 @@ +import process from 'process'; +import { Flags } from '@oclif/core'; +import { Listr } from 'listr2'; +import chalk from 'chalk'; +import { SEVERITY } from '../../doctor/Prescription.js'; +import ConfigBaseCommand from '../../oclif/command/ConfigBaseCommand.js'; +import Samples from '../../doctor/Samples.js'; +import MuteOneLineError from '../../oclif/errors/MuteOneLineError.js'; + +export default class DoctorCommand extends ConfigBaseCommand { + static description = 'Dashmate node diagnostics. Bring your node to the doctor'; + + static flags = { + ...ConfigBaseCommand.flags, + verbose: Flags.boolean({ char: 'v', description: 'use verbose mode for output', default: false }), + samples: Flags.string({ char: 's', description: 'path to the samples archive', default: '' }), + }; + + /** + * @param {Object} args + * @param {Object} flags + * @param {Config} config + * @param {analyseSamples} analyseSamples + * @param {collectSamplesTask} collectSamplesTask + * @param {unarchiveSamples} unarchiveSamples + * @return {Promise} + */ + async runWithDependencies( + args, + { + verbose: isVerbose, + samples: samplesFile, + }, + config, + analyseSamples, + collectSamplesTask, + unarchiveSamples, + ) { + const tasks = new Listr( + [ + { + title: 'Collecting samples', + enabled: () => !samplesFile, + task: async () => collectSamplesTask(config), + }, + { + title: 'Analyzing samples', + task: async (ctx) => { + ctx.prescription = analyseSamples(ctx.samples); + }, + }, + ], + { + renderer: isVerbose ? 'verbose' : 'default', + rendererOptions: { + clearOutput: false, + showTimer: isVerbose, + removeEmptyLines: false, + collapse: false, + }, + }, + ); + + let samples; + if (samplesFile) { + samples = await unarchiveSamples(samplesFile); + } else { + samples = new Samples(); + } + + let ctx; + try { + ctx = await tasks.run({ + isVerbose, + samples, + }); + } catch (e) { + throw new MuteOneLineError(e); + } + + const problems = ctx.prescription.getOrderedProblems(); + if (problems.length === 0) { + // eslint-disable-next-line no-console + console.log(chalk`\n The doctor didn't find any problems with your node. + + If issues still persist, please use {bold.cyanBright dashmate doctor report} to create an archive + of the already collected data for further investigation. + + You can use it to analyze the node's condition yourself or send it to the Dash Core Group support team ({underline.cyanBright support@dash.org}) for help.`); + + return; + } + + const problemsString = problems.map((problem, index) => { + let numberedDescription = `${index + 1}. ${problem.getDescription()}`; + if (problem.getSeverity() === SEVERITY.HIGH) { + numberedDescription = chalk.red(numberedDescription); + } else if (problem.getSeverity() === SEVERITY.MEDIUM) { + numberedDescription = chalk.yellow(numberedDescription); + } + + const indentedDescription = numberedDescription.split('\n') + .map((line, i) => { + let size = 5; + if (i === 0) { + size = 3; + } + + return ' '.repeat(size) + line; + }).join('\n'); + + const indentedSolution = problem.getSolution().split('\n') + .map((line) => ' '.repeat(6) + line).join('\n'); + + return `${indentedDescription}\n\n${indentedSolution}`; + }).join('\n\n'); + + const plural = problems.length > 1 ? 's' : ''; + + const severity = ctx.prescription.getSeverity(); + + let problemsCount = `${problems.length} problem${plural}`; + if (severity === SEVERITY.HIGH) { + problemsCount = chalk.red(problemsCount); + } else if (severity === SEVERITY.MEDIUM) { + problemsCount = chalk.yellow(problemsCount); + } + + const prescriptionString = chalk`\n ${problemsCount} found: + +${problemsString} + + + Use {bold.cyanBright dashmate doctor report} to create an archive + of the already collected data for further investigation. + + You can use it to analyze the node's condition yourself or send it to the Dash Core Group support team ({underline.cyanBright support@dash.org}) for help.`; + + // eslint-disable-next-line no-console + console.log(prescriptionString); + + if (severity === SEVERITY.HIGH) { + process.exitCode = 1; + } + } +} diff --git a/packages/dashmate/src/commands/doctor/report.js b/packages/dashmate/src/commands/doctor/report.js new file mode 100644 index 00000000000..c826dc8ad7f --- /dev/null +++ b/packages/dashmate/src/commands/doctor/report.js @@ -0,0 +1,105 @@ +import process from 'process'; +import { Flags } from '@oclif/core'; +import { Listr } from 'listr2'; +import chalk from 'chalk'; +import Samples from '../../doctor/Samples.js'; +import ConfigBaseCommand from '../../oclif/command/ConfigBaseCommand.js'; +import MuteOneLineError from '../../oclif/errors/MuteOneLineError.js'; + +export default class ReportCommand extends ConfigBaseCommand { + static description = `Dashmate node diagnostic report + +The command collects diagnostic information and creates an obfuscated archive for further investigation`; + + static flags = { + ...ConfigBaseCommand.flags, + verbose: Flags.boolean({ char: 'v', description: 'use verbose mode for output', default: false }), + }; + + /** + * @param {Object} args + * @param {Object} flags + * @param {Config} config + * @param {collectSamplesTask} collectSamplesTask + * @param {archiveSamples} archiveSamples + * @return {Promise} + */ + async runWithDependencies( + args, + { + verbose: isVerbose, + }, + config, + collectSamplesTask, + archiveSamples, + ) { + const tasks = new Listr( + [ + { + task: async (ctx, task) => { + const agreement = await task.prompt({ + type: 'toggle', + name: 'confirm', + header: chalk` Do you want to create an archive of diagnostic information to help with debugging? + + The archive will include: + + - System information + - The node configuration + - Service logs, metrics and status + + Collected data will not contain any information which is not already publicly known. + All sensitive data like private keys or passwords is obfuscated. + + The archive will be compressed with TAR/GZIP and placed in {bold.cyanBright ${process.cwd()}} + You can use it to analyze the node's condition yourself or send it to the Dash Core Group support team ({underline.cyanBright support@dash.org}) for help.\n`, + message: 'Create an archive?', + enabled: 'Yes', + disabled: 'No', + }); + + if (!agreement) { + throw new Error('Archive creation was declined'); + } + }, + }, + { + title: 'Collecting samples', + task: async () => collectSamplesTask(config), + }, + { + title: 'Creating archive', + task: async (ctx, task) => { + const archivePath = process.cwd(); + + await archiveSamples(ctx.samples, archivePath); + + // eslint-disable-next-line no-param-reassign + task.output = chalk`Saved to {bold.cyanBright ${archivePath}/dashmate-report-${ctx.samples.date.toISOString()}.tar.gz}`; + }, + options: { + persistentOutput: true, + }, + }, + ], + { + renderer: isVerbose ? 'verbose' : 'default', + rendererOptions: { + clearOutput: false, + showTimer: isVerbose, + removeEmptyLines: false, + collapse: false, + }, + }, + ); + + try { + await tasks.run({ + isVerbose, + samples: new Samples(), + }); + } catch (e) { + throw new MuteOneLineError(e); + } + } +} diff --git a/packages/dashmate/src/config/configJsonSchema.js b/packages/dashmate/src/config/configJsonSchema.js index 0e9dc266d19..8da6b4ce486 100644 --- a/packages/dashmate/src/config/configJsonSchema.js +++ b/packages/dashmate/src/config/configJsonSchema.js @@ -401,36 +401,59 @@ export default { log: { type: 'object', properties: { - file: { + filePath: { + type: ['null', 'string'], + minLength: 1, + }, + debug: { type: 'object', properties: { - categories: { + enabled: { + type: 'boolean', + }, + ips: { + type: 'boolean', + }, + sourceLocations: { + type: 'boolean', + }, + threadNames: { + type: 'boolean', + }, + timeMicros: { + type: 'boolean', + }, + includeOnly: { type: 'array', uniqueItems: true, items: { type: 'string', - enum: ['all', 'net', 'tor', 'mempool', 'http', 'bench', 'zmq', 'walletdb', 'rpc', 'estimatefee', + enum: ['net', 'tor', 'mempool', 'http', 'bench', 'zmq', 'walletdb', 'rpc', 'estimatefee', 'addrman', 'selectcoins', 'reindex', 'cmpctblock', 'rand', 'prune', 'proxy', 'mempoolrej', 'libevent', 'coindb', 'qt', 'leveldb', 'chainlocks', 'gobject', 'instantsend', 'llmq', 'llmq-dkg', 'llmq-sigs', 'mnpayments', 'mnsync', 'coinjoin', 'spork', 'netconn', ], }, }, - path: { - type: 'string', - minLength: 1, + exclude: { + type: 'array', + uniqueItems: true, + items: { + type: 'string', + enum: ['net', 'tor', 'mempool', 'http', 'bench', 'zmq', 'walletdb', 'rpc', 'estimatefee', + 'addrman', 'selectcoins', 'reindex', 'cmpctblock', 'rand', 'prune', 'proxy', 'mempoolrej', + 'libevent', 'coindb', 'qt', 'leveldb', 'chainlocks', 'gobject', 'instantsend', 'llmq', + 'llmq-dkg', 'llmq-sigs', 'mnpayments', 'mnsync', 'coinjoin', 'spork', 'netconn', + ], + }, }, }, additionalProperties: false, - required: ['categories', 'path'], + required: ['enabled', 'ips', 'sourceLocations', 'threadNames', 'timeMicros', 'includeOnly', 'exclude'], }, }, additionalProperties: false, - required: ['file'], - }, - logIps: { - type: 'integer', - enum: [0, 1], + required: ['filePath', 'debug'], }, indexes: { type: ['array'], @@ -444,7 +467,7 @@ export default { }, }, required: ['docker', 'p2p', 'rpc', 'spork', 'masternode', 'miner', 'devnet', 'log', - 'logIps', 'indexes', 'insight'], + 'indexes', 'insight'], additionalProperties: false, }, platform: { diff --git a/packages/dashmate/src/config/generateEnvsFactory.js b/packages/dashmate/src/config/generateEnvsFactory.js index fcb0491ecf7..781ef7bdaa4 100644 --- a/packages/dashmate/src/config/generateEnvsFactory.js +++ b/packages/dashmate/src/config/generateEnvsFactory.js @@ -1,4 +1,3 @@ -import path from 'path'; import os from 'os'; import convertObjectToEnvs from './convertObjectToEnvs.js'; import { DASHMATE_HELPER_DOCKER_IMAGE } from '../constants.js'; @@ -20,7 +19,6 @@ export default function generateEnvsFactory(configFile, homeDir, getConfigProfil * COMPOSE_PROJECT_NAME: string, * COMPOSE_FILE: string, * COMPOSE_PATH_SEPARATOR: string, - * CORE_LOG_DIRECTORY_PATH: string * }} */ function generateEnvs(config) { @@ -69,13 +67,6 @@ export default function generateEnvsFactory(configFile, homeDir, getConfigProfil const { uid, gid } = os.userInfo(); - // Determine logs directory to mount into tenderdash container - let tenderdashLogDirectoryPath = homeDir.joinPath('logs', config.get('network')); - const tenderdashLogFilePath = config.get('platform.drive.tenderdash.log.path'); - if (tenderdashLogFilePath !== null) { - tenderdashLogDirectoryPath = path.dirname(tenderdashLogFilePath); - } - let driveAbciMetricsUrl = ''; if (config.get('platform.drive.abci.metrics.enabled')) { driveAbciMetricsUrl = 'http://0.0.0.0:29090'; @@ -92,11 +83,7 @@ export default function generateEnvsFactory(configFile, homeDir, getConfigProfil COMPOSE_PATH_SEPARATOR: ':', DOCKER_BUILDKIT: 1, COMPOSE_DOCKER_CLI_BUILD: 1, - CORE_LOG_DIRECTORY_PATH: path.dirname( - config.get('core.log.file.path'), - ), DASHMATE_HELPER_DOCKER_IMAGE, - PLATFORM_DRIVE_TENDERDASH_LOG_DIRECTORY_PATH: tenderdashLogDirectoryPath, PLATFORM_GATEWAY_RATE_LIMITER_METRICS_DISABLED: !config.get('platform.gateway.rateLimiter.metrics.enabled'), PLATFORM_DRIVE_ABCI_METRICS_URL: driveAbciMetricsUrl, ...convertObjectToEnvs(config.getOptions()), diff --git a/packages/dashmate/src/config/obfuscateConfig.js b/packages/dashmate/src/config/obfuscateConfig.js index 1a9e8db0446..99982ab387e 100644 --- a/packages/dashmate/src/config/obfuscateConfig.js +++ b/packages/dashmate/src/config/obfuscateConfig.js @@ -1,25 +1,30 @@ import lodash from 'lodash'; import obfuscateObjectRecursive from '../util/obfuscateObjectRecursive.js'; +import Config from './Config.js'; import hideString from '../util/hideString.js'; +/** + * @param {Config} config + * @return {Config} + */ export default function obfuscateConfig( config, ) { const username = process.env.USER; - const cloned = lodash.cloneDeep(config); + const clonedOptions = lodash.cloneDeep(config.getOptions()); // sanitize [password, apiKey, privateKey, externalIp] fields in the dashmate config - obfuscateObjectRecursive(cloned, (field, value) => (typeof value === 'string' && field === 'password' ? hideString(value) : value)); - obfuscateObjectRecursive(cloned, (field, value) => (typeof value === 'string' && field === 'key' ? hideString(value) : value)); - obfuscateObjectRecursive(cloned, (field, value) => (typeof value === 'string' && field === 'apiKey' ? hideString(value) : value)); - obfuscateObjectRecursive(cloned, (field, value) => (typeof value === 'string' && field === 'privateKey' ? hideString(value) : value)); + obfuscateObjectRecursive(clonedOptions, (field, value) => (typeof value === 'string' && field === 'password' ? hideString(value) : value)); + obfuscateObjectRecursive(clonedOptions, (field, value) => (typeof value === 'string' && field === 'key' ? hideString(value) : value)); + obfuscateObjectRecursive(clonedOptions, (field, value) => (typeof value === 'string' && field === 'apiKey' ? hideString(value) : value)); + obfuscateObjectRecursive(clonedOptions, (field, value) => (typeof value === 'string' && field === 'privateKey' ? hideString(value) : value)); // sanitize also usernames & external ip from the rest of the fields values - obfuscateObjectRecursive(cloned, (_field, value) => (typeof value === 'string' ? value.replaceAll( + obfuscateObjectRecursive(clonedOptions, (_field, value) => (typeof value === 'string' ? value.replaceAll( username, hideString(username), ) : value)); - return cloned; + return new Config(config.getName(), clonedOptions); } diff --git a/packages/dashmate/src/core/startCoreFactory.js b/packages/dashmate/src/core/startCoreFactory.js index 86401ee6dfd..3da7e54b8d3 100644 --- a/packages/dashmate/src/core/startCoreFactory.js +++ b/packages/dashmate/src/core/startCoreFactory.js @@ -59,8 +59,10 @@ export default function startCoreFactory( coreCommand.push('--disablewallet=1'); } - const logFilePath = config.get('core.log.file.path'); - ensureFileMountExists(logFilePath, 0o666); + const logFilePath = config.get('core.log.filePath'); + if (logFilePath !== null) { + ensureFileMountExists(logFilePath, 0o666); + } const coreContainer = await dockerCompose.runService( config, diff --git a/packages/dashmate/src/createDIContainer.js b/packages/dashmate/src/createDIContainer.js index e478ffdf1d1..9f3b8616235 100644 --- a/packages/dashmate/src/createDIContainer.js +++ b/packages/dashmate/src/createDIContainer.js @@ -15,6 +15,14 @@ import ConfigFileJsonRepository from './config/configFile/ConfigFileJsonReposito import createConfigFileFactory from './config/configFile/createConfigFileFactory.js'; import migrateConfigFileFactory from './config/configFile/migrateConfigFileFactory.js'; import DefaultConfigs from './config/DefaultConfigs.js'; +import analyseConfigFactory from './doctor/analyse/analyseConfigFactory.js'; +import analyseCoreFactory from './doctor/analyse/analyseCoreFactory.js'; +import analysePlatformFactory from './doctor/analyse/analysePlatformFactory.js'; +import analyseServiceContainersFactory from './doctor/analyse/analyseServiceContainersFactory.js'; +import analyseSystemResourcesFactory from './doctor/analyse/analyseSystemResourcesFactory.js'; +import analyseSamplesFactory from './doctor/analyseSamplesFactory.js'; +import archiveSamples from './doctor/archiveSamples.js'; +import unarchiveSamplesFactory from './doctor/unarchiveSamplesFactory.js'; import renderTemplateFactory from './templates/renderTemplateFactory.js'; import renderServiceTemplatesFactory from './templates/renderServiceTemplatesFactory.js'; @@ -113,6 +121,9 @@ import writeConfigTemplatesFactory from './templates/writeConfigTemplatesFactory import importCoreDataTaskFactory from './listr/tasks/setup/regular/importCoreDataTaskFactory.js'; import verifySystemRequirementsTaskFactory from './listr/tasks/setup/regular/verifySystemRequirementsTaskFactory.js'; +import collectSamplesTaskFactory from './listr/tasks/doctor/collectSamplesTaskFactory.js'; +import verifySystemRequirementsFactory from './doctor/verifySystemRequirementsFactory.js'; +import validateZeroSslCertificateFactory from './ssl/zerossl/validateZeroSslCertificateFactory.js'; /** * @param {Object} [options] @@ -306,6 +317,30 @@ export default async function createDIContainer(options = {}) { importCoreDataTask: asFunction(importCoreDataTaskFactory).singleton(), verifySystemRequirementsTask: asFunction(verifySystemRequirementsTaskFactory) .singleton(), + collectSamplesTask: asFunction(collectSamplesTaskFactory).singleton(), + }); + + /** + * SSL + */ + container.register({ + validateZeroSslCertificate: asFunction(validateZeroSslCertificateFactory).singleton(), + getCertificate: asValue(getCertificate), + }); + + /** + * Doctor + */ + container.register({ + verifySystemRequirements: asFunction(verifySystemRequirementsFactory), + analyseSamples: asFunction(analyseSamplesFactory).singleton(), + analyseSystemResources: asFunction(analyseSystemResourcesFactory).singleton(), + analyseServiceContainers: asFunction(analyseServiceContainersFactory).singleton(), + analyseConfig: asFunction(analyseConfigFactory).singleton(), + analyseCore: asFunction(analyseCoreFactory).singleton(), + analysePlatform: asFunction(analysePlatformFactory).singleton(), + unarchiveSamples: asFunction(unarchiveSamplesFactory).singleton(), + archiveSamples: asValue(archiveSamples), }); /** diff --git a/packages/dashmate/src/docker/DockerCompose.js b/packages/dashmate/src/docker/DockerCompose.js index 7826b325938..c9231128be1 100644 --- a/packages/dashmate/src/docker/DockerCompose.js +++ b/packages/dashmate/src/docker/DockerCompose.js @@ -41,6 +41,11 @@ export default class DockerCompose { */ #isDockerSetupVerified = false; + /** + * @type {Error} + */ + #dockerVerifiicationError; + /** * @type {HomeDir} */ @@ -499,14 +504,24 @@ export default class DockerCompose { */ async throwErrorIfNotInstalled() { if (this.#isDockerSetupVerified) { - return; + if (this.#dockerVerifiicationError) { + throw this.#dockerVerifiicationError; + } else { + return; + } } - this.#isDockerSetupVerified = true; + try { + await this.throwErrorIfDockerIsNotInstalled(); - await this.throwErrorIfDockerIsNotInstalled(); + await this.throwErrorIfDockerComposeIsNotInstalled(); + } catch (e) { + this.#dockerVerifiicationError = e; - await this.throwErrorIfDockerComposeIsNotInstalled(); + throw e; + } finally { + this.#isDockerSetupVerified = true; + } } /** diff --git a/packages/dashmate/src/docker/getServiceListFactory.js b/packages/dashmate/src/docker/getServiceListFactory.js index 7fee42f5fc3..eff5fac7574 100644 --- a/packages/dashmate/src/docker/getServiceListFactory.js +++ b/packages/dashmate/src/docker/getServiceListFactory.js @@ -13,7 +13,7 @@ export default function getServiceListFactory(generateEnvs, getConfigProfiles) { /** * Returns list of services and corresponding docker images from the config * - * @typedef {getServiceList} + * @typedef {function} getServiceList * @param {Config} config * @return {Object[]} */ diff --git a/packages/dashmate/src/doctor/Prescription.js b/packages/dashmate/src/doctor/Prescription.js new file mode 100644 index 00000000000..07bd6cd6344 --- /dev/null +++ b/packages/dashmate/src/doctor/Prescription.js @@ -0,0 +1,40 @@ +export const SEVERITY = { + LOW: 1, + MEDIUM: 2, + HIGH: 3, +}; + +export class Prescription { + /** + * @type {Problem[]} + */ + #orderedProblems; + + /** + * @param {Problem[]} problems + */ + constructor(problems) { + const orderedProblems = [...problems]; + orderedProblems.sort((a, b) => b.getSeverity() - a.getSeverity()); + this.#orderedProblems = orderedProblems; + } + + /** + * @return {number} - Severity level + */ + getSeverity() { + return this.#orderedProblems + .reduce((severity, problem) => ( + Math.max(severity, problem.getSeverity()) + ), SEVERITY.LOW); + } + + /** + * Get problems ordered by severity level + * + * @return {Problem[]} + */ + getOrderedProblems() { + return this.#orderedProblems; + } +} diff --git a/packages/dashmate/src/doctor/Problem.js b/packages/dashmate/src/doctor/Problem.js new file mode 100644 index 00000000000..64cff07c31c --- /dev/null +++ b/packages/dashmate/src/doctor/Problem.js @@ -0,0 +1,48 @@ +export default class Problem { + /** + * @type {string} + */ + #description; + + /** + * @type {string} + */ + #solution; + + /** + * @type {number} + */ + #severity; + + /** + * @param {string} description + * @param {string} solution + * @param {number} severity + */ + constructor(description, solution, severity) { + this.#description = description; + this.#solution = solution; + this.#severity = severity; + } + + /** + * @return {string} + */ + getDescription() { + return this.#description; + } + + /** + * @return {string} + */ + getSolution() { + return this.#solution; + } + + /** + * @return {number} + */ + getSeverity() { + return this.#severity; + } +} diff --git a/packages/dashmate/src/doctor/Samples.js b/packages/dashmate/src/doctor/Samples.js new file mode 100644 index 00000000000..5d2c2b80d64 --- /dev/null +++ b/packages/dashmate/src/doctor/Samples.js @@ -0,0 +1,101 @@ +export default class Samples { + /** + * @type {Date} + */ + date; + + /** + * @type {Object} + */ + systemInfo = {}; + + /** + * @type {string} + */ + #dockerError; + + /** + * @type {string} + */ + #dashmateVersion; + + /** + * @type {Config} + */ + #dashmateConfig; + + /** + * @type {Object} + */ + #services = {}; + + constructor() { + this.date = new Date(); + } + + setSystemInfo(systemInfo) { + this.systemInfo = systemInfo; + } + + getSystemInfo() { + return this.systemInfo; + } + + /** + * @param {Error} error + */ + setDockerError(error) { + this.#dockerError = error.toString(); + } + + /** + * @param {string} errorString + */ + setStringifiedDockerError(errorString) { + this.#dockerError = errorString; + } + + /** + * @return {string} + */ + getStringifiedDockerError() { + return this.#dockerError; + } + + setDashmateVersion(version) { + this.#dashmateVersion = version; + } + + getDashmateVersion() { + return this.#dashmateVersion; + } + + /** + * @param {Config} config + */ + setDashmateConfig(config) { + this.#dashmateConfig = config; + } + + /** + * @return {Config} + */ + getDashmateConfig() { + return this.#dashmateConfig; + } + + setServiceInfo(service, key, data) { + this.#services[service] = { + ...(this.#services[service] ?? {}), + [key]: data, + }; + } + + getServices() { + return this.#services; + } + + getServiceInfo(service, key) { + return this.#services[service]?.[key]; + } +} diff --git a/packages/dashmate/src/doctor/analyse/analyseConfigFactory.js b/packages/dashmate/src/doctor/analyse/analyseConfigFactory.js new file mode 100644 index 00000000000..7396668d439 --- /dev/null +++ b/packages/dashmate/src/doctor/analyse/analyseConfigFactory.js @@ -0,0 +1,214 @@ +import chalk from 'chalk'; +import { NETWORK_LOCAL, NETWORK_MAINNET } from '../../constants.js'; +import { ERRORS } from '../../ssl/zerossl/validateZeroSslCertificateFactory.js'; +import { SEVERITY } from '../Prescription.js'; +import Problem from '../Problem.js'; + +export default function analyseConfigFactory() { + /** + * @typedef analyseConfig + * @param {Samples} samples + * @return {Problem[]} + */ + function analyseConfig(samples) { + const config = samples.getDashmateConfig(); + + const problems = []; + + if (config?.get('platform.enable')) { + // Gateway admin is disabled while metrics are enabled + if (config.get('platform.gateway.metrics.enabled') && !config.get('platform.gateway.admin.enabled')) { + const problem = new Problem( + 'Gateway admin is disabled while metrics are enabled', + chalk`Please enable gateway admin: {bold.cyanBright dashmate config set platform.gateway.admin.enabled true}`, + SEVERITY.HIGH, + ); + + problems.push(problem); + } + + // Platform Node ID + const masternodeStatus = samples.getServiceInfo('core', 'masternodeStatus'); + const platformNodeId = masternodeStatus?.dmnState?.platformNodeId; + if (platformNodeId && config.get('platform.drive.tenderdash.node.id') !== platformNodeId) { + const problem = new Problem( + 'Platform Node ID doesn\'t match the one found in the ProReg transaction', + chalk`Please set the correct Node ID and Node Key: + {bold.cyanBright dashmate config set platform.drive.tenderdash.node.id ID + dashmate config set platform.drive.tenderdash.node.key KEY} + Or update the Node ID in the masternode list using a ProServUp transaction`, + SEVERITY.HIGH, + ); + + problems.push(problem); + } + + // SSL certificate + const ssl = samples.getServiceInfo('gateway', 'ssl'); + if (ssl?.error) { + switch (ssl.error) { + case 'disabled': + if (config.get('network') !== NETWORK_LOCAL) { + const problem = new Problem( + 'SSL certificates are disabled. Clients won\'t be able to connect securely', + chalk`Please enable and set up SSL certificates {bold.cyanBright https://docs.dash.org/en/stable/masternodes/dashmate.html#ssl-certificate}`, + SEVERITY.HIGH, + ); + + problems.push(problem); + } + break; + case 'self-signed': + if (config.get('network') === NETWORK_MAINNET) { + const problem = new Problem( + 'Self-signed SSL certificate is used on mainnet. Clients won\'t be able to connect securely', + chalk`Please use valid SSL certificates {bold.cyanBright https://docs.dash.org/en/stable/masternodes/dashmate.html#ssl-certificate}`, + SEVERITY.HIGH, + ); + + problems.push(problem); + } + break; + default: { + const { + description, + solution, + } = { + // File provider error + 'not-valid': { + description: 'SSL certificate files are not valid', + solution: chalk`Please make sure the certificate chain contains the actual server certificate at the top of the file, and it corresponds to the private key + +Certificate chain file path: {bold.cyanBright ${ssl?.data?.chainFilePath}} +Private key file path: {bold.cyanBright ${ssl?.data?.privateFilePath}}`, + }, + // File provider error + 'not-exist': { + description: 'SSL certificate files are not found', + solution: chalk`Please get an SSL certificate and place the certificate files in the correct location. + +Certificate chain file path: {bold.cyanBright ${ssl?.data?.chainFilePath}} +Private key file path: {bold.cyanBright ${ssl?.data?.privateFilePath}} + +Or use ZeroSSL https://docs.dash.org/en/stable/masternodes/dashmate.html#ssl-certificate`, + }, + // ZeroSSL validation errors + [ERRORS.API_KEY_IS_NOT_SET]: { + description: 'ZeroSSL API key is not set.', + solution: chalk`Please obtain your API key from {underline.cyanBright https://app.zerossl.com/developer} +And then update your configuration with {block.cyanBright dashmate config set platform.gateway.ssl.providerConfigs.zerossl.apiKey [KEY]}`, + }, + [ERRORS.EXTERNAL_IP_IS_NOT_SET]: { + description: 'External IP is not set.', + solution: chalk`Please update your configuration to include your external IP using {block.cyanBright dashmate config set externalIp [IP]}`, + }, + [ERRORS.CERTIFICATE_ID_IS_NOT_SET]: { + description: 'ZeroSSL certificate is not configured', + solution: chalk`Please run {bold.cyanBright dashmate ssl obtain} to get a new certificate`, + }, + [ERRORS.PRIVATE_KEY_IS_NOT_PRESENT]: { + description: chalk`ZeroSSL private key file not found in ${ssl?.data?.privateKeyFilePath}.`, + solution: chalk`Please regenerate the certificate using {bold.cyanBright dashmate ssl obtain --force} +and revoke the previous certificate in the ZeroSSL dashboard`, + }, + [ERRORS.EXTERNAL_IP_MISMATCH]: { + description: chalk`ZeroSSL IP ${ssl?.data?.certificate.common_name} does not match external IP ${ssl?.data?.externalIp}.`, + solution: chalk`Please regenerate the certificate using {bold.cyanBright dashmate ssl obtain --force} + and revoke the previous certificate in the ZeroSSL dashboard`, + }, + [ERRORS.CSR_FILE_IS_NOT_PRESENT]: { + description: chalk`ZeroSSL certificate request file not found in ${ssl?.data?.csrFilePath}. +This makes auto-renewal impossible.`, + solution: chalk`If you need auto renew, please regenerate the certificate using {bold.cyanBright dashmate ssl obtain --force} +and revoke the previous certificate in the ZeroSSL dashboard`, + }, + [ERRORS.CERTIFICATE_EXPIRES_SOON]: { + description: chalk`ZeroSSL certificate expires at ${ssl?.data?.certificate.expires}.`, + solution: chalk`Please run {bold.cyanBright dashmate ssl obtain} to get a new one`, + }, + [ERRORS.CERTIFICATE_IS_NOT_VALIDATED]: { + description: chalk`ZeroSSL certificate is not approved.`, + solution: chalk`Please run {bold.cyanBright dashmate ssl obtain} to confirm certificate`, + }, + [ERRORS.CERTIFICATE_IS_NOT_VALID]: { + description: chalk`ZeroSSL certificate is not valid.`, + solution: chalk`Please run {bold.cyanBright dashmate ssl zerossl obtain} to get a new one.`, + }, + }[ssl.error] ?? {}; + + if (description) { + const problem = new Problem( + description, + solution, + SEVERITY.HIGH, + ); + + problems.push(problem); + } + break; + } + } + } + + if (samples?.getDashmateConfig()?.get('network') !== NETWORK_LOCAL) { + // Core P2P port + const coreP2pPort = samples.getServiceInfo('core', 'p2pPort'); + if (coreP2pPort && coreP2pPort !== 'OPEN') { + const port = config.get('core.p2p.port'); + const externalIp = config.get('externalIp'); + const problem = new Problem( + 'Core P2P port is unavailable for incoming connections.', + chalk`Please ensure that port ${port} on your public IP address ${externalIp} is open +for incoming connections. You may need to configure your firewall to +ensure this port is accessible from the public internet. If you are using +Network Address Translation (NAT), please enable port forwarding for port 80 +and all Dash service ports listed above.`, + SEVERITY.HIGH, + ); + + problems.push(problem); + } + + // Gateway HTTP port + const gatewayHttpPort = samples.getServiceInfo('gateway', 'httpPort'); + if (gatewayHttpPort && gatewayHttpPort !== 'OPEN') { + const port = config.get('platform.gateway.listeners.dapiAndDrive.port'); + const externalIp = config.get('externalIp'); + const problem = new Problem( + 'Gateway HTTP port is unavailable for incoming connections.', + chalk`Please ensure that port ${port} on your public IP address ${externalIp} is open +for incoming connections. You may need to configure your firewall to +ensure this port is accessible from the public internet. If you are using +Network Address Translation (NAT), please enable port forwarding for port 80 +and all Dash service ports listed above.`, + SEVERITY.HIGH, + ); + + problems.push(problem); + } + + // Tenderdash P2P port + const tenderdashP2pPort = samples.getServiceInfo('drive_tenderdash', 'p2pPort'); + if (tenderdashP2pPort && tenderdashP2pPort !== 'OPEN') { + const port = config.get('platform.drive.tenderdash.p2p.port'); + const externalIp = config.get('externalIp'); + const problem = new Problem( + 'Tenderdash P2P port is unavailable for incoming connections.', + chalk`Please ensure that port ${port} on your public IP address ${externalIp} is open +for incoming connections. You may need to configure your firewall to +ensure this port is accessible from the public internet. If you are using +Network Address Translation (NAT), please enable port forwarding for port 80 +and all Dash service ports listed above.`, + SEVERITY.HIGH, + ); + + problems.push(problem); + } + } + } + + return problems; + } + + return analyseConfig; +} diff --git a/packages/dashmate/src/doctor/analyse/analyseCoreFactory.js b/packages/dashmate/src/doctor/analyse/analyseCoreFactory.js new file mode 100644 index 00000000000..eb947e8a6ef --- /dev/null +++ b/packages/dashmate/src/doctor/analyse/analyseCoreFactory.js @@ -0,0 +1,92 @@ +import chalk from 'chalk'; +import { SEVERITY } from '../Prescription.js'; +import Problem from '../Problem.js'; + +/** + * @return {analyseCore} + */ +export default function analyseCoreFactory() { + /** + * @typedef {Function} analyseCore + * @param {Samples} samples + * @return {Problem[]} + */ + function analyseCore(samples) { + const problems = []; + + // Core is synced + const masternodeSyncStatus = samples.getServiceInfo('core', 'masternodeSyncStatus'); + + if (masternodeSyncStatus?.IsSynced === false) { + const blockchainInfo = samples.getServiceInfo('core', 'blockchainInfo'); + const verificationProgress = blockchainInfo?.verificationprogress ?? 0; + + const problem = new Problem( + 'Core is syncing blockchain data. Some node services may be temporarily unresponsive', + chalk`Sync is ${(verificationProgress * 100).toFixed(1)}% complete. Please wait until Core is fully synced`, + SEVERITY.MEDIUM, + ); + + problems.push(problem); + } + + // PoSe + if (samples?.getDashmateConfig()?.get('core.masternode.enable')) { + const masternodeStatus = samples.getServiceInfo('core', 'masternodeStatus'); + + const { description, solution, severity } = { + WAITING_FOR_PROTX: { + description: 'The masternode is waiting for ProTx registration confirmation', + solution: chalk`Ensure the ProRegTx transaction has been sent and is confirmed on the network.`, + severity: SEVERITY.HIGH, + }, + POSE_BANNED: { + description: 'The masternode has been banned due to failing Proof-of-Service checks.', + solution: chalk`Submit a ProUpServTx transaction to unban your masternode and ensure +it meets all network requirements.`, + severity: SEVERITY.HIGH, + }, + REMOVED: { + description: 'The masternode has been removed from the network\'s masternode list.', + solution: chalk`Re-register the masternode with a new ProRegTx transaction.`, + severity: SEVERITY.HIGH, + }, + OPERATOR_KEY_CHANGED: { + description: 'The operator key for the masternode has been changed.', + solution: chalk`Update the masternode configuration with the new operator key +using {bold.cyanBright dashmate config set core.masternode.operatorKey }.`, + severity: SEVERITY.HIGH, + }, + PROTX_IP_CHANGED: { + description: 'The IP address registered in the ProTx has changed.', + solution: chalk`Update your masternode\'s configuration with the new IP address.`, + severity: SEVERITY.HIGH, + }, + ERROR: { + description: 'An unknown error has occurred with the masternode.', + solution: chalk`Check the Core logs for detailed error information and troubleshoot accordingly.`, + severity: SEVERITY.HIGH, + }, + UNKNOWN: { + description: 'The masternode status cannot be determined.', + solution: chalk`Check the Core logs for detailed error information and troubleshoot accordingly.`, + severity: SEVERITY.HIGH, + }, + }[masternodeStatus?.state] || {}; + + if (description) { + const problem = new Problem( + description, + solution, + severity, + ); + + problems.push(problem); + } + } + + return problems; + } + + return analyseCore; +} diff --git a/packages/dashmate/src/doctor/analyse/analysePlatformFactory.js b/packages/dashmate/src/doctor/analyse/analysePlatformFactory.js new file mode 100644 index 00000000000..d36b71147e3 --- /dev/null +++ b/packages/dashmate/src/doctor/analyse/analysePlatformFactory.js @@ -0,0 +1,35 @@ +import { SEVERITY } from '../Prescription.js'; +import Problem from '../Problem.js'; + +/** + * @return {analysePlatform} + */ +export default function analysePlatformFactory() { + /** + * @typedef {Function} analysePlatform + * @param {Samples} samples + * @return {Problem[]} + */ + function analysePlatform(samples) { + const problems = []; + + // Tenderdash is synced + if (samples?.getDashmateConfig()?.get('platform.enable')) { + const status = samples.getServiceInfo('drive_tenderdash', 'status'); + + if (status?.sync_info?.catching_up) { + const problem = new Problem( + 'Drive is syncing blockchain data. Some node services may temporarily be unresponsive.', + 'Please wait until Drive is fully synced', + SEVERITY.MEDIUM, + ); + + problems.push(problem); + } + } + + return problems; + } + + return analysePlatform; +} diff --git a/packages/dashmate/src/doctor/analyse/analyseServiceContainersFactory.js b/packages/dashmate/src/doctor/analyse/analyseServiceContainersFactory.js new file mode 100644 index 00000000000..7cf6b6c6964 --- /dev/null +++ b/packages/dashmate/src/doctor/analyse/analyseServiceContainersFactory.js @@ -0,0 +1,110 @@ +import chalk from 'chalk'; +import { SEVERITY } from '../Prescription.js'; +import Problem from '../Problem.js'; + +/** + * @param {getServiceList} getServiceList + * @return {analyseServiceContainers} + */ +export default function analyseServiceContainersFactory( + getServiceList, +) { + /** + * @typedef {analyseServiceContainers} + * @param {Samples} samples + * @return {Problem[]} + */ + function analyseServiceContainers(samples) { + const services = getServiceList(samples.getDashmateConfig()); + + const servicesNotStarted = []; + const servicesFailed = []; + const servicesOOMKilled = []; + + for (const service of services) { + const dockerInspect = samples.getServiceInfo(service.name, 'dockerInspect'); + + if (!dockerInspect) { + continue; + } + + if (dockerInspect.message) { + servicesNotStarted.push({ + service, + message: dockerInspect.message, + }); + } else if ( + dockerInspect.State?.Restarting === true + && dockerInspect.State?.ExitCode !== 0 + ) { + servicesFailed.push({ + service, + message: dockerInspect.State.Error, + code: dockerInspect.State.ExitCode, + }); + } else if (dockerInspect.State?.OOMKilled === true) { + servicesOOMKilled.push({ + service, + }); + } + } + + const problems = []; + + if (servicesNotStarted.length > 0) { + let description; + if (servicesNotStarted.length === 1) { + description = `Service ${servicesNotStarted[0].service.title} isn't started.`; + } else { + description = `Services ${servicesNotStarted.map((e) => e.service.title).join(', ')} aren't started.`; + } + + const problem = new Problem( + description, + chalk`Try {bold.cyanBright dashmate start --force} to make sure all services are started`, + SEVERITY.HIGH, + ); + + problems.push(problem); + } + + for (const failedService of servicesFailed) { + let description = `Service ${failedService.service.title} failed with an error code ${failedService.code}`; + + if (failedService.message?.length > 0) { + description += `\nand message: ${failedService.message}`; + } + + description += '.'; + + const problem = new Problem( + description, + 'Please check service logs or share them with Dash Core Group', + SEVERITY.HIGH, + ); + + problems.push(problem); + } + + if (servicesOOMKilled.length > 0) { + let description; + if (servicesNotStarted.length === 1) { + description = chalk`Service ${servicesNotStarted[0].service.title} was killed due to a lack of memory.`; + } else { + description = chalk`Services ${servicesNotStarted.map((e) => e.service.title).join(', ')} were killed due to lack of memory.`; + } + + const problem = new Problem( + description, + 'Make sure you have enough memory to run the node.', + SEVERITY.HIGH, + ); + + problems.push(problem); + } + + return problems; + } + + return analyseServiceContainers; +} diff --git a/packages/dashmate/src/doctor/analyse/analyseSystemResourcesFactory.js b/packages/dashmate/src/doctor/analyse/analyseSystemResourcesFactory.js new file mode 100644 index 00000000000..a5728a4b413 --- /dev/null +++ b/packages/dashmate/src/doctor/analyse/analyseSystemResourcesFactory.js @@ -0,0 +1,104 @@ +import { SEVERITY } from '../Prescription.js'; +import Problem from '../Problem.js'; + +/** + * @param {verifySystemRequirements} verifySystemRequirements + * @return {analyseSystemResources} + */ +export default function analyseSystemResourcesFactory(verifySystemRequirements) { + /** + * @typedef {analyseSystemResources} + * @param {Samples} samples + * @returns {Problem[]} + */ + function analyseSystemResources(samples) { + const { + cpu, + dockerSystemInfo, + currentLoad, + diskSpace, + fsOpenFiles, + memory, + diskIO, + } = samples.getSystemInfo(); + + // System requirements + const problems = verifySystemRequirements( + { + dockerSystemInfo, + cpu, + memory, + diskSpace, + }, + samples.getDashmateConfig().get('platform.enable'), + { + diskSpace: 5, + }, + ); + + // Current CPU load + const cpuCores = dockerSystemInfo?.NCPU ?? cpu?.cores; + if (cpuCores && currentLoad && (currentLoad.avgLoad / cpuCores) > 0.8) { + const problem = new Problem( + `Average system load ${currentLoad.avgLoad.toFixed(2)} is higher than normal`, + 'Consider upgrading CPUs', + SEVERITY.LOW, + ); + + problems.push(problem); + } + + // Free memory + if (memory && Number.isInteger(memory.free) && memory.free > 0) { + const memoryGb = memory.free / (1024 ** 3); + if (memoryGb < 0.5) { + const problem = new Problem( + `Only ${memoryGb.toFixed(1)}GB RAM is available`, + 'Consider adding RAM', + SEVERITY.LOW, + ); + + problems.push(problem); + } + } + + // Open file descriptors + if (fsOpenFiles?.allocated && fsOpenFiles?.max) { + const available = fsOpenFiles.max - fsOpenFiles.allocated; + if (available < 1000) { + const problem = new Problem( + `${available} available file descriptors left`, + 'Please increase the maximum open file descriptor limit or stop unnecessary processes.', + SEVERITY.HIGH, + ); + + problems.push(problem); + } + } + + // IO wait time + if (diskIO?.tWaitPercent) { + const THRESHOLD = 40; + + const maxDiskIOWaitPercent = Math.max( + diskIO.rWaitPercent, + diskIO.wWaitPercent, + diskIO.tWaitPercent, + ) * 100; + + if (maxDiskIOWaitPercent > THRESHOLD) { + const problem = new Problem( + `Disk IO wait time is ${maxDiskIOWaitPercent.toFixed(0)}%`, + 'Consider upgrading to faster storage', + SEVERITY.LOW, + ); + + problems.push(problem); + } + } + + return problems; + } + + return analyseSystemResources; +} diff --git a/packages/dashmate/src/doctor/analyseSamplesFactory.js b/packages/dashmate/src/doctor/analyseSamplesFactory.js new file mode 100644 index 00000000000..f3aae62e8b7 --- /dev/null +++ b/packages/dashmate/src/doctor/analyseSamplesFactory.js @@ -0,0 +1,52 @@ +import { Prescription, SEVERITY } from './Prescription.js'; +import Problem from './Problem.js'; + +/** + * @param {analyseSystemResources} analyseSystemResources + * @param {analyseServiceContainers} analyseServiceContainers + * @param {analyseConfig} analyseConfig + * @param {analyseCore} analyseCore + * @param {analysePlatform} analysePlatform + * @return {analyseSamples} + */ +export default function analyseSamplesFactory( + analyseSystemResources, + analyseServiceContainers, + analyseConfig, + analyseCore, + analysePlatform, +) { + /** + * @typedef {Function} analyseSamples + * @param {Samples} samples + * @return {Prescription} + */ + function analyseSamples(samples) { + const problems = []; + + // System resources + problems.push(...analyseSystemResources(samples)); + + // Docker + const dockerError = samples.getStringifiedDockerError(); + if (dockerError) { + problems.push(new Problem( + 'Docker installation error', + dockerError, + SEVERITY.HIGH, + )); + } + + problems.push(...analyseServiceContainers(samples)); + + problems.push(...analyseConfig(samples)); + + problems.push(...analyseCore(samples)); + + problems.push(...analysePlatform(samples)); + + return new Prescription(problems); + } + + return analyseSamples; +} diff --git a/packages/dashmate/src/doctor/archiveSamples.js b/packages/dashmate/src/doctor/archiveSamples.js new file mode 100644 index 00000000000..4f02eb49d86 --- /dev/null +++ b/packages/dashmate/src/doctor/archiveSamples.js @@ -0,0 +1,64 @@ +import os from 'os'; +import path from 'path'; +import fs from 'fs'; +import { create } from 'tar'; + +function writeSampleFile(archiveDir, service, filename, data) { + if (data === undefined || data === null) { + return; + } + + const serviceDir = path.join(archiveDir, service ?? ''); + + let buffer; + let filetype; + + const dataType = typeof data; + + if (dataType === 'string') { + buffer = data; + filetype = '.txt'; + } else { + buffer = JSON.stringify(data, null, 2); + filetype = '.json'; + } + + if (!fs.existsSync(serviceDir)) { + fs.mkdirSync(serviceDir); + } + + fs.writeFileSync(path.join(serviceDir, `${filename}${filetype}`), buffer, 'utf8'); +} + +/** + * @param {Samples} samples + * @param {string} folderPath + */ +export default async function archiveSamples(samples, folderPath) { + const tempDir = os.tmpdir(); + const archiveName = `dashmate-report-${samples.date.toISOString()}`; + const archiveDir = path.join(tempDir, archiveName); + + writeSampleFile(archiveDir, null, 'date', samples.date.toISOString()); + writeSampleFile(archiveDir, null, 'systemInfo', samples.getSystemInfo()); + writeSampleFile(archiveDir, null, 'dockerError', samples.getStringifiedDockerError()); + writeSampleFile(archiveDir, null, 'dashmateConfig', samples.getDashmateConfig()); + writeSampleFile(archiveDir, null, 'dashmateVersion', samples.getDashmateVersion()); + + for (const [serviceName, service] of Object.entries(samples.getServices())) { + for (const [key, data] of Object.entries(service)) { + if (data !== undefined && data !== null) { + writeSampleFile(archiveDir, serviceName, key, data); + } + } + } + + await create( + { + cwd: archiveDir, + gzip: true, + file: path.join(folderPath, `${archiveName}.tar.gz`), + }, + ['.'], + ); +} diff --git a/packages/dashmate/src/doctor/report.js b/packages/dashmate/src/doctor/report.js deleted file mode 100644 index ea5618d42ef..00000000000 --- a/packages/dashmate/src/doctor/report.js +++ /dev/null @@ -1,91 +0,0 @@ -import os from 'os'; -import path from 'path'; -import fs from 'fs'; -import { create } from 'tar'; - -export default class Report { - date; - - #systemInfo = {}; - - #dashmateVersion = null; - - #dashmateConfig = null; - - #services = {}; - - constructor() { - this.date = new Date(); - } - - setSystemInfo(systemInfo) { - this.#systemInfo = systemInfo; - } - - setDashmateVersion(version) { - this.#dashmateVersion = version; - } - - setDashmateConfig(config) { - this.#dashmateConfig = config; - } - - setServiceInfo(service, key, data) { - this.#services[service] = { - ...(this.#services[service] ?? {}), - [key]: data, - }; - } - - #writeReportFile(reportDir, service, filename, data) { - const serviceDir = path.join(reportDir, service ?? ''); - - let buffer; - let filetype; - - const dataType = typeof data; - - if (dataType === 'string') { - buffer = data; - filetype = '.txt'; - } else { - buffer = JSON.stringify(data, null, 2); - filetype = '.json'; - } - - if (!fs.existsSync(serviceDir)) { - fs.mkdirSync(serviceDir); - } - - fs.writeFileSync(path.join(serviceDir, `${filename}${filetype}`), buffer, 'utf8'); - } - - async archive(folderPath) { - const tempDir = os.tmpdir(); - const reportName = `dashmate-report-${this.date.toISOString()}`; - const reportDir = path.join(tempDir, reportName); - - this.#writeReportFile(reportDir, null, 'systemInfo', this.#systemInfo); - this.#writeReportFile(reportDir, null, 'dashmateConfig', this.#dashmateConfig); - this.#writeReportFile(reportDir, null, 'dashmateVersion', this.#dashmateVersion); - - for (const service of Object.keys(this.#services)) { - for (const dataKey of Object.keys(this.#services[service])) { - const data = this.#services[service][dataKey]; - - if (data !== undefined && data !== null) { - this.#writeReportFile(reportDir, service, dataKey, data); - } - } - } - - await create( - { - cwd: reportDir, - gzip: true, - file: path.join(folderPath, `${reportName}.tar.gz`), - }, - ['.'], - ); - } -} diff --git a/packages/dashmate/src/doctor/unarchiveSamplesFactory.js b/packages/dashmate/src/doctor/unarchiveSamplesFactory.js new file mode 100644 index 00000000000..1eb53c4b308 --- /dev/null +++ b/packages/dashmate/src/doctor/unarchiveSamplesFactory.js @@ -0,0 +1,115 @@ +import os from 'os'; +import path from 'path'; +import fs from 'fs'; +import { extract } from 'tar'; +import Samples from './Samples.js'; +import Config from '../config/Config.js'; + +function readSampleFile(filePath) { + const data = fs.readFileSync(filePath, 'utf8'); + const ext = path.extname(filePath); + + if (ext === '.json') { + return JSON.parse(data); + } + + return data; +} + +/** + * @param {getServiceList} getServiceList + * @returns {unarchiveSamples} + */ +export default function unarchiveSamplesFactory(getServiceList) { + /** + * @typedef {Function} unarchiveSamples + * @param {string} archiveFilePath + * @returns {Promise} + */ + async function unarchiveSamples(archiveFilePath) { + if (!fs.existsSync(archiveFilePath)) { + throw new Error(`Archive file with logged data not found: ${archiveFilePath}`); + } + + const samples = new Samples(); + + const tempDir = os.tmpdir(); + const archiveFileName = path.basename(archiveFilePath, '.tar.gz'); + const extractDir = path.join(tempDir, archiveFileName); + fs.mkdirSync(extractDir, { recursive: true }); + + await extract({ + file: archiveFilePath, + cwd: extractDir, + }); + + if (process.env.DEBUG) { + // eslint-disable-next-line no-console + console.debug(`Extracted logged data to: ${extractDir}`); + } + + const dateFilePath = path.join(extractDir, 'date.txt'); + if (fs.existsSync(dateFilePath)) { + samples.date = readSampleFile(dateFilePath); + } + + const systemInfoFilePath = path.join(extractDir, 'systemInfo.json'); + if (fs.existsSync(systemInfoFilePath)) { + samples.setSystemInfo(readSampleFile(systemInfoFilePath)); + } + + const dockerErrorFilePath = path.join(extractDir, 'dockerError.txt'); + if (fs.existsSync(dockerErrorFilePath)) { + samples.setStringifiedDockerError(readSampleFile(dockerErrorFilePath)); + } + + const dashmateConfigFilePath = path.join(extractDir, 'dashmateConfig.json'); + if (fs.existsSync(dashmateConfigFilePath)) { + const configProperties = readSampleFile(dashmateConfigFilePath); + if (configProperties?.options) { + const config = new Config(configProperties.name, configProperties.options); + samples.setDashmateConfig(config); + } + } + + const dashmateVersionFilePath = path.join(extractDir, 'dashmateVersion.txt'); + if (fs.existsSync(dashmateVersionFilePath)) { + samples.setDashmateVersion(readSampleFile(dashmateVersionFilePath)); + } + + const serviceNames = getServiceList(samples.getDashmateConfig()) + .map((service) => service.name); + + for (const serviceName of serviceNames) { + const serviceDir = path.join(extractDir, serviceName); + + if (!fs.statSync(serviceDir) + .isDirectory()) { + continue; + } + + const files = fs.readdirSync(serviceDir); + + for (const file of files) { + const filePath = path.join(serviceDir, file); + + const ext = path.extname(file); + if (ext !== '.txt' && ext !== '.json' && !fs.statSync(filePath) + .isDirectory()) { + continue; + } + + const data = readSampleFile(filePath); + const key = path.basename(file, ext); + samples.setServiceInfo(serviceName, key, data); + } + } + + if (!process.env.DEBUG) { + fs.rmSync(extractDir, { recursive: true }); + } + + return samples; + } + return unarchiveSamples; +} diff --git a/packages/dashmate/src/doctor/verifySystemRequirementsFactory.js b/packages/dashmate/src/doctor/verifySystemRequirementsFactory.js new file mode 100644 index 00000000000..66f7355d471 --- /dev/null +++ b/packages/dashmate/src/doctor/verifySystemRequirementsFactory.js @@ -0,0 +1,130 @@ +import { SEVERITY } from './Prescription.js'; +import Problem from './Problem.js'; + +/** + * @return {verifySystemRequirements} + */ +export default function verifySystemRequirementsFactory() { + /** + * @typedef {Function} verifySystemRequirements + * @param {Object} systemInfo + * @param {Object} systemInfo.dockerSystemInfo + * @param {Object} systemInfo.cpu + * @param {Object} systemInfo.memory + * @param {Object} systemInfo.diskSpace + * @param {boolean} isHP + * @param {Object} [overrideRequirements] + * @param {Number} [overrideRequirements.diskSpace] + * @returns {Problem[]} + */ + function verifySystemRequirements( + { + dockerSystemInfo, + cpu, + memory, + diskSpace, + }, + isHP, + overrideRequirements = {}, + ) { + const MINIMUM_CPU_CORES = isHP ? 4 : 2; + const MINIMUM_CPU_FREQUENCY = 2.4; // GHz + const MINIMUM_RAM = isHP ? 8 : 4; // GB + const MINIMUM_DISK_SPACE = overrideRequirements.diskSpace ?? (isHP ? 200 : 100); // GB + + const problems = []; + + // CPU cores + const cpuCores = dockerSystemInfo?.NCPU ?? cpu?.cores; + + if (Number.isInteger(cpuCores)) { + if (cpuCores < MINIMUM_CPU_CORES) { + const problem = new Problem( + `${cpuCores} CPU cores detected. At least ${MINIMUM_CPU_CORES} are required`, + `Consider upgrading CPUs to make sure the node can provide timely responses +for required network services and avoid Proof-of-Service bans`, + SEVERITY.MEDIUM, + ); + + problems.push(problem); + } + } else if (process.env.DEBUG) { + // eslint-disable-next-line no-console + console.warn('Can\'t get CPU core information'); + } + + // Memory + const totalMemory = dockerSystemInfo?.MemTotal ?? memory?.total; + + if (Number.isInteger(totalMemory)) { + const totalMemoryGb = totalMemory / (1024 ** 3); // Convert to GB + + if (totalMemoryGb < MINIMUM_RAM) { + const problem = new Problem( + `${totalMemoryGb.toFixed(2)}GB RAM detected. At least ${MINIMUM_RAM}GB is required`, + `Consider upgrading RAM to make sure the node can provide timely responses +for required network services and avoid Proof-of-Service bans`, + SEVERITY.MEDIUM, + ); + + problems.push(problem); + } + } else if (process.env.DEBUG) { + // eslint-disable-next-line no-console + console.warn('Can\'t get memory information'); + } + + // CPU speed + if (cpu && Number.isFinite(cpu.speed) && cpu.speed !== 0) { + if (cpu.speed < MINIMUM_CPU_FREQUENCY) { + const problem = new Problem( + `${cpu.speed.toFixed(1)}GHz CPU frequency detected. At least ${MINIMUM_CPU_FREQUENCY}GHz is required`, + `Consider upgrading CPUs to make sure the node can provide timely responses +for required network services and avoid Proof-of-Service bans`, + SEVERITY.MEDIUM, + ); + + problems.push(problem); + } + } else if (process.env.DEBUG) { + // eslint-disable-next-line no-console + console.warn('Can\'t get CPU frequency'); + } + + // Check swap information + if (memory && Number.isInteger(memory.swaptotal)) { + const swapTotalGb = (memory.swaptotal / (1024 ** 3)); // Convert bytes to GB + + if (swapTotalGb < 2) { + const problem = new Problem( + `Swap space is ${swapTotalGb.toFixed(2)}GB. 2GB is recommended`, + `Consider enabling SWAP to make sure the node can provide timely responses +for required network services and avoid Proof-of-Service bans`, + SEVERITY.LOW, + ); + + problems.push(problem); + } + } + + // Get disk usage info + if (diskSpace) { + const availableDiskSpace = diskSpace.available / (1024 ** 3); // Convert to GB + + if (availableDiskSpace < MINIMUM_DISK_SPACE) { + const problem = new Problem( + `${availableDiskSpace.toFixed(2)}GB of available disk space detected. At least ${MINIMUM_DISK_SPACE}GB is required`, + `Consider increasing disk space to make sure the node can provide timely responses +for required network services and avoid Proof-of-Service bans`, + MINIMUM_DISK_SPACE - availableDiskSpace < 5 ? SEVERITY.HIGH : SEVERITY.MEDIUM, + ); + + problems.push(problem); + } + } + + return problems; + } + + return verifySystemRequirements; +} diff --git a/packages/dashmate/src/listr/prompts/validators/validateSslCertificateFiles.js b/packages/dashmate/src/listr/prompts/validators/validateSslCertificateFiles.js new file mode 100644 index 00000000000..8c23a840699 --- /dev/null +++ b/packages/dashmate/src/listr/prompts/validators/validateSslCertificateFiles.js @@ -0,0 +1,33 @@ +import crypto from 'node:crypto'; +import fs from 'node:fs'; + +/** + * @param {string} chainFilePath + * @param {string} privateFilePath + * @return {boolean} + */ +export default function validateSslCertificateFiles(chainFilePath, privateFilePath) { + const bundlePem = fs.readFileSync(chainFilePath, 'utf8'); + const privateKeyPem = fs.readFileSync(privateFilePath, 'utf8'); + + // Step 2: Create a signature using the private key + const data = 'This is a test message'; + const sign = crypto.createSign('SHA256'); + sign.update(data); + sign.end(); + + const signature = sign.sign(privateKeyPem, 'hex'); + + // Verify the signature using the public key from the certificate + const verify = crypto.createVerify('SHA256'); + verify.update(data); + verify.end(); + + // Extract the public key from the first certificate in the bundle + const certificate = crypto.createPublicKey({ + key: bundlePem, + format: 'pem', + }); + + return verify.verify(certificate, signature, 'hex'); +} diff --git a/packages/dashmate/src/listr/tasks/doctor/collectSamplesTaskFactory.js b/packages/dashmate/src/listr/tasks/doctor/collectSamplesTaskFactory.js new file mode 100644 index 00000000000..1c4d7540be1 --- /dev/null +++ b/packages/dashmate/src/listr/tasks/doctor/collectSamplesTaskFactory.js @@ -0,0 +1,366 @@ +import fs from 'fs'; +import { Listr } from 'listr2'; +import path from 'path'; +import process from 'process'; +import obfuscateConfig from '../../../config/obfuscateConfig.js'; +import { DASHMATE_VERSION } from '../../../constants.js'; +import Certificate from '../../../ssl/zerossl/Certificate.js'; +import providers from '../../../status/providers.js'; +import hideString from '../../../util/hideString.js'; +import obfuscateObjectRecursive from '../../../util/obfuscateObjectRecursive.js'; +import validateSslCertificateFiles from '../../prompts/validators/validateSslCertificateFiles.js'; + +/** + * + * @param {string} url + * @return {Promise} + */ +async function fetchTextOrError(url) { + try { + const response = await fetch(url); + + return await response.text(); + } catch (e) { + return e.toString(); + } +} + +/** + * @param {DockerCompose} dockerCompose + * @param {createRpcClient} createRpcClient + * @param {getConnectionHost} getConnectionHost + * @param {createTenderdashRpcClient} createTenderdashRpcClient + * @param {getServiceList} getServiceList + * @param {getOperatingSystemInfo} getOperatingSystemInfo + * @param {HomeDir} homeDir + * @param {validateZeroSslCertificate} validateZeroSslCertificate + * @return {collectSamplesTask} + */ +export default function collectSamplesTaskFactory( + dockerCompose, + createRpcClient, + getConnectionHost, + createTenderdashRpcClient, + getServiceList, + getOperatingSystemInfo, + homeDir, + validateZeroSslCertificate, +) { + /** + * @typedef {function} collectSamplesTask + * @param config + * @return {Listr} + */ + function collectSamplesTask(config) { + return new Listr( + [ + { + title: 'System information', + task: async (ctx) => { + // Sample docker installation errors + try { + await dockerCompose.throwErrorIfNotInstalled(); + } catch (e) { + ctx.samples.setDockerError(e); + } + + // Operating system info + const osInfo = await getOperatingSystemInfo(); + + ctx.samples.setSystemInfo(osInfo); + }, + }, + { + title: 'Configuration', + task: async (ctx) => { + ctx.samples.setDashmateVersion(DASHMATE_VERSION); + ctx.samples.setDashmateConfig(obfuscateConfig(config)); + + return new Listr([ + { + enabled: () => config.get('platform.enable'), + title: 'Gateway SSL certificates', + task: async () => { + if (!config.get('platform.gateway.ssl.enabled')) { + ctx.samples.setServiceInfo('gateway', 'ssl', { + error: 'disabled', + }); + + return; + } + + switch (config.get('platform.gateway.ssl.provider')) { + case 'self-signed': { + ctx.samples.setServiceInfo('gateway', 'ssl', { + error: 'self-signed', + }); + + return; + } + case 'zerossl': { + const { + error, + data, + } = validateZeroSslCertificate(config, Certificate.EXPIRATION_LIMIT_DAYS); + + obfuscateObjectRecursive(data, (_field, value) => (typeof value === 'string' ? value.replaceAll( + process.env.USER, + hideString(process.env.USER), + ) : value)); + + ctx.samples.setServiceInfo('gateway', 'ssl', { + error, + data, + }); + + return; + } + case 'file': { + // SSL certificate + const certificatesDir = homeDir.joinPath( + config.getName(), + 'platform', + 'gateway', + 'ssl', + ); + + const chainFilePath = path.join(certificatesDir, 'bundle.crt'); + const privateFilePath = path.join(certificatesDir, 'private.key'); + + const data = { + chainFilePath, + privateFilePath, + }; + + obfuscateObjectRecursive(data, (_field, value) => (typeof value === 'string' ? value.replaceAll( + process.env.USER, + hideString(process.env.USER), + ) : value)); + + if (!fs.existsSync(chainFilePath) || !fs.existsSync(privateFilePath)) { + ctx.samples.setServiceInfo('gateway', 'ssl', { + error: 'not-exist', + data, + }); + + return; + } + + const isValid = validateSslCertificateFiles(chainFilePath, privateFilePath); + + if (!isValid) { + ctx.samples.setServiceInfo('gateway', 'ssl', { + error: 'not-valid', + data, + }); + } + + return; + } + default: + throw new Error('Unknown SSL provider'); + } + }, + }, + { + title: 'Core P2P port', + task: async () => { + const port = config.get('core.p2p.port'); + const response = await providers.mnowatch.checkPortStatus(port); + + ctx.samples.setServiceInfo('core', 'p2pPort', response); + }, + }, + { + title: 'Gateway HTTP port', + enabled: () => config.get('platform.enable'), + task: async () => { + const port = config.get('platform.gateway.listeners.dapiAndDrive.port'); + const response = await providers.mnowatch.checkPortStatus(port); + + ctx.samples.setServiceInfo('gateway', 'httpPort', response); + }, + }, + { + title: 'Tenderdash P2P port', + task: async () => { + const port = config.get('platform.drive.tenderdash.p2p.port'); + const response = await providers.mnowatch.checkPortStatus(port); + + ctx.samples.setServiceInfo('drive_tenderdash', 'p2pPort', response); + }, + }, + ]); + }, + }, + { + title: 'Core status', + task: async (ctx) => { + const rpcClient = createRpcClient({ + port: config.get('core.rpc.port'), + user: 'dashmate', + pass: config.get('core.rpc.users.dashmate.password'), + host: await getConnectionHost(config, 'core', 'core.rpc.host'), + }); + + const coreCalls = [ + rpcClient.getBestChainLock(), + rpcClient.quorum('listextended'), + rpcClient.getBlockchainInfo(), + rpcClient.getPeerInfo(), + rpcClient.mnsync('status'), + ]; + + if (config.get('core.masternode.enable')) { + coreCalls.push(rpcClient.masternode('status')); + } + + const [ + getBestChainLock, + quorums, + getBlockchainInfo, + getPeerInfo, + masternodeStatus, + masternodeSyncStatus, + ] = (await Promise.allSettled(coreCalls)) + .map((e) => e.value?.result || e.reason); + + ctx.samples.setServiceInfo('core', 'bestChainLock', getBestChainLock); + ctx.samples.setServiceInfo('core', 'quorums', quorums); + ctx.samples.setServiceInfo('core', 'blockchainInfo', getBlockchainInfo); + ctx.samples.setServiceInfo('core', 'peerInfo', getPeerInfo); + ctx.samples.setServiceInfo('core', 'masternodeStatus', masternodeStatus); + ctx.samples.setServiceInfo('core', 'masternodeSyncStatus', masternodeSyncStatus); + }, + }, + { + title: 'Tenderdash status', + enabled: () => config.get('platform.enable'), + task: async (ctx) => { + const tenderdashRPCClient = createTenderdashRpcClient({ + host: config.get('platform.drive.tenderdash.rpc.host'), + port: config.get('platform.drive.tenderdash.rpc.port'), + }); + + // Tenderdash requires to pass all params, so we use basic fetch + async function fetchValidators() { + const url = `http://${config.get('platform.drive.tenderdash.rpc.host')}:${config.get('platform.drive.tenderdash.rpc.port')}/validators?request_quorum_info=true`; + const response = await fetch(url, 'GET'); + return response.json(); + } + + const [ + status, + genesis, + peers, + abciInfo, + consensusState, + validators, + ] = await Promise.allSettled([ + tenderdashRPCClient.request('status', []), + tenderdashRPCClient.request('genesis', []), + tenderdashRPCClient.request('net_info', []), + tenderdashRPCClient.request('abci_info', []), + tenderdashRPCClient.request('dump_consensus_state', []), + fetchValidators(), + ]); + + ctx.samples.setServiceInfo('drive_tenderdash', 'status', status); + ctx.samples.setServiceInfo('drive_tenderdash', 'validators', validators); + ctx.samples.setServiceInfo('drive_tenderdash', 'genesis', genesis); + ctx.samples.setServiceInfo('drive_tenderdash', 'peers', peers); + ctx.samples.setServiceInfo('drive_tenderdash', 'abciInfo', abciInfo); + ctx.samples.setServiceInfo('drive_tenderdash', 'consensusState', consensusState); + }, + }, + { + title: 'Metrics', + enabled: () => config.get('platform.enable'), + task: async (ctx, task) => { + if (config.get('platform.drive.tenderdash.metrics.enabled')) { + // eslint-disable-next-line no-param-reassign + task.output = 'Reading Tenderdash metrics'; + + const url = `http://${config.get('platform.drive.tenderdash.rpc.host')}:${config.get('platform.drive.tenderdash.rpc.port')}/metrics`; + + const result = fetchTextOrError(url); + + ctx.samples.setServiceInfo('drive_tenderdash', 'metrics', result); + } + + if (config.get('platform.drive.abci.metrics.enabled')) { + // eslint-disable-next-line no-param-reassign + task.output = 'Reading Drive metrics'; + + const url = `http://${config.get('platform.drive.abci.rpc.host')}:${config.get('platform.drive.abci.rpc.port')}/metrics`; + + const result = fetchTextOrError(url); + + ctx.samples.setServiceInfo('drive_abci', 'metrics', result); + } + + if (config.get('platform.gateway.metrics.enabled')) { + // eslint-disable-next-line no-param-reassign + task.output = 'Reading Gateway metrics'; + + const url = `http://${config.get('platform.gateway.metrics.host')}:${config.get('platform.gateway.metrics.port')}/metrics`; + + const result = fetchTextOrError(url); + + ctx.samples.setServiceInfo('gateway', 'metrics', result); + } + }, + }, + { + title: 'Logs', + task: async (ctx, task) => { + const services = await getServiceList(config); + + // eslint-disable-next-line no-param-reassign + task.output = `Pulling logs from ${services.map((e) => e.name)}`; + + await Promise.all( + services.map(async (service) => { + const [inspect, logs] = (await Promise.allSettled([ + dockerCompose.inspectService(config, service.name), + dockerCompose.logs(config, [service.name]), + ])).map((e) => e.value || e.reason); + + if (logs?.out) { + // Hide username & external ip from logs + logs.out = logs.out.replaceAll( + process.env.USER, + hideString(process.env.USER), + ); + } + + if (logs?.err) { + logs.err = logs.err.replaceAll( + process.env.USER, + hideString(process.env.USER), + ); + } + + // Hide username & external ip from inspect + obfuscateObjectRecursive(inspect, (_field, value) => ( + typeof value === 'string' + ? value.replaceAll( + process.env.USER, + hideString(process.env.USER), + ) + : value + )); + + ctx.samples.setServiceInfo(service.name, 'stdOut', logs?.out); + ctx.samples.setServiceInfo(service.name, 'stdErr', logs?.err); + ctx.samples.setServiceInfo(service.name, 'dockerInspect', inspect); + }), + ); + }, + }, + ], + ); + } + + return collectSamplesTask; +} diff --git a/packages/dashmate/src/listr/tasks/setup/regular/configureSSLCertificateTaskFactory.js b/packages/dashmate/src/listr/tasks/setup/regular/configureSSLCertificateTaskFactory.js index ef6082771c1..50b5f5f050d 100644 --- a/packages/dashmate/src/listr/tasks/setup/regular/configureSSLCertificateTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/setup/regular/configureSSLCertificateTaskFactory.js @@ -1,12 +1,14 @@ import fs from 'fs'; import { Listr } from 'listr2'; -import crypto from 'node:crypto'; + +import validateSslCertificateFiles from '../../../prompts/validators/validateSslCertificateFiles.js'; import { PRESET_MAINNET, SSL_PROVIDERS, NODE_TYPE_FULLNODE, } from '../../../../constants.js'; + import validateFileExists from '../../../prompts/validators/validateFileExists.js'; import listCertificates from '../../../../ssl/zerossl/listCertificates.js'; @@ -66,29 +68,7 @@ export default function configureSSLCertificateTaskFactory( return 'the same path for both files'; } - const bundlePem = fs.readFileSync(chainFilePath, 'utf8'); - const privateKeyPem = fs.readFileSync(privateFilePath, 'utf8'); - - // Step 2: Create a signature using the private key - const data = 'This is a test message'; - const sign = crypto.createSign('SHA256'); - sign.update(data); - sign.end(); - - const signature = sign.sign(privateKeyPem, 'hex'); - - // Verify the signature using the public key from the certificate - const verify = crypto.createVerify('SHA256'); - verify.update(data); - verify.end(); - - // Extract the public key from the first certificate in the bundle - const certificate = crypto.createPublicKey({ - key: bundlePem, - format: 'pem', - }); - - const isValid = verify.verify(certificate, signature, 'hex'); + const isValid = validateSslCertificateFiles(chainFilePath, privateFilePath); if (!isValid) { return 'The certificate and private key do not match'; diff --git a/packages/dashmate/src/listr/tasks/setup/regular/verifySystemRequirementsTaskFactory.js b/packages/dashmate/src/listr/tasks/setup/regular/verifySystemRequirementsTaskFactory.js index 3e142af4165..7e97b445113 100644 --- a/packages/dashmate/src/listr/tasks/setup/regular/verifySystemRequirementsTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/setup/regular/verifySystemRequirementsTaskFactory.js @@ -6,12 +6,14 @@ import { Listr } from 'listr2'; * @param {Docker} docker * @param {DockerCompose} dockerCompose * @param {getOperatingSystemInfo} getOperatingSystemInfo + * @param {verifySystemRequirements} verifySystemRequirements * @return {verifySystemRequirementsTask} */ export default function verifySystemRequirementsTaskFactory( docker, dockerCompose, getOperatingSystemInfo, + verifySystemRequirements, ) { /** * @typedef {function} verifySystemRequirementsTask @@ -24,72 +26,9 @@ export default function verifySystemRequirementsTaskFactory( task: async (ctx, task) => { await dockerCompose.throwErrorIfNotInstalled(); - const MINIMUM_CPU_CORES = ctx.isHP ? 4 : 2; - const MINIMUM_CPU_FREQUENCY = 2.4; // GHz - const MINIMUM_RAM = ctx.isHP ? 8 : 4; // GB - const MINIMUM_DISK_SPACE = ctx.isHP ? 200 : 100; // GB + const systemInfo = await getOperatingSystemInfo(); - const warnings = []; - - const { - dockerSystemInfo, cpu, memory, diskSpace, - } = await getOperatingSystemInfo(); - - if (dockerSystemInfo) { - if (Number.isInteger(dockerSystemInfo.NCPU)) { - // Check CPU cores - const cpuCores = dockerSystemInfo.NCPU; - - if (cpuCores < MINIMUM_CPU_CORES) { - warnings.push(`${cpuCores} CPU cores detected. At least ${MINIMUM_CPU_CORES} are required`); - } - } else { - // eslint-disable-next-line no-console - console.warn('Can\'t get NCPU from docker info'); - } - - // Check RAM - if (Number.isInteger(dockerSystemInfo.MemTotal)) { - const memoryGb = dockerSystemInfo.MemTotal / (1024 ** 3); // Convert to GB - - if (memoryGb < MINIMUM_RAM) { - warnings.push(`${memoryGb.toFixed(2)}GB RAM detected. At least ${MINIMUM_RAM}GB is required`); - } - } else { - // eslint-disable-next-line no-console - console.warn('Can\'t get MemTotal from docker info'); - } - } - - // Check CPU frequency - if (cpu) { - if (cpu.speed === 0) { - if (process.env.DEBUG) { - // eslint-disable-next-line no-console - console.warn('Can\'t get CPU frequency'); - } - } else if (cpu.speed < MINIMUM_CPU_FREQUENCY) { - warnings.push(`${cpu.speed.toFixed(1)}GHz CPU frequency detected. At least ${MINIMUM_CPU_FREQUENCY}GHz is required`); - } - } - - // Check swap information - if (memory) { - const swapTotalGb = (memory.swaptotal / (1024 ** 3)); // Convert bytes to GB - - if (swapTotalGb < 2) { - warnings.push(`Swap space is ${swapTotalGb.toFixed(2)}GB. 2GB is recommended`); - } - } - - // Get disk usage info - if (diskSpace) { - const availableDiskSpace = diskSpace.available / (1024 ** 3); // Convert to GB - - if (availableDiskSpace < MINIMUM_DISK_SPACE) { - warnings.push(`${availableDiskSpace.toFixed(2)}GB available disk space detected. At least ${MINIMUM_DISK_SPACE}GB is required`); - } - } + const problems = verifySystemRequirements(systemInfo, ctx.isHP); let message = ''; if (ctx.isHP) { @@ -106,12 +45,13 @@ export default function verifySystemRequirementsTaskFactory( Upgrading system resources is recommended before proceeding.`; } - if (warnings.length > 0) { - const warningsText = warnings.map((warning) => ` - ${warning}`).join('\n'); + if (problems.length > 0) { + const problemsText = problems + .map((p) => ` - ${p.getDescription()}`).join('\n'); const header = chalk` Minimum requirements have not been met: -{red ${warningsText}} +{red ${problemsText}} ${message}\n`; diff --git a/packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js b/packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js index 5338eb4178a..242f65582ad 100644 --- a/packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js @@ -139,11 +139,8 @@ export default function setupLocalPresetTaskFactory( config.set('docker.network.subnet', subnet.join('.')); // Setup Core debug logs - const coreLogFilePath = homeDir.joinPath('logs', config.getName(), 'core.log'); - config.set('core.log.file.path', coreLogFilePath); - if (ctx.debugLogs) { - config.set('core.log.file.categories', ['all']); + config.set('core.log.debug.enabled', true); } // Although not all nodes are miners, all nodes should be aware of diff --git a/packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js b/packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js index 12718ad4de4..86bb3db5ca4 100644 --- a/packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js @@ -1,9 +1,10 @@ import { Listr } from 'listr2'; import chalk from 'chalk'; -import path from 'path'; import fs from 'fs'; +import lodash from 'lodash'; import wait from '../../../../util/wait.js'; +import { ERRORS } from '../../../../ssl/zerossl/validateZeroSslCertificateFactory.js'; /** * @param {generateCsr} generateCsr @@ -16,6 +17,7 @@ import wait from '../../../../util/wait.js'; * @param {saveCertificateTask} saveCertificateTask * @param {VerificationServer} verificationServer * @param {HomeDir} homeDir + * @param {validateZeroSslCertificate} validateZeroSslCertificate * @return {obtainZeroSSLCertificateTask} */ export default function obtainZeroSSLCertificateTaskFactory( @@ -29,6 +31,7 @@ export default function obtainZeroSSLCertificateTaskFactory( saveCertificateTask, verificationServer, homeDir, + validateZeroSslCertificate, ) { /** * @typedef {obtainZeroSSLCertificateTask} @@ -36,124 +39,69 @@ export default function obtainZeroSSLCertificateTaskFactory( * @return {Promise} */ async function obtainZeroSSLCertificateTask(config) { - // Make sure that required config options are set - const apiKey = config.get('platform.gateway.ssl.providerConfigs.zerossl.apiKey', true); - const externalIp = config.get('externalIp', true); - - const sslConfigDir = homeDir.joinPath(config.getName(), 'platform', 'gateway', 'ssl'); - const csrFilePath = path.join(sslConfigDir, 'csr.pem'); - const privateKeyFilePath = path.join(sslConfigDir, 'private.key'); - const bundleFilePath = path.join(sslConfigDir, 'bundle.crt'); - - // Ensure we have config dir created - fs.mkdirSync(sslConfigDir, { recursive: true }); - return new Listr([ { title: 'Check if certificate already exists and not expiring soon', // Skips the check if force flag is set skip: (ctx) => ctx.force, task: async (ctx, task) => { - const certificateId = await config.get('platform.gateway.ssl.providerConfigs.zerossl.id'); + const { error, data } = await validateZeroSslCertificate(config, ctx.expirationDays); - if (!certificateId) { - // Certificate is not configured - - // eslint-disable-next-line no-param-reassign - task.output = 'Certificate is not configured yet, creating a new one'; - - return; - } + lodash.merge(ctx, data); - // Certificate is already configured - - // Check if certificate files are present - ctx.isCrtFilePresent = fs.existsSync(csrFilePath); - - ctx.isPrivateKeyFilePresent = fs.existsSync(privateKeyFilePath); - - ctx.isBundleFilePresent = fs.existsSync(bundleFilePath); - - // This function will throw an error if certificate with specified ID is not present - const certificate = await getCertificate(apiKey, certificateId); - - // If certificate exists but private key does not, then we can't setup TLS connection - // In this case we need to regenerate certificate or put back this private key - if (!ctx.isPrivateKeyFilePresent) { - throw new Error(`Certificate private key file not found in ${privateKeyFilePath}.\n` - + 'Please regenerate the certificate using the the obtain' - + ' command with the --force flag, and revoke the previous certificate in' - + ' the ZeroSSL dashboard'); - } - - // We need to make sure that external IP and certificate IP match - if (certificate.common_name !== externalIp) { - throw new Error(`Certificate IPe ${certificate.common_name} does not match external IP ${externalIp}.\n` - + 'Please change the external IP in config or regenerate the certificate ' - + ' using the obtain command with the --force flag, and revoke the previous' - + ' certificate in the ZeroSSL dashboard'); - } - - if (!certificate.isExpiredInDays(ctx.expirationDays)) { - // Certificate is not going to expire soon - - if (certificate.status === 'issued') { - // Certificate is valid, so we might need only to download certificate bundle - ctx.certificate = certificate; + // Ensure we have config dir created + fs.mkdirSync(ctx.sslConfigDir, { recursive: true }); + switch (error) { + case undefined: // eslint-disable-next-line no-param-reassign - task.output = `Certificate is valid and expires at ${certificate.expires}`; - } else if (['pending_validation', 'draft'].includes(certificate.status)) { - // Certificate is already created, so we just need to pass validation - // and download certificate file - ctx.certificate = certificate; - - // We need to download new certificate bundle - ctx.isBundleFilePresent = false; - - // eslint-disable-next-line no-param-reassign - task.output = 'Certificate was already created, but not validated yet.'; - } else { - // Certificate is not valid, so we need to re-create it - - // We need to download certificate bundle - ctx.isBundleFilePresent = false; - - if (!ctx.isCrtFilePresent) { - throw new Error(`Certificate request file not found in ${csrFilePath}.\n` - + 'To create a new certificate, please use the obtain' - + ' command with the --force flag and revoke the previous certificate' - + ' in the ZeroSSL dashboard'); - } - - ctx.csr = fs.readFileSync(csrFilePath, 'utf8'); - + task.output = `Certificate is valid and expires at ${ctx.certificate.expires}`; + break; + case ERRORS.API_KEY_IS_NOT_SET: + throw new Error('ZeroSSL API key is not set. Please set it in the config file'); + case ERRORS.EXTERNAL_IP_IS_NOT_SET: + throw new Error('External IP is not set. Please set it in the config file'); + case ERRORS.CERTIFICATE_ID_IS_NOT_SET: // eslint-disable-next-line no-param-reassign - task.output = 'Certificate is not valid. Create a new one'; - } - } else { - // Certificate is going to expire soon, we need to obtain a new one - - // We need to download new certificate bundle - ctx.isBundleFilePresent = false; - - if (!ctx.isCrtFilePresent) { - throw new Error(`Certificate request file not found in ${csrFilePath}.\n` + task.output = 'Certificate is not configured yet, creating a new one'; + break; + case ERRORS.PRIVATE_KEY_IS_NOT_PRESENT: + // If certificate exists but private key does not, then we can't set up TLS connection + // In this case we need to regenerate certificate or put back this private key + throw new Error(`Certificate private key file not found in ${ctx.privateKeyFilePath}.\n` + + 'Please regenerate the certificate using the obtain' + + ' command with the --force flag and revoke the previous certificate in' + + ' the ZeroSSL dashboard'); + case ERRORS.EXTERNAL_IP_MISMATCH: + throw new Error(`Certificate IPe ${ctx.certificate.common_name} does not match external IP ${ctx.externalIp}.\n` + + 'Please change the external IP in config. Otherwise, regenerate the certificate ' + + ' using the obtain command with the --force flag and revoke the previous' + + ' certificate in the ZeroSSL dashboard'); + case ERRORS.CSR_FILE_IS_NOT_PRESENT: + throw new Error(`Certificate request file not found in ${ctx.csrFilePath}.\n` + 'To renew certificate please use the obtain' + ' command with the --force flag, and revoke the previous certificate in' + ' the ZeroSSL dashboard'); - } - - ctx.csr = fs.readFileSync(csrFilePath, 'utf8'); - - // eslint-disable-next-line no-param-reassign - task.output = `Certificate exists but expires in less than ${ctx.expirationDays} days at ${certificate.expires}. Obtain a new one`; + case ERRORS.CERTIFICATE_EXPIRES_SOON: + // eslint-disable-next-line no-param-reassign + task.output = `Certificate exists but expires in less than ${ctx.expirationDays} days at ${ctx.certificate.expires}. Obtain a new one`; + break; + case ERRORS.CERTIFICATE_IS_NOT_VALIDATED: + // eslint-disable-next-line no-param-reassign + task.output = 'Certificate was already created, but has not been validated yet.'; + break; + case ERRORS.CERTIFICATE_IS_NOT_VALID: + // eslint-disable-next-line no-param-reassign + task.output = 'Certificate is not valid. Create a new one'; + break; + default: + throw new Error(`Unknown error: ${error}`); } }, }, { title: 'Generate a keypair', - enabled: (ctx) => !ctx.isCrtFilePresent, + enabled: (ctx) => !ctx.isCsrFilePresent, task: async (ctx) => { ctx.keyPair = await generateKeyPair(); ctx.privateKeyFile = ctx.keyPair.privateKey; @@ -161,11 +109,11 @@ export default function obtainZeroSSLCertificateTaskFactory( }, { title: 'Generate certificate request', - enabled: (ctx) => !ctx.isCrtFilePresent, + enabled: (ctx) => !ctx.isCsrFilePresent, task: async (ctx) => { ctx.csr = await generateCsr( ctx.keyPair, - externalIp, + ctx.externalIp, ); }, }, @@ -175,8 +123,8 @@ export default function obtainZeroSSLCertificateTaskFactory( task: async (ctx) => { ctx.certificate = await createZeroSSLCertificate( ctx.csr, - externalIp, - apiKey, + ctx.externalIp, + ctx.apiKey, ); config.set('platform.gateway.ssl.enabled', true); @@ -188,7 +136,7 @@ export default function obtainZeroSSLCertificateTaskFactory( title: 'Set up verification server', skip: (ctx) => ctx.certificate && !['pending_validation', 'draft'].includes(ctx.certificate.status), task: async (ctx) => { - const validationResponse = ctx.certificate.validation.other_methods[externalIp]; + const validationResponse = ctx.certificate.validation.other_methods[ctx.externalIp]; await verificationServer.setup( config, @@ -209,14 +157,14 @@ export default function obtainZeroSSLCertificateTaskFactory( let retry; do { try { - await verifyDomain(ctx.certificate.id, apiKey); + await verifyDomain(ctx.certificate.id, ctx.apiKey); } catch (e) { if (ctx.noRetry !== true) { retry = await task.prompt({ type: 'toggle', header: chalk` An error occurred during verification: {red ${e.message}} - Please ensure that port 80 on your public IP address ${externalIp} is open + Please ensure that port 80 on your public IP address ${ctx.externalIp} is open for incoming HTTP connections. You may need to configure your firewall to ensure this port is accessible from the public internet. If you are using Network Address Translation (NAT), please enable port forwarding for port 80 @@ -245,7 +193,7 @@ export default function obtainZeroSSLCertificateTaskFactory( try { ctx.certificateFile = await downloadCertificate( ctx.certificate.id, - apiKey, + ctx.apiKey, ); // eslint-disable-next-line no-param-reassign @@ -271,30 +219,30 @@ export default function obtainZeroSSLCertificateTaskFactory( title: 'Save certificate private key file', enabled: (ctx) => !ctx.isPrivateKeyFilePresent, task: async (ctx, task) => { - fs.writeFileSync(privateKeyFilePath, ctx.privateKeyFile, 'utf8'); + fs.writeFileSync(ctx.privateKeyFilePath, ctx.privateKeyFile, 'utf8'); // eslint-disable-next-line no-param-reassign - task.output = privateKeyFilePath; + task.output = ctx.privateKeyFilePath; }, }, { title: 'Save certificate request file', - enabled: (ctx) => !ctx.isCrtFilePresent, + enabled: (ctx) => !ctx.isCsrFilePresent, task: async (ctx, task) => { - fs.writeFileSync(csrFilePath, ctx.csr, 'utf8'); + fs.writeFileSync(ctx.csrFilePath, ctx.csr, 'utf8'); // eslint-disable-next-line no-param-reassign - task.output = csrFilePath; + task.output = ctx.csrFilePath; }, }, { title: 'Save certificate file', skip: (ctx) => ctx.isBundleFilePresent, task: async (ctx, task) => { - fs.writeFileSync(bundleFilePath, ctx.certificateFile, 'utf8'); + fs.writeFileSync(ctx.bundleFilePath, ctx.certificateFile, 'utf8'); // eslint-disable-next-line no-param-reassign - task.output = bundleFilePath; + task.output = ctx.bundleFilePath; }, }, { diff --git a/packages/dashmate/src/listr/tasks/startNodeTaskFactory.js b/packages/dashmate/src/listr/tasks/startNodeTaskFactory.js index b364bcf2241..06bff9e7edb 100644 --- a/packages/dashmate/src/listr/tasks/startNodeTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/startNodeTaskFactory.js @@ -35,8 +35,10 @@ export default function startNodeTaskFactory( throw new Error(`'core.miner.enable' option only works with local network. Your network is ${config.get('network')}.`); } - const coreLogFilePath = config.get('core.log.file.path'); - ensureFileMountExists(coreLogFilePath, 0o666); + const coreLogFilePath = config.get('core.log.filePath'); + if (coreLogFilePath !== null) { + ensureFileMountExists(coreLogFilePath, 0o666); + } // Check Drive log files are created if (config.get('platform.enable')) { diff --git a/packages/dashmate/src/ssl/zerossl/validateZeroSslCertificateFactory.js b/packages/dashmate/src/ssl/zerossl/validateZeroSslCertificateFactory.js new file mode 100644 index 00000000000..f4d9956a9d7 --- /dev/null +++ b/packages/dashmate/src/ssl/zerossl/validateZeroSslCertificateFactory.js @@ -0,0 +1,139 @@ +import fs from 'fs'; +import path from 'path'; + +export const ERRORS = { + API_KEY_IS_NOT_SET: 'API_KEY_IS_NOT_SET', + EXTERNAL_IP_IS_NOT_SET: 'EXTERNAL_IP_IS_NOT_SET', + CERTIFICATE_ID_IS_NOT_SET: 'CERTIFICATE_ID_IS_NOT_SET', + PRIVATE_KEY_IS_NOT_PRESENT: 'PRIVATE_KEY_IS_NOT_PRESENT', + EXTERNAL_IP_MISMATCH: 'EXTERNAL_IP_MISMATCH', + CSR_FILE_IS_NOT_PRESENT: 'CSR_FILE_IS_NOT_PRESENT', + CERTIFICATE_EXPIRES_SOON: 'CERTIFICATE_EXPIRES_SOON', + CERTIFICATE_IS_NOT_VALIDATED: 'CERTIFICATE_IS_NOT_VALIDATED', + CERTIFICATE_IS_NOT_VALID: 'CERTIFICATE_IS_NOT_VALID', +}; + +/** + * @param {HomeDir} homeDir + * @param {getCertificate} getCertificate + * @return {validateZeroSslCertificate} + */ +export default function validateZeroSslCertificateFactory(homeDir, getCertificate) { + /** + * @typedef {validateZeroSslCertificate} + * @param {Config} config + * @param {number} expirationDays + * @return {Promise<{ [error: String], [data: Object] }>} + */ + async function validateZeroSslCertificate(config, expirationDays) { + const data = {}; + + data.sslConfigDir = homeDir.joinPath(config.getName(), 'platform', 'gateway', 'ssl'); + data.csrFilePath = path.join(data.sslConfigDir, 'csr.pem'); + data.privateKeyFilePath = path.join(data.sslConfigDir, 'private.key'); + data.bundleFilePath = path.join(data.sslConfigDir, 'bundle.crt'); + + data.apiKey = config.get('platform.gateway.ssl.providerConfigs.zerossl.apiKey'); + + if (!data.apiKey) { + return { + error: ERRORS.API_KEY_IS_NOT_SET, + data, + }; + } + + data.externalIp = config.get('externalIp'); + + if (!data.externalIp) { + return { + error: ERRORS.EXTERNAL_IP_IS_NOT_SET, + data, + }; + } + + const certificateId = config.get('platform.gateway.ssl.providerConfigs.zerossl.id'); + + if (!certificateId) { + return { + error: ERRORS.CERTIFICATE_ID_IS_NOT_SET, + data, + }; + } + + // Certificate is already configured + + // Check if certificate files are present + data.isCsrFilePresent = fs.existsSync(data.csrFilePath); + data.isPrivateKeyFilePresent = fs.existsSync(data.privateKeyFilePath); + data.isBundleFilePresent = fs.existsSync(data.bundleFilePath); + + // This function will throw an error if certificate with specified ID is not present + const certificate = await getCertificate(data.apiKey, certificateId); + + data.isExpiresSoon = certificate.isExpiredInDays(expirationDays); + + // If certificate exists but private key does not, then we can't setup TLS connection + // In this case we need to regenerate a certificate or put back this private key + if (!data.isPrivateKeyFilePresent) { + return { + error: ERRORS.PRIVATE_KEY_IS_NOT_PRESENT, + data, + }; + } + + // We need to make sure that external IP and certificate IP match + if (certificate.common_name !== data.externalIp) { + return { + error: ERRORS.EXTERNAL_IP_MISMATCH, + data, + }; + } + + if (['pending_validation', 'draft'].includes(certificate.status)) { + // Certificate is already created, so we just need to pass validation + // and download certificate file + data.certificate = certificate; + + // We need to download new certificate bundle + data.isBundleFilePresent = false; + + return { + error: ERRORS.CERTIFICATE_IS_NOT_VALIDATED, + data, + }; + } + + if (certificate.status !== 'issued' || data.isExpiresSoon) { + // Certificate is going to expire soon, or current certificate is not valid + // we need to obtain a new one + + // We need to download new certificate bundle + data.isBundleFilePresent = false; + + if (!data.isCsrFilePresent) { + return { + error: ERRORS.CSR_FILE_IS_NOT_PRESENT, + data, + }; + } + + data.csr = fs.readFileSync(data.csrFilePath, 'utf8'); + + return { + error: data.isExpiresSoon + ? ERRORS.CERTIFICATE_EXPIRES_SOON + : ERRORS.CERTIFICATE_IS_NOT_VALID, + data, + }; + } + + // Certificate is valid, so we might need only to download certificate bundle + data.certificate = certificate; + + return { + data, + }; + } + + return validateZeroSslCertificate; +} diff --git a/packages/dashmate/src/test/mock/getConfigMock.js b/packages/dashmate/src/test/mock/getConfigMock.js index 1961c48f289..641a1b87202 100644 --- a/packages/dashmate/src/test/mock/getConfigMock.js +++ b/packages/dashmate/src/test/mock/getConfigMock.js @@ -17,7 +17,6 @@ export default function getConfigMock(sinon) { configMock.get.withArgs('platform.drive.tenderdash.rpc.host').returns('127.0.0.1'); configMock.get.withArgs('platform.drive.tenderdash.rpc.port').returns('8103'); configMock.get.withArgs('platform.enable').returns(true); - configMock.get.withArgs('core.log.file.path').returns('/Users/user/.dashmate/logs/base/core.log'); return configMock; } diff --git a/packages/dashmate/templates/core/dash.conf.dot b/packages/dashmate/templates/core/dash.conf.dot index 807431f9848..790575a9fb1 100644 --- a/packages/dashmate/templates/core/dash.conf.dot +++ b/packages/dashmate/templates/core/dash.conf.dot @@ -3,14 +3,30 @@ daemon=0 # leave this set to 0 for Docker logtimestamps=1 maxconnections=256 reindex={{?it.reindex}}1{{??}}0{{?}} -{{~it.core.log.file.categories :category}} -{{? category === 'all'}} + +{{? it.core.log.debug.enabled }} +logips={{? it.core.log.debug.ips }}1{{??}}0{{?}} +logsourcelocations={{? it.core.log.debug.sourceLocations }}1{{??}}0{{?}} +logthreadnames={{? it.core.log.debug.threadNames }}1{{??}}0{{?}} +logtimemicros={{? it.core.log.debug.timeMicros }}1{{??}}0{{?}} + + {{? it.core.log.debug.includeOnly.length === 0 }} debug=1 + {{??}} + {{~it.core.log.debug.includeOnly :category}} +debug={{= category }} + {{~}} + {{?}} + {{~it.core.log.debug.exclude :category}} +debugexclude={{= category}} + {{~}} +{{?}} + +{{? it.core.log.filePath === null }} +nodebuglogfile=1 {{??}} -debug={{=category}}{{?}}{{~}} -debuglogfile=/var/log/dash/{{= it.core.log.file.path.split('/').pop() }} -logips={{=it.core.logIps }} -fallbackfee=0.00001 +debuglogfile=/var/log/dash/debug.log }} +{{?}} # JSON RPC server=1 diff --git a/packages/dashmate/templates/dynamic-compose.yml.dot b/packages/dashmate/templates/dynamic-compose.yml.dot index fbe122735e7..6ed120930fe 100644 --- a/packages/dashmate/templates/dynamic-compose.yml.dot +++ b/packages/dashmate/templates/dynamic-compose.yml.dot @@ -7,6 +7,10 @@ services: {{~ it.core.docker.commandArgs :arg }} - {{=arg}} {{~}} + {{? it.core.log.filePath !== null }} + volumes: + - {{=it.core.log.filePath}}:/var/log/dash/debug.log + {{?}} {{ driveLogs = Object.entries(it.platform.drive.abci.logs).filter(([, settings]) => settings.destination !== 'stderr' && settings.destination !== 'stdout'); }} {{? driveLogs.length > 0 }} @@ -18,6 +22,12 @@ services: {{~}} {{?}} + {{? it.platform.drive.tenderdash.log.path !== null }} + drive_tenderdash: + volumes: + - {{=it.platform.drive.tenderdash.log.path}}:/var/log/tenderdash/tenderdash.log + {{?}} + {{ gatewayLogs = it.platform.gateway.log.accessLogs.filter((l) => l.type === 'file'); }} {{? gatewayLogs.length > 0 }} gateway: diff --git a/packages/dashmate/templates/platform/drive/tenderdash/config.toml.dot b/packages/dashmate/templates/platform/drive/tenderdash/config.toml.dot index 9caf3e128bf..a818a356409 100644 --- a/packages/dashmate/templates/platform/drive/tenderdash/config.toml.dot +++ b/packages/dashmate/templates/platform/drive/tenderdash/config.toml.dot @@ -54,7 +54,7 @@ db-dir = "data" log-level = "{{=it.platform.drive.tenderdash.log.level}}" # Path to the log file. This parameter is an additional option to the existing stderr output -{{? it.platform.drive.tenderdash.log.path }}log-file-path = "/var/log/tenderdash/{{= it.platform.drive.tenderdash.log.path.split('/').pop() }}"{{?}} +{{? it.platform.drive.tenderdash.log.path }}log-file-path = "/var/log/tenderdash/tenderdash.log"{{?}} # Output format: 'plain' (colored text) or 'json' log-format = "{{=it.platform.drive.tenderdash.log.format}}" diff --git a/packages/dashmate/test/unit/doctor/verifySystemRequirementsFactory.spec.js b/packages/dashmate/test/unit/doctor/verifySystemRequirementsFactory.spec.js new file mode 100644 index 00000000000..38590b3fbdc --- /dev/null +++ b/packages/dashmate/test/unit/doctor/verifySystemRequirementsFactory.spec.js @@ -0,0 +1,147 @@ +import verifySystemRequirementsFactory from '../../../src/doctor/verifySystemRequirementsFactory.js'; +import Problem from '../../../src/doctor/Problem.js'; + +describe('verifySystemRequirementsFactory', () => { + let verifySystemRequirements; + + beforeEach(() => { + verifySystemRequirements = verifySystemRequirementsFactory(); + }); + + describe('CPU cores', () => { + it('should return a problem if CPU cores are less than minimum for non evonode', () => { + const systemInfo = { + dockerSystemInfo: { NCPU: 1 }, + }; + + const problems = verifySystemRequirements(systemInfo, false); + + expect(problems).to.have.lengthOf(1); + expect(problems[0]).to.be.an.instanceOf(Problem); + expect(problems[0].getDescription()).to.include('1 CPU cores detected'); + }); + + it('should return a problem if CPU cores are less than minimum for evonode', () => { + const systemInfo = { + dockerSystemInfo: { NCPU: 2 }, + }; + + const problems = verifySystemRequirements(systemInfo, true); + + expect(problems).to.have.lengthOf(1); + expect(problems[0]).to.be.an.instanceOf(Problem); + expect(problems[0].getDescription()).to.include('2 CPU cores detected'); + }); + + it('should return a problem if CPU cores are less than minimum and docker info is not present', () => { + const systemInfo = { + cpu: { cores: 1 }, + }; + + const problems = verifySystemRequirements(systemInfo, false); + + expect(problems).to.have.lengthOf(1); + expect(problems[0]).to.be.an.instanceOf(Problem); + expect(problems[0].getDescription()).to.include('1 CPU cores detected'); + }); + + it('should not return anything if CPU cores information is not available', () => { + const systemInfo = { }; + + const problems = verifySystemRequirements(systemInfo, false); + + expect(problems).to.have.lengthOf(0); + }); + }); + + describe('CPU speed', () => { + it('should return a problem if CPU speed is less than minimum', () => { + const systemInfo = { + cpu: { speed: 1.5 }, + }; + + const problems = verifySystemRequirements(systemInfo, false); + + expect(problems).to.have.lengthOf(1); + expect(problems[0]).to.be.an.instanceOf(Problem); + expect(problems[0].getDescription()).to.include('1.5GHz CPU frequency detected'); + }); + + it('should return a problem if CPU speed is not detected', () => { + const systemInfo = { + cpu: { speed: 0 }, + }; + + const problems = verifySystemRequirements(systemInfo, false); + + expect(problems).to.have.lengthOf(0); + }); + }); + + describe('RAM', () => { + it('should return a problem if RAM is less than minimum (from Docker info)', () => { + const systemInfo = { + dockerSystemInfo: { MemTotal: 2 * 1024 ** 3 }, + }; + + const problems = verifySystemRequirements(systemInfo, false); + + expect(problems).to.have.lengthOf(1); + expect(problems[0]).to.be.an.instanceOf(Problem); + expect(problems[0].getDescription()).to.include('2.00GB RAM detected'); + }); + + it('should return a problem if RAM is less than minimum (from memory)', () => { + const systemInfo = { + memory: { total: 2 * 1024 ** 3 }, + }; + + const problems = verifySystemRequirements(systemInfo, false); + + expect(problems).to.have.lengthOf(1); + expect(problems[0]).to.be.an.instanceOf(Problem); + expect(problems[0].getDescription()).to.include('2.00GB RAM detected'); + }); + }); + + describe('Swap', () => { + it('should return a problem if swap space is less than recommended', () => { + const systemInfo = { + memory: { swaptotal: 1024 ** 3 }, + }; + + const problems = verifySystemRequirements(systemInfo, false); + + expect(problems).to.have.lengthOf(1); + expect(problems[0]).to.be.an.instanceOf(Problem); + expect(problems[0].getDescription()).to.include('Swap space is 1.00GB'); + }); + }); + + describe('Disk space', () => { + it('should return a problem if disk space is less than minimum', () => { + const systemInfo = { + diskSpace: { available: 50 * 1024 ** 3 }, + }; + + const problems = verifySystemRequirements(systemInfo, false); + + expect(problems).to.have.lengthOf(1); + expect(problems[0]).to.be.an.instanceOf(Problem); + expect(problems[0].getDescription()).to.include('50.00GB of available disk space detected'); + }); + }); + + it('should not return any problems if all requirements are met', () => { + const systemInfo = { + dockerSystemInfo: { NCPU: 4, MemTotal: 8 * 1024 ** 3 }, + cpu: { cores: 4, speed: 3.0 }, + memory: { total: 8 * 1024 ** 3, swaptotal: 2 * 1024 ** 3 }, + diskSpace: { available: 500 * 1024 ** 3 }, + }; + + const problems = verifySystemRequirements(systemInfo, false); + + expect(problems).to.have.lengthOf(0); + }); +}); diff --git a/packages/dashmate/test/unit/ssl/zerossl/validateZeroSslCertificateFactory.spec.js b/packages/dashmate/test/unit/ssl/zerossl/validateZeroSslCertificateFactory.spec.js new file mode 100644 index 00000000000..44c94a2f185 --- /dev/null +++ b/packages/dashmate/test/unit/ssl/zerossl/validateZeroSslCertificateFactory.spec.js @@ -0,0 +1,192 @@ +import fs from 'fs'; +import path from 'path'; +import validateZeroSslCertificateFactory, { ERRORS } from '../../../../src/ssl/zerossl/validateZeroSslCertificateFactory.js'; + +describe('validateZeroSslCertificateFactory', () => { + let config; + let expirationDays; + let homeDir; + let getCertificate; + let validateZeroSslCertificate; + + beforeEach(function beforeEach() { + config = { + get: this.sinon.stub(), + getName: this.sinon.stub(), + }; + + expirationDays = 30; + + homeDir = { + joinPath: this.sinon.stub(), + }; + + getCertificate = this.sinon.stub(); + + config.getName.returns('my-config'); + + homeDir.joinPath.callsFake((...args) => path.join('/home/dir', ...args)); + + config.get.withArgs('platform.gateway.ssl.providerConfigs.zerossl.apiKey').returns('test-api-key'); + config.get.withArgs('externalIp').returns('1.2.3.4'); + config.get.withArgs('platform.gateway.ssl.providerConfigs.zerossl.id').returns('certificate-id'); + + this.sinon.stub(fs, 'existsSync').returns(true); + + validateZeroSslCertificate = validateZeroSslCertificateFactory(homeDir, getCertificate); + }); + + it('should return API_KEY_IS_NOT_SET error when apiKey is not set', async () => { + config.get.withArgs('platform.gateway.ssl.providerConfigs.zerossl.apiKey').returns(null); + + const result = await validateZeroSslCertificate(config, expirationDays); + + expect(result.error).to.equal(ERRORS.API_KEY_IS_NOT_SET); + }); + + it('should return EXTERNAL_IP_IS_NOT_SET error when externalIp is not set', async () => { + config.get.withArgs('externalIp').returns(null); + + const result = await validateZeroSslCertificate(config, expirationDays); + + expect(result.error).to.equal(ERRORS.EXTERNAL_IP_IS_NOT_SET); + }); + + it('should return CERTIFICATE_ID_IS_NOT_SET error when certificateId is not set', async () => { + config.get.withArgs('platform.gateway.ssl.providerConfigs.zerossl.id').returns(null); + + const result = await validateZeroSslCertificate(config, expirationDays); + + expect(result.error).to.equal(ERRORS.CERTIFICATE_ID_IS_NOT_SET); + }); + + it('should return PRIVATE_KEY_IS_NOT_PRESENT error when private key file is not present', async function it() { + const sslConfigDir = path.join('/home/dir', 'my-config', 'platform', 'gateway', 'ssl'); + const privateKeyFilePath = path.join(sslConfigDir, 'private.key'); + + fs.existsSync.withArgs(privateKeyFilePath).returns(false); + + getCertificate.resolves({ + common_name: '1.2.3.4', + status: 'issued', + isExpiredInDays: this.sinon.stub().returns(false), + }); + + const result = await validateZeroSslCertificate(config, expirationDays); + + expect(result.error).to.equal(ERRORS.PRIVATE_KEY_IS_NOT_PRESENT); + }); + + it('should return EXTERNAL_IP_MISMATCH error when certificate common_name does not match externalIp', async function it() { + const certificate = { + common_name: '5.6.7.8', + status: 'issued', + isExpiredInDays: this.sinon.stub().returns(false), + }; + + getCertificate.resolves(certificate); + + const result = await validateZeroSslCertificate(config, expirationDays); + + expect(result.error).to.equal(ERRORS.EXTERNAL_IP_MISMATCH); + }); + + it('should return CERTIFICATE_IS_NOT_VALIDATED error when certificate status is pending_validation', async function it() { + const certificate = { + common_name: '1.2.3.4', + status: 'pending_validation', + isExpiredInDays: this.sinon.stub().returns(false), + }; + + getCertificate.resolves(certificate); + + const result = await validateZeroSslCertificate(config, expirationDays); + + expect(result.error).to.equal(ERRORS.CERTIFICATE_IS_NOT_VALIDATED); + expect(result.data.certificate).to.equal(certificate); + }); + + it('should return CERTIFICATE_IS_NOT_VALIDATED error when certificate status is draft', async function it() { + const certificate = { + common_name: '1.2.3.4', + status: 'draft', + isExpiredInDays: this.sinon.stub().returns(false), + }; + + getCertificate.resolves(certificate); + + const result = await validateZeroSslCertificate(config, expirationDays); + + expect(result.error).to.equal(ERRORS.CERTIFICATE_IS_NOT_VALIDATED); + expect(result.data.certificate).to.equal(certificate); + }); + + it('should return CSR_FILE_IS_NOT_PRESENT error when certificate is not issued and csr file is not present', async function it() { + const certificate = { + common_name: '1.2.3.4', + status: 'revoked', + isExpiredInDays: this.sinon.stub().returns(false), + }; + + getCertificate.resolves(certificate); + + const sslConfigDir = path.join('/home/dir', 'my-config', 'platform', 'gateway', 'ssl'); + const csrFilePath = path.join(sslConfigDir, 'csr.pem'); + + fs.existsSync.withArgs(csrFilePath).returns(false); + + const result = await validateZeroSslCertificate(config, expirationDays); + + expect(result.error).to.equal(ERRORS.CSR_FILE_IS_NOT_PRESENT); + }); + + it('should return CERTIFICATE_IS_NOT_VALID error when certificate is not issued and csr file is present', async function it() { + const certificate = { + common_name: '1.2.3.4', + status: 'revoked', + isExpiredInDays: this.sinon.stub().returns(false), + }; + + getCertificate.resolves(certificate); + + this.sinon.stub(fs, 'readFileSync').returns('csr content'); + + const result = await validateZeroSslCertificate(config, expirationDays); + + expect(result.error).to.equal(ERRORS.CERTIFICATE_IS_NOT_VALID); + expect(result.data.csr).to.equal('csr content'); + }); + + it('should return CERTIFICATE_EXPIRES_SOON error when certificate is expiring soon and csr file is present', async function it() { + const certificate = { + common_name: '1.2.3.4', + status: 'issued', + isExpiredInDays: this.sinon.stub().returns(true), + }; + + getCertificate.resolves(certificate); + + this.sinon.stub(fs, 'readFileSync').returns('csr content'); + + const result = await validateZeroSslCertificate(config, expirationDays); + + expect(result.error).to.equal(ERRORS.CERTIFICATE_EXPIRES_SOON); + expect(result.data.csr).to.equal('csr content'); + }); + + it('should return data when certificate is valid and not expiring soon', async function it() { + const certificate = { + common_name: '1.2.3.4', + status: 'issued', + isExpiredInDays: this.sinon.stub().returns(false), + }; + + getCertificate.resolves(certificate); + + const result = await validateZeroSslCertificate(config, expirationDays); + + expect(result.error).to.be.undefined(); + expect(result.data).to.exist(); + expect(result.data.certificate).to.equal(certificate); + }); +}); diff --git a/packages/dashpay-contract/Cargo.toml b/packages/dashpay-contract/Cargo.toml index 506ba5147c0..ee8938f6a01 100644 --- a/packages/dashpay-contract/Cargo.toml +++ b/packages/dashpay-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dashpay-contract" description = "DashPay data contract schema and tools" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/dashpay-contract/package.json b/packages/dashpay-contract/package.json index f3433093c6c..c2af220ad16 100644 --- a/packages/dashpay-contract/package.json +++ b/packages/dashpay-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dashpay-contract", - "version": "1.2.0", + "version": "1.3.0-dev.5", "description": "Reference contract of the DashPay DPA on Dash Evolution", "scripts": { "lint": "eslint .", diff --git a/packages/data-contracts/Cargo.toml b/packages/data-contracts/Cargo.toml index 0fb8ca270bb..42ba11e09c6 100644 --- a/packages/data-contracts/Cargo.toml +++ b/packages/data-contracts/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "data-contracts" description = "Dash Platform system data contracts" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/dpns-contract/Cargo.toml b/packages/dpns-contract/Cargo.toml index 04640230018..0aa9f4546f8 100644 --- a/packages/dpns-contract/Cargo.toml +++ b/packages/dpns-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dpns-contract" description = "DPNS data contract schema and tools" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/dpns-contract/package.json b/packages/dpns-contract/package.json index 8f2de0a9ea9..6341b17fdae 100644 --- a/packages/dpns-contract/package.json +++ b/packages/dpns-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dpns-contract", - "version": "1.2.0", + "version": "1.3.0-dev.5", "description": "A contract and helper scripts for DPNS DApp", "scripts": { "lint": "eslint .", diff --git a/packages/feature-flags-contract/Cargo.toml b/packages/feature-flags-contract/Cargo.toml index e84ed5c5eda..5cde2361fc6 100644 --- a/packages/feature-flags-contract/Cargo.toml +++ b/packages/feature-flags-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "feature-flags-contract" description = "Feature flags data contract schema and tools" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/feature-flags-contract/package.json b/packages/feature-flags-contract/package.json index 3b6830aa494..0f84065dd84 100644 --- a/packages/feature-flags-contract/package.json +++ b/packages/feature-flags-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/feature-flags-contract", - "version": "1.2.0", + "version": "1.3.0-dev.5", "description": "Data Contract to store Dash Platform feature flags", "scripts": { "build": "", diff --git a/packages/js-dapi-client/lib/methods/platform/PlatformMethodsFacade.js b/packages/js-dapi-client/lib/methods/platform/PlatformMethodsFacade.js index 035b7afbfc7..8de255abdec 100644 --- a/packages/js-dapi-client/lib/methods/platform/PlatformMethodsFacade.js +++ b/packages/js-dapi-client/lib/methods/platform/PlatformMethodsFacade.js @@ -15,6 +15,7 @@ const getIdentityNonceFactory = require('./getIdentityNonce/getIdentityNonceFact const getIdentityKeysFactory = require('./getIdentityKeys/getIdentityKeysFactory'); const getTotalCreditsInPlatformFactory = require('./getTotalCreditsInPlatform/getTotalCreditsInPlatformFactory'); const getStatusFactory = require('./getStatus/getStatusFactory'); +const getIdentityBalanceFactory = require('./getIdentityBalance/getIdentityBalanceFactory'); class PlatformMethodsFacade { /** @@ -40,6 +41,7 @@ class PlatformMethodsFacade { this.getIdentityKeys = getIdentityKeysFactory(grpcTransport); this.getTotalCreditsInPlatform = getTotalCreditsInPlatformFactory(grpcTransport); this.getStatus = getStatusFactory(grpcTransport); + this.getIdentityBalance = getIdentityBalanceFactory(grpcTransport); } } diff --git a/packages/js-dapi-client/lib/methods/platform/getEpochsInfo/getEpochsInfoFactory.js b/packages/js-dapi-client/lib/methods/platform/getEpochsInfo/getEpochsInfoFactory.js index 9ae984dbc9a..9982c6f9e6a 100644 --- a/packages/js-dapi-client/lib/methods/platform/getEpochsInfo/getEpochsInfoFactory.js +++ b/packages/js-dapi-client/lib/methods/platform/getEpochsInfo/getEpochsInfoFactory.js @@ -28,7 +28,7 @@ function getEpochsInfoFactory(grpcTransport) { const getEpochInfosRequest = new GetEpochsInfoRequest(); getEpochInfosRequest.setV0( new GetEpochsInfoRequestV0() - .setStartEpoch(new UInt32Value([startEpoch])) + .setStartEpoch(typeof startEpoch === 'number' ? new UInt32Value([startEpoch]) : undefined) .setCount(count) .setAscending(!!options.ascending) .setProve(!!options.prove), diff --git a/packages/js-dapi-client/lib/methods/platform/getIdentityBalance/GetIdentityBalanceResponse.js b/packages/js-dapi-client/lib/methods/platform/getIdentityBalance/GetIdentityBalanceResponse.js new file mode 100644 index 00000000000..b5b4a59b310 --- /dev/null +++ b/packages/js-dapi-client/lib/methods/platform/getIdentityBalance/GetIdentityBalanceResponse.js @@ -0,0 +1,43 @@ +const AbstractResponse = require('../response/AbstractResponse'); +const InvalidResponseError = require('../response/errors/InvalidResponseError'); + +class GetIdentityBalanceResponse extends AbstractResponse { + /** + * @param {number} balance + * @param {Metadata} metadata + * @param {Proof} [proof] + */ + constructor(balance, metadata, proof = undefined) { + super(metadata, proof); + + this.balance = balance; + } + + /** + * @returns {number} + */ + getBalance() { + return this.balance; + } + + /** + * @param proto + * @returns {GetIdentityBalanceResponse} + */ + static createFromProto(proto) { + const balance = proto.getV0().getBalance(); + const { metadata, proof } = AbstractResponse.createMetadataAndProofFromProto(proto); + + if ((balance === null || balance === undefined) && !proof) { + throw new InvalidResponseError('Balance is not defined'); + } + + return new GetIdentityBalanceResponse( + balance, + metadata, + proof, + ); + } +} + +module.exports = GetIdentityBalanceResponse; diff --git a/packages/js-dapi-client/lib/methods/platform/getIdentityBalance/getIdentityBalanceFactory.js b/packages/js-dapi-client/lib/methods/platform/getIdentityBalance/getIdentityBalanceFactory.js new file mode 100644 index 00000000000..93862ccff9a --- /dev/null +++ b/packages/js-dapi-client/lib/methods/platform/getIdentityBalance/getIdentityBalanceFactory.js @@ -0,0 +1,71 @@ +const { + v0: { + PlatformPromiseClient, + GetIdentityBalanceRequest, + }, +} = require('@dashevo/dapi-grpc'); + +const GetIdentityBalanceResponse = require('./GetIdentityBalanceResponse'); +const InvalidResponseError = require('../response/errors/InvalidResponseError'); + +/** + * @param {GrpcTransport} grpcTransport + * @returns {getIdentityBalance} + */ +function getIdentityBalanceFactory(grpcTransport) { + /** + * Fetch the identity balance by id + * @typedef {getIdentityBalance} + * @param {Buffer} id + * @param {DAPIClientOptions & {prove: boolean}} [options] + * @returns {Promise} + */ + async function getIdentityBalance(id, options = {}) { + const { GetIdentityBalanceRequestV0 } = GetIdentityBalanceRequest; + const getIdentityBalanceRequest = new GetIdentityBalanceRequest(); + // need to convert objects inherited from Buffer to pure buffer as google protobuf + // doesn't support extended buffers + // https://github.com/protocolbuffers/protobuf/blob/master/js/binary/utils.js#L1049 + if (Buffer.isBuffer(id)) { + // eslint-disable-next-line no-param-reassign + id = Buffer.from(id); + } + + getIdentityBalanceRequest.setV0( + new GetIdentityBalanceRequestV0() + .setId(id) + .setProve(!!options.prove), + ); + + let lastError; + + // TODO: simple retry before the dapi versioning is properly implemented + for (let i = 0; i < 3; i += 1) { + try { + // eslint-disable-next-line no-await-in-loop + const getIdentityBalanceResponse = await grpcTransport.request( + PlatformPromiseClient, + 'getIdentityBalance', + getIdentityBalanceRequest, + options, + ); + + return GetIdentityBalanceResponse.createFromProto(getIdentityBalanceResponse); + } catch (e) { + if (e instanceof InvalidResponseError) { + lastError = e; + } else { + throw e; + } + } + } + + // If we made it past the cycle it means that the retry didn't work, + // and we're throwing the last error encountered + throw lastError; + } + + return getIdentityBalance; +} + +module.exports = getIdentityBalanceFactory; diff --git a/packages/js-dapi-client/package.json b/packages/js-dapi-client/package.json index 28fa1c445de..56366329254 100644 --- a/packages/js-dapi-client/package.json +++ b/packages/js-dapi-client/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dapi-client", - "version": "1.2.0", + "version": "1.3.0-dev.5", "description": "Client library used to access Dash DAPI endpoints", "main": "lib/index.js", "contributors": [ diff --git a/packages/js-dapi-client/test/integration/methods/platform/PlatformMethodsFacade.spec.js b/packages/js-dapi-client/test/integration/methods/platform/PlatformMethodsFacade.spec.js index cb2c2dd0fae..fbb1f32ed5c 100644 --- a/packages/js-dapi-client/test/integration/methods/platform/PlatformMethodsFacade.spec.js +++ b/packages/js-dapi-client/test/integration/methods/platform/PlatformMethodsFacade.spec.js @@ -4,6 +4,7 @@ const { GetDataContractResponse, GetDocumentsResponse, GetIdentityResponse, + GetIdentityBalanceResponse, GetIdentityByPublicKeyHashResponse, GetIdentitiesContractKeysResponse, GetEpochsInfoResponse, @@ -27,6 +28,7 @@ const PlatformMethodsFacade = require('../../../../lib/methods/platform/Platform const { WaitForStateTransitionResultResponseV0 } = WaitForStateTransitionResultResponse; const { GetIdentityResponseV0 } = GetIdentityResponse; +const { GetIdentityBalanceResponseV0 } = GetIdentityBalanceResponse; const { GetIdentityByPublicKeyHashResponseV0 } = GetIdentityByPublicKeyHashResponse; const { GetIdentitiesContractKeysResponseV0 } = GetIdentitiesContractKeysResponse; const { GetDocumentsResponseV0 } = GetDocumentsResponse; @@ -318,4 +320,22 @@ describe('PlatformMethodsFacade', () => { expect(grpcTransportMock.request).to.be.calledOnce(); }); }); + + describe('#getIdentityBalance', () => { + it('should get identity balance', async () => { + const response = new GetIdentityBalanceResponse(); + + response.setV0( + new GetIdentityBalanceResponseV0() + .setMetadata(new ResponseMetadata()) + .setBalance(1337), + ); + + grpcTransportMock.request.resolves(response); + + await platformMethods.getIdentityBalance('41nthkqvHBLnqiMkSbsdTNANzYu9bgdv4etKoRUunY1M'); + + expect(grpcTransportMock.request).to.be.calledOnce(); + }); + }); }); diff --git a/packages/js-dapi-client/test/unit/methods/platform/getIdentityBalance/GetIdentityBalanceResponse.spec.js b/packages/js-dapi-client/test/unit/methods/platform/getIdentityBalance/GetIdentityBalanceResponse.spec.js new file mode 100644 index 00000000000..3df6adb6be5 --- /dev/null +++ b/packages/js-dapi-client/test/unit/methods/platform/getIdentityBalance/GetIdentityBalanceResponse.spec.js @@ -0,0 +1,126 @@ +const { + v0: { + GetIdentityBalanceResponse, + ResponseMetadata, + Proof: ProofResponse, + }, +} = require('@dashevo/dapi-grpc'); + +const GetIdentityBalanceResponseClass = require('../../../../../lib/methods/platform/getIdentityBalance/GetIdentityBalanceResponse'); +const getMetadataFixture = require('../../../../../lib/test/fixtures/getMetadataFixture'); +const InvalidResponseError = require('../../../../../lib/methods/platform/response/errors/InvalidResponseError'); +const getProofFixture = require('../../../../../lib/test/fixtures/getProofFixture'); +const Proof = require('../../../../../lib/methods/platform/response/Proof'); +const Metadata = require('../../../../../lib/methods/platform/response/Metadata'); + +describe('GetIdentityBalanceResponse', () => { + let getIdentityBalanceResponse; + let metadataFixture; + let balance; + let proto; + let proofFixture; + + beforeEach(async () => { + metadataFixture = getMetadataFixture(); + proofFixture = getProofFixture(); + balance = 1337; + + const { GetIdentityBalanceResponseV0 } = GetIdentityBalanceResponse; + proto = new GetIdentityBalanceResponse(); + + const metadata = new ResponseMetadata(); + metadata.setHeight(metadataFixture.height); + metadata.setCoreChainLockedHeight(metadataFixture.coreChainLockedHeight); + metadata.setTimeMs(metadataFixture.timeMs); + metadata.setProtocolVersion(metadataFixture.protocolVersion); + + proto.setV0( + new GetIdentityBalanceResponseV0() + .setBalance(balance) + .setMetadata(metadata), + ); + + getIdentityBalanceResponse = new GetIdentityBalanceResponseClass( + balance, + new Metadata(metadataFixture), + ); + }); + + it('should return Identity balance', () => { + const identityBalance = getIdentityBalanceResponse.getBalance(); + const identityProof = getIdentityBalanceResponse.getProof(); + + expect(identityBalance).to.equal(balance); + expect(identityProof).to.equal(undefined); + }); + + it('should return proof', () => { + getIdentityBalanceResponse = new GetIdentityBalanceResponseClass( + balance, + new Metadata(metadataFixture), + new Proof(proofFixture), + ); + + const identityBalance = getIdentityBalanceResponse.getBalance(); + const proof = getIdentityBalanceResponse.getProof(); + + expect(identityBalance).to.equal(balance); + expect(proof).to.be.an.instanceOf(Proof); + expect(proof.getGrovedbProof()).to.deep.equal(proofFixture.merkleProof); + expect(proof.getQuorumHash()).to.deep.equal(proofFixture.quorumHash); + expect(proof.getSignature()).to.deep.equal(proofFixture.signature); + expect(proof.getRound()).to.deep.equal(proofFixture.round); + }); + + it('should create an instance from proto', () => { + getIdentityBalanceResponse = GetIdentityBalanceResponseClass.createFromProto(proto); + expect(getIdentityBalanceResponse).to.be + .an.instanceOf(GetIdentityBalanceResponseClass); + expect(getIdentityBalanceResponse.getBalance()).to.equal(balance); + + expect(getIdentityBalanceResponse.getMetadata()) + .to.be.an.instanceOf(Metadata); + expect(getIdentityBalanceResponse.getMetadata().getHeight()) + .to.equal(metadataFixture.height); + expect(getIdentityBalanceResponse.getMetadata().getCoreChainLockedHeight()) + .to.equal(metadataFixture.coreChainLockedHeight); + + expect(getIdentityBalanceResponse.getProof()).to.equal(undefined); + }); + + it('should create an instance with proof from proto', () => { + const proofProto = new ProofResponse(); + + proofProto.setQuorumHash(proofFixture.quorumHash); + proofProto.setSignature(proofFixture.signature); + proofProto.setGrovedbProof(proofFixture.merkleProof); + proofProto.setRound(proofFixture.round); + + proto.getV0().setBalance(undefined); + proto.getV0().setProof(proofProto); + + getIdentityBalanceResponse = GetIdentityBalanceResponseClass.createFromProto(proto); + + expect(getIdentityBalanceResponse.getBalance()).to.equal(0); + expect(getIdentityBalanceResponse.getMetadata()).to.deep.equal(metadataFixture); + + const proof = getIdentityBalanceResponse.getProof(); + expect(proof).to.be.an.instanceOf(Proof); + expect(proof.getGrovedbProof()).to.deep.equal(proofFixture.merkleProof); + expect(proof.getQuorumHash()).to.deep.equal(proofFixture.quorumHash); + expect(proof.getSignature()).to.deep.equal(proofFixture.signature); + expect(proof.getRound()).to.deep.equal(proofFixture.round); + }); + + it('should throw InvalidResponseError if Metadata is not defined', () => { + proto.getV0().setMetadata(undefined); + + try { + getIdentityBalanceResponse = GetIdentityBalanceResponseClass.createFromProto(proto); + + expect.fail('should throw InvalidResponseError'); + } catch (e) { + expect(e).to.be.an.instanceOf(InvalidResponseError); + } + }); +}); diff --git a/packages/js-dapi-client/test/unit/methods/platform/getIdentityBalance/getIdentityBalanceFactory.spec.js b/packages/js-dapi-client/test/unit/methods/platform/getIdentityBalance/getIdentityBalanceFactory.spec.js new file mode 100644 index 00000000000..210d2a8a9f9 --- /dev/null +++ b/packages/js-dapi-client/test/unit/methods/platform/getIdentityBalance/getIdentityBalanceFactory.spec.js @@ -0,0 +1,156 @@ +const { + v0: { + PlatformPromiseClient, + GetIdentityBalanceRequest, + GetIdentityBalanceResponse, + ResponseMetadata, + Proof: ProofResponse, + }, +} = require('@dashevo/dapi-grpc'); + +const { GetIdentityBalanceResponseV0 } = GetIdentityBalanceResponse; + +const getIdentityBalanceFactory = require('../../../../../lib/methods/platform/getIdentityBalance/getIdentityBalanceFactory'); +const getMetadataFixture = require('../../../../../lib/test/fixtures/getMetadataFixture'); +const getProofFixture = require('../../../../../lib/test/fixtures/getProofFixture'); +const Proof = require('../../../../../lib/methods/platform/response/Proof'); + +describe('getIdentityBalanceFactory', () => { + let grpcTransportMock; + let getIdentityBalance; + let options; + let response; + let balance; + let identityId; + let metadataFixture; + let proofFixture; + let proofResponse; + + beforeEach(async function beforeEach() { + balance = 1337; + + identityId = Buffer.alloc(32).fill(0); + + metadataFixture = getMetadataFixture(); + proofFixture = getProofFixture(); + + const metadata = new ResponseMetadata(); + metadata.setHeight(metadataFixture.height); + metadata.setCoreChainLockedHeight(metadataFixture.coreChainLockedHeight); + metadata.setTimeMs(metadataFixture.timeMs); + metadata.setProtocolVersion(metadataFixture.protocolVersion); + + response = new GetIdentityBalanceResponse(); + + response.setV0( + new GetIdentityBalanceResponseV0() + .setBalance(balance) + .setMetadata(metadata), + ); + + proofResponse = new ProofResponse(); + + proofResponse.setQuorumHash(proofFixture.quorumHash); + proofResponse.setSignature(proofFixture.signature); + proofResponse.setGrovedbProof(proofFixture.merkleProof); + proofResponse.setRound(proofFixture.round); + + grpcTransportMock = { + request: this.sinon.stub().resolves(response), + }; + + getIdentityBalance = getIdentityBalanceFactory(grpcTransportMock); + + options = { + timeout: 1000, + }; + }); + + it('should return identity balance', async () => { + const result = await getIdentityBalance(identityId, options); + + const { GetIdentityBalanceRequestV0 } = GetIdentityBalanceRequest; + const request = new GetIdentityBalanceRequest(); + request.setV0( + new GetIdentityBalanceRequestV0() + .setId(identityId) + .setProve(false), + ); + + expect(grpcTransportMock.request).to.be.calledOnceWithExactly( + PlatformPromiseClient, + 'getIdentityBalance', + request, + options, + ); + expect(result.getBalance()).to.deep.equal(balance); + expect(result.getMetadata()).to.deep.equal(metadataFixture); + expect(result.getProof()).to.equal(undefined); + }); + + it('should return proof', async () => { + options.prove = true; + response.getV0().setBalance(undefined); + response.getV0().setProof(proofResponse); + + const result = await getIdentityBalance(identityId, options); + + const { GetIdentityBalanceRequestV0 } = GetIdentityBalanceRequest; + const request = new GetIdentityBalanceRequest(); + request.setV0( + new GetIdentityBalanceRequestV0() + .setId(identityId) + .setProve(true), + ); + + expect(grpcTransportMock.request).to.be.calledOnceWithExactly( + PlatformPromiseClient, + 'getIdentityBalance', + request, + options, + ); + + expect(result.getBalance()).to.deep.equal(0); + + expect(result.getMetadata()).to.deep.equal(metadataFixture); + + expect(result.getProof()).to.be.an.instanceOf(Proof); + expect(result.getProof().getGrovedbProof()).to.deep.equal(proofFixture.merkleProof); + expect(result.getProof().getQuorumHash()).to.deep.equal(proofFixture.quorumHash); + expect(result.getProof().getSignature()).to.deep.equal(proofFixture.signature); + expect(result.getProof().getRound()).to.deep.equal(proofFixture.round); + expect(result.getMetadata()).to.deep.equal(metadataFixture); + expect(result.getMetadata().getHeight()).to.equal(metadataFixture.height); + expect(result.getMetadata().getCoreChainLockedHeight()).to.equal( + metadataFixture.coreChainLockedHeight, + ); + }); + + it('should throw unknown error', async () => { + const error = new Error('Unknown found'); + + grpcTransportMock.request.throws(error); + + const { GetIdentityBalanceRequestV0 } = GetIdentityBalanceRequest; + const request = new GetIdentityBalanceRequest(); + request.setV0( + new GetIdentityBalanceRequestV0() + .setId(identityId) + .setProve(false), + ); + + try { + await getIdentityBalance(identityId, options); + + expect.fail('should throw unknown error'); + } catch (e) { + expect(e).to.deep.equal(error); + expect(grpcTransportMock.request).to.be.calledOnceWithExactly( + PlatformPromiseClient, + 'getIdentityBalance', + request, + options, + ); + } + }); +}); diff --git a/packages/js-dash-sdk/README.md b/packages/js-dash-sdk/README.md index 454768f6742..a9083164c72 100644 --- a/packages/js-dash-sdk/README.md +++ b/packages/js-dash-sdk/README.md @@ -7,6 +7,11 @@ Dash library for JavaScript/TypeScript ecosystem (Wallet, DAPI, Primitives, BLS, ...) +**Warning: This SDK should only be used in production when connected to trusted nodes. Although it +provides easy access to Dash Platform without requiring a full node, it does not support Dash +Platform’s proofs or verify synchronized blockchain data. Therefore, it is less secure than the +[Rust SDK](../rs-sdk/), which requests proofs for all queried data.** + Dash library provides access via [DAPI](https://dashplatform.readme.io/docs/explanation-dapi) to use both the Dash Core network and Dash Platform on [supported networks](https://github.com/dashpay/platform/#supported-networks). The Dash Core network can be used to broadcast and receive payments. Dash Platform can be used to manage identities, register data contracts for applications, and submit or retrieve application data via documents. ## Table of Contents diff --git a/packages/js-dash-sdk/package.json b/packages/js-dash-sdk/package.json index f74effe667a..3d97930cd4a 100644 --- a/packages/js-dash-sdk/package.json +++ b/packages/js-dash-sdk/package.json @@ -1,6 +1,6 @@ { "name": "dash", - "version": "4.2.0", + "version": "4.3.0-dev.5", "description": "Dash library for JavaScript/TypeScript ecosystem (Wallet, DAPI, Primitives, BLS, ...)", "main": "build/index.js", "unpkg": "dist/dash.min.js", diff --git a/packages/js-grpc-common/package.json b/packages/js-grpc-common/package.json index 33b06aed4dc..f699bfd78ba 100644 --- a/packages/js-grpc-common/package.json +++ b/packages/js-grpc-common/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/grpc-common", - "version": "1.2.0", + "version": "1.3.0-dev.5", "description": "Common GRPC library", "main": "index.js", "scripts": { diff --git a/packages/masternode-reward-shares-contract/Cargo.toml b/packages/masternode-reward-shares-contract/Cargo.toml index b9784e87b27..a90401badf5 100644 --- a/packages/masternode-reward-shares-contract/Cargo.toml +++ b/packages/masternode-reward-shares-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "masternode-reward-shares-contract" description = "Masternode reward shares data contract schema and tools" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/masternode-reward-shares-contract/package.json b/packages/masternode-reward-shares-contract/package.json index 7f42654e1ab..875b6993328 100644 --- a/packages/masternode-reward-shares-contract/package.json +++ b/packages/masternode-reward-shares-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/masternode-reward-shares-contract", - "version": "1.2.0", + "version": "1.3.0-dev.5", "description": "A contract and helper scripts for reward sharing", "scripts": { "lint": "eslint .", diff --git a/packages/platform-test-suite/package.json b/packages/platform-test-suite/package.json index 4483fbcdb4f..924121db358 100644 --- a/packages/platform-test-suite/package.json +++ b/packages/platform-test-suite/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/platform-test-suite", "private": true, - "version": "1.2.0", + "version": "1.3.0-dev.5", "description": "Dash Network end-to-end tests", "scripts": { "test": "yarn exec bin/test.sh", diff --git a/packages/rs-dapi-client/Cargo.toml b/packages/rs-dapi-client/Cargo.toml index aa67ac0bf2c..cea36d09513 100644 --- a/packages/rs-dapi-client/Cargo.toml +++ b/packages/rs-dapi-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rs-dapi-client" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" [features] diff --git a/packages/rs-dapi-client/src/transport/grpc.rs b/packages/rs-dapi-client/src/transport/grpc.rs index 43680130e8f..9350696e750 100644 --- a/packages/rs-dapi-client/src/transport/grpc.rs +++ b/packages/rs-dapi-client/src/transport/grpc.rs @@ -208,6 +208,14 @@ impl_transport_request_grpc!( get_identity_balance ); +impl_transport_request_grpc!( + platform_proto::GetIdentitiesBalancesRequest, + platform_proto::GetIdentitiesBalancesResponse, + PlatformGrpcClient, + RequestSettings::default(), + get_identities_balances +); + impl_transport_request_grpc!( platform_proto::GetIdentityNonceRequest, platform_proto::GetIdentityNonceResponse, @@ -323,6 +331,24 @@ impl_transport_request_grpc!( get_vote_polls_by_end_date ); +// rpc GetEvonodesProposedEpochBlocksByIdsRequest(GetEvonodesProposedEpochBlocksByIdsRequest) returns (GetEvonodesProposedEpochBlocksResponse); +impl_transport_request_grpc!( + platform_proto::GetEvonodesProposedEpochBlocksByIdsRequest, + platform_proto::GetEvonodesProposedEpochBlocksResponse, + PlatformGrpcClient, + RequestSettings::default(), + get_evonodes_proposed_epoch_blocks_by_ids +); + +// rpc GetEvonodesProposedEpochBlocksByRangeRequest(GetEvonodesProposedEpochBlocksByRangeRequest) returns (GetEvonodesProposedEpochBlocksResponse); +impl_transport_request_grpc!( + platform_proto::GetEvonodesProposedEpochBlocksByRangeRequest, + platform_proto::GetEvonodesProposedEpochBlocksResponse, + PlatformGrpcClient, + RequestSettings::default(), + get_evonodes_proposed_epoch_blocks_by_range +); + // rpc getPrefundedSpecializedBalance(GetPrefundedSpecializedBalanceRequest) returns (GetPrefundedSpecializedBalanceResponse); impl_transport_request_grpc!( platform_proto::GetPrefundedSpecializedBalanceRequest, diff --git a/packages/rs-dapi-grpc-macros/Cargo.toml b/packages/rs-dapi-grpc-macros/Cargo.toml index 48b887a01c1..7d11755542b 100644 --- a/packages/rs-dapi-grpc-macros/Cargo.toml +++ b/packages/rs-dapi-grpc-macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dapi-grpc-macros" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" description = "Macros used by dapi-grpc. Internal use only." diff --git a/packages/rs-dpp/Cargo.toml b/packages/rs-dpp/Cargo.toml index fe0394492ed..7cee8fa9dd2 100644 --- a/packages/rs-dpp/Cargo.toml +++ b/packages/rs-dpp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dpp" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true authors = [ diff --git a/packages/rs-dpp/src/data_contract/document_type/class_methods/try_from_schema/v0/mod.rs b/packages/rs-dpp/src/data_contract/document_type/class_methods/try_from_schema/v0/mod.rs index 82019a53e77..57b3bffb37f 100644 --- a/packages/rs-dpp/src/data_contract/document_type/class_methods/try_from_schema/v0/mod.rs +++ b/packages/rs-dpp/src/data_contract/document_type/class_methods/try_from_schema/v0/mod.rs @@ -76,7 +76,7 @@ const MAX_INDEXED_ARRAY_ITEMS: usize = 1024; impl DocumentTypeV0 { // TODO: Split into multiple functions #[allow(unused_variables)] - pub(crate) fn try_from_schema_v0( + pub(super) fn try_from_schema_v0( data_contract_id: Identifier, name: &str, schema: Value, diff --git a/packages/rs-dpp/src/errors/consensus/codes.rs b/packages/rs-dpp/src/errors/consensus/codes.rs index e5c731c54be..b4258538963 100644 --- a/packages/rs-dpp/src/errors/consensus/codes.rs +++ b/packages/rs-dpp/src/errors/consensus/codes.rs @@ -214,6 +214,7 @@ impl ErrorWithCode for StateError { Self::DocumentContestCurrentlyLockedError(_) => 40110, Self::DocumentContestNotJoinableError(_) => 40111, Self::DocumentContestIdentityAlreadyContestantError(_) => 40112, + Self::DocumentContestDocumentWithSameIdAlreadyPresentError(_) => 40113, // Identity Errors: 40200-40299 Self::IdentityAlreadyExistsError(_) => 40200, diff --git a/packages/rs-dpp/src/errors/consensus/state/document/document_contest_document_with_same_id_already_present_error.rs b/packages/rs-dpp/src/errors/consensus/state/document/document_contest_document_with_same_id_already_present_error.rs new file mode 100644 index 00000000000..7ddd37b52f3 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/state/document/document_contest_document_with_same_id_already_present_error.rs @@ -0,0 +1,37 @@ +use crate::consensus::state::state_error::StateError; +use crate::consensus::ConsensusError; +use crate::errors::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use platform_value::Identifier; +use thiserror::Error; + +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error("Document {document_id} is already present in a contest, entropy might be being reused")] +#[platform_serialize(unversioned)] +pub struct DocumentContestDocumentWithSameIdAlreadyPresentError { + /* + + DO NOT CHANGE ORDER OF FIELDS WITHOUT INTRODUCING OF NEW VERSION + + */ + document_id: Identifier, +} + +impl DocumentContestDocumentWithSameIdAlreadyPresentError { + pub fn new(document_id: Identifier) -> Self { + Self { document_id } + } + + pub fn document_id(&self) -> &Identifier { + &self.document_id + } +} + +impl From for ConsensusError { + fn from(err: DocumentContestDocumentWithSameIdAlreadyPresentError) -> Self { + Self::StateError(StateError::DocumentContestDocumentWithSameIdAlreadyPresentError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/state/document/mod.rs b/packages/rs-dpp/src/errors/consensus/state/document/mod.rs index 9a3071065e4..2a3441fe12c 100644 --- a/packages/rs-dpp/src/errors/consensus/state/document/mod.rs +++ b/packages/rs-dpp/src/errors/consensus/state/document/mod.rs @@ -1,5 +1,6 @@ pub mod document_already_present_error; pub mod document_contest_currently_locked_error; +pub mod document_contest_document_with_same_id_already_present_error; pub mod document_contest_identity_already_contestant; pub mod document_contest_not_joinable_error; pub mod document_incorrect_purchase_price_error; diff --git a/packages/rs-dpp/src/errors/consensus/state/state_error.rs b/packages/rs-dpp/src/errors/consensus/state/state_error.rs index cf5736fd88d..4cc4991c6cb 100644 --- a/packages/rs-dpp/src/errors/consensus/state/state_error.rs +++ b/packages/rs-dpp/src/errors/consensus/state/state_error.rs @@ -30,6 +30,7 @@ use crate::consensus::ConsensusError; use crate::consensus::state::data_contract::data_contract_update_permission_error::DataContractUpdatePermissionError; use crate::consensus::state::data_contract::document_type_update_error::DocumentTypeUpdateError; use crate::consensus::state::document::document_contest_currently_locked_error::DocumentContestCurrentlyLockedError; +use crate::consensus::state::document::document_contest_document_with_same_id_already_present_error::DocumentContestDocumentWithSameIdAlreadyPresentError; use crate::consensus::state::document::document_contest_identity_already_contestant::DocumentContestIdentityAlreadyContestantError; use crate::consensus::state::document::document_contest_not_joinable_error::DocumentContestNotJoinableError; use crate::consensus::state::document::document_incorrect_purchase_price_error::DocumentIncorrectPurchasePriceError; @@ -78,6 +79,11 @@ pub enum StateError { #[error(transparent)] DocumentContestIdentityAlreadyContestantError(DocumentContestIdentityAlreadyContestantError), + #[error(transparent)] + DocumentContestDocumentWithSameIdAlreadyPresentError( + DocumentContestDocumentWithSameIdAlreadyPresentError, + ), + #[error(transparent)] DocumentNotFoundError(DocumentNotFoundError), diff --git a/packages/rs-dpp/src/util/json_schema.rs b/packages/rs-dpp/src/util/json_schema.rs index 10eb520568c..eaf8fb0d909 100644 --- a/packages/rs-dpp/src/util/json_schema.rs +++ b/packages/rs-dpp/src/util/json_schema.rs @@ -149,11 +149,12 @@ mod test { use crate::data_contract::document_type::DocumentType; use platform_value::Identifier; - use platform_version::version::LATEST_PLATFORM_VERSION; + use platform_version::version::PlatformVersion; use serde_json::json; #[test] fn test_extract_indices() { + let platform_version = PlatformVersion::latest(); let input = json!({ "type": "object", "indices": [ @@ -215,7 +216,7 @@ mod test { false, false, &mut vec![], - LATEST_PLATFORM_VERSION, + platform_version, ) .unwrap(); diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index 8d3509e1707..303932fc21c 100644 --- a/packages/rs-drive-abci/Cargo.toml +++ b/packages/rs-drive-abci/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "drive-abci" -version = "1.2.0" +version = "1.3.0-dev.5" authors = [ "Samuel Westrich ", "Ivan Shumkov ", @@ -50,7 +50,7 @@ tracing-subscriber = { version = "0.3.16", default-features = false, features = "tracing-log", ], optional = false } atty = { version = "0.2.14", optional = false } -tenderdash-abci = { git = "https://github.com/dashpay/rs-tenderdash-abci", version = "1.1.0", tag = "v1.1.0", features = [ +tenderdash-abci = { git = "https://github.com/dashpay/rs-tenderdash-abci", branch = "feat/consensus-params-version", features = [ "grpc", ] } lazy_static = "1.4.0" @@ -73,7 +73,6 @@ tokio-util = { version = "0.7.8" } derive_more = "0.99.17" async-trait = "0.1.77" console-subscriber = { version = "0.2.0", optional = true } -once_cell = "1.19.0" [dev-dependencies] bs58 = { version = "0.5.0"} @@ -103,8 +102,8 @@ rocksdb = { version = "0.22.0" } integer-encoding = { version = "4.0.0" } [features] -# TODO: Remove console for production -default = ["mocks", "console"] + +default = ["mocks"] mocks = ["mockall", "drive/fixtures-and-mocks"] console = ["console-subscriber", "tokio/tracing"] testing-config = [] @@ -113,4 +112,3 @@ grovedbg = ["drive/grovedbg"] [[bin]] name = "drive-abci" path = "src/main.rs" -required-features = ["console"] diff --git a/packages/rs-drive-abci/src/abci/handler/info.rs b/packages/rs-drive-abci/src/abci/handler/info.rs index ea8aad0eec3..dbb85018913 100644 --- a/packages/rs-drive-abci/src/abci/handler/info.rs +++ b/packages/rs-drive-abci/src/abci/handler/info.rs @@ -3,7 +3,7 @@ use crate::abci::AbciError; use crate::error::Error; use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::rpc::core::CoreRPCLike; -use dpp::version::PlatformVersion; +use dpp::version::DESIRED_PLATFORM_VERSION; use tenderdash_abci::proto::abci as proto; pub fn info(app: &A, request: proto::RequestInfo) -> Result @@ -26,18 +26,18 @@ where .map(|app_hash| app_hash.to_vec()) .unwrap_or_default(); - let latest_supported_protocol_version = PlatformVersion::latest().protocol_version; + let desired_protocol_version = DESIRED_PLATFORM_VERSION.protocol_version; let response = proto::ResponseInfo { data: "".to_string(), - app_version: latest_supported_protocol_version as u64, + app_version: desired_protocol_version as u64, last_block_height: platform_state.last_committed_block_height() as i64, version: env!("CARGO_PKG_VERSION").to_string(), last_block_app_hash: state_app_hash.clone(), }; tracing::debug!( - latest_supported_protocol_version, + desired_protocol_version, software_version = env!("CARGO_PKG_VERSION"), block_version = request.block_version, p2p_version = request.p2p_version, diff --git a/packages/rs-drive-abci/src/abci/handler/prepare_proposal.rs b/packages/rs-drive-abci/src/abci/handler/prepare_proposal.rs index 5034fd12268..9a59463beaa 100644 --- a/packages/rs-drive-abci/src/abci/handler/prepare_proposal.rs +++ b/packages/rs-drive-abci/src/abci/handler/prepare_proposal.rs @@ -1,7 +1,10 @@ use crate::abci::app::{BlockExecutionApplication, PlatformApplication, TransactionalApplication}; use crate::abci::AbciError; use crate::error::Error; -use crate::execution::types::block_execution_context::v0::BlockExecutionContextV0Setters; +use crate::execution::engine::consensus_params_update::consensus_params_update; +use crate::execution::types::block_execution_context::v0::{ + BlockExecutionContextV0Getters, BlockExecutionContextV0Setters, +}; use crate::platform_types::block_execution_outcome; use crate::platform_types::block_proposal::v0::BlockProposal; use crate::platform_types::platform_state::v0::PlatformStateV0Methods; @@ -9,7 +12,7 @@ use crate::platform_types::state_transitions_processing_result::StateTransitionE use crate::rpc::core::CoreRPCLike; use dpp::dashcore::hashes::Hash; use dpp::version::TryIntoPlatformVersioned; -use drive::grovedb_storage::Error::{RocksDBError, StorageError}; +use drive::grovedb_storage::Error::RocksDBError; use tenderdash_abci::proto::abci as proto; use tenderdash_abci::proto::abci::tx_record::TxAction; use tenderdash_abci::proto::abci::{ExecTxResult, TxRecord}; @@ -34,6 +37,8 @@ where let last_committed_core_height = platform_state.last_committed_core_height(); + let starting_platform_version = platform_state.current_platform_version()?; + let core_chain_lock_update = match app.platform().core_rpc.get_best_chain_lock() { Ok(latest_chain_lock) => { if platform_state.last_committed_block_info().is_none() @@ -129,6 +134,8 @@ where mut block_execution_context, } = run_result.into_data().map_err(Error::Protocol)?; + let epoch_info = block_execution_context.epoch_info(); + // We need to let Tenderdash know about the transactions we should remove from execution let valid_tx_count = state_transitions_result.valid_count(); let failed_tx_count = state_transitions_result.failed_count(); @@ -199,8 +206,12 @@ where signature: chain_lock.signature.to_bytes().to_vec(), }), validator_set_update, - // TODO: implement consensus param updates - consensus_param_updates: None, + consensus_param_updates: consensus_params_update( + app.platform().config.network, + starting_platform_version, + platform_version, + epoch_info, + )?, app_version: platform_version.protocol_version as u64, }; diff --git a/packages/rs-drive-abci/src/abci/handler/process_proposal.rs b/packages/rs-drive-abci/src/abci/handler/process_proposal.rs index 072e4c616f5..5bf547e14a7 100644 --- a/packages/rs-drive-abci/src/abci/handler/process_proposal.rs +++ b/packages/rs-drive-abci/src/abci/handler/process_proposal.rs @@ -1,6 +1,7 @@ use crate::abci::app::{BlockExecutionApplication, PlatformApplication, TransactionalApplication}; use crate::abci::AbciError; use crate::error::Error; +use crate::execution::engine::consensus_params_update::consensus_params_update; use crate::execution::types::block_execution_context::v0::{ BlockExecutionContextV0Getters, BlockExecutionContextV0MutableGetters, }; @@ -8,6 +9,7 @@ use crate::execution::types::block_state_info::v0::{ BlockStateInfoV0Getters, BlockStateInfoV0Setters, }; use crate::platform_types::block_execution_outcome; +use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::platform_types::state_transitions_processing_result::StateTransitionExecutionResult; use crate::rpc::core::CoreRPCLike; use dpp::version::TryIntoPlatformVersioned; @@ -177,6 +179,8 @@ where let platform_state = app.platform().state.load(); + let starting_platform_version = platform_state.current_platform_version()?; + // Running the proposal executes all the state transitions for the block let run_result = app.platform().run_block_proposal( (&request).try_into()?, @@ -212,6 +216,8 @@ where block_execution_context, } = run_result.into_data().map_err(Error::Protocol)?; + let epoch_info = *block_execution_context.epoch_info(); + app.block_execution_context() .write() .unwrap() @@ -274,8 +280,12 @@ where tx_results, status: proto::response_process_proposal::ProposalStatus::Accept.into(), validator_set_update, - // TODO: Implement consensus param updates - consensus_param_updates: None, + consensus_param_updates: consensus_params_update( + app.platform().config.network, + starting_platform_version, + platform_version, + &epoch_info, + )?, events: Vec::new(), }; diff --git a/packages/rs-drive-abci/src/config.rs b/packages/rs-drive-abci/src/config.rs index 7437f0255fb..b3bedc0276b 100644 --- a/packages/rs-drive-abci/src/config.rs +++ b/packages/rs-drive-abci/src/config.rs @@ -7,7 +7,7 @@ use dpp::dashcore::Network; use dpp::util::deserializer::ProtocolVersion; use dpp::version::INITIAL_PROTOCOL_VERSION; use drive::config::DriveConfig; -use serde::{de::DeserializeOwned, Deserialize, Serialize}; +use serde::{de::DeserializeOwned, Deserialize, Deserializer, Serialize}; use std::path::PathBuf; use std::str::FromStr; @@ -129,15 +129,11 @@ pub struct ExecutionConfig { /// `` /// /// [`verify_sum_trees`]: PlatformConfig::verify_sum_trees -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Clone, Debug, Serialize)] // NOTE: in renames, we use lower_snake_case, because uppercase does not work; see // https://github.com/softprops/envy/issues/61 and https://github.com/softprops/envy/pull/69 pub struct PlatformConfig { /// The network type - #[serde( - default = "PlatformConfig::default_network", - deserialize_with = "from_str_to_network_with_aliases" - )] pub network: Network, /// Drive configuration #[serde(flatten)] @@ -185,7 +181,6 @@ pub struct PlatformConfig { pub block_spacing_ms: u64, /// Initial protocol version - #[serde(default = "PlatformConfig::default_initial_protocol_version")] pub initial_protocol_version: ProtocolVersion, /// Path to data storage @@ -195,7 +190,6 @@ pub struct PlatformConfig { /// Used mainly for debuggig. /// /// If not set, rejected and invalid items will not be stored. - #[serde(default)] pub rejections_path: Option, #[cfg(feature = "testing-config")] @@ -208,14 +202,92 @@ pub struct PlatformConfig { // TODO: Use from_str_to_socket_address /// Tokio console address to connect to - #[serde(default = "PlatformConfig::default_tokio_console_address")] pub tokio_console_address: String, /// Number of seconds to store task information if there is no clients connected + pub tokio_console_retention_secs: u64, +} + +// Define an intermediate struct that mirrors PlatformConfig +#[derive(Deserialize)] +struct PlatformConfigIntermediate { + /// The network type + #[serde( + default = "PlatformConfig::default_network", + deserialize_with = "from_str_to_network_with_aliases" + )] + pub network: Network, + /// Drive configuration + #[serde(flatten)] + pub drive: DriveConfig, + // Include all other fields + #[serde(flatten)] + pub core: CoreConfig, + #[serde(flatten)] + pub abci: AbciConfig, + pub prometheus_bind_address: Option, + pub grpc_bind_address: String, + #[serde(flatten)] + pub execution: ExecutionConfig, + #[serde(flatten)] + pub validator_set: ValidatorSetConfig, + #[serde(flatten)] + pub chain_lock: ChainLockConfig, + #[serde(flatten)] + pub instant_lock: InstantLockConfig, + pub block_spacing_ms: u64, + #[serde(default = "PlatformConfig::default_initial_protocol_version")] + pub initial_protocol_version: ProtocolVersion, + pub db_path: PathBuf, + #[serde(default)] + pub rejections_path: Option, + #[cfg(feature = "testing-config")] + #[serde(skip)] + pub testing_configs: PlatformTestConfig, + pub tokio_console_enabled: bool, + #[serde(default = "PlatformConfig::default_tokio_console_address")] + pub tokio_console_address: String, #[serde(default = "PlatformConfig::default_tokio_console_retention_secs")] pub tokio_console_retention_secs: u64, } +impl<'de> Deserialize<'de> for PlatformConfig { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + // First, deserialize into an intermediate struct + let mut config = PlatformConfigIntermediate::deserialize(deserializer)?; + + // Set drive.network = network + config.drive.network = config.network; + + // Convert the intermediate struct into your actual PlatformConfig + Ok(PlatformConfig { + network: config.network, + drive: config.drive, + // Copy other fields + core: config.core, + abci: config.abci, + prometheus_bind_address: config.prometheus_bind_address, + grpc_bind_address: config.grpc_bind_address, + execution: config.execution, + validator_set: config.validator_set, + chain_lock: config.chain_lock, + instant_lock: config.instant_lock, + block_spacing_ms: config.block_spacing_ms, + initial_protocol_version: config.initial_protocol_version, + db_path: config.db_path, + rejections_path: config.rejections_path, + #[cfg(feature = "testing-config")] + testing_configs: config.testing_configs, + tokio_console_enabled: config.tokio_console_enabled, + tokio_console_address: config.tokio_console_address, + tokio_console_retention_secs: config.tokio_console_retention_secs, + }) + } +} + fn from_str_to_network_with_aliases<'de, D>(deserializer: D) -> Result where D: serde::Deserializer<'de>, @@ -737,7 +809,7 @@ impl PlatformConfig { quorum_rotation: true, }, block_spacing_ms: 5000, - drive: Default::default(), + drive: DriveConfig::default_testnet(), abci: Default::default(), core: Default::default(), execution: Default::default(), @@ -846,6 +918,7 @@ mod tests { use super::FromEnv; use crate::logging::LogDestination; use dashcore_rpc::dashcore_rpc_json::QuorumType; + use dpp::dashcore::Network; use std::env; #[test] @@ -877,4 +950,20 @@ mod tests { matches!(config.abci.log[id.0].destination, LogDestination::Bytes); } } + + #[test] + fn test_config_from_testnet_propogates_network() { + // ABCI log configs are parsed manually, so they deserve separate handling + // Note that STDOUT is also defined in .env.example, but env var should overwrite it. + + let envfile = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(".env.testnet"); + + dotenvy::from_path(envfile.as_path()).expect("cannot load .env file"); + + let config = super::PlatformConfig::from_env().expect("expected config from env"); + assert!(config.execution.verify_sum_trees); + assert_eq!(config.validator_set.quorum_type, QuorumType::Llmq25_67); + assert_eq!(config.network, config.drive.network); + assert_eq!(config.network, Network::Testnet); + } } diff --git a/packages/rs-drive-abci/src/execution/engine/consensus_params_update/mod.rs b/packages/rs-drive-abci/src/execution/engine/consensus_params_update/mod.rs new file mode 100644 index 00000000000..16319d77461 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/engine/consensus_params_update/mod.rs @@ -0,0 +1,34 @@ +use crate::error::execution::ExecutionError; +use crate::error::Error; +use crate::execution::engine::consensus_params_update::v0::consensus_params_update_v0; +use crate::platform_types::epoch_info::EpochInfo; +use dpp::dashcore::Network; +use dpp::version::PlatformVersion; +use tenderdash_abci::proto::types::ConsensusParams; + +mod v0; +pub(crate) fn consensus_params_update( + network: Network, + original_platform_version: &PlatformVersion, + new_platform_version: &PlatformVersion, + epoch_info: &EpochInfo, +) -> Result, Error> { + match new_platform_version + .drive_abci + .methods + .engine + .consensus_params_update + { + 0 => Ok(consensus_params_update_v0( + network, + original_platform_version, + new_platform_version, + epoch_info, + )), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "consensus_params_update".to_string(), + known_versions: vec![0], + received: version, + })), + } +} diff --git a/packages/rs-drive-abci/src/execution/engine/consensus_params_update/v0/mod.rs b/packages/rs-drive-abci/src/execution/engine/consensus_params_update/v0/mod.rs new file mode 100644 index 00000000000..1fc68944974 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/engine/consensus_params_update/v0/mod.rs @@ -0,0 +1,73 @@ +use crate::platform_types::epoch_info::v0::EpochInfoV0Methods; +use crate::platform_types::epoch_info::EpochInfo; +use dpp::dashcore::Network; +use dpp::version::PlatformVersion; +use tenderdash_abci::proto::types::{ConsensusParams, VersionParams}; + +#[inline(always)] +pub(super) fn consensus_params_update_v0( + network: Network, + original_platform_version: &PlatformVersion, + new_platform_version: &PlatformVersion, + epoch_info: &EpochInfo, +) -> Option { + // These are emergency consensus updates + match network { + Network::Dash => { + if epoch_info.is_first_block_of_epoch(3) { + return Some(ConsensusParams { + block: None, + evidence: None, + validator: None, + version: Some(VersionParams { + app_version: new_platform_version.protocol_version as u64, + consensus_version: 1, + }), + synchrony: None, + timeout: None, + abci: None, + }); + } + } + Network::Testnet => { + if epoch_info.is_first_block_of_epoch(1476) { + return Some(ConsensusParams { + block: None, + evidence: None, + validator: None, + version: Some(VersionParams { + app_version: new_platform_version.protocol_version as u64, + consensus_version: 1, + }), + synchrony: None, + timeout: None, + abci: None, + }); + } + } + _ => {} + } + + // These are normal consensus updates + if original_platform_version + .consensus + .tenderdash_consensus_version + == new_platform_version.consensus.tenderdash_consensus_version + { + None + } else { + Some(ConsensusParams { + block: None, + evidence: None, + validator: None, + version: Some(VersionParams { + app_version: new_platform_version.protocol_version as u64, + consensus_version: new_platform_version.consensus.tenderdash_consensus_version + as i32, + }), + synchrony: None, + timeout: None, + abci: None, + }) + } +} diff --git a/packages/rs-drive-abci/src/execution/engine/mod.rs b/packages/rs-drive-abci/src/execution/engine/mod.rs index d996afeda92..086db216f7a 100644 --- a/packages/rs-drive-abci/src/execution/engine/mod.rs +++ b/packages/rs-drive-abci/src/execution/engine/mod.rs @@ -1,3 +1,4 @@ +pub(crate) mod consensus_params_update; mod finalize_block_proposal; /// Initialization /// Init chain is called from abci diff --git a/packages/rs-drive-abci/src/execution/engine/run_block_proposal/v0/mod.rs b/packages/rs-drive-abci/src/execution/engine/run_block_proposal/v0/mod.rs index 19cc38acef2..5a5d36780b2 100644 --- a/packages/rs-drive-abci/src/execution/engine/run_block_proposal/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/engine/run_block_proposal/v0/mod.rs @@ -331,9 +331,6 @@ where block_execution_context::v0::BlockExecutionContextV0 { block_state_info: block_state_info.into(), epoch_info: epoch_info.clone(), - // TODO: It doesn't seem correct to use previous block count of hpmns. - // We currently not using this field in the codebase. We probably should just remove it. - hpmn_count: last_committed_platform_state.hpmn_list_len() as u32, unsigned_withdrawal_transactions: unsigned_withdrawal_transaction_bytes, block_platform_state, proposer_results: None, diff --git a/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/add_process_epoch_change_operations/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/add_process_epoch_change_operations/v0/mod.rs index 1aa590cbc3c..f02ff1e8c45 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/add_process_epoch_change_operations/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/add_process_epoch_change_operations/v0/mod.rs @@ -272,7 +272,6 @@ mod tests { let block_execution_context = BlockExecutionContextV0 { block_state_info: block_info.clone().into(), epoch_info, - hpmn_count: 0, unsigned_withdrawal_transactions: Default::default(), block_platform_state, proposer_results: None, diff --git a/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/process_block_fees/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/process_block_fees/v0/mod.rs index d73b86e7a21..4bb341a678e 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/process_block_fees/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/process_block_fees/v0/mod.rs @@ -268,7 +268,6 @@ mod tests { let block_execution_context = BlockExecutionContextV0 { block_state_info: block_info.clone().into(), epoch_info: epoch_info.clone(), - hpmn_count: 0, unsigned_withdrawal_transactions: Default::default(), block_platform_state, proposer_results: None, diff --git a/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/tests.rs b/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/tests.rs index d48d9c30473..fcbf1e8314a 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/tests.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/tests.rs @@ -18,28 +18,21 @@ mod refund_tests { use dpp::data_contract::document_type::DocumentTypeRef; use dpp::document::document_methods::DocumentMethodsV0; use dpp::document::serialization_traits::DocumentPlatformConversionMethodsV0; - use dpp::document::{Document, DocumentV0Getters, DocumentV0Setters}; - use dpp::fee::default_costs::CachedEpochIndexFeeVersions; + use dpp::document::{Document, DocumentV0Setters}; use dpp::fee::fee_result::FeeResult; use dpp::fee::Credits; use dpp::identity::accessors::IdentityGettersV0; use dpp::identity::{Identity, IdentityPublicKey}; use dpp::platform_value::Bytes32; - use dpp::prelude::CoreBlockHeight; use dpp::state_transition::documents_batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; use drive::util::test_helpers::setup_contract; - use once_cell::sync::Lazy; use platform_version::version::PlatformVersion; use rand::prelude::StdRng; use rand::SeedableRng; use simple_signer::signer::SimpleSigner; - use std::collections::BTreeMap; use std::ops::Deref; - static EPOCH_CHANGE_FEE_VERSION_TEST: Lazy = - Lazy::new(|| BTreeMap::from([(0, PlatformVersion::first().fee_version.clone())])); - // There's a fee for the first document that a user creates on a contract as they add space // For the identity data contract nonce fn setup_join_contract_document<'a>( @@ -830,8 +823,8 @@ mod refund_tests { .calculate_refunds_amount_for_identity(identity.id()) .expect("expected refunds for identity"); - println!("{}", insertion_fee_result.storage_fee); - println!("{}", refund_amount); + // println!("{}", insertion_fee_result.storage_fee); + // println!("{}", refund_amount); // we should be refunding around 21% after 25 years. let refunded_percentage = refund_amount * 100 / insertion_fee_result.storage_fee; diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/mod.rs index d6af4e68f34..e87425a4b29 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/mod.rs @@ -6,8 +6,6 @@ use crate::platform_types::platform::Platform; use crate::platform_types::platform_state::PlatformState; use crate::rpc::core::CoreRPCLike; use dashcore_rpc::dashcore::ProTxHash; -use dashcore_rpc::json::DMNStateDiff; -use dpp::block::block_info::BlockInfo; use dpp::version::PlatformVersion; use drive::util::batch::DriveOperation; diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_owner_withdrawal_address/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_owner_withdrawal_address/mod.rs index 9322928938e..f2f5b5c708a 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_owner_withdrawal_address/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_owner_withdrawal_address/mod.rs @@ -3,8 +3,6 @@ use crate::error::Error; use crate::platform_types::platform::Platform; use crate::rpc::core::CoreRPCLike; -use dashcore_rpc::dashcore::ProTxHash; -use dashcore_rpc::json::DMNStateDiff; use dpp::block::block_info::BlockInfo; use dpp::version::PlatformVersion; diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_owner_withdrawal_address/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_owner_withdrawal_address/v0/mod.rs index 9aac4dc25c4..8484f4436d8 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_owner_withdrawal_address/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_owner_withdrawal_address/v0/mod.rs @@ -3,10 +3,6 @@ use crate::error::Error; use crate::platform_types::platform::Platform; use crate::rpc::core::CoreRPCLike; -use dashcore_rpc::dashcore::hashes::Hash; -use dashcore_rpc::dashcore::ProTxHash; - -use dashcore_rpc::json::DMNStateDiff; use dpp::block::block_info::BlockInfo; use dpp::identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0; diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/mod.rs index 70c8ff50987..4ecd62a4c91 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/mod.rs @@ -134,11 +134,11 @@ mod test { let file_path = adjust_path_based_on_current_dir( "tests/supporting_files/mainnet_protx_list_diffs/1-2128896.json", ); - println!( - "Current directory: {:?}, using {:?}", - std::env::current_dir(), - &file_path - ); + // println!( + // "Current directory: {:?}, using {:?}", + // std::env::current_dir(), + // &file_path + // ); // Deserialize the first JSON file let file = File::open(file_path).expect("expected to open file"); let reader = BufReader::new(file); diff --git a/packages/rs-drive-abci/src/execution/platform_events/fee_pool_outwards_distribution/add_epoch_pool_to_proposers_payout_operations/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/fee_pool_outwards_distribution/add_epoch_pool_to_proposers_payout_operations/v0/mod.rs index 15709631b66..14de0e6df7e 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/fee_pool_outwards_distribution/add_epoch_pool_to_proposers_payout_operations/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/fee_pool_outwards_distribution/add_epoch_pool_to_proposers_payout_operations/v0/mod.rs @@ -12,6 +12,7 @@ use dpp::platform_value::btreemap_extensions::BTreeValueMapHelper; use dpp::version::PlatformVersion; use dpp::ProtocolError; +use drive::query::proposer_block_count_query::ProposerQueryType; use drive::util::batch::DriveOperation; use drive::util::batch::DriveOperation::IdentityOperation; use drive::util::batch::IdentityOperationType::AddToIdentityBalance; @@ -56,9 +57,9 @@ impl Platform { let proposers = self .drive - .get_epoch_proposers( + .fetch_epoch_proposers( &unpaid_epoch_tree, - None, + ProposerQueryType::ByRange(None, None), Some(transaction), platform_version, ) diff --git a/packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/v0/mod.rs index c8aae65e354..e343d710c81 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/v0/mod.rs @@ -177,11 +177,11 @@ mod tests { use crate::config::PlatformConfig; use crate::test::helpers::setup::TestPlatformBuilder; use drive::config::DriveConfig; - use platform_version::version::PlatformVersion; + use platform_version::version::{PlatformVersion, INITIAL_PROTOCOL_VERSION}; #[test] pub fn should_create_genesis_state_deterministically() { - let platform_version = PlatformVersion::latest(); + let platform_version = PlatformVersion::first(); let platform = TestPlatformBuilder::new() .with_config(PlatformConfig { drive: DriveConfig { @@ -190,6 +190,7 @@ mod tests { }, ..Default::default() }) + .with_initial_protocol_version(INITIAL_PROTOCOL_VERSION) .build_with_mock_rpc() .set_genesis_state(); @@ -200,6 +201,7 @@ mod tests { .unwrap() .expect("should obtain root hash"); + // This should never be changed assert_eq!( hex::encode(root_hash), "dc5b0d4be407428adda2315db7d782e64015cbe2d2b7df963f05622390dc3c9f" diff --git a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/check_for_desired_protocol_upgrade/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/check_for_desired_protocol_upgrade/mod.rs index 33805f31251..be12d1989d0 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/check_for_desired_protocol_upgrade/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/check_for_desired_protocol_upgrade/mod.rs @@ -5,6 +5,7 @@ use dpp::util::deserializer::ProtocolVersion; use dpp::version::PlatformVersion; mod v0; +mod v1; impl Platform { /// Checks for a network upgrade and resets activation window. @@ -12,7 +13,7 @@ impl Platform { /// /// # Arguments /// - /// * `total_hpmns` - The total number of high priority masternodes. + /// * `active_hpmns` - The total number of evonodes that are not banned. /// /// # Returns /// @@ -29,7 +30,7 @@ impl Platform { /// * More than one version pass the threshold to upgrade. pub fn check_for_desired_protocol_upgrade( &self, - total_hpmns: u32, + active_hpmns: u32, platform_version: &PlatformVersion, ) -> Result, Error> { match platform_version @@ -38,10 +39,11 @@ impl Platform { .protocol_upgrade .check_for_desired_protocol_upgrade { - 0 => self.check_for_desired_protocol_upgrade_v0(total_hpmns, platform_version), + 0 => self.check_for_desired_protocol_upgrade_v0(active_hpmns, platform_version), + 1 => self.check_for_desired_protocol_upgrade_v1(active_hpmns, platform_version), version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { method: "check_for_desired_protocol_upgrade".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, })), } diff --git a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/check_for_desired_protocol_upgrade/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/check_for_desired_protocol_upgrade/v0/mod.rs index ba60c5a3fec..ba67c149d5a 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/check_for_desired_protocol_upgrade/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/check_for_desired_protocol_upgrade/v0/mod.rs @@ -1,6 +1,7 @@ use crate::error::execution::ExecutionError; use crate::error::Error; use crate::platform_types::platform::Platform; +use dpp::dashcore::Network; use dpp::version::PlatformVersion; use drive::dpp::util::deserializer::ProtocolVersion; @@ -10,17 +11,26 @@ impl Platform { /// this should only be called on epoch change pub(super) fn check_for_desired_protocol_upgrade_v0( &self, - total_hpmns: u32, + active_hpmns: u32, platform_version: &PlatformVersion, ) -> Result, Error> { - let upgrade_percentage_needed = platform_version - .drive_abci - .methods - .protocol_upgrade - .protocol_version_upgrade_percentage_needed; + let upgrade_percentage_needed = if (self.config.network == Network::Dash + && platform_version.protocol_version == 1) + || (self.config.network == Network::Testnet && platform_version.protocol_version == 2) + { + // This is a solution for the emergency update to version 3 + // We clean this up immediately though as we transition to check_for_desired_protocol_upgrade_v1 + 51 + } else { + platform_version + .drive_abci + .methods + .protocol_upgrade + .protocol_version_upgrade_percentage_needed + }; let required_upgraded_hpmns = 1 - + (total_hpmns as u64) + + (active_hpmns as u64) .checked_mul(upgrade_percentage_needed) .and_then(|product| product.checked_div(100)) .ok_or(Error::Execution(ExecutionError::Overflow( @@ -42,12 +52,13 @@ impl Platform { )); } - tracing::trace!( - total_hpmns, + tracing::debug!( + active_hpmns, required_upgraded_hpmns, all_votes = ?protocol_versions_counter.global_cache, ?versions_passing_threshold, - "Protocol version voting is finished. {} versions passing the threshold: {:?}", + "Protocol version voting is finished. we require {} upgraded, {} versions passing the threshold: {:?}", + required_upgraded_hpmns, versions_passing_threshold.len(), versions_passing_threshold ); diff --git a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/check_for_desired_protocol_upgrade/v1/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/check_for_desired_protocol_upgrade/v1/mod.rs new file mode 100644 index 00000000000..fd66cc62cd8 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/check_for_desired_protocol_upgrade/v1/mod.rs @@ -0,0 +1,64 @@ +use crate::error::execution::ExecutionError; +use crate::error::Error; +use crate::platform_types::platform::Platform; + +use dpp::version::PlatformVersion; +use drive::dpp::util::deserializer::ProtocolVersion; + +impl Platform { + /// checks for a network upgrade and resets activation window + /// this should only be called on epoch change + pub(super) fn check_for_desired_protocol_upgrade_v1( + &self, + active_hpmns: u32, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let upgrade_percentage_needed = platform_version + .drive_abci + .methods + .protocol_upgrade + .protocol_version_upgrade_percentage_needed; + + let required_upgraded_hpmns = 1 + + (active_hpmns as u64) + .checked_mul(upgrade_percentage_needed) + .and_then(|product| product.checked_div(100)) + .ok_or(Error::Execution(ExecutionError::Overflow( + "overflow for required block count", + )))?; + + // if we are at an epoch change, check to see if over 75% of blocks of previous epoch + // were on the future version + let protocol_versions_counter = self.drive.cache.protocol_versions_counter.read(); + + let mut versions_passing_threshold = + protocol_versions_counter.versions_passing_threshold(required_upgraded_hpmns); + + if versions_passing_threshold.len() > 1 { + return Err(Error::Execution( + ExecutionError::ProtocolUpgradeIncoherence( + "only at most 1 version should be able to pass the threshold to upgrade", + ), + )); + } + + tracing::debug!( + active_hpmns, + required_upgraded_hpmns, + all_votes = ?protocol_versions_counter.global_cache, + ?versions_passing_threshold, + "Protocol version voting is finished. we require {} upgraded, {} versions passing the threshold: {:?}", + required_upgraded_hpmns, + versions_passing_threshold.len(), + versions_passing_threshold + ); + + if !versions_passing_threshold.is_empty() { + // same as equals 1 + let next_version = versions_passing_threshold.remove(0); + Ok(Some(next_version)) + } else { + Ok(None) + } + } +} diff --git a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/upgrade_protocol_version/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/upgrade_protocol_version/v0/mod.rs index 5edbf3e2f19..79b6ce27cd5 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/upgrade_protocol_version/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/upgrade_protocol_version/v0/mod.rs @@ -7,6 +7,7 @@ use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::platform_types::platform_state::PlatformState; use chrono::{TimeZone, Utc}; use dpp::block::block_info::BlockInfo; +use dpp::dashcore::Network::Testnet; use dpp::version::PlatformVersion; use drive::grovedb::Transaction; @@ -57,10 +58,16 @@ impl Platform { // Determine a new protocol version for the next epoch if enough proposers voted // otherwise keep the current one - let hpmn_list_len = last_committed_platform_state.hpmn_list_len() as u32; + let hpmn_active_list_len = + if self.config.network == Testnet && epoch_info.current_epoch_index() <= 1430 { + // We had a bug on testnet that would use the entire hpmn list len, including banned nodes + last_committed_platform_state.hpmn_list_len() as u32 + } else { + last_committed_platform_state.hpmn_active_list_len() as u32 + }; let next_epoch_protocol_version = - self.check_for_desired_protocol_upgrade(hpmn_list_len, platform_version)?; + self.check_for_desired_protocol_upgrade(hpmn_active_list_len, platform_version)?; if let Some(protocol_version) = next_epoch_protocol_version { tracing::trace!( diff --git a/packages/rs-drive-abci/src/execution/platform_events/voting/check_for_ended_vote_polls/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/voting/check_for_ended_vote_polls/mod.rs index 6bb08f7facb..71c8cf00da6 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/voting/check_for_ended_vote_polls/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/voting/check_for_ended_vote_polls/mod.rs @@ -16,6 +16,7 @@ where /// Checks for ended vote polls pub(in crate::execution) fn check_for_ended_vote_polls( &self, + last_committed_platform_state: &PlatformState, block_platform_state: &PlatformState, block_info: &BlockInfo, transaction: TransactionArg, @@ -28,6 +29,7 @@ where .check_for_ended_vote_polls { 0 => self.check_for_ended_vote_polls_v0( + last_committed_platform_state, block_platform_state, block_info, transaction, diff --git a/packages/rs-drive-abci/src/execution/platform_events/voting/check_for_ended_vote_polls/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/voting/check_for_ended_vote_polls/v0/mod.rs index ca84b637298..426888de5da 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/voting/check_for_ended_vote_polls/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/voting/check_for_ended_vote_polls/v0/mod.rs @@ -1,18 +1,26 @@ use crate::error::Error; use crate::platform_types::platform::Platform; +use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::platform_types::platform_state::PlatformState; use crate::rpc::core::CoreRPCLike; +use dashcore_rpc::dashcore::Network::Testnet; use dpp::block::block_info::BlockInfo; use dpp::document::DocumentV0Getters; use dpp::prelude::TimestampMillis; use dpp::version::PlatformVersion; use dpp::voting::contender_structs::FinalizedContender; +use dpp::voting::vote_choices::resource_vote_choice::ResourceVoteChoice; use dpp::voting::vote_choices::resource_vote_choice::ResourceVoteChoice::TowardsIdentity; use dpp::voting::vote_info_storage::contested_document_vote_poll_winner_info::ContestedDocumentVotePollWinnerInfo; +use drive::drive::votes::paths::vote_end_date_queries_tree_path_vec; use drive::drive::votes::resolved::vote_polls::resolve::VotePollResolver; use drive::drive::votes::resolved::vote_polls::{ResolvedVotePoll, ResolvedVotePollWithVotes}; -use drive::grovedb::TransactionArg; -use drive::query::VotePollsByEndDateDriveQuery; +use drive::grovedb::{QueryItem, TransactionArg}; +use drive::query::vote_poll_vote_state_query::{ + ContestedDocumentVotePollDriveQuery, ContestedDocumentVotePollDriveQueryResultType, +}; +use drive::query::{PathQuery, Query, QueryResultType, VotePollsByEndDateDriveQuery}; +use drive::util::common::encode::encode_u64; use itertools::Itertools; use std::collections::BTreeMap; @@ -24,156 +32,286 @@ where #[inline(always)] pub(super) fn check_for_ended_vote_polls_v0( &self, + last_committed_platform_state: &PlatformState, block_platform_state: &PlatformState, block_info: &BlockInfo, transaction: TransactionArg, platform_version: &PlatformVersion, ) -> Result<(), Error> { // let's start by getting the vote polls that have finished - let vote_polls_by_timestamp = - VotePollsByEndDateDriveQuery::execute_no_proof_for_specialized_end_time_query( + let ( + distribute_after_time, + clean_up_testnet_corrupted_reference_issue, + maximum_vote_polls_to_process, + ) = if self.config.network == Testnet + && last_committed_platform_state.current_protocol_version_in_consensus() == 1 + && block_platform_state.current_protocol_version_in_consensus() == 2 + { + // We need to clean up testnet + ( + TimestampMillis::MAX >> 1, + true, + platform_version + .drive_abci + .validation_and_processing + .event_constants + .maximum_vote_polls_to_process, + ) + } else if self.config.network == Testnet + && block_platform_state.last_committed_block_epoch().index == 1434 + && block_info.epoch.index == 1435 + { + // We need to clean up testnet, this time we are going to do this clean up at a specific epoch change version + (TimestampMillis::MAX >> 1, true, 100) + } else { + ( block_info.time_ms, + false, platform_version .drive_abci .validation_and_processing .event_constants .maximum_vote_polls_to_process, + ) + }; + let vote_polls_by_timestamp = + VotePollsByEndDateDriveQuery::execute_no_proof_for_specialized_end_time_query( + distribute_after_time, + maximum_vote_polls_to_process, &self.drive, transaction, &mut vec![], platform_version, )?; - let vote_polls_with_info = vote_polls_by_timestamp.into_iter().map(|(end_date, vote_polls)| { - let vote_polls_with_votes = vote_polls.into_iter().map(|vote_poll| { - let resolved_vote_poll = - vote_poll.resolve(&self.drive, transaction, platform_version)?; - match resolved_vote_poll { - ResolvedVotePoll::ContestedDocumentResourceVotePollWithContractInfo( - resolved_contested_document_resource_vote_poll, - ) => { - let document_type = - resolved_contested_document_resource_vote_poll.document_type()?; - // let's see who actually won - let result = self.tally_votes_for_contested_document_resource_vote_poll( - (&resolved_contested_document_resource_vote_poll).into(), - transaction, - platform_version, - )?; - let contenders = result.contenders; - // For each contender if there vote_tally is 1 or more we need to get their votes - // We don't do this for contenders with 0 votes, as there is no point. - - let sorted_contenders: Vec<_> = contenders - .into_iter() - .sorted_by(|a, b| Ord::cmp(&b.final_vote_tally, &a.final_vote_tally)) - .collect(); - - let (contenders_with_votes, contenders_with_no_votes) : (Vec<_>, Vec<_>) = sorted_contenders.iter().partition(|a| a.final_vote_tally > 0); - - let fetch_contenders = contenders_with_votes - .iter() - .map(|contender| contender.identity_id) - .collect::>(); - let mut other_contenders = if contenders_with_no_votes.is_empty() - { - BTreeMap::new() - } else { - // Other contenders are only those with no votes - contenders_with_no_votes.into_iter().map(|contender| (TowardsIdentity(contender.identity_id), vec![])).collect() - }; - - // We need to get the votes of the sorted contenders - let mut identifiers_voting_for_contenders = - self.drive.fetch_identities_voting_for_contenders( - &resolved_contested_document_resource_vote_poll, - fetch_contenders, - true, + // Check if awarding is disabled + let vote_polls_with_info = if clean_up_testnet_corrupted_reference_issue { + // We need to remove all empty trees before the current time + // This is because before this fix on testnet empty trees were left in the query by end date tree + let path = vote_end_date_queries_tree_path_vec(); + let query = + Query::new_single_query_item(QueryItem::RangeTo(..encode_u64(block_info.time_ms))); + let path_query = PathQuery::new_unsized(path.clone(), query); + + let keys = self + .drive + .grove_get_raw_path_query( + &path_query, + transaction, + QueryResultType::QueryKeyElementPairResultType, + &mut vec![], + &platform_version.drive, + )? + .0 + .to_keys(); + + for key in keys { + self.drive.grove_delete( + path.as_slice().into(), + key.as_slice(), + transaction, + &mut vec![], + &platform_version.drive, + )?; + } + + // Skip processing, just collect resolved vote polls for cleanup + vote_polls_by_timestamp.into_iter().map(|(end_date, vote_polls)| { + let vote_polls_with_votes = vote_polls.into_iter().map(|vote_poll| { + let resolved_vote_poll = vote_poll.resolve( + &self.drive, + transaction, + platform_version, + )?; + match resolved_vote_poll { + ResolvedVotePoll::ContestedDocumentResourceVotePollWithContractInfo( + resolved_contested_document_resource_vote_poll, + ) => { + let query = ContestedDocumentVotePollDriveQuery { + vote_poll: (&resolved_contested_document_resource_vote_poll).into(), + result_type: ContestedDocumentVotePollDriveQueryResultType::VoteTally, + offset: None, + limit: None, // There should be no limit here + start_at: None, + allow_include_locked_and_abstaining_vote_tally: true, + }; + + let query_result = + query.execute_no_proof(&self.drive, transaction, &mut vec![], platform_version)?; + + let contenders_with_no_votes : Vec<_> = query_result.contenders.iter().filter(|a| a.vote_tally().is_none() || a.vote_tally().unwrap() == 0 ).collect(); + + let mut other_contenders = if contenders_with_no_votes.is_empty() + { + BTreeMap::new() + } else { + // Other contenders are only those with no votes + contenders_with_no_votes.into_iter().map(|contender| (TowardsIdentity(contender.identity_id()), vec![])).collect() + }; + + if query_result.locked_vote_tally == Some(0) { + other_contenders.insert(ResourceVoteChoice::Lock, vec![]); + } + + if query_result.abstaining_vote_tally == Some(0) { + other_contenders.insert(ResourceVoteChoice::Abstain, vec![]); + } + + // We need to get the votes of the sorted contenders + let mut identifiers_voting_for_contenders = + self.drive.fetch_identities_voting_for_contenders( + &resolved_contested_document_resource_vote_poll, + query_result.contenders.into_iter().map(|contender| contender.identity_id()).collect(), + true, + transaction, + platform_version, + )?; + + identifiers_voting_for_contenders.append(&mut other_contenders); + + // We don't need votes, so we pass an empty BTreeMap + Ok(ResolvedVotePollWithVotes::ContestedDocumentResourceVotePollWithContractInfoAndVotes( + resolved_contested_document_resource_vote_poll, + identifiers_voting_for_contenders, + )) + } + } + }).collect::, Error>>()?; + Ok((end_date, vote_polls_with_votes)) + }).collect::>, Error>>() + } else { + vote_polls_by_timestamp.into_iter().map(|(end_date, vote_polls)| { + let vote_polls_with_votes = vote_polls.into_iter().map(|vote_poll| { + let resolved_vote_poll = + vote_poll.resolve(&self.drive, transaction, platform_version)?; + match resolved_vote_poll { + ResolvedVotePoll::ContestedDocumentResourceVotePollWithContractInfo( + resolved_contested_document_resource_vote_poll, + ) => { + let document_type = + resolved_contested_document_resource_vote_poll.document_type()?; + // let's see who actually won + let result = self.tally_votes_for_contested_document_resource_vote_poll( + (&resolved_contested_document_resource_vote_poll).into(), transaction, platform_version, )?; + let contenders = result.contenders; + // For each contender if there vote_tally is 1 or more we need to get their votes + // We don't do this for contenders with 0 votes, as there is no point. - identifiers_voting_for_contenders.append(&mut other_contenders); - - let highest_vote_tally = sorted_contenders - .first() - .map(|max_voted_contender| max_voted_contender.final_vote_tally) - .unwrap_or_default(); - // These are all the people who got top votes - let top_contenders: Vec = sorted_contenders - .into_iter() - .filter(|c| c.final_vote_tally == highest_vote_tally) - .take(100) // Limit to the first 100 before the expensive operation - .map(|contender| { - FinalizedContender::try_from_contender_with_serialized_document( - contender, - document_type, - platform_version, - ) - .map_err(Error::Protocol) - }) - .collect::, Error>>()?; - // Now we sort by the document creation date - let maybe_top_contender = top_contenders.into_iter().max_by(|a, b| { - a.document - .created_at() - .cmp(&b.document.created_at()) - .then_with(|| { - a.document - .created_at_block_height() - .cmp(&b.document.created_at_block_height()) - }) - .then_with(|| { - a.document - .created_at_core_block_height() - .cmp(&b.document.created_at_core_block_height()) - }) - .then_with(|| a.document.id().cmp(&b.document.id())) - }); - // We award the document to the top contender - let winner_info = if let Some(top_contender) = maybe_top_contender { - // let's check to make sure the lock votes didn't win it - // if the lock is tied with the top contender the top contender gets it - if result.locked_vote_tally > top_contender.final_vote_tally { - // the record will show it's locked - ContestedDocumentVotePollWinnerInfo::Locked + let sorted_contenders: Vec<_> = contenders + .into_iter() + .sorted_by(|a, b| Ord::cmp(&b.final_vote_tally, &a.final_vote_tally)) + .collect(); + + let (contenders_with_votes, contenders_with_no_votes): (Vec<_>, Vec<_>) = sorted_contenders.iter().partition(|a| a.final_vote_tally > 0); + + let fetch_contenders = contenders_with_votes + .iter() + .map(|contender| contender.identity_id) + .collect::>(); + let mut other_contenders = if contenders_with_no_votes.is_empty() + { + BTreeMap::new() } else { - let contender_id = top_contender.identity_id; - // We award the document to the winner of the vote poll - self.award_document_to_winner( - block_info, - top_contender, + // Other contenders are only those with no votes + contenders_with_no_votes.into_iter().map(|contender| (TowardsIdentity(contender.identity_id), vec![])).collect() + }; + + // We need to get the votes of the sorted contenders + let mut identifiers_voting_for_contenders = + self.drive.fetch_identities_voting_for_contenders( &resolved_contested_document_resource_vote_poll, + fetch_contenders, + true, transaction, platform_version, )?; - ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_id) - } - } else { - ContestedDocumentVotePollWinnerInfo::NoWinner - }; - // We want to keep a record of how everyone voted - self.keep_record_of_finished_contested_resource_vote_poll( - block_platform_state, - block_info, - &resolved_contested_document_resource_vote_poll, - &identifiers_voting_for_contenders, - winner_info, - transaction, - platform_version, - )?; - Ok(ResolvedVotePollWithVotes::ContestedDocumentResourceVotePollWithContractInfoAndVotes(resolved_contested_document_resource_vote_poll, identifiers_voting_for_contenders)) + + identifiers_voting_for_contenders.append(&mut other_contenders); + + let highest_vote_tally = sorted_contenders + .first() + .map(|max_voted_contender| max_voted_contender.final_vote_tally) + .unwrap_or_default(); + // These are all the people who got top votes + let top_contenders: Vec = sorted_contenders + .into_iter() + .filter(|c| c.final_vote_tally == highest_vote_tally) + .take(100) // Limit to the first 100 before the expensive operation + .map(|contender| { + FinalizedContender::try_from_contender_with_serialized_document( + contender, + document_type, + platform_version, + ) + .map_err(Error::Protocol) + }) + .collect::, Error>>()?; + // Now we sort by the document creation date + let maybe_top_contender = top_contenders.into_iter().max_by(|a, b| { + a.document + .created_at() + .cmp(&b.document.created_at()) + .then_with(|| { + a.document + .created_at_block_height() + .cmp(&b.document.created_at_block_height()) + }) + .then_with(|| { + a.document + .created_at_core_block_height() + .cmp(&b.document.created_at_core_block_height()) + }) + .then_with(|| a.document.id().cmp(&b.document.id())) + }); + // We award the document to the top contender + let winner_info = if let Some(top_contender) = maybe_top_contender { + // let's check to make sure the lock votes didn't win it + // if the lock is tied with the top contender the top contender gets it + if result.locked_vote_tally > top_contender.final_vote_tally { + // the record will show it's locked + ContestedDocumentVotePollWinnerInfo::Locked + } else { + let contender_id = top_contender.identity_id; + // We award the document to the winner of the vote poll + self.award_document_to_winner( + block_info, + top_contender, + &resolved_contested_document_resource_vote_poll, + transaction, + platform_version, + )?; + ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_id) + } + } else { + ContestedDocumentVotePollWinnerInfo::NoWinner + }; + // We want to keep a record of how everyone voted + self.keep_record_of_finished_contested_resource_vote_poll( + block_platform_state, + block_info, + &resolved_contested_document_resource_vote_poll, + &identifiers_voting_for_contenders, + winner_info, + transaction, + platform_version, + )?; + Ok(ResolvedVotePollWithVotes::ContestedDocumentResourceVotePollWithContractInfoAndVotes(resolved_contested_document_resource_vote_poll, identifiers_voting_for_contenders)) + } } - } - }).collect::, Error>>()?; - Ok((end_date, vote_polls_with_votes)) - }).collect::>, Error>>()?; + }).collect::, Error>>()?; + Ok((end_date, vote_polls_with_votes)) + }).collect::>, Error>>() + }?; // We need to clean up the vote polls // This means removing it and also removing all current votes if !vote_polls_with_info.is_empty() { self.clean_up_after_vote_polls_end( &vote_polls_with_info, + clean_up_testnet_corrupted_reference_issue, transaction, platform_version, )?; diff --git a/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_contested_resources_vote_polls_end/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_contested_resources_vote_polls_end/mod.rs index 05a48ad45c7..1c13190a5a4 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_contested_resources_vote_polls_end/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_contested_resources_vote_polls_end/mod.rs @@ -24,6 +24,7 @@ where &TimestampMillis, &BTreeMap>, )>, + clean_up_testnet_corrupted_reference_issue: bool, transaction: TransactionArg, platform_version: &PlatformVersion, ) -> Result<(), Error> { @@ -35,6 +36,7 @@ where { 0 => self.clean_up_after_contested_resources_vote_polls_end_v0( vote_polls, + clean_up_testnet_corrupted_reference_issue, transaction, platform_version, ), diff --git a/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_contested_resources_vote_polls_end/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_contested_resources_vote_polls_end/v0/mod.rs index f648ad27f86..f444ed1e61f 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_contested_resources_vote_polls_end/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_contested_resources_vote_polls_end/v0/mod.rs @@ -24,6 +24,7 @@ where &TimestampMillis, &BTreeMap>, )>, + clean_up_testnet_corrupted_reference_issue: bool, transaction: TransactionArg, platform_version: &PlatformVersion, ) -> Result<(), Error> { @@ -52,6 +53,7 @@ where self.drive .remove_contested_resource_vote_poll_documents_operations( vote_polls.as_slice(), + clean_up_testnet_corrupted_reference_issue, &mut operations, transaction, platform_version, @@ -109,6 +111,23 @@ where )?; } + if clean_up_testnet_corrupted_reference_issue { + self.drive.remove_contested_resource_info_operations( + vote_polls.as_slice(), + &mut operations, + transaction, + platform_version, + )?; + // We remove the last index + self.drive + .remove_contested_resource_top_level_index_operations( + vote_polls.as_slice(), + &mut operations, + transaction, + platform_version, + )?; + } + if !operations.is_empty() { self.drive.apply_batch_low_level_drive_operations( None, diff --git a/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_vote_polls_end/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_vote_polls_end/mod.rs index d5089264b83..2852effd323 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_vote_polls_end/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_vote_polls_end/mod.rs @@ -18,6 +18,7 @@ where pub(in crate::execution) fn clean_up_after_vote_polls_end( &self, vote_polls: &BTreeMap>, + clean_up_testnet_corrupted_reference_issue: bool, transaction: TransactionArg, platform_version: &PlatformVersion, ) -> Result<(), Error> { @@ -27,7 +28,12 @@ where .voting .clean_up_after_vote_poll_end { - 0 => self.clean_up_after_vote_polls_end_v0(vote_polls, transaction, platform_version), + 0 => self.clean_up_after_vote_polls_end_v0( + vote_polls, + clean_up_testnet_corrupted_reference_issue, + transaction, + platform_version, + ), version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { method: "clean_up_after_vote_polls_end".to_string(), known_versions: vec![0], diff --git a/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_vote_polls_end/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_vote_polls_end/v0/mod.rs index 20f39351ef7..a5b0d75a3b5 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_vote_polls_end/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/voting/clean_up_after_vote_polls_end/v0/mod.rs @@ -19,6 +19,7 @@ where pub(super) fn clean_up_after_vote_polls_end_v0( &self, vote_polls: &BTreeMap>, + clean_up_testnet_corrupted_reference_issue: bool, transaction: TransactionArg, platform_version: &PlatformVersion, ) -> Result<(), Error> { @@ -44,6 +45,7 @@ where // Call the function to clean up contested document resource vote polls self.clean_up_after_contested_resources_vote_polls_end( contested_polls, + clean_up_testnet_corrupted_reference_issue, transaction, platform_version, ) diff --git a/packages/rs-drive-abci/src/execution/platform_events/voting/run_dao_platform_events/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/voting/run_dao_platform_events/v0/mod.rs index 817067f58c0..2ea9357af14 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/voting/run_dao_platform_events/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/voting/run_dao_platform_events/v0/mod.rs @@ -30,6 +30,7 @@ where // Check for any vote polls that might have ended self.check_for_ended_vote_polls( + last_committed_platform_state, block_platform_state, block_info, transaction, diff --git a/packages/rs-drive-abci/src/execution/types/block_execution_context/mod.rs b/packages/rs-drive-abci/src/execution/types/block_execution_context/mod.rs index a0054fff7a9..3a866d17c75 100644 --- a/packages/rs-drive-abci/src/execution/types/block_execution_context/mod.rs +++ b/packages/rs-drive-abci/src/execution/types/block_execution_context/mod.rs @@ -42,12 +42,6 @@ impl BlockExecutionContextV0Getters for BlockExecutionContext { } } - fn hpmn_count(&self) -> u32 { - match self { - BlockExecutionContext::V0(v0) => v0.hpmn_count, - } - } - fn unsigned_withdrawal_transactions(&self) -> &UnsignedWithdrawalTxs { match self { BlockExecutionContext::V0(v0) => &v0.unsigned_withdrawal_transactions, @@ -80,12 +74,6 @@ impl BlockExecutionContextV0Setters for BlockExecutionContext { } } - fn set_hpmn_count(&mut self, count: u32) { - match self { - BlockExecutionContext::V0(v0) => v0.hpmn_count = count, - } - } - fn set_unsigned_withdrawal_transactions(&mut self, transactions: UnsignedWithdrawalTxs) { match self { BlockExecutionContext::V0(v0) => v0.unsigned_withdrawal_transactions = transactions, diff --git a/packages/rs-drive-abci/src/execution/types/block_execution_context/v0/mod.rs b/packages/rs-drive-abci/src/execution/types/block_execution_context/v0/mod.rs index 9276f1ff8a7..ec71d6f20d2 100644 --- a/packages/rs-drive-abci/src/execution/types/block_execution_context/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/types/block_execution_context/v0/mod.rs @@ -42,8 +42,6 @@ pub struct BlockExecutionContextV0 { pub block_state_info: BlockStateInfo, /// Epoch info pub epoch_info: EpochInfo, - /// Total hpmn count - pub hpmn_count: u32, /// Unsigned withdrawal transactions to be available for extend and verify votes handlers pub unsigned_withdrawal_transactions: UnsignedWithdrawalTxs, /// Block state @@ -59,9 +57,6 @@ pub trait BlockExecutionContextV0Getters { /// Returns a reference of the epoch_info field. fn epoch_info(&self) -> &EpochInfo; - /// Returns the hpmn_count field. - fn hpmn_count(&self) -> u32; - /// Returns a reference of the withdrawal_transactions field. fn unsigned_withdrawal_transactions(&self) -> &UnsignedWithdrawalTxs; @@ -80,9 +75,6 @@ pub trait BlockExecutionContextV0Setters { /// Sets the epoch_info field. fn set_epoch_info(&mut self, info: EpochInfo); - /// Sets the hpmn_count field. - fn set_hpmn_count(&mut self, count: u32); - /// Sets the withdrawal_transactions field. fn set_unsigned_withdrawal_transactions(&mut self, transactions: UnsignedWithdrawalTxs); @@ -137,11 +129,6 @@ impl BlockExecutionContextV0Getters for BlockExecutionContextV0 { &self.epoch_info } - /// Returns the hpmn_count field. - fn hpmn_count(&self) -> u32 { - self.hpmn_count - } - /// Returns a reference to the unsigned withdrawal transactions fn unsigned_withdrawal_transactions(&self) -> &UnsignedWithdrawalTxs { &self.unsigned_withdrawal_transactions @@ -167,10 +154,6 @@ impl BlockExecutionContextV0Setters for BlockExecutionContextV0 { fn set_epoch_info(&mut self, info: EpochInfo) { self.epoch_info = info; } - /// Sets the hpmn_count field. - fn set_hpmn_count(&mut self, count: u32) { - self.hpmn_count = count; - } /// Sets the withdrawal_transactions field. fn set_unsigned_withdrawal_transactions(&mut self, transactions: UnsignedWithdrawalTxs) { self.unsigned_withdrawal_transactions = transactions; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_update/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_update/mod.rs index d74a18ba331..9cd512b6da2 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_update/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_update/mod.rs @@ -221,7 +221,6 @@ mod tests { use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; use crate::execution::validation::state_transition::ValidationMode; use dpp::version::TryFromPlatformVersioned; - use platform_version::version::LATEST_PLATFORM_VERSION; use platform_version::{DefaultForPlatformVersion, TryIntoPlatformVersioned}; #[test] @@ -516,7 +515,7 @@ mod tests { updated_document_type.into(), true, &mut vec![], - LATEST_PLATFORM_VERSION, + platform_version, ) .expect("to be able to set document schema"); @@ -524,7 +523,7 @@ mod tests { data_contract.config_mut().set_keeps_history(false); let state_transition: DataContractUpdateTransitionV0 = (data_contract, 1) - .try_into_platform_versioned(LATEST_PLATFORM_VERSION) + .try_into_platform_versioned(platform_version) .expect("expected an update transition"); let state_transition: DataContractUpdateTransition = state_transition.into(); diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/mod.rs index 54176e1dcee..bff6309b3dc 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/mod.rs @@ -8,10 +8,12 @@ use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; use crate::execution::validation::state_transition::documents_batch::action_validation::document_create_transition_action::state_v0::DocumentCreateTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::documents_batch::action_validation::document_create_transition_action::state_v1::DocumentCreateTransitionActionStateValidationV1; use crate::execution::validation::state_transition::documents_batch::action_validation::document_create_transition_action::structure_v0::DocumentCreateTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; +mod state_v1; mod structure_v0; pub trait DocumentCreateTransitionActionValidation { @@ -78,9 +80,19 @@ impl DocumentCreateTransitionActionValidation for DocumentCreateTransitionAction transaction, platform_version, ), + // V1 introduces a validation that a contested document does not yet exist (and the + // cost for this operation) + 1 => self.validate_state_v1( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + ), version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { method: "DocumentCreateTransitionAction::validate_state".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, })), } diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/state_v0/mod.rs index 29368d7c99c..fdc1c0a2dfa 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/state_v0/mod.rs @@ -129,7 +129,9 @@ impl DocumentCreateTransitionActionStateValidationV0 for DocumentCreateTransitio // We need to make sure that if there is a contest, it is in its first week // The week might be more or less, as it's a versioned parameter let time_ms_since_start = block_info.time_ms.checked_sub(start_block.time_ms).ok_or(Error::Drive(drive::error::Error::Drive(DriveError::CorruptedDriveState(format!("it makes no sense that the start block time {} is before our current block time {}", start_block.time_ms, block_info.time_ms)))))?; - let join_time_allowed = platform_version.dpp.validation.voting.allow_other_contenders_time_ms; + + let join_time_allowed = platform_version.dpp.validation.voting.allow_other_contenders_time_mainnet_ms; + if time_ms_since_start > join_time_allowed { return Ok(SimpleConsensusValidationResult::new_with_error(ConsensusError::StateError(StateError::DocumentContestNotJoinableError( DocumentContestNotJoinableError::new( diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/state_v1/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/state_v1/mod.rs new file mode 100644 index 00000000000..2e2908d9b56 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/state_v1/mod.rs @@ -0,0 +1,200 @@ +use dpp::block::block_info::BlockInfo; +use dpp::consensus::basic::document::InvalidDocumentTypeError; +use dpp::consensus::ConsensusError; +use dpp::consensus::state::document::document_already_present_error::DocumentAlreadyPresentError; +use dpp::consensus::state::document::document_contest_currently_locked_error::DocumentContestCurrentlyLockedError; +use dpp::consensus::state::document::document_contest_document_with_same_id_already_present_error::DocumentContestDocumentWithSameIdAlreadyPresentError; +use dpp::consensus::state::document::document_contest_identity_already_contestant::DocumentContestIdentityAlreadyContestantError; +use dpp::consensus::state::document::document_contest_not_joinable_error::DocumentContestNotJoinableError; +use dpp::consensus::state::state_error::StateError; +use dpp::dashcore::Network; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; +use dpp::prelude::{ConsensusValidationResult, Identifier}; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::document::documents_batch::document_transition::document_create_transition_action::{DocumentCreateTransitionAction, DocumentCreateTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +use dpp::voting::vote_info_storage::contested_document_vote_poll_stored_info::{ContestedDocumentVotePollStatus, ContestedDocumentVotePollStoredInfoV0Getters}; +use drive::error::drive::DriveError; +use drive::query::TransactionArg; +use crate::error::Error; +use crate::execution::types::execution_operation::ValidationOperation; +use crate::execution::types::state_transition_execution_context::{StateTransitionExecutionContext, StateTransitionExecutionContextMethodsV0}; +use crate::execution::validation::state_transition::documents_batch::state::v0::fetch_contender::fetch_contender; +use crate::execution::validation::state_transition::documents_batch::state::v0::fetch_documents::{fetch_document_with_id, has_contested_document_with_document_id}; +use crate::platform_types::platform::PlatformStateRef; + +pub(super) trait DocumentCreateTransitionActionStateValidationV1 { + fn validate_state_v1( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} +impl DocumentCreateTransitionActionStateValidationV1 for DocumentCreateTransitionAction { + fn validate_state_v1( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let contract_fetch_info = self.base().data_contract_fetch_info(); + + let contract = &contract_fetch_info.contract; + + let document_type_name = self.base().document_type_name(); + + let Some(document_type) = contract.document_type_optional_for_name(document_type_name) + else { + return Ok(SimpleConsensusValidationResult::new_with_error( + InvalidDocumentTypeError::new(document_type_name.clone(), contract.id()).into(), + )); + }; + + // TODO: Use multi get https://github.com/facebook/rocksdb/wiki/MultiGet-Performance + // We should check to see if a document already exists in the state + let (already_existing_document, fee_result) = fetch_document_with_id( + platform.drive, + contract, + document_type, + self.base().id(), + transaction, + platform_version, + )?; + + execution_context.add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); + + if already_existing_document.is_some() { + return Ok(ConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::DocumentAlreadyPresentError( + DocumentAlreadyPresentError::new(self.base().id()), + )), + )); + } + + // we also need to validate that the new document wouldn't conflict with any other document + // this means for example having overlapping unique indexes + + if document_type.indexes().values().any(|index| index.unique) { + let validation_result = platform + .drive + .validate_document_create_transition_action_uniqueness( + contract, + document_type, + self, + owner_id, + transaction, + platform_version, + ) + .map_err(Error::Drive)?; + + if !validation_result.is_valid() { + return Ok(validation_result); + } + } + + if let Some((contested_document_resource_vote_poll, _)) = self.prefunded_voting_balance() { + // -->> Introduced in V1 <<-- + // We should check to see if a contested document already exists in the state with the same id + // This could happen if we used the same entropy for multiple different contests + let (contested_document_already_exists, fee_result) = + has_contested_document_with_document_id( + platform.drive, + contested_document_resource_vote_poll.contract.as_ref(), + contested_document_resource_vote_poll.document_type()?, + self.base().id(), + Some(&block_info.epoch), + transaction, + platform_version, + )?; + + execution_context + .add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); + + if contested_document_already_exists { + return Ok(ConsensusValidationResult::new_with_error( + ConsensusError::StateError( + StateError::DocumentContestDocumentWithSameIdAlreadyPresentError( + DocumentContestDocumentWithSameIdAlreadyPresentError::new( + self.base().id(), + ), + ), + ), + )); + } + + // -->> End Introduced in V1 <<-- + + if let Some(stored_info) = self.current_store_contest_info() { + // We have previous stored info + match stored_info.vote_poll_status() { + ContestedDocumentVotePollStatus::NotStarted => { + Ok(SimpleConsensusValidationResult::new()) + } + ContestedDocumentVotePollStatus::Awarded(_) => { + // This is weird as it should have already been found when querying the document, however it is possible + // That it was destroyed + Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::DocumentAlreadyPresentError( + DocumentAlreadyPresentError::new(self.base().id()), + )), + )) + } + ContestedDocumentVotePollStatus::Locked => { + Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::DocumentContestCurrentlyLockedError( + DocumentContestCurrentlyLockedError::new( + contested_document_resource_vote_poll.into(), + stored_info.clone(), + platform_version.fee_version.vote_resolution_fund_fees.contested_document_vote_resolution_unlock_fund_required_amount, + ))), + )) + } + ContestedDocumentVotePollStatus::Started(start_block) => { + // We need to make sure that if there is a contest, it is in its first week + // The week might be more or less, as it's a versioned parameter + let time_ms_since_start = block_info.time_ms.checked_sub(start_block.time_ms).ok_or(Error::Drive(drive::error::Error::Drive(DriveError::CorruptedDriveState(format!("it makes no sense that the start block time {} is before our current block time {}", start_block.time_ms, block_info.time_ms)))))?; + let join_time_allowed = match platform.config.network { + Network::Dash => platform_version.dpp.validation.voting.allow_other_contenders_time_mainnet_ms, + _ => platform_version.dpp.validation.voting.allow_other_contenders_time_testing_ms + }; + if time_ms_since_start > join_time_allowed { + return Ok(SimpleConsensusValidationResult::new_with_error(ConsensusError::StateError(StateError::DocumentContestNotJoinableError( + DocumentContestNotJoinableError::new( + contested_document_resource_vote_poll.into(), + stored_info.clone(), + start_block.time_ms, + block_info.time_ms, + join_time_allowed, + ))))) + } + + // we need to also make sure that we are not already a contestant + + let (maybe_existing_contender, fee_result) = fetch_contender(platform.drive, contested_document_resource_vote_poll, owner_id, block_info, transaction, platform_version)?; + + execution_context.add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); + + if maybe_existing_contender.is_some() { + Ok(SimpleConsensusValidationResult::new_with_error(ConsensusError::StateError(StateError::DocumentContestIdentityAlreadyContestantError(DocumentContestIdentityAlreadyContestantError::new(contested_document_resource_vote_poll.into(), owner_id))))) + } else { + Ok(SimpleConsensusValidationResult::new()) + } + } + } + } else { + Ok(SimpleConsensusValidationResult::new()) + } + } else { + Ok(SimpleConsensusValidationResult::new()) + } + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/dpns/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/dpns/v0/mod.rs index ed384955e76..a790d727bd8 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/dpns/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/dpns/v0/mod.rs @@ -413,7 +413,10 @@ pub(super) fn create_domain_data_trigger_v0( "expecting action to have a base", )))? .id(), - "preorderDocument was not found".to_string(), + format!( + "preorderDocument was not found with a salted domain hash of {}", + hex::encode(salted_domain_hash) + ), ); result.add_error(err) } diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/is_allowed/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/is_allowed/v0/mod.rs index 4f0681b7efa..a98801ee70b 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/is_allowed/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/is_allowed/v0/mod.rs @@ -7,7 +7,11 @@ use dpp::state_transition::documents_batch_transition::document_create_transitio use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; use dpp::validation::ConsensusValidationResult; -pub const TARGET_EPOCH_INDEX: EpochIndex = 3; +// TARGET_EPOCH_INDEX was introduced without versioning. +// All Evonodes that have not upgraded to version 1.3 by Epoch 3 will chain stall. +// +// This value was previously 3 before version 1.3 +pub const TARGET_EPOCH_INDEX: EpochIndex = 4; #[inline(always)] pub fn validate_is_allowed_v0( diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/mod.rs index 485ca90372c..eaa0f93bcc2 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/mod.rs @@ -298,11 +298,13 @@ mod tests { use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::platform_types::state_transitions_processing_result::StateTransitionExecutionResult::PaidConsensusError; use crate::test::helpers::fast_forward_to_block::fast_forward_to_block; + use dpp::consensus::state::state_error::StateError; #[test] fn test_document_creation() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -384,10 +386,162 @@ mod tests { .expect("expected to commit transaction"); } + #[test] + fn test_document_creation_should_fail_if_reusing_entropy() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() + .build_with_mock_rpc() + .set_genesis_state(); + + let mut rng = StdRng::seed_from_u64(433); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let dashpay = platform.drive.cache.system_data_contracts.load_dashpay(); + let dashpay_contract = dashpay.clone(); + + let profile = dashpay_contract + .document_type_for_name("profile") + .expect("expected a profile document type"); + + assert!(profile.documents_mutable()); + + let entropy = Bytes32::random_with_rng(&mut rng); + + let mut document = profile + .random_document_with_identifier_and_entropy( + &mut rng, + identity.id(), + entropy, + DocumentFieldFillType::FillIfNotRequired, + DocumentFieldFillSize::AnyDocumentFillSize, + platform_version, + ) + .expect("expected a random document"); + + document.set("avatarUrl", "http://test.com/bob.jpg".into()); + + let documents_batch_create_transition = + DocumentsBatchTransition::new_document_creation_transition_from_document( + document, + profile, + entropy.0, + &key, + 2, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let documents_batch_create_serialized_transition = documents_batch_create_transition + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![documents_batch_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_matches!( + processing_result.execution_results().as_slice(), + [StateTransitionExecutionResult::SuccessfulExecution(_, _)] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // Now let's create a second document with the same entropy + + let mut document = profile + .random_document_with_identifier_and_entropy( + &mut rng, + identity.id(), + entropy, + DocumentFieldFillType::FillIfNotRequired, + DocumentFieldFillSize::AnyDocumentFillSize, + platform_version, + ) + .expect("expected a random document"); + + document.set("avatarUrl", "http://test.com/coy.jpg".into()); + + let documents_batch_create_transition = + DocumentsBatchTransition::new_document_creation_transition_from_document( + document, + profile, + entropy.0, + &key, + 3, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let documents_batch_create_serialized_transition = documents_batch_create_transition + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![documents_batch_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_matches!( + processing_result.execution_results().as_slice(), + [StateTransitionExecutionResult::PaidConsensusError( + ConsensusError::StateError(StateError::DocumentAlreadyPresentError { .. }), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + } + #[test] fn test_document_creation_with_very_big_field() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -397,111 +551,571 @@ mod tests { let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); - let dashpay_contract_no_max_length = setup_contract( - &platform.drive, - "tests/supporting_files/contract/dashpay/dashpay-contract-no-max-length.json", - None, - None, - ); + let dashpay_contract_no_max_length = setup_contract( + &platform.drive, + "tests/supporting_files/contract/dashpay/dashpay-contract-no-max-length.json", + None, + None, + ); + + let dashpay_contract = dashpay_contract_no_max_length.clone(); + + let profile = dashpay_contract + .document_type_for_name("profile") + .expect("expected a profile document type"); + + assert!(profile.documents_mutable()); + + let entropy = Bytes32::random_with_rng(&mut rng); + + let mut document = profile + .random_document_with_identifier_and_entropy( + &mut rng, + identity.id(), + entropy, + DocumentFieldFillType::FillIfNotRequired, + DocumentFieldFillSize::AnyDocumentFillSize, + platform_version, + ) + .expect("expected a random document"); + + let max_field_size = platform_version.system_limits.max_field_value_size; + let avatar_size = max_field_size + 1000; + + document.set( + "avatar", + Value::Bytes( + rng.sample_iter(Standard) + .take(avatar_size as usize) + .collect(), + ), + ); + + let documents_batch_create_transition = + DocumentsBatchTransition::new_document_creation_transition_from_document( + document, + profile, + entropy.0, + &key, + 2, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let documents_batch_create_serialized_transition = documents_batch_create_transition + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![documents_batch_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + assert_eq!( + processing_result.execution_results().first().unwrap(), + &PaidConsensusError( + ConsensusError::BasicError(BasicError::DocumentFieldMaxSizeExceededError( + DocumentFieldMaxSizeExceededError::new( + "avatar".to_string(), + avatar_size as u64, + max_field_size as u64 + ) + )), + FeeResult { + storage_fee: 11556000, + processing_fee: 526140, + fee_refunds: FeeRefunds::default(), + removed_bytes_from_system: 0 + } + ) + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + } + + #[test] + fn test_document_creation_on_contested_unique_index() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() + .build_with_mock_rpc() + .set_genesis_state(); + + let mut rng = StdRng::seed_from_u64(433); + + let platform_state = platform.state.load(); + + let (identity_1, signer_1, key_1) = + setup_identity(&mut platform, 958, dash_to_credits!(0.5)); + + let (identity_2, signer_2, key_2) = + setup_identity(&mut platform, 93, dash_to_credits!(0.5)); + + let dpns = platform.drive.cache.system_data_contracts.load_dpns(); + let dpns_contract = dpns.clone(); + + let preorder = dpns_contract + .document_type_for_name("preorder") + .expect("expected a profile document type"); + + assert!(!preorder.documents_mutable()); + assert!(preorder.documents_can_be_deleted()); + assert!(!preorder.documents_transferable().is_transferable()); + + let domain = dpns_contract + .document_type_for_name("domain") + .expect("expected a profile document type"); + + assert!(!domain.documents_mutable()); + // Deletion is disabled with data trigger + assert!(domain.documents_can_be_deleted()); + assert!(domain.documents_transferable().is_transferable()); + + let entropy = Bytes32::random_with_rng(&mut rng); + + let mut preorder_document_1 = preorder + .random_document_with_identifier_and_entropy( + &mut rng, + identity_1.id(), + entropy, + DocumentFieldFillType::FillIfNotRequired, + DocumentFieldFillSize::AnyDocumentFillSize, + platform_version, + ) + .expect("expected a random document"); + + let mut preorder_document_2 = preorder + .random_document_with_identifier_and_entropy( + &mut rng, + identity_2.id(), + entropy, + DocumentFieldFillType::FillIfNotRequired, + DocumentFieldFillSize::AnyDocumentFillSize, + platform_version, + ) + .expect("expected a random document"); + + let mut document_1 = domain + .random_document_with_identifier_and_entropy( + &mut rng, + identity_1.id(), + entropy, + DocumentFieldFillType::FillIfNotRequired, + DocumentFieldFillSize::AnyDocumentFillSize, + platform_version, + ) + .expect("expected a random document"); + + let mut document_2 = domain + .random_document_with_identifier_and_entropy( + &mut rng, + identity_2.id(), + entropy, + DocumentFieldFillType::FillIfNotRequired, + DocumentFieldFillSize::AnyDocumentFillSize, + platform_version, + ) + .expect("expected a random document"); + + document_1.set("parentDomainName", "dash".into()); + document_1.set("normalizedParentDomainName", "dash".into()); + document_1.set("label", "quantum".into()); + document_1.set("normalizedLabel", "quantum".into()); + document_1.set("records.identity", document_1.owner_id().into()); + document_1.set("subdomainRules.allowSubdomains", false.into()); + + document_2.set("parentDomainName", "dash".into()); + document_2.set("normalizedParentDomainName", "dash".into()); + document_2.set("label", "quantum".into()); + document_2.set("normalizedLabel", "quantum".into()); + document_2.set("records.identity", document_2.owner_id().into()); + document_2.set("subdomainRules.allowSubdomains", false.into()); + + let salt_1: [u8; 32] = rng.gen(); + let salt_2: [u8; 32] = rng.gen(); + + let mut salted_domain_buffer_1: Vec = vec![]; + salted_domain_buffer_1.extend(salt_1); + salted_domain_buffer_1.extend("quantum.dash".as_bytes()); + + let salted_domain_hash_1 = hash_double(salted_domain_buffer_1); + + let mut salted_domain_buffer_2: Vec = vec![]; + salted_domain_buffer_2.extend(salt_2); + salted_domain_buffer_2.extend("quantum.dash".as_bytes()); + + let salted_domain_hash_2 = hash_double(salted_domain_buffer_2); + + preorder_document_1.set("saltedDomainHash", salted_domain_hash_1.into()); + preorder_document_2.set("saltedDomainHash", salted_domain_hash_2.into()); + + document_1.set("preorderSalt", salt_1.into()); + document_2.set("preorderSalt", salt_2.into()); + + let documents_batch_create_preorder_transition_1 = + DocumentsBatchTransition::new_document_creation_transition_from_document( + preorder_document_1, + preorder, + entropy.0, + &key_1, + 2, + 0, + &signer_1, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let documents_batch_create_serialized_preorder_transition_1 = + documents_batch_create_preorder_transition_1 + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + + let documents_batch_create_preorder_transition_2 = + DocumentsBatchTransition::new_document_creation_transition_from_document( + preorder_document_2, + preorder, + entropy.0, + &key_2, + 2, + 0, + &signer_2, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let documents_batch_create_serialized_preorder_transition_2 = + documents_batch_create_preorder_transition_2 + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + + let documents_batch_create_transition_1 = + DocumentsBatchTransition::new_document_creation_transition_from_document( + document_1, + domain, + entropy.0, + &key_1, + 3, + 0, + &signer_1, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let documents_batch_create_serialized_transition_1 = + documents_batch_create_transition_1 + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + + let documents_batch_create_transition_2 = + DocumentsBatchTransition::new_document_creation_transition_from_document( + document_2, + domain, + entropy.0, + &key_2, + 3, + 0, + &signer_2, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let documents_batch_create_serialized_transition_2 = + documents_batch_create_transition_2 + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![ + documents_batch_create_serialized_preorder_transition_1.clone(), + documents_batch_create_serialized_preorder_transition_2.clone(), + ], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + assert_eq!(processing_result.valid_count(), 2); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![ + documents_batch_create_serialized_transition_1.clone(), + documents_batch_create_serialized_transition_2.clone(), + ], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + assert_eq!(processing_result.valid_count(), 2); + + // Now let's run a query for the vote totals + + let config = bincode::config::standard() + .with_big_endian() + .with_no_limit(); + + let dash_encoded = bincode::encode_to_vec(Value::Text("dash".to_string()), config) + .expect("expected to encode the word dash"); + + let quantum_encoded = + bincode::encode_to_vec(Value::Text("quantum".to_string()), config) + .expect("expected to encode the word quantum"); + + let index_name = "parentNameAndLabel".to_string(); + + let query_validation_result = platform + .query_contested_resource_vote_state( + GetContestedResourceVoteStateRequest { + version: Some(get_contested_resource_vote_state_request::Version::V0( + GetContestedResourceVoteStateRequestV0 { + contract_id: dpns_contract.id().to_vec(), + document_type_name: domain.name().clone(), + index_name: index_name.clone(), + index_values: vec![dash_encoded.clone(), quantum_encoded.clone()], + result_type: ResultType::DocumentsAndVoteTally as i32, + allow_include_locked_and_abstaining_vote_tally: false, + start_at_identifier_info: None, + count: None, + prove: false, + }, + )), + }, + &platform_state, + platform_version, + ) + .expect("expected to execute query") + .into_data() + .expect("expected query to be valid"); + + let get_contested_resource_vote_state_response::Version::V0( + GetContestedResourceVoteStateResponseV0 { + metadata: _, + result, + }, + ) = query_validation_result.version.expect("expected a version"); + + let Some( + get_contested_resource_vote_state_response_v0::Result::ContestedResourceContenders( + get_contested_resource_vote_state_response_v0::ContestedResourceContenders { + contenders, + abstain_vote_tally, + lock_vote_tally, + finished_vote_info, + }, + ), + ) = result + else { + panic!("expected contenders") + }; + + assert_eq!(abstain_vote_tally, None); + + assert_eq!(lock_vote_tally, None); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + let first_contender_document = Document::from_bytes( + first_contender + .document + .as_ref() + .expect("expected a document") + .as_slice(), + domain, + platform_version, + ) + .expect("expected to get document"); + + let second_contender_document = Document::from_bytes( + second_contender + .document + .as_ref() + .expect("expected a document") + .as_slice(), + domain, + platform_version, + ) + .expect("expected to get document"); + + assert_ne!(first_contender_document, second_contender_document); + + assert_eq!(first_contender.identifier, identity_1.id().to_vec()); + + assert_eq!(second_contender.identifier, identity_2.id().to_vec()); + + assert_eq!(first_contender.vote_count, Some(0)); + + assert_eq!(second_contender.vote_count, Some(0)); + + let GetContestedResourceVoteStateResponse { version } = platform + .query_contested_resource_vote_state( + GetContestedResourceVoteStateRequest { + version: Some(get_contested_resource_vote_state_request::Version::V0( + GetContestedResourceVoteStateRequestV0 { + contract_id: dpns_contract.id().to_vec(), + document_type_name: domain.name().clone(), + index_name: "parentNameAndLabel".to_string(), + index_values: vec![dash_encoded, quantum_encoded], + result_type: ResultType::DocumentsAndVoteTally as i32, + allow_include_locked_and_abstaining_vote_tally: true, + start_at_identifier_info: None, + count: None, + prove: true, + }, + )), + }, + &platform_state, + platform_version, + ) + .expect("expected to execute query") + .into_data() + .expect("expected query to be valid"); + + let get_contested_resource_vote_state_response::Version::V0( + GetContestedResourceVoteStateResponseV0 { + metadata: _, + result, + }, + ) = version.expect("expected a version"); + + let Some(get_contested_resource_vote_state_response_v0::Result::Proof(proof)) = result + else { + panic!("expected contenders") + }; - let dashpay_contract = dashpay_contract_no_max_length.clone(); + let resolved_contested_document_vote_poll_drive_query = + ResolvedContestedDocumentVotePollDriveQuery { + vote_poll: ContestedDocumentResourceVotePollWithContractInfoAllowBorrowed { + contract: DataContractResolvedInfo::BorrowedDataContract(&dpns_contract), + document_type_name: domain.name().clone(), + index_name: index_name.clone(), + index_values: vec![ + Value::Text("dash".to_string()), + Value::Text("quantum".to_string()), + ], + }, + result_type: DocumentsAndVoteTally, + offset: None, + limit: None, + start_at: None, + allow_include_locked_and_abstaining_vote_tally: true, + }; - let profile = dashpay_contract - .document_type_for_name("profile") - .expect("expected a profile document type"); + let (_root_hash, result) = resolved_contested_document_vote_poll_drive_query + .verify_vote_poll_vote_state_proof(proof.grovedb_proof.as_ref(), platform_version) + .expect("expected to verify proof"); - assert!(profile.documents_mutable()); + let contenders = result.contenders; + assert_eq!(contenders.len(), 2); - let entropy = Bytes32::random_with_rng(&mut rng); + let first_contender = contenders.first().unwrap(); - let mut document = profile - .random_document_with_identifier_and_entropy( - &mut rng, - identity.id(), - entropy, - DocumentFieldFillType::FillIfNotRequired, - DocumentFieldFillSize::AnyDocumentFillSize, - platform_version, - ) - .expect("expected a random document"); + let second_contender = contenders.last().unwrap(); - let max_field_size = platform_version.system_limits.max_field_value_size; - let avatar_size = max_field_size + 1000; + let first_contender_document = Document::from_bytes( + first_contender + .serialized_document() + .as_ref() + .expect("expected a document") + .as_slice(), + domain, + platform_version, + ) + .expect("expected to get document"); - document.set( - "avatar", - Value::Bytes( - rng.sample_iter(Standard) - .take(avatar_size as usize) - .collect(), - ), - ); + let second_contender_document = Document::from_bytes( + second_contender + .serialized_document() + .as_ref() + .expect("expected a document") + .as_slice(), + domain, + platform_version, + ) + .expect("expected to get document"); - let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( - document, - profile, - entropy.0, - &key, - 2, - 0, - &signer, - platform_version, - None, - None, - None, - ) - .expect("expect to create documents batch transition"); + assert_ne!(first_contender_document, second_contender_document); - let documents_batch_create_serialized_transition = documents_batch_create_transition - .serialize_to_bytes() - .expect("expected documents batch serialized state transition"); + assert_eq!(first_contender.identity_id(), identity_1.id()); - let transaction = platform.drive.grove.start_transaction(); + assert_eq!(second_contender.identity_id(), identity_2.id()); - let processing_result = platform - .platform - .process_raw_state_transitions( - &vec![documents_batch_create_serialized_transition.clone()], - &platform_state, - &BlockInfo::default(), - &transaction, - platform_version, - false, - None, - ) - .expect("expected to process state transition"); - assert_eq!( - processing_result.execution_results().first().unwrap(), - &PaidConsensusError( - ConsensusError::BasicError(BasicError::DocumentFieldMaxSizeExceededError( - DocumentFieldMaxSizeExceededError::new( - "avatar".to_string(), - avatar_size as u64, - max_field_size as u64 - ) - )), - FeeResult { - storage_fee: 11556000, - processing_fee: 526140, - fee_refunds: FeeRefunds::default(), - removed_bytes_from_system: 0 - } - ) - ); + assert_eq!(first_contender.vote_tally(), Some(0)); - platform - .drive - .grove - .commit_transaction(transaction) - .unwrap() - .expect("expected to commit transaction"); + assert_eq!(second_contender.vote_tally(), Some(0)); } #[test] - fn test_document_creation_on_contested_unique_index() { + fn test_document_creation_on_contested_unique_index_should_fail_if_reusing_entropy() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -559,6 +1173,19 @@ mod tests { ) .expect("expected a random document"); + let new_entropy = Bytes32::random_with_rng(&mut rng); + + let mut preorder_document_3_on_identity_1 = preorder + .random_document_with_identifier_and_entropy( + &mut rng, + identity_1.id(), + new_entropy, //change entropy here + DocumentFieldFillType::FillIfNotRequired, + DocumentFieldFillSize::AnyDocumentFillSize, + platform_version, + ) + .expect("expected a random document"); + let mut document_1 = domain .random_document_with_identifier_and_entropy( &mut rng, @@ -581,6 +1208,17 @@ mod tests { ) .expect("expected a random document"); + let mut document_3_on_identity_1 = domain + .random_document_with_identifier_and_entropy( + &mut rng, + identity_1.id(), + entropy, //same entropy + DocumentFieldFillType::FillIfNotRequired, + DocumentFieldFillSize::AnyDocumentFillSize, + platform_version, + ) + .expect("expected a random document"); + document_1.set("parentDomainName", "dash".into()); document_1.set("normalizedParentDomainName", "dash".into()); document_1.set("label", "quantum".into()); @@ -595,8 +1233,19 @@ mod tests { document_2.set("records.identity", document_2.owner_id().into()); document_2.set("subdomainRules.allowSubdomains", false.into()); + document_3_on_identity_1.set("parentDomainName", "dash".into()); + document_3_on_identity_1.set("normalizedParentDomainName", "dash".into()); + document_3_on_identity_1.set("label", "cry".into()); + document_3_on_identity_1.set("normalizedLabel", "cry".into()); + document_3_on_identity_1.set( + "records.identity", + document_3_on_identity_1.owner_id().into(), + ); + document_3_on_identity_1.set("subdomainRules.allowSubdomains", false.into()); + let salt_1: [u8; 32] = rng.gen(); let salt_2: [u8; 32] = rng.gen(); + let salt_3: [u8; 32] = rng.gen(); let mut salted_domain_buffer_1: Vec = vec![]; salted_domain_buffer_1.extend(salt_1); @@ -610,11 +1259,19 @@ mod tests { let salted_domain_hash_2 = hash_double(salted_domain_buffer_2); + let mut salted_domain_buffer_3: Vec = vec![]; + salted_domain_buffer_3.extend(salt_3); + salted_domain_buffer_3.extend("cry.dash".as_bytes()); + + let salted_domain_hash_3 = hash_double(salted_domain_buffer_3); + preorder_document_1.set("saltedDomainHash", salted_domain_hash_1.into()); preorder_document_2.set("saltedDomainHash", salted_domain_hash_2.into()); + preorder_document_3_on_identity_1.set("saltedDomainHash", salted_domain_hash_3.into()); document_1.set("preorderSalt", salt_1.into()); document_2.set("preorderSalt", salt_2.into()); + document_3_on_identity_1.set("preorderSalt", salt_3.into()); let documents_batch_create_preorder_transition_1 = DocumentsBatchTransition::new_document_creation_transition_from_document( @@ -658,13 +1315,34 @@ mod tests { .serialize_to_bytes() .expect("expected documents batch serialized state transition"); + let documents_batch_create_preorder_transition_3 = + DocumentsBatchTransition::new_document_creation_transition_from_document( + preorder_document_3_on_identity_1, + preorder, + new_entropy.0, + &key_1, + 3, + 0, + &signer_1, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let documents_batch_create_serialized_preorder_transition_3 = + documents_batch_create_preorder_transition_3 + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + let documents_batch_create_transition_1 = DocumentsBatchTransition::new_document_creation_transition_from_document( document_1, domain, entropy.0, &key_1, - 3, + 4, 0, &signer_1, platform_version, @@ -700,6 +1378,27 @@ mod tests { .serialize_to_bytes() .expect("expected documents batch serialized state transition"); + let documents_batch_create_transition_3 = + DocumentsBatchTransition::new_document_creation_transition_from_document( + document_3_on_identity_1, + domain, + entropy.0, + &key_1, + 5, + 0, + &signer_1, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let documents_batch_create_serialized_transition_3 = + documents_batch_create_transition_3 + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + let transaction = platform.drive.grove.start_transaction(); let processing_result = platform @@ -708,6 +1407,7 @@ mod tests { &vec![ documents_batch_create_serialized_preorder_transition_1.clone(), documents_batch_create_serialized_preorder_transition_2.clone(), + documents_batch_create_serialized_preorder_transition_3.clone(), ], &platform_state, &BlockInfo::default(), @@ -725,7 +1425,7 @@ mod tests { .unwrap() .expect("expected to commit transaction"); - assert_eq!(processing_result.valid_count(), 2); + assert_eq!(processing_result.valid_count(), 3); let transaction = platform.drive.grove.start_transaction(); @@ -754,6 +1454,38 @@ mod tests { assert_eq!(processing_result.valid_count(), 2); + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![documents_batch_create_serialized_transition_3.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + assert_matches!( + processing_result.execution_results().as_slice(), + [StateTransitionExecutionResult::PaidConsensusError( + ConsensusError::StateError( + StateError::DocumentContestDocumentWithSameIdAlreadyPresentError { .. } + ), + _ + )] + ); + // Now let's run a query for the vote totals let config = bincode::config::standard() @@ -960,6 +1692,7 @@ mod tests { fn test_that_a_contested_document_can_not_be_added_to_after_a_week() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -984,10 +1717,17 @@ mod tests { ], "quantum", 10, + None, platform_version, ); - fast_forward_to_block(&platform, 500_000_000, 900, 42, 0, false); //less than a week + let max_join_time = platform_version + .dpp + .validation + .voting + .allow_other_contenders_time_testing_ms; + + fast_forward_to_block(&platform, max_join_time / 2, 900, 42, 0, false); let platform_state = platform.state.load(); @@ -1000,26 +1740,46 @@ mod tests { platform_version, ); - fast_forward_to_block(&platform, 1_000_000_000, 900, 42, 0, false); //more than a week, less than 2 weeks + let time_now = platform_version + .dpp + .validation + .voting + .allow_other_contenders_time_testing_ms + + 100; + + fast_forward_to_block(&platform, time_now, 900, 42, 0, false); //more than a week, less than 2 weeks let platform_state = platform.state.load(); // We expect this to fail + let time_started = 0; + + let extra_time_used = 3000; // add_contender_to_dpns_name_contest uses this extra time + + let expected_error_message = format!( + "Document Contest for vote_poll ContestedDocumentResourceVotePoll {{ contract_id: GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec, document_type_name: domain, index_name: parentNameAndLabel, index_values: [string dash, string quantum] }} is not joinable V0(ContestedDocumentVotePollStoredInfoV0 {{ finalized_events: [], vote_poll_status: Started(BlockInfo {{ time_ms: {}, height: 0, core_height: 0, epoch: 0 }}), locked_count: 0 }}), it started {} and it is now {}, and you can only join for {}", + time_started + extra_time_used, + time_started + extra_time_used, + time_now + extra_time_used, + max_join_time + ); + let _contender_4 = add_contender_to_dpns_name_contest( &mut platform, &platform_state, 9, "quantum", - Some("Document Contest for vote_poll ContestedDocumentResourceVotePoll { contract_id: GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec, document_type_name: domain, index_name: parentNameAndLabel, index_values: [string dash, string quantum] } is not joinable V0(ContestedDocumentVotePollStoredInfoV0 { finalized_events: [], vote_poll_status: Started(BlockInfo { time_ms: 3000, height: 0, core_height: 0, epoch: 0 }), locked_count: 0 }), it started 3000 and it is now 1000003000, and you can only join for 604800000"), // this should fail, as we are over a week + Some(expected_error_message.as_str()), // this should fail, as we are over a week platform_version, ); } #[test] - fn test_that_a_contested_document_can_not_be_added_twice_by_the_same_identity() { + fn test_that_a_contest_can_not_be_joined_twice_by_the_same_identity() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -1031,7 +1791,7 @@ mod tests { contender_1_signer, contender_1_key, _preorder_document_1, - (document_1, entropy), + (mut document_1, _entropy), ), (_contender_2, _, _, _, _), dpns_contract, @@ -1047,11 +1807,22 @@ mod tests { .document_type_for_name("domain") .expect("expected a profile document type"); + let mut rng = StdRng::seed_from_u64(89); + + let different_entropy = Bytes32::random_with_rng(&mut rng); + + document_1.set_id(Document::generate_document_id_v0( + dpns_contract.id_ref(), + document_1.owner_id_ref(), + domain.name(), + different_entropy.as_slice(), + )); + let documents_batch_create_transition_1 = DocumentsBatchTransition::new_document_creation_transition_from_document( document_1, domain, - entropy.0, + different_entropy.0, &contender_1_key, 4, 0, @@ -1108,6 +1879,7 @@ mod tests { fn test_that_a_contested_document_can_not_be_added_if_we_are_locked() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -1132,10 +1904,23 @@ mod tests { ], "quantum", 10, + None, platform_version, ); - fast_forward_to_block(&platform, 200_000_000, 900, 42, 0, false); //less than a week + fast_forward_to_block( + &platform, + platform_version + .dpp + .validation + .voting + .allow_other_contenders_time_testing_ms + / 2, + 900, + 42, + 0, + false, + ); // a time when others can join let platform_state = platform.state.load(); @@ -1144,11 +1929,17 @@ mod tests { &platform_state, 4, "quantum", - None, // this should succeed, as we are under a week + None, // this should succeed, as we are under the `platform_version.dpp.validation.voting.allow_other_contenders_time_testing_ms` platform_version, ); - fast_forward_to_block(&platform, 2_000_000_000, 900, 42, 0, false); //more than two weeks + let time_after_distribution_limit = platform_version + .dpp + .voting_versions + .default_vote_poll_time_duration_test_network_ms + + 10_000; // add 10s (3 seconds is used by create_dpns_identity_name_contest) + + fast_forward_to_block(&platform, time_after_distribution_limit, 900, 42, 0, false); // after distribution let platform_state = platform.state.load(); @@ -1156,9 +1947,10 @@ mod tests { platform .check_for_ended_vote_polls( + &platform_state, &platform_state, &BlockInfo { - time_ms: 2_000_000_000, + time_ms: time_after_distribution_limit, height: 900, core_height: 42, epoch: Default::default(), @@ -1179,12 +1971,17 @@ mod tests { // We expect this to fail + let expected_error_message = format!( + "Document Contest for vote_poll ContestedDocumentResourceVotePoll {{ contract_id: GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec, document_type_name: domain, index_name: parentNameAndLabel, index_values: [string dash, string quantum] }} is currently already locked V0(ContestedDocumentVotePollStoredInfoV0 {{ finalized_events: [ContestedDocumentVotePollStoredInfoVoteEventV0 {{ resource_vote_choices: [FinalizedResourceVoteChoicesWithVoterInfo {{ resource_vote_choice: TowardsIdentity(BjNejy4r9QAvLHpQ9Yq6yRMgNymeGZ46d48fJxJbMrfW), voters: [2oGomAQc47V9h3mkpyHUPbF74gT2AmoYKg1oSb94Rbwm:1, 4iroeiNBeBYZetCt21kW7FGyczE8WqoqzZ48YAHwyV7R:1, Cdf8V4KGHHd395x5xPJPPrzTKwmp5MqbuszSE2iMzzeP:1] }}, FinalizedResourceVoteChoicesWithVoterInfo {{ resource_vote_choice: TowardsIdentity(FiLk5pGtspYtF65PKsQq3YFr1DEiXPHTZeKjusT6DuqN), voters: [] }}, FinalizedResourceVoteChoicesWithVoterInfo {{ resource_vote_choice: TowardsIdentity(Fv8S6kTbNrRqKC7PR7XcRUoPR59bxNhhggg5mRaNN6ow), voters: [4MK8GWEWX1PturUqjZJefdE4WGrUqz1UQZnbK17ENkeA:1, 5gRudU7b4n8LYkNvhZomv6FtMrP7gvaTvRrHKfaTS22K:1, AfzQBrdwzDuTVdXrMWqQyVvXRWqPMDVjA76hViuGLh6W:1, E75wdFZB22P1uW1wJBJGPgXZuZKLotK7YmbH5wUk5msH:1, G3ZfS2v39x6FuLGnnJ1RNQyy4zn4Wb64KiGAjqj39wUu:1] }}, FinalizedResourceVoteChoicesWithVoterInfo {{ resource_vote_choice: Abstain, voters: [5Ur8tDxJnatfUd9gcVFDde7ptHydujZzJLNTxa6aMYYy:1, 93Gsg14oT9K4FLYmC7N26uS4g5b7JcM1GwGEDeJCCBPJ:1, 96eX4PTjbXRuGHuMzwXdptWFtHcboXbtevk51Jd73pP7:1, AE9xm2mbemDeMxPUzyt35Agq1axRxggVfV4DRLAZp7Qt:1, FbLyu5d7JxEsvSsujj7Wopg57Wrvz9HH3UULCusKpBnF:1, GsubMWb3LH1skUJrcxTmZ7wus1habJcbpb8su8yBVqFY:1, H9UrL7aWaxDmXhqeGMJy7LrGdT2wWb45mc7kQYsoqwuf:1, Hv88mzPZVKq2fnjoUqK56vjzkcmqRHpWE1ME4z1MXDrw:1] }}, FinalizedResourceVoteChoicesWithVoterInfo {{ resource_vote_choice: Lock, voters: [F1oA8iAoyJ8dgCAi2GSPqcNhp9xEuAqhP47yXBDw5QR:1, 2YSjsJUp74MJpm12rdn8wyPR5MY3c322pV8E8siw989u:1, 3fQrmN4PWhthUFnCFTaJqbT2PPGf7MytAyik4eY1DP8V:1, 7r7gnAiZunVLjtSd5ky4yvPpnWTFYbJuQAapg8kDCeNK:1, 86TUE89xNkBDcmshXRD198xjAvMmKecvHbwo6i83AmqA:1, 97iYr4cirPdG176kqa5nvJWT9tsnqxHmENfRnZUgM6SC:1, 99nKfYZL4spsTe9p9pPNhc1JWv9yq4CbPPMPm87a5sgn:1, BYAqFxCVwMKrw5YAQMCFQGiAF2v3YhKRm2EdGfgkYN9G:1, CGKeK3AfdZUxXF3qH9zxp5MR7Z4WvDVqMrU5wjMKqT5C:1, HRPPEX4mdoZAMkg6NLJUgDzN4pSTpiDXEAGcR5JBdiXX:1] }}], start_block: BlockInfo {{ time_ms: 3000, height: 0, core_height: 0, epoch: 0 }}, finalization_block: BlockInfo {{ time_ms: {}, height: 900, core_height: 42, epoch: 0 }}, winner: Locked }}], vote_poll_status: Locked, locked_count: 1 }}), unlocking is possible by paying 400000000000 credits", + time_after_distribution_limit + ); + let _contender_4 = add_contender_to_dpns_name_contest( &mut platform, &platform_state, 9, "quantum", - Some("Document Contest for vote_poll ContestedDocumentResourceVotePoll { contract_id: GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec, document_type_name: domain, index_name: parentNameAndLabel, index_values: [string dash, string quantum] } is currently already locked V0(ContestedDocumentVotePollStoredInfoV0 { finalized_events: [ContestedDocumentVotePollStoredInfoVoteEventV0 { resource_vote_choices: [FinalizedResourceVoteChoicesWithVoterInfo { resource_vote_choice: TowardsIdentity(BjNejy4r9QAvLHpQ9Yq6yRMgNymeGZ46d48fJxJbMrfW), voters: [2oGomAQc47V9h3mkpyHUPbF74gT2AmoYKg1oSb94Rbwm:1, 4iroeiNBeBYZetCt21kW7FGyczE8WqoqzZ48YAHwyV7R:1, Cdf8V4KGHHd395x5xPJPPrzTKwmp5MqbuszSE2iMzzeP:1] }, FinalizedResourceVoteChoicesWithVoterInfo { resource_vote_choice: TowardsIdentity(FiLk5pGtspYtF65PKsQq3YFr1DEiXPHTZeKjusT6DuqN), voters: [] }, FinalizedResourceVoteChoicesWithVoterInfo { resource_vote_choice: TowardsIdentity(Fv8S6kTbNrRqKC7PR7XcRUoPR59bxNhhggg5mRaNN6ow), voters: [4MK8GWEWX1PturUqjZJefdE4WGrUqz1UQZnbK17ENkeA:1, 5gRudU7b4n8LYkNvhZomv6FtMrP7gvaTvRrHKfaTS22K:1, AfzQBrdwzDuTVdXrMWqQyVvXRWqPMDVjA76hViuGLh6W:1, E75wdFZB22P1uW1wJBJGPgXZuZKLotK7YmbH5wUk5msH:1, G3ZfS2v39x6FuLGnnJ1RNQyy4zn4Wb64KiGAjqj39wUu:1] }, FinalizedResourceVoteChoicesWithVoterInfo { resource_vote_choice: Abstain, voters: [5Ur8tDxJnatfUd9gcVFDde7ptHydujZzJLNTxa6aMYYy:1, 93Gsg14oT9K4FLYmC7N26uS4g5b7JcM1GwGEDeJCCBPJ:1, 96eX4PTjbXRuGHuMzwXdptWFtHcboXbtevk51Jd73pP7:1, AE9xm2mbemDeMxPUzyt35Agq1axRxggVfV4DRLAZp7Qt:1, FbLyu5d7JxEsvSsujj7Wopg57Wrvz9HH3UULCusKpBnF:1, GsubMWb3LH1skUJrcxTmZ7wus1habJcbpb8su8yBVqFY:1, H9UrL7aWaxDmXhqeGMJy7LrGdT2wWb45mc7kQYsoqwuf:1, Hv88mzPZVKq2fnjoUqK56vjzkcmqRHpWE1ME4z1MXDrw:1] }, FinalizedResourceVoteChoicesWithVoterInfo { resource_vote_choice: Lock, voters: [F1oA8iAoyJ8dgCAi2GSPqcNhp9xEuAqhP47yXBDw5QR:1, 2YSjsJUp74MJpm12rdn8wyPR5MY3c322pV8E8siw989u:1, 3fQrmN4PWhthUFnCFTaJqbT2PPGf7MytAyik4eY1DP8V:1, 7r7gnAiZunVLjtSd5ky4yvPpnWTFYbJuQAapg8kDCeNK:1, 86TUE89xNkBDcmshXRD198xjAvMmKecvHbwo6i83AmqA:1, 97iYr4cirPdG176kqa5nvJWT9tsnqxHmENfRnZUgM6SC:1, 99nKfYZL4spsTe9p9pPNhc1JWv9yq4CbPPMPm87a5sgn:1, BYAqFxCVwMKrw5YAQMCFQGiAF2v3YhKRm2EdGfgkYN9G:1, CGKeK3AfdZUxXF3qH9zxp5MR7Z4WvDVqMrU5wjMKqT5C:1, HRPPEX4mdoZAMkg6NLJUgDzN4pSTpiDXEAGcR5JBdiXX:1] }], start_block: BlockInfo { time_ms: 3000, height: 0, core_height: 0, epoch: 0 }, finalization_block: BlockInfo { time_ms: 2000000000, height: 900, core_height: 42, epoch: 0 }, winner: Locked }], vote_poll_status: Locked, locked_count: 1 }), unlocking is possible by paying 400000000000 credits"), // this should fail, as it is locked + Some(expected_error_message.as_str()), // this should fail, as it is locked platform_version, ); } @@ -1193,6 +1990,7 @@ mod tests { fn test_document_creation_on_restricted_document_type_that_only_allows_contract_owner_to_create( ) { let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_initial_state_structure(); @@ -1382,6 +2180,7 @@ mod tests { fn test_document_replace_on_document_type_that_is_mutable() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -1540,6 +2339,7 @@ mod tests { ) { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -1874,6 +2674,7 @@ mod tests { fn test_document_replace_on_document_type_that_is_not_mutable() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -2216,6 +3017,7 @@ mod tests { fn test_document_replace_that_does_not_yet_exist() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -2307,6 +3109,7 @@ mod tests { fn test_double_document_replace() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -2524,6 +3327,7 @@ mod tests { fn test_double_document_replace_different_height_same_epoch() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -2786,6 +3590,7 @@ mod tests { fn test_double_document_replace_no_change_different_height_same_epoch() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -3044,6 +3849,7 @@ mod tests { fn test_double_document_replace_different_height_different_epoch() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -3310,6 +4116,7 @@ mod tests { fn test_document_delete_on_document_type_that_is_mutable_and_can_be_deleted() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -3813,6 +4620,7 @@ mod tests { fn test_document_delete_on_document_type_that_is_not_mutable_and_can_not_be_deleted() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -3960,6 +4768,7 @@ mod tests { fn test_document_delete_that_does_not_yet_exist() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -7000,6 +7809,7 @@ mod tests { fn test_dpns_contract_references_with_no_contested_unique_index() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -7448,6 +8258,7 @@ mod tests { fn test_dpns_contract_references_with_no_contested_unique_index_null_searchable_true() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/v0/fetch_documents.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/v0/fetch_documents.rs index d569e680a2c..8db9245d3f0 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/v0/fetch_documents.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/v0/fetch_documents.rs @@ -1,11 +1,11 @@ -use std::collections::btree_map::Entry; -use std::collections::BTreeMap; - use crate::error::Error; use crate::platform_types::platform::PlatformStateRef; +use dpp::block::epoch::Epoch; use dpp::consensus::basic::document::{DataContractNotPresentError, InvalidDocumentTypeError}; use dpp::consensus::basic::BasicError; use dpp::data_contract::accessors::v0::DataContractV0Getters; +use std::collections::btree_map::Entry; +use std::collections::BTreeMap; use dpp::data_contract::document_type::DocumentTypeRef; use dpp::data_contract::DataContract; @@ -20,9 +20,13 @@ use dpp::state_transition::documents_batch_transition::document_transition::{ }; use dpp::validation::ConsensusValidationResult; use dpp::version::PlatformVersion; +use drive::drive::document::query::query_contested_documents_storage::QueryContestedDocumentsOutcomeV0Methods; use drive::drive::document::query::QueryDocumentsOutcomeV0Methods; use drive::drive::Drive; use drive::grovedb::TransactionArg; +use drive::query::drive_contested_document_query::{ + DriveContestedDocumentQuery, PrimaryContestedInternalClauses, +}; use drive::query::{DriveDocumentQuery, InternalClauses, WhereClause, WhereOperator}; #[allow(dead_code)] @@ -226,3 +230,45 @@ pub(crate) fn fetch_document_with_id( Ok((Some(documents.remove(0)), fee_result)) } } + +pub(crate) fn has_contested_document_with_document_id<'a>( + drive: &Drive, + contract: &'a DataContract, + document_type: DocumentTypeRef<'a>, + document_id: Identifier, + epoch: Option<&Epoch>, + transaction: TransactionArg, + platform_version: &PlatformVersion, +) -> Result<(bool, FeeResult), Error> { + let drive_query = DriveContestedDocumentQuery { + contract, + document_type, + internal_clauses: PrimaryContestedInternalClauses { + primary_key_in_clause: None, + primary_key_equal_clause: Some(document_id), + }, + }; + + let documents_outcome = drive.query_contested_documents( + drive_query, + epoch, + false, + transaction, + Some(platform_version.protocol_version), + )?; + + let fee = documents_outcome.cost(); + let fee_result = FeeResult { + storage_fee: 0, + processing_fee: fee, + fee_refunds: Default::default(), + removed_bytes_from_system: 0, + }; + let documents = documents_outcome.documents_owned(); + + if documents.is_empty() { + Ok((false, fee_result)) + } else { + Ok((true, fee_result)) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/masternode_vote/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/masternode_vote/mod.rs index deed2aa6870..9ef53ddfb05 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/masternode_vote/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/masternode_vote/mod.rs @@ -174,6 +174,7 @@ mod tests { fn test_not_proved_contests_request() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -275,6 +276,7 @@ mod tests { fn test_proved_contests_request() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -369,6 +371,7 @@ mod tests { fn test_empty_string_start_index_value() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -502,6 +505,7 @@ mod tests { fn test_no_start_index_value() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -642,6 +646,7 @@ mod tests { fn test_existing_end_index_value() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -786,6 +791,7 @@ mod tests { fn test_non_existing_end_index_value() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -920,6 +926,7 @@ mod tests { fn test_non_existing_end_index_value_many_values() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -1018,6 +1025,7 @@ mod tests { fn test_limit() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -1169,6 +1177,7 @@ mod tests { fn test_start_at() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -1350,6 +1359,7 @@ mod tests { fn test_not_proved_vote_state_query_request_after_vote() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -1500,6 +1510,7 @@ mod tests { fn test_proved_vote_state_query_request_after_vote() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -1647,6 +1658,7 @@ mod tests { fn test_not_proved_vote_state_query_request_after_many_votes() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -1671,6 +1683,7 @@ mod tests { ], "quantum", 10, + None, platform_version, ); @@ -1902,6 +1915,7 @@ mod tests { fn test_proved_vote_state_query_request_after_many_votes() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -1926,6 +1940,7 @@ mod tests { ], "quantum", 10, + None, platform_version, ); @@ -2212,6 +2227,7 @@ mod tests { fn test_vote_state_query_request_with_no_index_values_should_return_error() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -2236,6 +2252,7 @@ mod tests { ], "quantum", 10, + None, platform_version, ); @@ -2337,6 +2354,7 @@ mod tests { fn test_vote_state_query_request_with_limit_too_high_should_return_error() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -2361,6 +2379,7 @@ mod tests { ], "quantum", 10, + None, platform_version, ); @@ -2477,6 +2496,7 @@ mod tests { fn test_vote_state_query_request_with_limit_4_should_return_4_contenders() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -2518,6 +2538,7 @@ mod tests { ], "quantum", 10, + None, platform_version, ); @@ -2637,6 +2658,7 @@ mod tests { fn test_proved_vote_state_query_request_with_limit_4_should_return_4_contenders() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -2678,6 +2700,7 @@ mod tests { ], "quantum", 10, + None, platform_version, ); @@ -3000,6 +3023,7 @@ mod tests { fn test_non_proved_contestant_votes_query_request() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -3243,6 +3267,7 @@ mod tests { fn test_proved_contestant_votes_query_request() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -3550,6 +3575,7 @@ mod tests { fn test_not_proved_identity_given_votes_query_request() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -3712,6 +3738,7 @@ mod tests { fn test_proved_identity_given_votes_query_request() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -3872,11 +3899,14 @@ mod tests { mod end_date_query { use super::*; + use crate::config::PlatformConfig; #[test] fn test_not_proved_end_date_query_request() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_config(PlatformConfig::default_mainnet()) + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -3978,6 +4008,8 @@ mod tests { fn test_proved_end_date_query_request() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_config(PlatformConfig::default_mainnet()) + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -4066,6 +4098,8 @@ mod tests { fn test_not_proved_end_date_query_multiple_contests() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_config(PlatformConfig::default_mainnet()) + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -4253,6 +4287,8 @@ mod tests { fn test_proved_end_date_query_multiple_contests() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_config(PlatformConfig::default_mainnet()) + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -4403,6 +4439,8 @@ mod tests { fn test_not_proved_end_date_query_multiple_contests_with_start_at() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_config(PlatformConfig::default_mainnet()) + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -4659,6 +4697,8 @@ mod tests { fn test_not_proved_end_date_query_multiple_contests_with_end_at() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_config(PlatformConfig::default_mainnet()) + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -4817,6 +4857,7 @@ mod tests { fn test_not_proved_end_date_query_multiple_contests_with_end_at_before_start_at() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -4971,6 +5012,8 @@ mod tests { fn test_not_proved_end_date_query_multiple_contests_with_start_at_ascending_false() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_config(PlatformConfig::default_mainnet()) + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -5142,6 +5185,8 @@ mod tests { fn test_proved_end_date_query_multiple_contests_with_start_at() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_config(PlatformConfig::default_mainnet()) + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -5511,6 +5556,7 @@ mod tests { fn test_non_proved_prefunded_specialized_balance_request_after_many_votes() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -5619,6 +5665,7 @@ mod tests { fn test_proved_prefunded_specialized_balance_request_after_many_votes() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -5726,12 +5773,25 @@ mod tests { mod document_distribution { use super::*; - use crate::execution::validation::state_transition::tests::create_dpns_contract_name_contest; + use crate::config::PlatformConfig; + use crate::execution::validation::state_transition::tests::{ + create_dpns_contract_name_contest, + create_dpns_identity_name_contest_skip_creating_identities, + setup_identity_without_adding_it, + }; + use assert_matches::assert_matches; + use dapi_grpc::platform::v0::get_contested_resource_vote_state_request::GetContestedResourceVoteStateRequestV0; + use dapi_grpc::platform::v0::{ + get_contested_resource_vote_state_request, GetContestedResourceVoteStateRequest, + }; + use dpp::dashcore::Network; + use platform_version::version::INITIAL_PROTOCOL_VERSION; #[test] fn test_document_distribution() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -5756,6 +5816,7 @@ mod tests { ], "quantum", 10, + None, platform_version, ); @@ -5830,6 +5891,7 @@ mod tests { platform .check_for_ended_vote_polls( + &platform_state, &platform_state, &block_info, Some(&transaction), @@ -5942,129 +6004,50 @@ mod tests { } #[test] - fn test_document_distribution_abstain_very_high() { + fn test_document_distribution_many_votes() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); - let platform_state = platform.state.load(); - - let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( - &mut platform, - &platform_state, - 7, - "quantum", - platform_version, - ); - - perform_votes_multi( - &mut platform, - dpns_contract.as_ref(), - vec![ - (TowardsIdentity(contender_1.id()), 50), - (TowardsIdentity(contender_2.id()), 5), - (ResourceVoteChoice::Abstain, 60), - (ResourceVoteChoice::Lock, 3), - ], - "quantum", - 10, - platform_version, - ); - - let platform_state = platform.state.load(); - - let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( - &platform, - &platform_state, - &dpns_contract, - "quantum", - None, - true, - None, - ResultType::DocumentsAndVoteTally, - platform_version, - ); - - assert_eq!(finished_vote_info, None); - - assert_eq!(contenders.len(), 2); - - let first_contender = contenders.first().unwrap(); - - let second_contender = contenders.last().unwrap(); - - assert_ne!(first_contender.document(), second_contender.document()); - - assert_eq!(first_contender.identity_id(), contender_1.id()); - - assert_eq!(second_contender.identity_id(), contender_2.id()); - - assert_eq!(first_contender.vote_tally(), Some(50)); - - assert_eq!(second_contender.vote_tally(), Some(5)); - - assert_eq!(abstaining, Some(60)); - - assert_eq!(locking, Some(3)); - - let mut platform_state = (**platform_state).clone(); - - let block_info = BlockInfo { - time_ms: 1_209_900_000, //2 weeks and 300s - height: 10000, - core_height: 42, - epoch: Default::default(), - }; - - platform_state.set_last_committed_block_info(Some( - ExtendedBlockInfoV0 { - basic_info: block_info, - app_hash: platform - .drive - .grove - .root_hash(None, &platform_version.drive.grove_version) - .unwrap() - .unwrap(), - quorum_hash: [0u8; 32], - block_id_hash: [0u8; 32], - proposer_pro_tx_hash: [0u8; 32], - signature: [0u8; 96], - round: 0, - } - .into(), - )); - - platform.state.store(Arc::new(platform_state)); + let votes = 10; //let's do this 10 times - let platform_state = platform.state.load(); + for i in 0..votes { + let platform_state = platform.state.load(); - let transaction = platform.drive.grove.start_transaction(); + let name = format!("quantum{}", (b'A' + i as u8) as char); + let (contender_1, contender_2, dpns_contract) = + create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 7 + i, + name.as_str(), + platform_version, + ); - platform - .check_for_ended_vote_polls( - &platform_state, - &block_info, - Some(&transaction), + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_1.id()), 50), + (TowardsIdentity(contender_2.id()), 5), + (ResourceVoteChoice::Abstain, 10), + (ResourceVoteChoice::Lock, 3), + ], + name.as_str(), + i * 500 + 10, + None, platform_version, - ) - .expect("expected to check for ended vote polls"); - - platform - .drive - .grove - .commit_transaction(transaction) - .unwrap() - .expect("expected to commit transaction"); + ); - // At this point the document should have been awarded to contender 1. + let platform_state = platform.state.load(); - { let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( &platform, &platform_state, &dpns_contract, - "quantum", + name.as_str(), None, true, None, @@ -6072,18 +6055,7 @@ mod tests { platform_version, ); - assert_eq!( - finished_vote_info, - Some(FinishedVoteInfo { - finished_vote_outcome: - finished_vote_info::FinishedVoteOutcome::TowardsIdentity as i32, - won_by_identity_id: Some(contender_1.id().to_vec()), - finished_at_block_height: 10000, - finished_at_core_block_height: 42, - finished_at_block_time_ms: 1209900000, - finished_at_epoch: 0 - }) - ); + assert_eq!(finished_vote_info, None); assert_eq!(contenders.len(), 2); @@ -6091,9 +6063,7 @@ mod tests { let second_contender = contenders.last().unwrap(); - assert_eq!(first_contender.document(), &None); - - assert_eq!(second_contender.document(), &None); + assert_ne!(first_contender.document(), second_contender.document()); assert_eq!(first_contender.identity_id(), contender_1.id()); @@ -6103,18 +6073,68 @@ mod tests { assert_eq!(second_contender.vote_tally(), Some(5)); - assert_eq!(abstaining, Some(60)); + assert_eq!(abstaining, Some(10)); assert_eq!(locking, Some(3)); - } - { - let (contenders, abstaining, locking, finished_vote_info) = - get_proved_vote_states( + let mut platform_state = (**platform_state).clone(); + + let block_info = BlockInfo { + time_ms: 1_209_900_000 * (i + 1), //2 weeks and 300s + height: 10000 + i, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // At this point the document should have been awarded to contender 1. + + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( &platform, &platform_state, &dpns_contract, - "quantum", + name.as_str(), None, true, None, @@ -6122,102 +6142,1358 @@ mod tests { platform_version, ); - assert_eq!( - finished_vote_info, - Some(( - ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_1.id()), - block_info - )) - ); + assert_eq!( + finished_vote_info, + Some(FinishedVoteInfo { + finished_vote_outcome: + finished_vote_info::FinishedVoteOutcome::TowardsIdentity as i32, + won_by_identity_id: Some(contender_1.id().to_vec()), + finished_at_block_height: 10000 + i, + finished_at_core_block_height: 42, + finished_at_block_time_ms: 1_209_900_000 * (i + 1), + finished_at_epoch: 0 + }) + ); - assert_eq!(contenders.len(), 2); + assert_eq!(contenders.len(), 2); - let first_contender = contenders.first().unwrap(); + let first_contender = contenders.first().unwrap(); - let second_contender = contenders.last().unwrap(); + let second_contender = contenders.last().unwrap(); - assert_eq!(first_contender.document(), &None); + assert_eq!(first_contender.document(), &None); - assert_eq!(second_contender.document(), &None); + assert_eq!(second_contender.document(), &None); - assert_eq!(first_contender.identity_id(), contender_1.id()); + assert_eq!(first_contender.identity_id(), contender_1.id()); - assert_eq!(second_contender.identity_id(), contender_2.id()); + assert_eq!(second_contender.identity_id(), contender_2.id()); - assert_eq!(first_contender.vote_tally(), Some(50)); + assert_eq!(first_contender.vote_tally(), Some(50)); - assert_eq!(second_contender.vote_tally(), Some(5)); + assert_eq!(second_contender.vote_tally(), Some(5)); - assert_eq!(abstaining, Some(60)); + assert_eq!(abstaining, Some(10)); - assert_eq!(locking, Some(3)); - } - } + assert_eq!(locking, Some(3)); + } - #[test] - fn test_document_distribution_low_votes() { - let platform_version = PlatformVersion::latest(); - let mut platform = TestPlatformBuilder::new() - .build_with_mock_rpc() - .set_genesis_state(); + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + name.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(( + ContestedDocumentVotePollWinnerInfo::WonByIdentity( + contender_1.id() + ), + block_info + )) + ); - let platform_state = platform.state.load(); + assert_eq!(contenders.len(), 2); - let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( - &mut platform, - &platform_state, - 7, - "quantum", - platform_version, - ); + let first_contender = contenders.first().unwrap(); - perform_votes_multi( - &mut platform, - dpns_contract.as_ref(), - vec![ - (TowardsIdentity(contender_1.id()), 1), - (TowardsIdentity(contender_2.id()), 1), - (ResourceVoteChoice::Abstain, 1), - (ResourceVoteChoice::Lock, 1), - ], - "quantum", - 10, - platform_version, - ); + let second_contender = contenders.last().unwrap(); - let platform_state = platform.state.load(); + assert_eq!(first_contender.document(), &None); - let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( - &platform, - &platform_state, - &dpns_contract, - "quantum", - None, - true, - None, - ResultType::DocumentsAndVoteTally, - platform_version, - ); + assert_eq!(second_contender.document(), &None); - assert_eq!(finished_vote_info, None); + assert_eq!(first_contender.identity_id(), contender_1.id()); - assert_eq!(contenders.len(), 2); + assert_eq!(second_contender.identity_id(), contender_2.id()); - let first_contender = contenders.first().unwrap(); + assert_eq!(first_contender.vote_tally(), Some(50)); - let second_contender = contenders.last().unwrap(); + assert_eq!(second_contender.vote_tally(), Some(5)); - assert_ne!(first_contender.document(), second_contender.document()); + assert_eq!(abstaining, Some(10)); - assert_eq!(first_contender.identity_id(), contender_1.id()); + assert_eq!(locking, Some(3)); + } + } + } - assert_eq!(second_contender.identity_id(), contender_2.id()); + #[test] + fn test_document_distribution_many_votes_two_contests_same_time() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() + .build_with_mock_rpc() + .set_genesis_state(); - assert_eq!(first_contender.vote_tally(), Some(1)); + let votes = 10; //let's do this 10 times - assert_eq!(second_contender.vote_tally(), Some(1)); + for i in 0..votes { + let platform_state = platform.state.load(); - assert_eq!(abstaining, Some(1)); + let name = format!("quantum{}", (b'A' + i as u8) as char); + let (contender_1, contender_2, dpns_contract) = + create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 7 + i, + name.as_str(), + platform_version, + ); + + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_1.id()), 50), + (TowardsIdentity(contender_2.id()), 5), + (ResourceVoteChoice::Abstain, 10), + (ResourceVoteChoice::Lock, 3), + ], + name.as_str(), + i * 500 + 50, + None, + platform_version, + ); + + let name2 = format!("alpha{}", (b'A' + i as u8) as char); + let (contender_3, contender_4, dpns_contract) = + create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 100007 + i, + name2.as_str(), + platform_version, + ); + + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_3.id()), 30), + (TowardsIdentity(contender_4.id()), 53), + (ResourceVoteChoice::Abstain, 2), + (ResourceVoteChoice::Lock, 5), + ], + name2.as_str(), + i * 750 + 500000, + None, + platform_version, + ); + + let platform_state = platform.state.load(); + + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + name.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), second_contender.document()); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(3)); + + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + name2.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), second_contender.document()); + + assert_eq!(first_contender.identity_id(), contender_3.id()); + + assert_eq!(second_contender.identity_id(), contender_4.id()); + + assert_eq!(first_contender.vote_tally(), Some(30)); + + assert_eq!(second_contender.vote_tally(), Some(53)); + + assert_eq!(abstaining, Some(2)); + + assert_eq!(locking, Some(5)); + + let mut platform_state = (**platform_state).clone(); + + let block_info = BlockInfo { + time_ms: 1_209_900_000 * (i + 1), //2 weeks and 300s + height: 10000 + i, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // At this point the document should have been awarded to contender 1. + + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + name.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(FinishedVoteInfo { + finished_vote_outcome: + finished_vote_info::FinishedVoteOutcome::TowardsIdentity as i32, + won_by_identity_id: Some(contender_1.id().to_vec()), + finished_at_block_height: 10000 + i, + finished_at_core_block_height: 42, + finished_at_block_time_ms: 1_209_900_000 * (i + 1), + finished_at_epoch: 0 + }) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(3)); + } + + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + name.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(( + ContestedDocumentVotePollWinnerInfo::WonByIdentity( + contender_1.id() + ), + block_info + )) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(3)); + } + + // At this point the document should have been awarded to contender 4. + + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + name2.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(FinishedVoteInfo { + finished_vote_outcome: + finished_vote_info::FinishedVoteOutcome::TowardsIdentity as i32, + won_by_identity_id: Some(contender_4.id().to_vec()), + finished_at_block_height: 10000 + i, + finished_at_core_block_height: 42, + finished_at_block_time_ms: 1_209_900_000 * (i + 1), + finished_at_epoch: 0 + }) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_3.id()); + + assert_eq!(second_contender.identity_id(), contender_4.id()); + + assert_eq!(first_contender.vote_tally(), Some(30)); + + assert_eq!(second_contender.vote_tally(), Some(53)); + + assert_eq!(abstaining, Some(2)); + + assert_eq!(locking, Some(5)); + } + + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + name2.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(( + ContestedDocumentVotePollWinnerInfo::WonByIdentity( + contender_4.id() + ), + block_info + )) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_3.id()); + + assert_eq!(second_contender.identity_id(), contender_4.id()); + + assert_eq!(first_contender.vote_tally(), Some(30)); + + assert_eq!(second_contender.vote_tally(), Some(53)); + + assert_eq!(abstaining, Some(2)); + + assert_eq!(locking, Some(5)); + } + } + } + + #[test] + fn test_document_distribution_many_votes_three_contests_same_time() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() + .build_with_mock_rpc() + .set_genesis_state(); + + let votes = 10; //let's do this 10 times + + for i in 0..votes { + let platform_state = platform.state.load(); + + let name = format!("quantum{}", (b'A' + i as u8) as char); + let (contender_1, contender_2, dpns_contract) = + create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 7 + i, + name.as_str(), + platform_version, + ); + + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_1.id()), 2), + (TowardsIdentity(contender_2.id()), 1), + (ResourceVoteChoice::Abstain, 4), + (ResourceVoteChoice::Lock, 0), + ], + name.as_str(), + i * 500 + 50, + None, + platform_version, + ); + + let name2 = format!("alpha{}", (b'A' + i as u8) as char); + let (contender_3, contender_4, dpns_contract) = + create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 100007 + i, + name2.as_str(), + platform_version, + ); + + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_3.id()), 5), + (TowardsIdentity(contender_4.id()), 6), + (ResourceVoteChoice::Abstain, 2), + (ResourceVoteChoice::Lock, 6), + ], + name2.as_str(), + i * 750 + 500000, + None, + platform_version, + ); + + let name3 = format!("beta{}", (b'A' + i as u8) as char); + let (contender_5, contender_6, dpns_contract) = + create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 200007 + i, + name3.as_str(), + platform_version, + ); + + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_5.id()), 5), + (TowardsIdentity(contender_6.id()), 6), + (ResourceVoteChoice::Abstain, 2), + (ResourceVoteChoice::Lock, 6), + ], + name3.as_str(), + i * 500 + 600000, + None, + platform_version, + ); + + let platform_state = platform.state.load(); + + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + name.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), second_contender.document()); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(2)); + + assert_eq!(second_contender.vote_tally(), Some(1)); + + assert_eq!(abstaining, Some(4)); + + assert_eq!(locking, Some(0)); + + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + name2.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), second_contender.document()); + + assert_eq!(first_contender.identity_id(), contender_3.id()); + + assert_eq!(second_contender.identity_id(), contender_4.id()); + + assert_eq!(first_contender.vote_tally(), Some(5)); + + assert_eq!(second_contender.vote_tally(), Some(6)); + + assert_eq!(abstaining, Some(2)); + + assert_eq!(locking, Some(6)); + + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + name3.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), second_contender.document()); + + assert_eq!(first_contender.identity_id(), contender_5.id()); + + assert_eq!(second_contender.identity_id(), contender_6.id()); + + assert_eq!(first_contender.vote_tally(), Some(5)); + + assert_eq!(second_contender.vote_tally(), Some(6)); + + assert_eq!(abstaining, Some(2)); + + assert_eq!(locking, Some(6)); + + let mut platform_state = (**platform_state).clone(); + + let block_info = BlockInfo { + time_ms: 1_209_900_000 * (i + 1), //2 weeks and 300s + height: 10000 + i * 2, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // At this point 1 of the 3 should not have been awarded, we are not sure which one it is though + { + // Check the first poll + let (_contenders1, _abstaining1, _locking1, finished_vote_info1) = + get_vote_states( + &platform, + &platform_state, + &dpns_contract, + name.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + // Check the second poll + let (_contenders2, _abstaining2, _locking2, finished_vote_info2) = + get_vote_states( + &platform, + &platform_state, + &dpns_contract, + name2.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + // Check the third poll + let (_contenders3, _abstaining3, _locking3, finished_vote_info3) = + get_vote_states( + &platform, + &platform_state, + &dpns_contract, + name3.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + // Now check that exactly one of the 'finished_vote_info's is None, and the other two are Some(_) + let finished_vote_infos = vec![ + finished_vote_info1.is_some(), + finished_vote_info2.is_some(), + finished_vote_info3.is_some(), + ]; + + // Count how many polls have been awarded + let awarded_count = finished_vote_infos + .iter() + .filter(|&&is_awarded| is_awarded) + .count(); + + // Assert that exactly two polls have been awarded + assert_eq!( + awarded_count, 2, + "Exactly two polls should have been awarded for event {}", + i + ); + + // Assert that exactly one poll has not been awarded + assert_eq!( + finished_vote_infos.len() - awarded_count, + 1, + "Exactly one poll should not have been awarded for event {}", + i + ); + } + + let mut platform_state = (**platform_state).clone(); + + let block_info = BlockInfo { + time_ms: 1_209_900_000 * (i + 1) + 50, //2 weeks and 350s + height: 10001 + i * 2, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // At this point the document should have been awarded to contender 1. + + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + name.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_matches!(finished_vote_info, Some(_)); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(2)); + + assert_eq!(second_contender.vote_tally(), Some(1)); + + assert_eq!(abstaining, Some(4)); + + assert_eq!(locking, Some(0)); + } + + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + name.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_matches!(finished_vote_info, Some(_)); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(2)); + + assert_eq!(second_contender.vote_tally(), Some(1)); + + assert_eq!(abstaining, Some(4)); + + assert_eq!(locking, Some(0)); + } + + // At this point the document should have been awarded to contender 4. + + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + name2.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_matches!(finished_vote_info, Some(_)); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_3.id()); + + assert_eq!(second_contender.identity_id(), contender_4.id()); + + assert_eq!(first_contender.vote_tally(), Some(5)); + + assert_eq!(second_contender.vote_tally(), Some(6)); + + assert_eq!(abstaining, Some(2)); + + assert_eq!(locking, Some(6)); + } + + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + name2.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_matches!(finished_vote_info, Some(_)); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_3.id()); + + assert_eq!(second_contender.identity_id(), contender_4.id()); + + assert_eq!(first_contender.vote_tally(), Some(5)); + + assert_eq!(second_contender.vote_tally(), Some(6)); + + assert_eq!(abstaining, Some(2)); + + assert_eq!(locking, Some(6)); + } + + // At this point the document should have been awarded to contender 6. + + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + name3.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_matches!(finished_vote_info, Some(_)); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_5.id()); + + assert_eq!(second_contender.identity_id(), contender_6.id()); + + assert_eq!(first_contender.vote_tally(), Some(5)); + + assert_eq!(second_contender.vote_tally(), Some(6)); + + assert_eq!(abstaining, Some(2)); + + assert_eq!(locking, Some(6)); + } + + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + name3.as_str(), + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_matches!(finished_vote_info, Some(_)); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_5.id()); + + assert_eq!(second_contender.identity_id(), contender_6.id()); + + assert_eq!(first_contender.vote_tally(), Some(5)); + + assert_eq!(second_contender.vote_tally(), Some(6)); + + assert_eq!(abstaining, Some(2)); + + assert_eq!(locking, Some(6)); + } + } + } + + #[test] + fn test_document_distribution_abstain_very_high() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 7, + "quantum", + platform_version, + ); + + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_1.id()), 50), + (TowardsIdentity(contender_2.id()), 5), + (ResourceVoteChoice::Abstain, 60), + (ResourceVoteChoice::Lock, 3), + ], + "quantum", + 10, + None, + platform_version, + ); + + let platform_state = platform.state.load(); + + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), second_contender.document()); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(60)); + + assert_eq!(locking, Some(3)); + + let mut platform_state = (**platform_state).clone(); + + let block_info = BlockInfo { + time_ms: 1_209_900_000, //2 weeks and 300s + height: 10000, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // At this point the document should have been awarded to contender 1. + + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(FinishedVoteInfo { + finished_vote_outcome: + finished_vote_info::FinishedVoteOutcome::TowardsIdentity as i32, + won_by_identity_id: Some(contender_1.id().to_vec()), + finished_at_block_height: 10000, + finished_at_core_block_height: 42, + finished_at_block_time_ms: 1209900000, + finished_at_epoch: 0 + }) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(60)); + + assert_eq!(locking, Some(3)); + } + + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(( + ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_1.id()), + block_info + )) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(60)); + + assert_eq!(locking, Some(3)); + } + } + + #[test] + fn test_document_distribution_low_votes() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 7, + "quantum", + platform_version, + ); + + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_1.id()), 1), + (TowardsIdentity(contender_2.id()), 1), + (ResourceVoteChoice::Abstain, 1), + (ResourceVoteChoice::Lock, 1), + ], + "quantum", + 10, + None, + platform_version, + ); + + let platform_state = platform.state.load(); + + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), second_contender.document()); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(1)); + + assert_eq!(second_contender.vote_tally(), Some(1)); + + assert_eq!(abstaining, Some(1)); assert_eq!(locking, Some(1)); @@ -6256,6 +7532,2111 @@ mod tests { platform .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // At this point the document should have been awarded to contender 1. + + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(FinishedVoteInfo { + finished_vote_outcome: + finished_vote_info::FinishedVoteOutcome::TowardsIdentity as i32, + won_by_identity_id: Some(contender_1.id().to_vec()), + finished_at_block_height: 10000, + finished_at_core_block_height: 42, + finished_at_block_time_ms: 1209900000, + finished_at_epoch: 0 + }) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(1)); + + assert_eq!(second_contender.vote_tally(), Some(1)); + + assert_eq!(abstaining, Some(1)); + + assert_eq!(locking, Some(1)); + } + + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(( + ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_1.id()), + block_info + )) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(1)); + + assert_eq!(second_contender.vote_tally(), Some(1)); + + assert_eq!(abstaining, Some(1)); + + assert_eq!(locking, Some(1)); + } + } + + #[test] + fn test_document_distribution_single_vote() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 7, + "quantum", + platform_version, + ); + + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![(TowardsIdentity(contender_1.id()), 1)], + "quantum", + 10, + None, + platform_version, + ); + + let platform_state = platform.state.load(); + + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), second_contender.document()); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(1)); + + assert_eq!(second_contender.vote_tally(), Some(0)); + + assert_eq!(abstaining, Some(0)); + + assert_eq!(locking, Some(0)); + + let mut platform_state = (**platform_state).clone(); + + let block_info = BlockInfo { + time_ms: 1_209_900_000, //2 weeks and 300s + height: 10000, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // At this point the document should have been awarded to contender 1. + + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(FinishedVoteInfo { + finished_vote_outcome: + finished_vote_info::FinishedVoteOutcome::TowardsIdentity as i32, + won_by_identity_id: Some(contender_1.id().to_vec()), + finished_at_block_height: 10000, + finished_at_core_block_height: 42, + finished_at_block_time_ms: 1209900000, + finished_at_epoch: 0 + }) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(1)); + + assert_eq!(second_contender.vote_tally(), Some(0)); + + assert_eq!(abstaining, Some(0)); + + assert_eq!(locking, Some(0)); + } + + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(( + ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_1.id()), + block_info + )) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(1)); + + assert_eq!(second_contender.vote_tally(), Some(0)); + + assert_eq!(abstaining, Some(0)); + + assert_eq!(locking, Some(0)); + } + } + + #[test] + fn test_document_distribution_no_votes() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 7, + "quantum", + platform_version, + ); + + let platform_state = platform.state.load(); + + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), second_contender.document()); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(0)); + + assert_eq!(second_contender.vote_tally(), Some(0)); + + assert_eq!(abstaining, Some(0)); + + assert_eq!(locking, Some(0)); + + let mut platform_state = (**platform_state).clone(); + + let block_info = BlockInfo { + time_ms: 1_209_900_000, //2 weeks and 300s + height: 10000, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // At this point the document should have been awarded to contender 1. + + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + false, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(FinishedVoteInfo { + finished_vote_outcome: + finished_vote_info::FinishedVoteOutcome::TowardsIdentity as i32, + won_by_identity_id: Some(contender_1.id().to_vec()), + finished_at_block_height: 10000, + finished_at_core_block_height: 42, + finished_at_block_time_ms: 1209900000, + finished_at_epoch: 0 + }) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(0)); + + assert_eq!(second_contender.vote_tally(), Some(0)); + + assert_eq!(abstaining, Some(0)); + + assert_eq!(locking, Some(0)); + } + + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(( + ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_1.id()), + block_info + )) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(0)); + + assert_eq!(second_contender.vote_tally(), Some(0)); + + assert_eq!(abstaining, Some(0)); + + assert_eq!(locking, Some(0)); + } + } + + #[test] + fn test_document_locking() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 7, + "quantum", + platform_version, + ); + + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_1.id()), 20), + (TowardsIdentity(contender_2.id()), 5), + (ResourceVoteChoice::Abstain, 10), + (ResourceVoteChoice::Lock, 60), + ], + "quantum", + 10, + None, + platform_version, + ); + + let platform_state = platform.state.load(); + + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), second_contender.document()); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(20)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(60)); + + let mut platform_state = (**platform_state).clone(); + + let block_info = BlockInfo { + time_ms: 1_209_900_000, //2 weeks and 300s + height: 10000, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // At this point the document should have been awarded to contender 1. + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(FinishedVoteInfo { + finished_vote_outcome: finished_vote_info::FinishedVoteOutcome::Locked + as i32, + won_by_identity_id: None, + finished_at_block_height: 10000, + finished_at_core_block_height: 42, + finished_at_block_time_ms: 1209900000, + finished_at_epoch: 0 + }) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(20)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(60)); + } + + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some((ContestedDocumentVotePollWinnerInfo::Locked, block_info)) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(20)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(60)); + } + } + + #[test] + fn test_new_vote_after_document_distribution() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 7, + "quantum", + platform_version, + ); + + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_1.id()), 50), + (TowardsIdentity(contender_2.id()), 5), + (ResourceVoteChoice::Abstain, 10), + (ResourceVoteChoice::Lock, 3), + ], + "quantum", + 10, + None, + platform_version, + ); + + let platform_state = platform.state.load(); + + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), second_contender.document()); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(3)); + + let mut platform_state = (**platform_state).clone(); + + let block_info = BlockInfo { + time_ms: 1_209_900_000, //2 weeks and 300s + height: 10000, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // At this point the document should have been awarded to contender 1. + + // now let's try to do another vote + + let (pro_tx_hash, _masternode, signer, voting_key) = + setup_masternode_voting_identity(&mut platform, 5000, platform_version); + + let platform_state = platform.state.load(); + + perform_vote( + &mut platform, + &platform_state, + dpns_contract.as_ref(), + TowardsIdentity(contender_1.id()), + "quantum", + &signer, + pro_tx_hash, + &voting_key, + 2, + Some("VotePoll ContestedDocumentResourceVotePoll(ContestedDocumentResourceVotePoll { contract_id: GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec, document_type_name: domain, index_name: parentNameAndLabel, index_values: [string dash, string quantum] }) not available for voting: Awarded(BjNejy4r9QAvLHpQ9Yq6yRMgNymeGZ46d48fJxJbMrfW)"), + platform_version, + ); + + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(FinishedVoteInfo { + finished_vote_outcome: + finished_vote_info::FinishedVoteOutcome::TowardsIdentity as i32, + won_by_identity_id: Some(contender_1.id().to_vec()), + finished_at_block_height: 10000, + finished_at_core_block_height: 42, + finished_at_block_time_ms: 1209900000, + finished_at_epoch: 0 + }) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(3)); + } + } + + #[test] + fn test_new_vote_after_lock() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 7, + "quantum", + platform_version, + ); + + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_1.id()), 2), + (TowardsIdentity(contender_2.id()), 5), + (ResourceVoteChoice::Abstain, 10), + (ResourceVoteChoice::Lock, 50), + ], + "quantum", + 10, + None, + platform_version, + ); + + let platform_state = platform.state.load(); + + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), second_contender.document()); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(2)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(50)); + + let mut platform_state = (**platform_state).clone(); + + let block_info = BlockInfo { + time_ms: 1_209_900_000, //2 weeks and 300s + height: 10000, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // At this point the document should have been awarded to contender 1. + + // now let's try to do another vote + + let (pro_tx_hash, _masternode, signer, voting_key) = + setup_masternode_voting_identity(&mut platform, 5000, platform_version); + + let platform_state = platform.state.load(); + + perform_vote( + &mut platform, + &platform_state, + dpns_contract.as_ref(), + TowardsIdentity(contender_1.id()), + "quantum", + &signer, + pro_tx_hash, + &voting_key, + 2, + Some("VotePoll ContestedDocumentResourceVotePoll(ContestedDocumentResourceVotePoll { contract_id: GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec, document_type_name: domain, index_name: parentNameAndLabel, index_values: [string dash, string quantum] }) not available for voting: Locked"), + platform_version, + ); + + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(FinishedVoteInfo { + finished_vote_outcome: finished_vote_info::FinishedVoteOutcome::Locked + as i32, + won_by_identity_id: None, + finished_at_block_height: 10000, + finished_at_core_block_height: 42, + finished_at_block_time_ms: 1209900000, + finished_at_epoch: 0 + }) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(2)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(50)); + } + } + + #[test] + fn test_queries_after_document_distribution() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 7, + "quantum", + platform_version, + ); + + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_1.id()), 50), + (TowardsIdentity(contender_2.id()), 5), + (ResourceVoteChoice::Abstain, 10), + (ResourceVoteChoice::Lock, 3), + ], + "quantum", + 10, + None, + platform_version, + ); + + let platform_state = platform.state.load(); + + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), second_contender.document()); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(3)); + + let mut platform_state = (**platform_state).clone(); + + let block_info = BlockInfo { + time_ms: 1_209_900_000, //2 weeks and 300s + height: 10000, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // At this point the document should have been awarded to contender 1. + + // Let's check that the contest is still seen (even though it's closed) + + let domain = dpns_contract + .document_type_for_name("domain") + .expect("expected a profile document type"); + + let index_name = "parentNameAndLabel".to_string(); + + let config = bincode::config::standard() + .with_big_endian() + .with_no_limit(); + + let dash_encoded = bincode::encode_to_vec(Value::Text("dash".to_string()), config) + .expect("expected to encode value"); + + let query_validation_result = platform + .query_contested_resources( + GetContestedResourcesRequest { + version: Some(get_contested_resources_request::Version::V0( + GetContestedResourcesRequestV0 { + contract_id: dpns_contract.id().to_vec(), + document_type_name: domain.name().clone(), + index_name: index_name.clone(), + start_index_values: vec![dash_encoded], + end_index_values: vec![], + start_at_value_info: None, + count: None, + order_ascending: true, + prove: true, + }, + )), + }, + &platform_state, + platform_version, + ) + .expect("expected to execute query") + .into_data() + .expect("expected query to be valid"); + + let get_contested_resources_response::Version::V0( + GetContestedResourcesResponseV0 { + metadata: _, + result, + }, + ) = query_validation_result.version.expect("expected a version"); + + let Some(get_contested_resources_response_v0::Result::Proof(proof)) = result else { + panic!("expected proof") + }; + + let resolved_contested_document_vote_poll_drive_query = + ResolvedVotePollsByDocumentTypeQuery { + contract: DataContractResolvedInfo::BorrowedDataContract( + dpns_contract.as_ref(), + ), + document_type_name: domain.name(), + index_name: &index_name, + start_index_values: &vec!["dash".into()], + end_index_values: &vec![], + limit: None, + order_ascending: true, + start_at_value: &None, + }; + + let (_, contests) = resolved_contested_document_vote_poll_drive_query + .verify_contests_proof(proof.grovedb_proof.as_ref(), platform_version) + .expect("expected to verify proof"); + + assert_eq!(contests.len(), 1); + + { + let (contenders, abstaining, locking, finished_info) = get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_info, + Some(( + ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_1.id()), + block_info + )) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(3)); + } + + { + let (contenders, abstaining, locking, finished_info) = get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::Documents, + platform_version, + ); + + assert_eq!(finished_info, None); + + assert_eq!(contenders.len(), 0); + + assert_eq!(abstaining, None); + + assert_eq!(locking, None); + } + + { + let (contenders, abstaining, locking, finished_info) = get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::VoteTally, + platform_version, + ); + + assert_eq!( + finished_info, + Some(( + ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_1.id()), + block_info + )) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(3)); + } + } + + #[test] + fn test_document_distribution_to_contract() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (contender_1, contender_2, dpns_contract) = create_dpns_contract_name_contest( + &mut platform, + &platform_state, + 600, + "cards", + platform_version, + ); + + perform_votes_multi( + &mut platform, + &dpns_contract, + vec![ + (TowardsIdentity(contender_1.id()), 50), + (TowardsIdentity(contender_2.id()), 5), + (ResourceVoteChoice::Abstain, 10), + (ResourceVoteChoice::Lock, 3), + ], + "cards", + 10, + None, + platform_version, + ); + + let platform_state = platform.state.load(); + + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "cards", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), second_contender.document()); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(3)); + + let mut platform_state = (**platform_state).clone(); + + let block_info = BlockInfo { + time_ms: 1_209_900_000, //2 weeks and 300s + height: 10000, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // At this point the document should have been awarded to contender 1. + + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "cards", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(FinishedVoteInfo { + finished_vote_outcome: + finished_vote_info::FinishedVoteOutcome::TowardsIdentity as i32, + won_by_identity_id: Some(contender_1.id().to_vec()), + finished_at_block_height: 10000, + finished_at_core_block_height: 42, + finished_at_block_time_ms: 1209900000, + finished_at_epoch: 0 + }) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(3)); + } + + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + "cards", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(( + ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_1.id()), + block_info + )) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(3)); + } + } + + #[test] + fn test_document_distribution_does_not_affect_other_contests() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 7, + "quantum", + platform_version, + ); + + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_1.id()), 50), + (TowardsIdentity(contender_2.id()), 5), + (ResourceVoteChoice::Abstain, 10), + (ResourceVoteChoice::Lock, 3), + ], + "quantum", + 10, + None, + platform_version, + ); + + let max_join_time = platform_version + .dpp + .validation + .voting + .allow_other_contenders_time_testing_ms; + + let platform_state = platform.state.load(); + + let mut platform_state = (**platform_state).clone(); + + let block_info = BlockInfo { + time_ms: max_join_time + 100, // Less than 2 weeks + height: 5000, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let (contender_3, contender_4, _) = create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 9, + "alpha", + platform_version, + ); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let mut platform_state = (**platform_state).clone(); + + let time_after_distribution = platform_version + .dpp + .voting_versions + .default_vote_poll_time_duration_test_network_ms + + 10_000; + + let block_info = BlockInfo { + time_ms: time_after_distribution, + height: 10000, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // At this point the quantum document should have been awarded to contender 1. + + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(FinishedVoteInfo { + finished_vote_outcome: + finished_vote_info::FinishedVoteOutcome::TowardsIdentity as i32, + won_by_identity_id: Some(contender_1.id().to_vec()), + finished_at_block_height: 10000, + finished_at_core_block_height: 42, + finished_at_block_time_ms: time_after_distribution, + finished_at_epoch: 0 + }) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(3)); + } + + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!( + finished_vote_info, + Some(( + ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_1.id()), + block_info + )) + ); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_1.id()); + + assert_eq!(second_contender.identity_id(), contender_2.id()); + + assert_eq!(first_contender.vote_tally(), Some(50)); + + assert_eq!(second_contender.vote_tally(), Some(5)); + + assert_eq!(abstaining, Some(10)); + + assert_eq!(locking, Some(3)); + } + + // At this point the alpha document should not have been awarded + + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "alpha", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), &None); + + assert_ne!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_3.id()); + + assert_eq!(second_contender.identity_id(), contender_4.id()); + + assert_eq!(first_contender.vote_tally(), Some(0)); + + assert_eq!(second_contender.vote_tally(), Some(0)); + + assert_eq!(abstaining, Some(0)); + + assert_eq!(locking, Some(0)); + } + + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + "alpha", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_ne!(first_contender.document(), &None); + + assert_ne!(second_contender.document(), &None); + + assert_eq!(first_contender.identity_id(), contender_3.id()); + + assert_eq!(second_contender.identity_id(), contender_4.id()); + + assert_eq!(first_contender.vote_tally(), Some(0)); + + assert_eq!(second_contender.vote_tally(), Some(0)); + + assert_eq!(abstaining, Some(0)); + + assert_eq!(locking, Some(0)); + } + } + + #[test] + fn test_document_distribution_fix_for_testnet_no_votes_v1() { + // There was an issue that we need to repair on testnet. + // Documents will have been deleted + // Let's verify that the fix works as intended + let platform_version = PlatformVersion::first(); + + let platform_config = PlatformConfig::default_for_network(Network::Testnet); + + let mut platform = TestPlatformBuilder::new() + .with_config(platform_config) + .with_initial_protocol_version(INITIAL_PROTOCOL_VERSION) + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 7, + "quantum", + platform_version, + ); + + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_1.id()), 50), + (TowardsIdentity(contender_2.id()), 5), + (ResourceVoteChoice::Abstain, 10), + (ResourceVoteChoice::Lock, 3), + ], + "quantum", + 10, + None, + platform_version, + ); + + let platform_state = platform.state.load(); + + let mut platform_state = (**platform_state).clone(); + + let block_info = BlockInfo { + time_ms: 1_000_000_000, // Less than 2 weeks + height: 5000, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let (_contender_3, _contender_4, _) = create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 9, + "alpha", + platform_version, + ); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let mut platform_state = (**platform_state).clone(); + + let block_info = BlockInfo { + time_ms: 1_209_900_000, //2 weeks and 300s + height: 10000, + core_height: 42, + epoch: Default::default(), + }; + + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); + + platform.state.store(Arc::new(platform_state)); + + let platform_state = platform.state.load(); + + let transaction = platform.drive.grove.start_transaction(); + + platform + .check_for_ended_vote_polls( + &platform_state, &platform_state, &block_info, Some(&transaction), @@ -6270,7 +9651,7 @@ mod tests { .unwrap() .expect("expected to commit transaction"); - // At this point the document should have been awarded to contender 1. + // At this point the quantum document should have been awarded to contender 1. { let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( @@ -6312,13 +9693,13 @@ mod tests { assert_eq!(second_contender.identity_id(), contender_2.id()); - assert_eq!(first_contender.vote_tally(), Some(1)); + assert_eq!(first_contender.vote_tally(), Some(50)); - assert_eq!(second_contender.vote_tally(), Some(1)); + assert_eq!(second_contender.vote_tally(), Some(5)); - assert_eq!(abstaining, Some(1)); + assert_eq!(abstaining, Some(10)); - assert_eq!(locking, Some(1)); + assert_eq!(locking, Some(3)); } { @@ -6357,90 +9738,76 @@ mod tests { assert_eq!(second_contender.identity_id(), contender_2.id()); - assert_eq!(first_contender.vote_tally(), Some(1)); + assert_eq!(first_contender.vote_tally(), Some(50)); - assert_eq!(second_contender.vote_tally(), Some(1)); + assert_eq!(second_contender.vote_tally(), Some(5)); - assert_eq!(abstaining, Some(1)); + assert_eq!(abstaining, Some(10)); - assert_eq!(locking, Some(1)); + assert_eq!(locking, Some(3)); } - } - - #[test] - fn test_document_distribution_single_vote() { - let platform_version = PlatformVersion::latest(); - let mut platform = TestPlatformBuilder::new() - .build_with_mock_rpc() - .set_genesis_state(); - - let platform_state = platform.state.load(); - - let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( - &mut platform, - &platform_state, - 7, - "quantum", - platform_version, - ); - - perform_votes_multi( - &mut platform, - dpns_contract.as_ref(), - vec![(TowardsIdentity(contender_1.id()), 1)], - "quantum", - 10, - platform_version, - ); - - let platform_state = platform.state.load(); - - let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( - &platform, - &platform_state, - &dpns_contract, - "quantum", - None, - true, - None, - ResultType::DocumentsAndVoteTally, - platform_version, - ); - - assert_eq!(finished_vote_info, None); - assert_eq!(contenders.len(), 2); - - let first_contender = contenders.first().unwrap(); - - let second_contender = contenders.last().unwrap(); + // At this point the alpha document should not have been awarded - assert_ne!(first_contender.document(), second_contender.document()); + { + let config = bincode::config::standard() + .with_big_endian() + .with_no_limit(); - assert_eq!(first_contender.identity_id(), contender_1.id()); + let dash_encoded = + bincode::encode_to_vec(Value::Text("dash".to_string()), config) + .expect("expected to encode the word dash"); - assert_eq!(second_contender.identity_id(), contender_2.id()); + let alpha_encoded = bincode::encode_to_vec( + Value::Text(convert_to_homograph_safe_chars("alpha")), + config, + ) + .expect("expected to encode the word quantum"); - assert_eq!(first_contender.vote_tally(), Some(1)); + let index_name = "parentNameAndLabel".to_string(); - assert_eq!(second_contender.vote_tally(), Some(0)); + let query_validation_result = platform.query_contested_resource_vote_state( + GetContestedResourceVoteStateRequest { + version: Some(get_contested_resource_vote_state_request::Version::V0( + GetContestedResourceVoteStateRequestV0 { + contract_id: dpns_contract.id().to_vec(), + document_type_name: "domain".to_string(), + index_name: index_name.clone(), + index_values: vec![dash_encoded.clone(), alpha_encoded.clone()], + result_type: ResultType::DocumentsAndVoteTally as i32, + allow_include_locked_and_abstaining_vote_tally: true, + start_at_identifier_info: None, + count: None, + prove: false, + }, + )), + }, + &platform_state, + platform_version, + ); - assert_eq!(abstaining, Some(0)); + assert_matches!( + query_validation_result, + Err(Error::Drive(drive::error::Error::GroveDB( + drive::grovedb::Error::CorruptedReferencePathKeyNotFound(_) + ))) + ) + } - assert_eq!(locking, Some(0)); + // Now that we know the error exists, let's make sure it is fixed when going to v2 let mut platform_state = (**platform_state).clone(); - let block_info = BlockInfo { - time_ms: 1_209_900_000, //2 weeks and 300s - height: 10000, + let block_info_later = BlockInfo { + time_ms: 1_409_900_000, //a bit later + height: 10050, core_height: 42, epoch: Default::default(), }; platform_state.set_last_committed_block_info(Some( ExtendedBlockInfoV0 { - basic_info: block_info, + basic_info: block_info_later, app_hash: platform .drive .grove @@ -6460,14 +9827,19 @@ mod tests { let platform_state = platform.state.load(); + let mut block_platform_state = (**platform_state).clone(); + + block_platform_state.set_current_protocol_version_in_consensus(2); + let transaction = platform.drive.grove.start_transaction(); platform .check_for_ended_vote_polls( &platform_state, + &block_platform_state, &block_info, Some(&transaction), - platform_version, + PlatformVersion::get(2).unwrap(), ) .expect("expected to check for ended vote polls"); @@ -6478,7 +9850,7 @@ mod tests { .unwrap() .expect("expected to commit transaction"); - // At this point the document should have been awarded to contender 1. + // The quantum document should still be awarded to contender 1. { let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( @@ -6520,13 +9892,13 @@ mod tests { assert_eq!(second_contender.identity_id(), contender_2.id()); - assert_eq!(first_contender.vote_tally(), Some(1)); + assert_eq!(first_contender.vote_tally(), Some(50)); - assert_eq!(second_contender.vote_tally(), Some(0)); + assert_eq!(second_contender.vote_tally(), Some(5)); - assert_eq!(abstaining, Some(0)); + assert_eq!(abstaining, Some(10)); - assert_eq!(locking, Some(0)); + assert_eq!(locking, Some(3)); } { @@ -6565,119 +9937,57 @@ mod tests { assert_eq!(second_contender.identity_id(), contender_2.id()); - assert_eq!(first_contender.vote_tally(), Some(1)); + assert_eq!(first_contender.vote_tally(), Some(50)); - assert_eq!(second_contender.vote_tally(), Some(0)); + assert_eq!(second_contender.vote_tally(), Some(5)); - assert_eq!(abstaining, Some(0)); + assert_eq!(abstaining, Some(10)); - assert_eq!(locking, Some(0)); + assert_eq!(locking, Some(3)); } - } - - #[test] - fn test_document_distribution_no_votes() { - let platform_version = PlatformVersion::latest(); - let mut platform = TestPlatformBuilder::new() - .build_with_mock_rpc() - .set_genesis_state(); - - let platform_state = platform.state.load(); - - let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( - &mut platform, - &platform_state, - 7, - "quantum", - platform_version, - ); - - let platform_state = platform.state.load(); - - let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( - &platform, - &platform_state, - &dpns_contract, - "quantum", - None, - true, - None, - ResultType::DocumentsAndVoteTally, - platform_version, - ); - - assert_eq!(finished_vote_info, None); - - assert_eq!(contenders.len(), 2); - - let first_contender = contenders.first().unwrap(); - - let second_contender = contenders.last().unwrap(); - - assert_ne!(first_contender.document(), second_contender.document()); - - assert_eq!(first_contender.identity_id(), contender_1.id()); - - assert_eq!(second_contender.identity_id(), contender_2.id()); - assert_eq!(first_contender.vote_tally(), Some(0)); - - assert_eq!(second_contender.vote_tally(), Some(0)); - - assert_eq!(abstaining, Some(0)); - - assert_eq!(locking, Some(0)); - - let mut platform_state = (**platform_state).clone(); + // The alpha document should not exist at all - let block_info = BlockInfo { - time_ms: 1_209_900_000, //2 weeks and 300s - height: 10000, - core_height: 42, - epoch: Default::default(), - }; + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "alpha", + None, + false, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); - platform_state.set_last_committed_block_info(Some( - ExtendedBlockInfoV0 { - basic_info: block_info, - app_hash: platform - .drive - .grove - .root_hash(None, &platform_version.drive.grove_version) - .unwrap() - .unwrap(), - quorum_hash: [0u8; 32], - block_id_hash: [0u8; 32], - proposer_pro_tx_hash: [0u8; 32], - signature: [0u8; 96], - round: 0, - } - .into(), - )); + assert_eq!(finished_vote_info, None); - platform.state.store(Arc::new(platform_state)); + assert_eq!(contenders.len(), 0); + } - let platform_state = platform.state.load(); + { + let (contenders, _abstaining, _locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + "alpha", + None, + false, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); - let transaction = platform.drive.grove.start_transaction(); + assert_eq!(finished_vote_info, None); - platform - .check_for_ended_vote_polls( - &platform_state, - &block_info, - Some(&transaction), - platform_version, - ) - .expect("expected to check for ended vote polls"); + assert_eq!(contenders.len(), 0); + } - platform - .drive - .grove - .commit_transaction(transaction) - .unwrap() - .expect("expected to commit transaction"); + // At this point everything should be "clean" except previously awarded contests, let's make sure they still are good - // At this point the document should have been awarded to contender 1. + // The quantum document should still be awarded to contender 1. { let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( @@ -6686,7 +9996,7 @@ mod tests { &dpns_contract, "quantum", None, - false, + true, None, ResultType::DocumentsAndVoteTally, platform_version, @@ -6719,13 +10029,13 @@ mod tests { assert_eq!(second_contender.identity_id(), contender_2.id()); - assert_eq!(first_contender.vote_tally(), Some(0)); + assert_eq!(first_contender.vote_tally(), Some(50)); - assert_eq!(second_contender.vote_tally(), Some(0)); + assert_eq!(second_contender.vote_tally(), Some(5)); - assert_eq!(abstaining, Some(0)); + assert_eq!(abstaining, Some(10)); - assert_eq!(locking, Some(0)); + assert_eq!(locking, Some(3)); } { @@ -6764,88 +10074,49 @@ mod tests { assert_eq!(second_contender.identity_id(), contender_2.id()); - assert_eq!(first_contender.vote_tally(), Some(0)); + assert_eq!(first_contender.vote_tally(), Some(50)); - assert_eq!(second_contender.vote_tally(), Some(0)); + assert_eq!(second_contender.vote_tally(), Some(5)); - assert_eq!(abstaining, Some(0)); + assert_eq!(abstaining, Some(10)); - assert_eq!(locking, Some(0)); + assert_eq!(locking, Some(3)); } - } - - #[test] - fn test_document_locking() { - let platform_version = PlatformVersion::latest(); - let mut platform = TestPlatformBuilder::new() - .build_with_mock_rpc() - .set_genesis_state(); - let platform_state = platform.state.load(); + // We keep seed 9 to use on the same identities - let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( - &mut platform, - &platform_state, - 7, - "quantum", - platform_version, - ); + let (contender_3, contender_4, _) = + create_dpns_identity_name_contest_skip_creating_identities( + &mut platform, + &platform_state, + 9, + "alpha", + Some(2), // We need a nonce offset + platform_version, + ); perform_votes_multi( &mut platform, dpns_contract.as_ref(), vec![ - (TowardsIdentity(contender_1.id()), 20), - (TowardsIdentity(contender_2.id()), 5), + (TowardsIdentity(contender_3.id()), 50), + (TowardsIdentity(contender_4.id()), 5), (ResourceVoteChoice::Abstain, 10), - (ResourceVoteChoice::Lock, 60), + (ResourceVoteChoice::Lock, 3), ], - "quantum", - 10, + "alpha", + 658, + Some(1), platform_version, ); let platform_state = platform.state.load(); - let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( - &platform, - &platform_state, - &dpns_contract, - "quantum", - None, - true, - None, - ResultType::DocumentsAndVoteTally, - platform_version, - ); - - assert_eq!(finished_vote_info, None); - - assert_eq!(contenders.len(), 2); - - let first_contender = contenders.first().unwrap(); - - let second_contender = contenders.last().unwrap(); - - assert_ne!(first_contender.document(), second_contender.document()); - - assert_eq!(first_contender.identity_id(), contender_1.id()); - - assert_eq!(second_contender.identity_id(), contender_2.id()); - - assert_eq!(first_contender.vote_tally(), Some(20)); - - assert_eq!(second_contender.vote_tally(), Some(5)); - - assert_eq!(abstaining, Some(10)); - - assert_eq!(locking, Some(60)); - let mut platform_state = (**platform_state).clone(); let block_info = BlockInfo { - time_ms: 1_209_900_000, //2 weeks and 300s - height: 10000, + time_ms: 3_000_000_000, // more than 2 weeks more + height: 5100, core_height: 42, epoch: Default::default(), }; @@ -6876,6 +10147,7 @@ mod tests { platform .check_for_ended_vote_polls( + &platform_state, &platform_state, &block_info, Some(&transaction), @@ -6890,13 +10162,14 @@ mod tests { .unwrap() .expect("expected to commit transaction"); - // At this point the document should have been awarded to contender 1. + // At this point the alpha document should have been awarded to contender 1. + { let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( &platform, &platform_state, &dpns_contract, - "quantum", + "alpha", None, true, None, @@ -6907,12 +10180,12 @@ mod tests { assert_eq!( finished_vote_info, Some(FinishedVoteInfo { - finished_vote_outcome: finished_vote_info::FinishedVoteOutcome::Locked - as i32, - won_by_identity_id: None, - finished_at_block_height: 10000, + finished_vote_outcome: + finished_vote_info::FinishedVoteOutcome::TowardsIdentity as i32, + won_by_identity_id: Some(contender_3.id().to_vec()), + finished_at_block_height: 5100, finished_at_core_block_height: 42, - finished_at_block_time_ms: 1209900000, + finished_at_block_time_ms: 3_000_000_000, finished_at_epoch: 0 }) ); @@ -6927,17 +10200,17 @@ mod tests { assert_eq!(second_contender.document(), &None); - assert_eq!(first_contender.identity_id(), contender_1.id()); + assert_eq!(first_contender.identity_id(), contender_3.id()); - assert_eq!(second_contender.identity_id(), contender_2.id()); + assert_eq!(second_contender.identity_id(), contender_4.id()); - assert_eq!(first_contender.vote_tally(), Some(20)); + assert_eq!(first_contender.vote_tally(), Some(50)); assert_eq!(second_contender.vote_tally(), Some(5)); assert_eq!(abstaining, Some(10)); - assert_eq!(locking, Some(60)); + assert_eq!(locking, Some(3)); } { @@ -6946,7 +10219,7 @@ mod tests { &platform, &platform_state, &dpns_contract, - "quantum", + "alpha", None, true, None, @@ -6956,7 +10229,10 @@ mod tests { assert_eq!( finished_vote_info, - Some((ContestedDocumentVotePollWinnerInfo::Locked, block_info)) + Some(( + ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_3.id()), + block_info + )) ); assert_eq!(contenders.len(), 2); @@ -6969,24 +10245,32 @@ mod tests { assert_eq!(second_contender.document(), &None); - assert_eq!(first_contender.identity_id(), contender_1.id()); + assert_eq!(first_contender.identity_id(), contender_3.id()); - assert_eq!(second_contender.identity_id(), contender_2.id()); + assert_eq!(second_contender.identity_id(), contender_4.id()); - assert_eq!(first_contender.vote_tally(), Some(20)); + assert_eq!(first_contender.vote_tally(), Some(50)); assert_eq!(second_contender.vote_tally(), Some(5)); assert_eq!(abstaining, Some(10)); - assert_eq!(locking, Some(60)); + assert_eq!(locking, Some(3)); } } #[test] - fn test_new_vote_after_document_distribution() { - let platform_version = PlatformVersion::latest(); + fn test_document_distribution_fix_for_testnet_with_votes_v1() { + // There was an issue that we need to repair on testnet. + // Documents will have been deleted + // Let's verify that the fix works as intended + let platform_version = PlatformVersion::first(); + + let platform_config = PlatformConfig::default_for_network(Network::Testnet); + let mut platform = TestPlatformBuilder::new() + .with_config(platform_config) + .with_initial_protocol_version(INITIAL_PROTOCOL_VERSION) .build_with_mock_rpc() .set_genesis_state(); @@ -7011,47 +10295,90 @@ mod tests { ], "quantum", 10, - platform_version, - ); - - let platform_state = platform.state.load(); - - let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( - &platform, - &platform_state, - &dpns_contract, - "quantum", - None, - true, None, - ResultType::DocumentsAndVoteTally, platform_version, ); - assert_eq!(finished_vote_info, None); + let platform_state = platform.state.load(); - assert_eq!(contenders.len(), 2); + // Jump to the future on block 5000 to reproduce testnet issue + let mut platform_state = (**platform_state).clone(); - let first_contender = contenders.first().unwrap(); + let block_info = BlockInfo { + time_ms: 1_000_000_000, // Less than 2 weeks + height: 5000, + core_height: 42, + epoch: Default::default(), + }; - let second_contender = contenders.last().unwrap(); + platform_state.set_last_committed_block_info(Some( + ExtendedBlockInfoV0 { + basic_info: block_info, + app_hash: platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .unwrap(), + quorum_hash: [0u8; 32], + block_id_hash: [0u8; 32], + proposer_pro_tx_hash: [0u8; 32], + signature: [0u8; 96], + round: 0, + } + .into(), + )); - assert_ne!(first_contender.document(), second_contender.document()); + platform.state.store(Arc::new(platform_state)); - assert_eq!(first_contender.identity_id(), contender_1.id()); + // Create the second alpha contest + let platform_state = platform.state.load(); - assert_eq!(second_contender.identity_id(), contender_2.id()); + let (contender_3, contender_4, _) = create_dpns_identity_name_contest( + &mut platform, + &platform_state, + 9, + "alpha", + platform_version, + ); - assert_eq!(first_contender.vote_tally(), Some(50)); + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_3.id()), 10), + (TowardsIdentity(contender_4.id()), 5), + (ResourceVoteChoice::Abstain, 10), + (ResourceVoteChoice::Lock, 3), + ], + "alpha", + 540500, + None, + platform_version, + ); - assert_eq!(second_contender.vote_tally(), Some(5)); + let transaction = platform.drive.grove.start_transaction(); - assert_eq!(abstaining, Some(10)); + platform + .check_for_ended_vote_polls( + &platform_state, + &platform_state, + &block_info, + Some(&transaction), + platform_version, + ) + .expect("expected to check for ended vote polls"); - assert_eq!(locking, Some(3)); + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); let mut platform_state = (**platform_state).clone(); + // We jump to the future to make sure the first (quantum) contest is finished let block_info = BlockInfo { time_ms: 1_209_900_000, //2 weeks and 300s height: 10000, @@ -7085,6 +10412,7 @@ mod tests { platform .check_for_ended_vote_polls( + &platform_state, &platform_state, &block_info, Some(&transaction), @@ -7099,28 +10427,7 @@ mod tests { .unwrap() .expect("expected to commit transaction"); - // At this point the document should have been awarded to contender 1. - - // now let's try to do another vote - - let (pro_tx_hash, _masternode, signer, voting_key) = - setup_masternode_voting_identity(&mut platform, 5000, platform_version); - - let platform_state = platform.state.load(); - - perform_vote( - &mut platform, - &platform_state, - dpns_contract.as_ref(), - TowardsIdentity(contender_1.id()), - "quantum", - &signer, - pro_tx_hash, - &voting_key, - 2, - Some("VotePoll ContestedDocumentResourceVotePoll(ContestedDocumentResourceVotePoll { contract_id: GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec, document_type_name: domain, index_name: parentNameAndLabel, index_values: [string dash, string quantum] }) not available for voting: Awarded(BjNejy4r9QAvLHpQ9Yq6yRMgNymeGZ46d48fJxJbMrfW)"), - platform_version, - ); + // At this point the quantum document should have been awarded to contender 1. { let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( @@ -7170,87 +10477,118 @@ mod tests { assert_eq!(locking, Some(3)); } - } - #[test] - fn test_new_vote_after_lock() { - let platform_version = PlatformVersion::latest(); - let mut platform = TestPlatformBuilder::new() - .build_with_mock_rpc() - .set_genesis_state(); + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); - let platform_state = platform.state.load(); + assert_eq!( + finished_vote_info, + Some(( + ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_1.id()), + block_info + )) + ); - let (contender_1, contender_2, dpns_contract) = create_dpns_identity_name_contest( - &mut platform, - &platform_state, - 7, - "quantum", - platform_version, - ); + assert_eq!(contenders.len(), 2); + + let first_contender = contenders.first().unwrap(); + + let second_contender = contenders.last().unwrap(); + + assert_eq!(first_contender.document(), &None); + + assert_eq!(second_contender.document(), &None); - perform_votes_multi( - &mut platform, - dpns_contract.as_ref(), - vec![ - (TowardsIdentity(contender_1.id()), 2), - (TowardsIdentity(contender_2.id()), 5), - (ResourceVoteChoice::Abstain, 10), - (ResourceVoteChoice::Lock, 50), - ], - "quantum", - 10, - platform_version, - ); + assert_eq!(first_contender.identity_id(), contender_1.id()); - let platform_state = platform.state.load(); + assert_eq!(second_contender.identity_id(), contender_2.id()); - let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( - &platform, - &platform_state, - &dpns_contract, - "quantum", - None, - true, - None, - ResultType::DocumentsAndVoteTally, - platform_version, - ); + assert_eq!(first_contender.vote_tally(), Some(50)); - assert_eq!(finished_vote_info, None); + assert_eq!(second_contender.vote_tally(), Some(5)); - assert_eq!(contenders.len(), 2); + assert_eq!(abstaining, Some(10)); - let first_contender = contenders.first().unwrap(); + assert_eq!(locking, Some(3)); + } - let second_contender = contenders.last().unwrap(); + // At this point the alpha document should not have been awarded - assert_ne!(first_contender.document(), second_contender.document()); + // Prove that we have a corrupted reference due to deletion of all documents + // of the same document type on the first (quantum) contest completion - assert_eq!(first_contender.identity_id(), contender_1.id()); + { + let config = bincode::config::standard() + .with_big_endian() + .with_no_limit(); - assert_eq!(second_contender.identity_id(), contender_2.id()); + let dash_encoded = + bincode::encode_to_vec(Value::Text("dash".to_string()), config) + .expect("expected to encode the word dash"); - assert_eq!(first_contender.vote_tally(), Some(2)); + let alpha_encoded = bincode::encode_to_vec( + Value::Text(convert_to_homograph_safe_chars("alpha")), + config, + ) + .expect("expected to encode the word quantum"); - assert_eq!(second_contender.vote_tally(), Some(5)); + let index_name = "parentNameAndLabel".to_string(); - assert_eq!(abstaining, Some(10)); + let query_validation_result = platform.query_contested_resource_vote_state( + GetContestedResourceVoteStateRequest { + version: Some(get_contested_resource_vote_state_request::Version::V0( + GetContestedResourceVoteStateRequestV0 { + contract_id: dpns_contract.id().to_vec(), + document_type_name: "domain".to_string(), + index_name: index_name.clone(), + index_values: vec![dash_encoded.clone(), alpha_encoded.clone()], + result_type: ResultType::DocumentsAndVoteTally as i32, + allow_include_locked_and_abstaining_vote_tally: true, + start_at_identifier_info: None, + count: None, + prove: false, + }, + )), + }, + &platform_state, + platform_version, + ); - assert_eq!(locking, Some(50)); + assert_matches!( + query_validation_result, + Err(Error::Drive(drive::error::Error::GroveDB( + drive::grovedb::Error::CorruptedReferencePathKeyNotFound(_) + ))) + ) + } + + // Now that we know the error exists, let's make sure it is fixed when going to v2 let mut platform_state = (**platform_state).clone(); - let block_info = BlockInfo { - time_ms: 1_209_900_000, //2 weeks and 300s - height: 10000, + // Jump to v2 + + let block_info_later = BlockInfo { + time_ms: 1_409_900_000, //a bit later + height: 10050, core_height: 42, epoch: Default::default(), }; platform_state.set_last_committed_block_info(Some( ExtendedBlockInfoV0 { - basic_info: block_info, + basic_info: block_info_later, app_hash: platform .drive .grove @@ -7270,14 +10608,19 @@ mod tests { let platform_state = platform.state.load(); + let mut block_platform_state = (**platform_state).clone(); + + block_platform_state.set_current_protocol_version_in_consensus(2); + let transaction = platform.drive.grove.start_transaction(); platform .check_for_ended_vote_polls( &platform_state, + &block_platform_state, &block_info, Some(&transaction), - platform_version, + PlatformVersion::get(2).unwrap(), ) .expect("expected to check for ended vote polls"); @@ -7288,28 +10631,7 @@ mod tests { .unwrap() .expect("expected to commit transaction"); - // At this point the document should have been awarded to contender 1. - - // now let's try to do another vote - - let (pro_tx_hash, _masternode, signer, voting_key) = - setup_masternode_voting_identity(&mut platform, 5000, platform_version); - - let platform_state = platform.state.load(); - - perform_vote( - &mut platform, - &platform_state, - dpns_contract.as_ref(), - TowardsIdentity(contender_1.id()), - "quantum", - &signer, - pro_tx_hash, - &voting_key, - 2, - Some("VotePoll ContestedDocumentResourceVotePoll(ContestedDocumentResourceVotePoll { contract_id: GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec, document_type_name: domain, index_name: parentNameAndLabel, index_values: [string dash, string quantum] }) not available for voting: Locked"), - platform_version, - ); + // The quantum document should still be awarded to contender 1. { let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( @@ -7327,9 +10649,9 @@ mod tests { assert_eq!( finished_vote_info, Some(FinishedVoteInfo { - finished_vote_outcome: finished_vote_info::FinishedVoteOutcome::Locked - as i32, - won_by_identity_id: None, + finished_vote_outcome: + finished_vote_info::FinishedVoteOutcome::TowardsIdentity as i32, + won_by_identity_id: Some(contender_1.id().to_vec()), finished_at_block_height: 10000, finished_at_core_block_height: 42, finished_at_block_time_ms: 1209900000, @@ -7351,88 +10673,140 @@ mod tests { assert_eq!(second_contender.identity_id(), contender_2.id()); - assert_eq!(first_contender.vote_tally(), Some(2)); + assert_eq!(first_contender.vote_tally(), Some(50)); assert_eq!(second_contender.vote_tally(), Some(5)); assert_eq!(abstaining, Some(10)); - assert_eq!(locking, Some(50)); + assert_eq!(locking, Some(3)); } - } - #[test] - fn test_document_distribution_to_contract() { - let platform_version = PlatformVersion::latest(); - let mut platform = TestPlatformBuilder::new() - .build_with_mock_rpc() - .set_genesis_state(); + { + let (contenders, abstaining, locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + "quantum", + None, + true, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); - let platform_state = platform.state.load(); + assert_eq!( + finished_vote_info, + Some(( + ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_1.id()), + block_info + )) + ); - let (contender_1, contender_2, dpns_contract) = create_dpns_contract_name_contest( - &mut platform, - &platform_state, - 600, - "cards", - platform_version, - ); + assert_eq!(contenders.len(), 2); - perform_votes_multi( - &mut platform, - &dpns_contract, - vec![ - (TowardsIdentity(contender_1.id()), 50), - (TowardsIdentity(contender_2.id()), 5), - (ResourceVoteChoice::Abstain, 10), - (ResourceVoteChoice::Lock, 3), - ], - "cards", - 10, - platform_version, - ); + let first_contender = contenders.first().unwrap(); - let platform_state = platform.state.load(); + let second_contender = contenders.last().unwrap(); - let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( - &platform, - &platform_state, - &dpns_contract, - "cards", - None, - true, - None, - ResultType::DocumentsAndVoteTally, - platform_version, - ); + assert_eq!(first_contender.document(), &None); - assert_eq!(finished_vote_info, None); + assert_eq!(second_contender.document(), &None); - assert_eq!(contenders.len(), 2); + assert_eq!(first_contender.identity_id(), contender_1.id()); - let first_contender = contenders.first().unwrap(); + assert_eq!(second_contender.identity_id(), contender_2.id()); - let second_contender = contenders.last().unwrap(); + assert_eq!(first_contender.vote_tally(), Some(50)); - assert_ne!(first_contender.document(), second_contender.document()); + assert_eq!(second_contender.vote_tally(), Some(5)); - assert_eq!(first_contender.identity_id(), contender_1.id()); + assert_eq!(abstaining, Some(10)); - assert_eq!(second_contender.identity_id(), contender_2.id()); + assert_eq!(locking, Some(3)); + } - assert_eq!(first_contender.vote_tally(), Some(50)); + // The alpha document should not exist at all - assert_eq!(second_contender.vote_tally(), Some(5)); + { + let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( + &platform, + &platform_state, + &dpns_contract, + "alpha", + None, + false, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); - assert_eq!(abstaining, Some(10)); + assert_eq!(finished_vote_info, None); - assert_eq!(locking, Some(3)); + assert_eq!(contenders.len(), 0); + } + + { + let (contenders, _abstaining, _locking, finished_vote_info) = + get_proved_vote_states( + &platform, + &platform_state, + &dpns_contract, + "alpha", + None, + false, + None, + ResultType::DocumentsAndVoteTally, + platform_version, + ); + + assert_eq!(finished_vote_info, None); + + assert_eq!(contenders.len(), 0); + } + + // At this point everything should be "clean" except previously awarded contests, let's make sure they still are good + + // We want to create the same contest to make sure that there are no + // leftovers and now logic works correctly + + // We keep seed 9 to use on the same identities + + let (contender_3, contender_4, _) = + create_dpns_identity_name_contest_skip_creating_identities( + &mut platform, + &platform_state, + 9, + "alpha", + Some(2), // We need a nonce offset + platform_version, + ); + + perform_votes_multi( + &mut platform, + dpns_contract.as_ref(), + vec![ + (TowardsIdentity(contender_3.id()), 50), + (TowardsIdentity(contender_4.id()), 5), + (ResourceVoteChoice::Abstain, 10), + (ResourceVoteChoice::Lock, 3), + ], + "alpha", + 658, + Some(1), + platform_version, + ); + + let platform_state = platform.state.load(); let mut platform_state = (**platform_state).clone(); + // Jump to the future to make sure the new alpha contest is finished + let block_info = BlockInfo { - time_ms: 1_209_900_000, //2 weeks and 300s - height: 10000, + time_ms: 3_000_000_000, // more than 2 weeks more + height: 5100, core_height: 42, epoch: Default::default(), }; @@ -7463,6 +10837,7 @@ mod tests { platform .check_for_ended_vote_polls( + &platform_state, &platform_state, &block_info, Some(&transaction), @@ -7477,14 +10852,14 @@ mod tests { .unwrap() .expect("expected to commit transaction"); - // At this point the document should have been awarded to contender 1. + // At this point the alpha document should have been awarded to contender 1. { let (contenders, abstaining, locking, finished_vote_info) = get_vote_states( &platform, &platform_state, &dpns_contract, - "cards", + "alpha", None, true, None, @@ -7497,10 +10872,10 @@ mod tests { Some(FinishedVoteInfo { finished_vote_outcome: finished_vote_info::FinishedVoteOutcome::TowardsIdentity as i32, - won_by_identity_id: Some(contender_1.id().to_vec()), - finished_at_block_height: 10000, + won_by_identity_id: Some(contender_3.id().to_vec()), + finished_at_block_height: 5100, finished_at_core_block_height: 42, - finished_at_block_time_ms: 1209900000, + finished_at_block_time_ms: 3_000_000_000, finished_at_epoch: 0 }) ); @@ -7515,9 +10890,9 @@ mod tests { assert_eq!(second_contender.document(), &None); - assert_eq!(first_contender.identity_id(), contender_1.id()); + assert_eq!(first_contender.identity_id(), contender_3.id()); - assert_eq!(second_contender.identity_id(), contender_2.id()); + assert_eq!(second_contender.identity_id(), contender_4.id()); assert_eq!(first_contender.vote_tally(), Some(50)); @@ -7534,7 +10909,7 @@ mod tests { &platform, &platform_state, &dpns_contract, - "cards", + "alpha", None, true, None, @@ -7545,7 +10920,7 @@ mod tests { assert_eq!( finished_vote_info, Some(( - ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_1.id()), + ContestedDocumentVotePollWinnerInfo::WonByIdentity(contender_3.id()), block_info )) ); @@ -7560,9 +10935,9 @@ mod tests { assert_eq!(second_contender.document(), &None); - assert_eq!(first_contender.identity_id(), contender_1.id()); + assert_eq!(first_contender.identity_id(), contender_3.id()); - assert_eq!(second_contender.identity_id(), contender_2.id()); + assert_eq!(second_contender.identity_id(), contender_4.id()); assert_eq!(first_contender.vote_tally(), Some(50)); @@ -7581,6 +10956,7 @@ mod tests { fn test_masternode_vote_again_same_vote_should_return_error() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -7632,6 +11008,7 @@ mod tests { fn test_masternode_vote_again_different_choice() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -7713,6 +11090,7 @@ mod tests { fn test_masternode_vote_again_different_choice_too_many_times() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -7824,6 +11202,7 @@ mod tests { fn test_masternode_vote_removals() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() + .with_latest_protocol_version() .build_with_mock_rpc() .set_genesis_state(); @@ -7848,6 +11227,7 @@ mod tests { ], "quantum", 10, + None, platform_version, ); @@ -7959,6 +11339,7 @@ mod tests { platform .check_for_ended_vote_polls( + &platform_state, &platform_state, &block_info, Some(&transaction), diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/mod.rs index 624f604f70e..4c091f8ad33 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/mod.rs @@ -80,7 +80,6 @@ pub(in crate::execution) mod tests { use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::DataContract; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; - use dpp::data_contract::document_type::DocumentTypeRef; use dpp::data_contract::document_type::random_document::{CreateRandomDocument, DocumentFieldFillSize, DocumentFieldFillType}; use dpp::document::{Document, DocumentV0Getters, DocumentV0Setters}; use dpp::document::serialization_traits::DocumentPlatformConversionMethodsV0; @@ -89,8 +88,7 @@ pub(in crate::execution) mod tests { use dpp::identity::accessors::IdentityGettersV0; use dpp::identity::contract_bounds::ContractBounds; use dpp::identity::hash::IdentityPublicKeyHashMethodsV0; - use dpp::identity::identity_public_key::v0::IdentityPublicKeyV0; - use dpp::platform_value::{BinaryData, Bytes32, Value}; + use dpp::platform_value::{Bytes32, Value}; use dpp::serialization::PlatformSerializable; use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; use dpp::state_transition::documents_batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; @@ -198,6 +196,49 @@ pub(in crate::execution) mod tests { (identity, signer, critical_public_key) } + pub(in crate::execution) fn setup_identity_without_adding_it( + seed: u64, + credits: Credits, + ) -> (Identity, SimpleSigner, IdentityPublicKey) { + let platform_version = PlatformVersion::latest(); + let mut signer = SimpleSigner::default(); + + let mut rng = StdRng::seed_from_u64(seed); + + let (master_key, master_private_key) = + IdentityPublicKey::random_ecdsa_master_authentication_key_with_rng( + 0, + &mut rng, + platform_version, + ) + .expect("expected to get key pair"); + + signer.add_key(master_key.clone(), master_private_key.clone()); + + let (critical_public_key, private_key) = + IdentityPublicKey::random_ecdsa_critical_level_authentication_key_with_rng( + 1, + &mut rng, + platform_version, + ) + .expect("expected to get key pair"); + + signer.add_key(critical_public_key.clone(), private_key.clone()); + + let identity: Identity = IdentityV0 { + id: Identifier::random_with_rng(&mut rng), + public_keys: BTreeMap::from([ + (0, master_key.clone()), + (1, critical_public_key.clone()), + ]), + balance: credits, + revision: 0, + } + .into(); + + (identity, signer, critical_public_key) + } + pub(in crate::execution) fn setup_identity_return_master_key( platform: &mut TempPlatform, seed: u64, @@ -429,7 +470,6 @@ pub(in crate::execution) mod tests { app_hash: None, }), epoch_info: EpochInfo::V0(EpochInfoV0::default()), - hpmn_count: 0, unsigned_withdrawal_transactions: Default::default(), block_platform_state: platform_state.clone(), proposer_results: None, @@ -622,6 +662,8 @@ pub(in crate::execution) mod tests { platform_state, rng, name, + None, + false, platform_version, ); @@ -676,6 +718,45 @@ pub(in crate::execution) mod tests { platform_state, rng, name, + None, + false, + platform_version, + ); + (identity_1_info.0, identity_2_info.0, dpns_contract) + } + + /// This can be useful if we already created the identities and we reuse the seed + pub(in crate::execution) fn create_dpns_identity_name_contest_skip_creating_identities( + platform: &mut TempPlatform, + platform_state: &PlatformState, + seed: u64, + name: &str, + nonce_offset: Option, + platform_version: &PlatformVersion, + ) -> (Identity, Identity, Arc) { + let mut rng = StdRng::seed_from_u64(seed); + + let identity_1_info = setup_identity_without_adding_it(rng.gen(), dash_to_credits!(0.5)); + + let identity_2_info = setup_identity_without_adding_it(rng.gen(), dash_to_credits!(0.5)); + + // Flip them if needed so identity 1 id is always smaller than identity 2 id + let (identity_1_info, identity_2_info) = if identity_1_info.0.id() < identity_2_info.0.id() + { + (identity_1_info, identity_2_info) + } else { + (identity_2_info, identity_1_info) + }; + + let (_, _, dpns_contract) = create_dpns_name_contest_on_identities( + platform, + &identity_1_info, + &identity_2_info, + platform_state, + rng, + name, + nonce_offset, + true, //we should also skip preorder platform_version, ); (identity_1_info.0, identity_2_info.0, dpns_contract) @@ -737,6 +818,8 @@ pub(in crate::execution) mod tests { platform_state: &PlatformState, mut rng: StdRng, name: &str, + nonce_offset: Option, + skip_preorder: bool, platform_version: &PlatformVersion, ) -> ( ((Document, Bytes32), (Document, Bytes32)), @@ -860,7 +943,7 @@ pub(in crate::execution) mod tests { preorder, entropy.0, key_1, - 2, + 2 + nonce_offset.unwrap_or_default(), 0, signer_1, platform_version, @@ -881,7 +964,7 @@ pub(in crate::execution) mod tests { preorder, entropy.0, key_2, - 2, + 2 + nonce_offset.unwrap_or_default(), 0, signer_2, platform_version, @@ -902,7 +985,7 @@ pub(in crate::execution) mod tests { domain, entropy.0, key_1, - 3, + 3 + nonce_offset.unwrap_or_default(), 0, signer_1, platform_version, @@ -922,7 +1005,7 @@ pub(in crate::execution) mod tests { domain, entropy.0, key_2, - 3, + 3 + nonce_offset.unwrap_or_default(), 0, signer_2, platform_version, @@ -936,37 +1019,51 @@ pub(in crate::execution) mod tests { .serialize_to_bytes() .expect("expected documents batch serialized state transition"); - let transaction = platform.drive.grove.start_transaction(); + if !skip_preorder { + let transaction = platform.drive.grove.start_transaction(); - let processing_result = platform - .platform - .process_raw_state_transitions( - &vec![ - documents_batch_create_serialized_preorder_transition_1.clone(), - documents_batch_create_serialized_preorder_transition_2.clone(), - ], - platform_state, - &BlockInfo::default_with_time( - platform_state - .last_committed_block_time_ms() - .unwrap_or_default() - + 3000, - ), - &transaction, - platform_version, - false, - None, - ) - .expect("expected to process state transition"); + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![ + documents_batch_create_serialized_preorder_transition_1.clone(), + documents_batch_create_serialized_preorder_transition_2.clone(), + ], + platform_state, + &BlockInfo::default_with_time( + platform_state + .last_committed_block_time_ms() + .unwrap_or_default() + + 3000, + ), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); - platform - .drive - .grove - .commit_transaction(transaction) - .unwrap() - .expect("expected to commit transaction"); + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let successful_count = processing_result + .execution_results() + .iter() + .filter(|result| { + assert_matches!( + result, + StateTransitionExecutionResult::SuccessfulExecution(_, _) + ); + true + }) + .count(); - assert_eq!(processing_result.valid_count(), 2); + assert_eq!(successful_count, 2); + } let transaction = platform.drive.grove.start_transaction(); @@ -998,7 +1095,19 @@ pub(in crate::execution) mod tests { .unwrap() .expect("expected to commit transaction"); - assert_eq!(processing_result.valid_count(), 2); + let successful_count = processing_result + .execution_results() + .iter() + .filter(|result| { + assert_matches!( + result, + StateTransitionExecutionResult::SuccessfulExecution(_, _) + ); + true + }) + .count(); + + assert_eq!(successful_count, 2); ( ((preorder_document_1, entropy), (document_1, entropy)), ((preorder_document_2, entropy), (document_2, entropy)), @@ -1765,6 +1874,7 @@ pub(in crate::execution) mod tests { name: &str, count: u64, start_seed: u64, + nonce_offset: Option, platform_version: &PlatformVersion, ) -> Vec<(Identifier, Identity, SimpleSigner, IdentityPublicKey)> { let mut masternode_infos = vec![]; @@ -1783,7 +1893,7 @@ pub(in crate::execution) mod tests { &signer, pro_tx_hash_bytes, &voting_key, - 1, + 1 + nonce_offset.unwrap_or_default(), None, platform_version, ); @@ -1799,6 +1909,7 @@ pub(in crate::execution) mod tests { resource_vote_choices: Vec<(ResourceVoteChoice, u64)>, name: &str, start_seed: u64, + nonce_offset: Option, platform_version: &PlatformVersion, ) -> BTreeMap> { @@ -1812,6 +1923,7 @@ pub(in crate::execution) mod tests { name, count, count_aggregate, + nonce_offset, platform_version, ); masternodes_by_vote_choice.insert(resource_vote_choice, masternode_infos); @@ -1851,7 +1963,7 @@ pub(in crate::execution) mod tests { let dash_encoded = bincode::encode_to_vec(Value::Text("dash".to_string()), config) .expect("expected to encode the word dash"); - let quantum_encoded = + let name_encoded = bincode::encode_to_vec(Value::Text(convert_to_homograph_safe_chars(name)), config) .expect("expected to encode the word quantum"); @@ -1865,7 +1977,7 @@ pub(in crate::execution) mod tests { contract_id: dpns_contract.id().to_vec(), document_type_name: domain.name().clone(), index_name: index_name.clone(), - index_values: vec![dash_encoded.clone(), quantum_encoded.clone()], + index_values: vec![dash_encoded.clone(), name_encoded.clone()], result_type: result_type as i32, allow_include_locked_and_abstaining_vote_tally, start_at_identifier_info, diff --git a/packages/rs-drive-abci/src/main.rs b/packages/rs-drive-abci/src/main.rs index fee28d30861..aab50e3e068 100644 --- a/packages/rs-drive-abci/src/main.rs +++ b/packages/rs-drive-abci/src/main.rs @@ -123,6 +123,7 @@ impl Cli { config.db_path.clone(), Some(config.clone()), core_rpc, + None, ) .expect("Failed to open platform"); @@ -201,6 +202,12 @@ fn main() -> Result<(), ExitCode> { install_panic_hook(cancel.clone()); // Start runtime in the main thread + tracing::info!( + version = env!("CARGO_PKG_VERSION"), + features = list_enabled_features().join(","), + rust = env!("CARGO_PKG_RUST_VERSION"), + "drive-abci server initializing", + ); let runtime_guard = runtime.enter(); @@ -282,6 +289,19 @@ fn dump_config(config: &PlatformConfig) -> Result<(), String> { Ok(()) } +fn list_enabled_features() -> Vec<&'static str> { + vec![ + #[cfg(feature = "console")] + "console", + #[cfg(feature = "testing-config")] + "testing-config", + #[cfg(feature = "grovedbg")] + "grovedbg", + #[cfg(feature = "mocks")] + "mocks", + ] +} + /// Check status of ABCI server. fn check_status(config: &PlatformConfig) -> Result<(), String> { if let Some(prometheus_addr) = &config.prometheus_bind_address { diff --git a/packages/rs-drive-abci/src/platform_types/cleaned_abci_messages/request_init_chain_cleaned_params/v0/mod.rs b/packages/rs-drive-abci/src/platform_types/cleaned_abci_messages/request_init_chain_cleaned_params/v0/mod.rs index b82e36261d5..cccbfb02342 100644 --- a/packages/rs-drive-abci/src/platform_types/cleaned_abci_messages/request_init_chain_cleaned_params/v0/mod.rs +++ b/packages/rs-drive-abci/src/platform_types/cleaned_abci_messages/request_init_chain_cleaned_params/v0/mod.rs @@ -75,10 +75,12 @@ impl TryFrom for RequestInitChainCleanedParams { "consensus params are required in init chain".to_string(), ))?; - let tenderdash_abci::proto::types::VersionParams { app_version } = - consensus_params.version.ok_or(AbciError::BadRequest( - "consensus params version is required in init chain".to_string(), - ))?; + let tenderdash_abci::proto::types::VersionParams { + app_version, + consensus_version: _consensus_version, + } = consensus_params.version.ok_or(AbciError::BadRequest( + "consensus params version is required in init chain".to_string(), + ))?; Ok(Self { genesis_time, diff --git a/packages/rs-drive-abci/src/platform_types/epoch_info/mod.rs b/packages/rs-drive-abci/src/platform_types/epoch_info/mod.rs index 3fb8512a78b..8ea7c8a84ff 100644 --- a/packages/rs-drive-abci/src/platform_types/epoch_info/mod.rs +++ b/packages/rs-drive-abci/src/platform_types/epoch_info/mod.rs @@ -8,7 +8,7 @@ use crate::platform_types::epoch_info::v0::{ EpochInfoV0, EpochInfoV0Getters, EpochInfoV0Methods, EpochInfoV0Setters, }; use derive_more::From; -use dpp::block::epoch::Epoch; +use dpp::block::epoch::{Epoch, EpochIndex}; use dpp::ProtocolError; use serde::{Deserialize, Serialize}; @@ -26,7 +26,7 @@ pub mod v0; /// This means that if we ever want to update EpochInfo, we will need to do so on a release /// where the new fields of epoch info are not being used. Then make another version once /// that one is activated. -#[derive(Clone, Serialize, Deserialize, Debug, From, Eq, PartialEq)] +#[derive(Clone, Copy, Serialize, Deserialize, Debug, From, Eq, PartialEq)] #[serde(rename_all = "camelCase")] pub enum EpochInfo { /// Version 0 @@ -39,6 +39,11 @@ impl EpochInfoV0Methods for EpochInfo { EpochInfo::V0(v0) => v0.is_epoch_change_but_not_genesis(), } } + fn is_first_block_of_epoch(&self, epoch_index: EpochIndex) -> bool { + match self { + EpochInfo::V0(v0) => v0.is_first_block_of_epoch(epoch_index), + } + } } impl EpochInfoV0Getters for EpochInfo { diff --git a/packages/rs-drive-abci/src/platform_types/epoch_info/v0/mod.rs b/packages/rs-drive-abci/src/platform_types/epoch_info/v0/mod.rs index b0891428c72..a2e216dc9d7 100644 --- a/packages/rs-drive-abci/src/platform_types/epoch_info/v0/mod.rs +++ b/packages/rs-drive-abci/src/platform_types/epoch_info/v0/mod.rs @@ -1,32 +1,3 @@ -// MIT LICENSE -// -// Copyright (c) 2021 Dash Core Group -// -// Permission is hereby granted, free of charge, to any -// person obtaining a copy of this software and associated -// documentation files (the "Software"), to deal in the -// Software without restriction, including without -// limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software -// is furnished to do so, subject to the following -// conditions: -// -// The above copyright notice and this permission notice -// shall be included in all copies or substantial portions -// of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// - //! Epoch Info. //! //! This module defines and implements the `EpochInfo` struct containing @@ -37,7 +8,7 @@ use crate::error::execution::ExecutionError; use crate::error::Error; use crate::execution::types::block_state_info::v0::BlockStateInfoV0; -use dpp::block::epoch::Epoch; +use dpp::block::epoch::{Epoch, EpochIndex}; use dpp::fee::epoch::GENESIS_EPOCH_INDEX; use dpp::ProtocolError; @@ -45,7 +16,7 @@ use rust_decimal::Decimal; use serde::{Deserialize, Serialize}; /// Info pertinent to the current epoch. -#[derive(Clone, Serialize, Deserialize, Debug, Eq, PartialEq)] +#[derive(Clone, Copy, Serialize, Deserialize, Debug, Eq, PartialEq)] #[serde(rename_all = "camelCase")] pub struct EpochInfoV0 { /// Current epoch index @@ -63,6 +34,9 @@ pub struct EpochInfoV0 { pub trait EpochInfoV0Methods { /// Returns true if it's an epoch change but not the Epoch 0 on genesis fn is_epoch_change_but_not_genesis(&self) -> bool; + + /// Returns if we are the first block of a specific epoch + fn is_first_block_of_epoch(&self, epoch_index: EpochIndex) -> bool; } /// Getters for `EpochInfoV0` @@ -122,6 +96,10 @@ impl EpochInfoV0Methods for EpochInfoV0 { fn is_epoch_change_but_not_genesis(&self) -> bool { self.is_epoch_change && self.current_epoch_index != GENESIS_EPOCH_INDEX } + + fn is_first_block_of_epoch(&self, epoch_index: EpochIndex) -> bool { + self.is_epoch_change && self.current_epoch_index == epoch_index + } } impl EpochInfoV0 { diff --git a/packages/rs-drive-abci/src/platform_types/platform/mod.rs b/packages/rs-drive-abci/src/platform_types/platform/mod.rs index 20c13b0b5cd..d5d99f71b37 100644 --- a/packages/rs-drive-abci/src/platform_types/platform/mod.rs +++ b/packages/rs-drive-abci/src/platform_types/platform/mod.rs @@ -18,6 +18,7 @@ use dashcore_rpc::dashcore::BlockHash; use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::platform_types::platform_state::PlatformState; +use dpp::version::ProtocolVersion; use dpp::version::{PlatformVersion, PlatformVersionCurrentVersion}; use serde_json::json; @@ -116,7 +117,7 @@ impl Platform { "Could not setup Dash Core RPC client", )) })?; - Self::open_with_client(path, Some(config), core_rpc) + Self::open_with_client(path, Some(config), core_rpc, None) } } @@ -126,6 +127,7 @@ impl Platform { pub fn open>( path: P, config: Option, + initial_protocol_version: Option, ) -> Result, Error> { let mut core_rpc_mock = MockCoreRPCLike::new(); @@ -141,7 +143,7 @@ impl Platform { "tx": [], })) }); - Self::open_with_client(path, config, core_rpc_mock) + Self::open_with_client(path, config, core_rpc_mock, initial_protocol_version) } /// Fetch and reload the state from the backing store @@ -171,6 +173,7 @@ impl Platform { path: P, config: Option, core_rpc: C, + initial_protocol_version: Option, ) -> Result, Error> where C: CoreRPCLike, @@ -203,8 +206,8 @@ impl Platform { drive, core_rpc, config, - INITIAL_PROTOCOL_VERSION, - INITIAL_PROTOCOL_VERSION, + initial_protocol_version.unwrap_or(INITIAL_PROTOCOL_VERSION), + initial_protocol_version.unwrap_or(INITIAL_PROTOCOL_VERSION), ) } diff --git a/packages/rs-drive-abci/src/platform_types/platform_state/mod.rs b/packages/rs-drive-abci/src/platform_types/platform_state/mod.rs index 626cf365010..e937924c94d 100644 --- a/packages/rs-drive-abci/src/platform_types/platform_state/mod.rs +++ b/packages/rs-drive-abci/src/platform_types/platform_state/mod.rs @@ -283,6 +283,12 @@ impl PlatformStateV0Methods for PlatformState { } } + fn hpmn_active_list_len(&self) -> usize { + match self { + PlatformState::V0(v0) => v0.hpmn_active_list_len(), + } + } + fn current_validator_set(&self) -> Result<&ValidatorSet, Error> { match self { PlatformState::V0(v0) => v0.current_validator_set(), diff --git a/packages/rs-drive-abci/src/platform_types/platform_state/v0/mod.rs b/packages/rs-drive-abci/src/platform_types/platform_state/v0/mod.rs index 0ad2f2c179e..61bc6b8d7db 100644 --- a/packages/rs-drive-abci/src/platform_types/platform_state/v0/mod.rs +++ b/packages/rs-drive-abci/src/platform_types/platform_state/v0/mod.rs @@ -20,6 +20,7 @@ use dpp::block::extended_block_info::v0::ExtendedBlockInfoV0Getters; use dpp::version::{PlatformVersion, TryIntoPlatformVersioned}; use crate::config::PlatformConfig; +use crate::platform_types::platform_state::PlatformState; use crate::platform_types::signature_verification_quorum_set::{ SignatureVerificationQuorumSet, SignatureVerificationQuorumSetForSaving, }; @@ -453,6 +454,9 @@ pub trait PlatformStateV0Methods { fn hpmn_masternode_list_changes(&self, previous: &Self) -> MasternodeListChanges where Self: Sized; + + /// The size of the hpmn list that are currently not banned + fn hpmn_active_list_len(&self) -> usize; } impl PlatformStateV0PrivateMethods for PlatformStateV0 { @@ -565,6 +569,14 @@ impl PlatformStateV0Methods for PlatformStateV0 { self.hpmn_masternode_list.len() } + /// HPMN active list len + fn hpmn_active_list_len(&self) -> usize { + self.hpmn_masternode_list + .values() + .filter(|masternode| masternode.state.pose_ban_height.is_none()) + .count() + } + /// Get the current quorum fn current_validator_set(&self) -> Result<&ValidatorSet, Error> { self.validator_sets diff --git a/packages/rs-drive-abci/src/query/data_contract_based_queries/data_contract/v0/mod.rs b/packages/rs-drive-abci/src/query/data_contract_based_queries/data_contract/v0/mod.rs index 83b8fea5f77..493a60fe801 100644 --- a/packages/rs-drive-abci/src/query/data_contract_based_queries/data_contract/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/data_contract_based_queries/data_contract/v0/mod.rs @@ -80,7 +80,7 @@ mod tests { #[test] fn test_invalid_data_contract_id() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetDataContractRequestV0 { id: vec![0; 8], @@ -94,7 +94,7 @@ mod tests { #[test] fn test_data_contract_not_found() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let id = vec![0; 32]; let request = GetDataContractRequestV0 { @@ -114,7 +114,7 @@ mod tests { #[test] fn test_data_contract_absence_proof() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let id = vec![0; 32]; let request = GetDataContractRequestV0 { diff --git a/packages/rs-drive-abci/src/query/data_contract_based_queries/data_contract_history/v0/mod.rs b/packages/rs-drive-abci/src/query/data_contract_based_queries/data_contract_history/v0/mod.rs index 0611a3ccc10..328f2ac307f 100644 --- a/packages/rs-drive-abci/src/query/data_contract_based_queries/data_contract_history/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/data_contract_based_queries/data_contract_history/v0/mod.rs @@ -243,7 +243,7 @@ mod tests { #[test] fn test_invalid_data_contract_id() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetDataContractHistoryRequestV0 { id: vec![0; 8], @@ -262,7 +262,7 @@ mod tests { #[test] fn test_invalid_limit_overflow() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetDataContractHistoryRequestV0 { id: vec![0; 32], @@ -284,7 +284,7 @@ mod tests { #[test] fn test_invalid_offset_overflow() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetDataContractHistoryRequestV0 { id: vec![0; 32], @@ -305,7 +305,7 @@ mod tests { #[test] fn test_data_contract_not_found() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let id = vec![0; 32]; @@ -470,7 +470,7 @@ mod tests { #[test] fn test_data_contract_history_absence_proof() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetDataContractHistoryRequestV0 { id: vec![0; 32], diff --git a/packages/rs-drive-abci/src/query/data_contract_based_queries/data_contracts/v0/mod.rs b/packages/rs-drive-abci/src/query/data_contract_based_queries/data_contracts/v0/mod.rs index f1533b24736..12b52e050a7 100644 --- a/packages/rs-drive-abci/src/query/data_contract_based_queries/data_contracts/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/data_contract_based_queries/data_contracts/v0/mod.rs @@ -92,7 +92,7 @@ mod tests { #[test] fn test_invalid_data_contract_id() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetDataContractsRequestV0 { ids: vec![vec![0; 8]], @@ -108,7 +108,7 @@ mod tests { #[test] fn test_data_contracts_not_found() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let id = vec![0; 32]; let request = GetDataContractsRequestV0 { @@ -131,7 +131,7 @@ mod tests { #[test] fn test_data_contracts_absence_proof() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let id = vec![0; 32]; let request = GetDataContractsRequestV0 { diff --git a/packages/rs-drive-abci/src/query/document_query/v0/mod.rs b/packages/rs-drive-abci/src/query/document_query/v0/mod.rs index 307919493c0..8af82e39cc0 100644 --- a/packages/rs-drive-abci/src/query/document_query/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/document_query/v0/mod.rs @@ -186,7 +186,7 @@ mod tests { #[test] fn test_invalid_document_id() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetDocumentsRequestV0 { data_contract_id: vec![0; 8], @@ -207,7 +207,7 @@ mod tests { #[test] fn test_data_contract_not_found_in_documents_request() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let data_contract_id = vec![0; 32]; @@ -233,7 +233,7 @@ mod tests { #[test] fn test_absent_document_type() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let created_data_contract = get_data_contract_fixture(None, 0, version.protocol_version); store_data_contract(&platform, created_data_contract.data_contract(), version); @@ -265,7 +265,7 @@ mod tests { #[test] fn test_invalid_where_clause() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let created_data_contract = get_data_contract_fixture(None, 0, version.protocol_version); store_data_contract(&platform, created_data_contract.data_contract(), version); @@ -295,7 +295,7 @@ mod tests { #[test] fn test_invalid_order_by_clause() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let created_data_contract = get_data_contract_fixture(None, 0, version.protocol_version); store_data_contract(&platform, created_data_contract.data_contract(), version); @@ -325,7 +325,7 @@ mod tests { #[test] fn test_invalid_start_at_clause() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let created_data_contract = get_data_contract_fixture(None, 0, version.protocol_version); store_data_contract(&platform, created_data_contract.data_contract(), version); @@ -355,7 +355,7 @@ mod tests { #[test] fn test_invalid_start_after_clause() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let created_data_contract = get_data_contract_fixture(None, 0, version.protocol_version); store_data_contract(&platform, created_data_contract.data_contract(), version); @@ -385,7 +385,7 @@ mod tests { #[test] fn test_invalid_limit() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let created_data_contract = get_data_contract_fixture(None, 0, version.protocol_version); store_data_contract(&platform, created_data_contract.data_contract(), version); @@ -416,7 +416,7 @@ mod tests { #[test] fn test_documents_not_found() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let created_data_contract = get_data_contract_fixture(None, 0, version.protocol_version); store_data_contract(&platform, created_data_contract.data_contract(), version); @@ -449,7 +449,7 @@ mod tests { #[test] fn test_documents_absence_proof() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let created_data_contract = get_data_contract_fixture(None, 0, version.protocol_version); store_data_contract(&platform, created_data_contract.data_contract(), version); diff --git a/packages/rs-drive-abci/src/query/identity_based_queries/balance/v0/mod.rs b/packages/rs-drive-abci/src/query/identity_based_queries/balance/v0/mod.rs index 5f6718eb139..dfabb8560a9 100644 --- a/packages/rs-drive-abci/src/query/identity_based_queries/balance/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/identity_based_queries/balance/v0/mod.rs @@ -69,7 +69,7 @@ mod tests { #[test] fn test_invalid_identity_id() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityBalanceRequestV0 { id: vec![0; 8], @@ -85,7 +85,7 @@ mod tests { #[test] fn test_identity_not_found() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let id = vec![0; 32]; @@ -106,7 +106,7 @@ mod tests { #[test] fn test_identity_balance_absence_proof() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let id = vec![0; 32]; diff --git a/packages/rs-drive-abci/src/query/identity_based_queries/balance_and_revision/v0/mod.rs b/packages/rs-drive-abci/src/query/identity_based_queries/balance_and_revision/v0/mod.rs index d4f8233e21e..518cb472394 100644 --- a/packages/rs-drive-abci/src/query/identity_based_queries/balance_and_revision/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/identity_based_queries/balance_and_revision/v0/mod.rs @@ -88,7 +88,7 @@ mod tests { #[test] fn test_invalid_identity_id() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityBalanceAndRevisionRequestV0 { id: vec![0; 8], @@ -104,7 +104,7 @@ mod tests { #[test] fn test_identity_not_found_when_querying_balance_and_revision() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let id = vec![0; 32]; @@ -125,7 +125,7 @@ mod tests { #[test] fn test_identity_balance_and_revision_absence_proof() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let id = vec![0; 32]; diff --git a/packages/rs-drive-abci/src/query/identity_based_queries/balances/mod.rs b/packages/rs-drive-abci/src/query/identity_based_queries/balances/mod.rs new file mode 100644 index 00000000000..0e8a2604647 --- /dev/null +++ b/packages/rs-drive-abci/src/query/identity_based_queries/balances/mod.rs @@ -0,0 +1,61 @@ +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_identities_balances_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_identities_balances_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{GetIdentitiesBalancesRequest, GetIdentitiesBalancesResponse}; +use dpp::version::PlatformVersion; + +mod v0; + +impl Platform { + /// Querying of the balances of multiple identities + pub fn query_identities_balances( + &self, + GetIdentitiesBalancesRequest { version }: GetIdentitiesBalancesRequest, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let Some(version) = version else { + return Ok(QueryValidationResult::new_with_error( + QueryError::DecodingError("could not decode identity balance query".to_string()), + )); + }; + + let feature_version_bounds = &platform_version + .drive_abci + .query + .identity_based_queries + .identities_balances; + + let feature_version = match &version { + RequestVersion::V0(_) => 0, + }; + if !feature_version_bounds.check_version(feature_version) { + return Ok(QueryValidationResult::new_with_error( + QueryError::UnsupportedQueryVersion( + "identities_balances".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_identities_balances_v0( + request_v0, + platform_state, + platform_version, + )?; + + Ok(result.map(|response_v0| GetIdentitiesBalancesResponse { + version: Some(ResponseVersion::V0(response_v0)), + })) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/identity_based_queries/balances/v0/mod.rs b/packages/rs-drive-abci/src/query/identity_based_queries/balances/v0/mod.rs new file mode 100644 index 00000000000..c8d054f8889 --- /dev/null +++ b/packages/rs-drive-abci/src/query/identity_based_queries/balances/v0/mod.rs @@ -0,0 +1,76 @@ +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_identities_balances_request::GetIdentitiesBalancesRequestV0; +use dapi_grpc::platform::v0::get_identities_balances_response::{ + get_identities_balances_response_v0, GetIdentitiesBalancesResponseV0, +}; +use dpp::check_validation_result_with_data; +use dpp::identifier::Identifier; +use dpp::validation::ValidationResult; +use dpp::version::PlatformVersion; + +impl Platform { + pub(super) fn query_identities_balances_v0( + &self, + GetIdentitiesBalancesRequestV0 { ids, prove }: GetIdentitiesBalancesRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let identifiers = check_validation_result_with_data!(ids + .into_iter() + .map(|identity_id| { + let identifier: Identifier = identity_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "id must be a valid identifier (32 bytes long)".to_string(), + ) + })?; + Ok(identifier.into_buffer()) + }) + .collect::, QueryError>>()); + let response = if prove { + let proof = + check_validation_result_with_data!(self.drive.prove_many_identity_balances( + identifiers.as_slice(), + None, + &platform_version.drive + )); + + GetIdentitiesBalancesResponseV0 { + result: Some(get_identities_balances_response_v0::Result::Proof( + self.response_proof_v0(platform_state, proof), + )), + metadata: Some(self.response_metadata_v0(platform_state)), + } + } else { + let map = |(key, value): ([u8; 32], Option)| { + get_identities_balances_response_v0::IdentityBalance { + identity_id: key.to_vec(), + balance: value, + } + }; + + let identities_balances = self + .drive + .fetch_optional_identities_balances(&identifiers, None, platform_version)? + .into_iter() + .map(map) + .collect(); + + GetIdentitiesBalancesResponseV0 { + result: Some( + get_identities_balances_response_v0::Result::IdentitiesBalances( + get_identities_balances_response_v0::IdentitiesBalances { + entries: identities_balances, + }, + ), + ), + metadata: Some(self.response_metadata_v0(platform_state)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} diff --git a/packages/rs-drive-abci/src/query/identity_based_queries/identities_contract_keys/v0/mod.rs b/packages/rs-drive-abci/src/query/identity_based_queries/identities_contract_keys/v0/mod.rs index 12f840d9d93..195d3bfe5fd 100644 --- a/packages/rs-drive-abci/src/query/identity_based_queries/identities_contract_keys/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/identity_based_queries/identities_contract_keys/v0/mod.rs @@ -150,7 +150,8 @@ mod tests { #[test] fn test_identities_contract_keys_missing_identity() { - let (platform, state, platform_version) = setup_platform(Some((1, 1)), Network::Testnet); + let (platform, state, platform_version) = + setup_platform(Some((1, 1)), Network::Testnet, None); let dashpay = platform.drive.cache.system_data_contracts.load_dashpay(); @@ -180,7 +181,8 @@ mod tests { #[test] fn test_identities_contract_keys_missing_identity_proved() { - let (platform, state, platform_version) = setup_platform(Some((1, 1)), Network::Testnet); + let (platform, state, platform_version) = + setup_platform(Some((1, 1)), Network::Testnet, None); let dashpay = platform.drive.cache.system_data_contracts.load_dashpay(); @@ -231,7 +233,7 @@ mod tests { #[test] fn test_identities_contract_keys_missing_identity_absent_contract() { - let (platform, state, platform_version) = setup_platform(None, Network::Testnet); + let (platform, state, platform_version) = setup_platform(None, Network::Testnet, None); let request = GetIdentitiesContractKeysRequestV0 { identities_ids: vec![vec![1; 32]], @@ -259,7 +261,7 @@ mod tests { #[test] fn test_identities_contract_keys_missing_identity_absent_contract_proved() { - let (platform, state, platform_version) = setup_platform(None, Network::Testnet); + let (platform, state, platform_version) = setup_platform(None, Network::Testnet, None); let request = GetIdentitiesContractKeysRequestV0 { identities_ids: vec![vec![1; 32]], @@ -306,7 +308,7 @@ mod tests { #[test] fn test_identities_contract_keys_with_identity_absent_contract() { - let (platform, state, platform_version) = setup_platform(None, Network::Testnet); + let (platform, state, platform_version) = setup_platform(None, Network::Testnet, None); let mut rng = StdRng::seed_from_u64(10); @@ -348,7 +350,7 @@ mod tests { #[test] fn test_identities_contract_keys_with_identity_absent_contract_proved() { - let (platform, state, platform_version) = setup_platform(None, Network::Testnet); + let (platform, state, platform_version) = setup_platform(None, Network::Testnet, None); let mut rng = StdRng::seed_from_u64(10); @@ -409,7 +411,8 @@ mod tests { #[test] fn test_identities_contract_keys_missing_identity_keys() { - let (platform, state, platform_version) = setup_platform(Some((1, 1)), Network::Testnet); + let (platform, state, platform_version) = + setup_platform(Some((1, 1)), Network::Testnet, None); let dashpay = platform.drive.cache.system_data_contracts.load_dashpay(); @@ -453,7 +456,8 @@ mod tests { #[test] fn test_identities_contract_keys_missing_identity_keys_proved() { - let (platform, state, platform_version) = setup_platform(Some((1, 1)), Network::Testnet); + let (platform, state, platform_version) = + setup_platform(Some((1, 1)), Network::Testnet, None); let dashpay = platform.drive.cache.system_data_contracts.load_dashpay(); @@ -516,7 +520,8 @@ mod tests { #[test] fn test_identities_contract_keys() { - let (platform, state, platform_version) = setup_platform(Some((1, 1)), Network::Testnet); + let (platform, state, platform_version) = + setup_platform(Some((1, 1)), Network::Testnet, None); let dashpay = platform.drive.cache.system_data_contracts.load_dashpay(); @@ -674,7 +679,8 @@ mod tests { #[test] fn test_identities_contract_keys_proof() { - let (platform, state, platform_version) = setup_platform(Some((1, 1)), Network::Testnet); + let (platform, state, platform_version) = + setup_platform(Some((1, 1)), Network::Testnet, None); let dashpay = platform.drive.cache.system_data_contracts.load_dashpay(); @@ -769,7 +775,8 @@ mod tests { #[test] fn test_multiple_identities_contract_keys() { - let (platform, state, platform_version) = setup_platform(Some((1, 1)), Network::Testnet); + let (platform, state, platform_version) = + setup_platform(Some((1, 1)), Network::Testnet, None); let dashpay = platform.drive.cache.system_data_contracts.load_dashpay(); @@ -969,7 +976,8 @@ mod tests { #[test] fn test_multiple_identities_contract_keys_proof() { - let (platform, state, platform_version) = setup_platform(Some((1, 1)), Network::Testnet); + let (platform, state, platform_version) = + setup_platform(Some((1, 1)), Network::Testnet, None); let dashpay = platform.drive.cache.system_data_contracts.load_dashpay(); diff --git a/packages/rs-drive-abci/src/query/identity_based_queries/identity/v0/mod.rs b/packages/rs-drive-abci/src/query/identity_based_queries/identity/v0/mod.rs index 9ead1303bfb..ae2ae470273 100644 --- a/packages/rs-drive-abci/src/query/identity_based_queries/identity/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/identity_based_queries/identity/v0/mod.rs @@ -75,7 +75,7 @@ mod tests { #[test] fn test_invalid_identity_id() { - let (platform, state, _unused_version) = setup_platform(None, Network::Testnet); + let (platform, state, _unused_version) = setup_platform(None, Network::Testnet, None); let version = PlatformVersion::latest(); @@ -93,7 +93,7 @@ mod tests { #[test] fn test_identity_not_found() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let id = vec![0; 32]; let request = GetIdentityRequestV0 { @@ -115,7 +115,7 @@ mod tests { #[test] fn test_identity_absence_proof() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let id = vec![0; 32]; let request = GetIdentityRequestV0 { diff --git a/packages/rs-drive-abci/src/query/identity_based_queries/identity_by_public_key_hash/v0/mod.rs b/packages/rs-drive-abci/src/query/identity_based_queries/identity_by_public_key_hash/v0/mod.rs index e3249f25376..0d3db5c8023 100644 --- a/packages/rs-drive-abci/src/query/identity_based_queries/identity_by_public_key_hash/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/identity_based_queries/identity_by_public_key_hash/v0/mod.rs @@ -83,7 +83,7 @@ mod tests { #[test] fn test_invalid_public_key_hash() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityByPublicKeyHashRequestV0 { public_key_hash: vec![0; 8], @@ -102,7 +102,7 @@ mod tests { #[test] fn test_identity_not_found() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let public_key_hash = vec![0; 20]; let request = GetIdentityByPublicKeyHashRequestV0 { @@ -122,7 +122,7 @@ mod tests { #[test] fn test_identity_absence_proof() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let public_key_hash = vec![0; 20]; let request = GetIdentityByPublicKeyHashRequestV0 { diff --git a/packages/rs-drive-abci/src/query/identity_based_queries/identity_contract_nonce/v0/mod.rs b/packages/rs-drive-abci/src/query/identity_based_queries/identity_contract_nonce/v0/mod.rs index 6db26c62f85..ec40ac73587 100644 --- a/packages/rs-drive-abci/src/query/identity_based_queries/identity_contract_nonce/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/identity_based_queries/identity_contract_nonce/v0/mod.rs @@ -92,7 +92,7 @@ mod tests { #[test] fn test_invalid_identity_id() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityContractNonceRequestV0 { identity_id: vec![0; 8], @@ -111,7 +111,7 @@ mod tests { #[test] fn test_invalid_contract_id() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityContractNonceRequestV0 { identity_id: vec![0; 32], @@ -130,7 +130,7 @@ mod tests { #[test] fn test_identity_not_found_when_querying_identity_nonce() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityContractNonceRequestV0 { identity_id: vec![0; 32], @@ -157,7 +157,7 @@ mod tests { #[test] fn test_contract_info_not_found_when_querying_identity_nonce_with_known_identity() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let mut rng = StdRng::seed_from_u64(45); let id = rng.gen::<[u8; 32]>(); let _unused_identity = @@ -189,7 +189,7 @@ mod tests { #[test] fn test_identity_is_found_when_querying_identity_nonce() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let mut rng = StdRng::seed_from_u64(10); let id = rng.gen::<[u8; 32]>(); let identity = create_test_identity_with_rng(&platform.drive, id, &mut rng, None, version) @@ -236,7 +236,7 @@ mod tests { #[test] fn test_identity_is_found_when_querying_identity_nonce_after_update() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let mut rng = StdRng::seed_from_u64(10); let id = rng.gen::<[u8; 32]>(); let identity = create_test_identity_with_rng(&platform.drive, id, &mut rng, None, version) @@ -297,7 +297,7 @@ mod tests { #[test] fn test_identity_is_found_when_querying_identity_nonce_after_update_for_past() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let mut rng = StdRng::seed_from_u64(10); let id = rng.gen::<[u8; 32]>(); let identity = create_test_identity_with_rng(&platform.drive, id, &mut rng, None, version) @@ -373,7 +373,7 @@ mod tests { #[test] fn test_identity_contract_nonce_absence_proof() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityContractNonceRequestV0 { identity_id: vec![0; 32], diff --git a/packages/rs-drive-abci/src/query/identity_based_queries/identity_nonce/v0/mod.rs b/packages/rs-drive-abci/src/query/identity_based_queries/identity_nonce/v0/mod.rs index 4c6874cf270..45abbb1710e 100644 --- a/packages/rs-drive-abci/src/query/identity_based_queries/identity_nonce/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/identity_based_queries/identity_nonce/v0/mod.rs @@ -72,7 +72,7 @@ mod tests { #[test] fn test_invalid_identity_id() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityNonceRequestV0 { identity_id: vec![0; 8], @@ -90,7 +90,7 @@ mod tests { #[test] fn test_identity_not_found_when_querying_identity_nonce() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityNonceRequestV0 { identity_id: vec![0; 32], @@ -114,7 +114,7 @@ mod tests { #[test] fn test_identity_is_found_when_querying_identity_nonce() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let mut rng = StdRng::seed_from_u64(10); let id = rng.gen::<[u8; 32]>(); let _unused_identity = @@ -143,7 +143,7 @@ mod tests { #[test] fn test_identity_is_found_when_querying_identity_nonce_after_update() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let mut rng = StdRng::seed_from_u64(10); let id = rng.gen::<[u8; 32]>(); let identity = create_test_identity_with_rng(&platform.drive, id, &mut rng, None, version) @@ -195,7 +195,7 @@ mod tests { #[test] fn test_identity_is_found_when_querying_identity_nonce_after_update_for_past() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let mut rng = StdRng::seed_from_u64(10); let id = rng.gen::<[u8; 32]>(); let identity = create_test_identity_with_rng(&platform.drive, id, &mut rng, None, version) @@ -260,7 +260,7 @@ mod tests { #[test] fn test_identity_contract_nonce_absence_proof() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityNonceRequestV0 { identity_id: vec![0; 32], diff --git a/packages/rs-drive-abci/src/query/identity_based_queries/keys/v0/mod.rs b/packages/rs-drive-abci/src/query/identity_based_queries/keys/v0/mod.rs index 7079dacf093..3cc854832d4 100644 --- a/packages/rs-drive-abci/src/query/identity_based_queries/keys/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/identity_based_queries/keys/v0/mod.rs @@ -173,7 +173,7 @@ mod tests { #[test] fn test_invalid_identity_id() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityKeysRequestV0 { identity_id: vec![0; 8], @@ -192,7 +192,7 @@ mod tests { #[test] fn test_invalid_limit_u16_overflow() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityKeysRequestV0 { identity_id: vec![0; 32], @@ -214,7 +214,7 @@ mod tests { #[test] fn test_invalid_limit_max() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityKeysRequestV0 { identity_id: vec![0; 32], @@ -241,7 +241,7 @@ mod tests { #[test] fn test_invalid_offset_u16_overflow() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityKeysRequestV0 { identity_id: vec![0; 32], @@ -263,7 +263,7 @@ mod tests { #[test] fn test_missing_request_type() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityKeysRequestV0 { identity_id: vec![0; 32], @@ -285,7 +285,7 @@ mod tests { #[test] fn test_missing_request() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityKeysRequestV0 { identity_id: vec![0; 32], @@ -307,7 +307,7 @@ mod tests { #[test] fn test_invalid_key_request_type() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityKeysRequestV0 { identity_id: vec![0; 32], @@ -340,7 +340,7 @@ mod tests { #[test] fn test_absent_keys() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityKeysRequestV0 { identity_id: vec![0; 32], @@ -367,7 +367,7 @@ mod tests { #[test] fn test_absent_keys_proof() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetIdentityKeysRequestV0 { identity_id: vec![0; 32], diff --git a/packages/rs-drive-abci/src/query/identity_based_queries/mod.rs b/packages/rs-drive-abci/src/query/identity_based_queries/mod.rs index 3a9d833283d..29fea765215 100644 --- a/packages/rs-drive-abci/src/query/identity_based_queries/mod.rs +++ b/packages/rs-drive-abci/src/query/identity_based_queries/mod.rs @@ -1,5 +1,6 @@ mod balance; mod balance_and_revision; +mod balances; mod identities_contract_keys; mod identity; mod identity_by_public_key_hash; diff --git a/packages/rs-drive-abci/src/query/mod.rs b/packages/rs-drive-abci/src/query/mod.rs index d97b97e9eec..a7d58c7358d 100644 --- a/packages/rs-drive-abci/src/query/mod.rs +++ b/packages/rs-drive-abci/src/query/mod.rs @@ -6,6 +6,7 @@ mod proofs; mod response_metadata; mod service; mod system; +mod validator_queries; mod voting; use crate::error::query::QueryError; @@ -34,32 +35,47 @@ pub(crate) mod tests { use dpp::prelude::{CoreBlockHeight, TimestampMillis}; use drive::util::batch::DataContractOperationType; use drive::util::batch::DriveOperation::DataContractOperation; - use platform_version::version::PlatformVersion; + use platform_version::version::{PlatformVersion, ProtocolVersion}; use std::borrow::Cow; use std::sync::Arc; pub fn setup_platform<'a>( with_genesis_state: Option<(TimestampMillis, CoreBlockHeight)>, network: Network, + initial_protocol_version: Option, ) -> ( TempPlatform, Arc, &'a PlatformVersion, ) { let platform = if let Some((timestamp, activation_core_block_height)) = with_genesis_state { - TestPlatformBuilder::new() - .with_config(PlatformConfig::default_for_network(network)) + let mut platform_builder = TestPlatformBuilder::new() + .with_config(PlatformConfig::default_for_network(network)); + + if let Some(initial_protocol_version) = initial_protocol_version { + platform_builder = + platform_builder.with_initial_protocol_version(initial_protocol_version); + } + + platform_builder .build_with_mock_rpc() .set_genesis_state_with_activation_info(timestamp, activation_core_block_height) } else { - TestPlatformBuilder::new() - .with_config(PlatformConfig::default_for_network(network)) + let mut platform_builder = TestPlatformBuilder::new() + .with_config(PlatformConfig::default_for_network(network)); + + if let Some(initial_protocol_version) = initial_protocol_version { + platform_builder = + platform_builder.with_initial_protocol_version(initial_protocol_version); + } + + platform_builder .build_with_mock_rpc() .set_initial_state_structure() }; // We can't return a reference to Arc (`load` method) so we clone Arc (`load_full`). - // This is a bit slower but we don't care since we are in test environment + // This is a bit slower, but we don't care since we are in test environment let platform_state = platform.platform.state.load_full(); let platform_version = platform_state.current_platform_version().unwrap(); diff --git a/packages/rs-drive-abci/src/query/prefunded_specialized_balances/balance/v0/mod.rs b/packages/rs-drive-abci/src/query/prefunded_specialized_balances/balance/v0/mod.rs index 4684c64658c..fed648c116a 100644 --- a/packages/rs-drive-abci/src/query/prefunded_specialized_balances/balance/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/prefunded_specialized_balances/balance/v0/mod.rs @@ -74,7 +74,7 @@ mod tests { #[test] fn test_invalid_identity_id() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetPrefundedSpecializedBalanceRequestV0 { id: vec![0; 8], @@ -90,7 +90,7 @@ mod tests { #[test] fn test_identity_not_found() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let id = vec![0; 32]; @@ -111,7 +111,7 @@ mod tests { #[test] fn test_identity_balance_absence_proof() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let id = vec![0; 32]; diff --git a/packages/rs-drive-abci/src/query/proofs/v0/mod.rs b/packages/rs-drive-abci/src/query/proofs/v0/mod.rs index 3152ecf4c82..7db4d012276 100644 --- a/packages/rs-drive-abci/src/query/proofs/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/proofs/v0/mod.rs @@ -180,7 +180,7 @@ mod tests { #[test] fn test_invalid_identity_ids() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetProofsRequestV0 { identities: vec![IdentityRequest { @@ -201,7 +201,7 @@ mod tests { #[test] fn test_invalid_identity_prove_request_type() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request_type = 10; @@ -230,7 +230,7 @@ mod tests { #[test] fn test_invalid_contract_ids() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetProofsRequestV0 { identities: vec![], @@ -250,7 +250,7 @@ mod tests { #[test] fn test_invalid_contract_id_for_documents_proof() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetProofsRequestV0 { identities: vec![], @@ -274,7 +274,7 @@ mod tests { #[test] fn test_invalid_document_id() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetProofsRequestV0 { identities: vec![], @@ -298,7 +298,7 @@ mod tests { #[test] fn test_proof_of_absence() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetProofsRequestV0 { identities: vec![], @@ -325,7 +325,7 @@ mod tests { #[test] fn test_proof_of_absence_of_vote() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let dpns_contract = platform .drive @@ -377,7 +377,7 @@ mod tests { #[test] fn test_prove_all() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetProofsRequestV0 { identities: vec![IdentityRequest { diff --git a/packages/rs-drive-abci/src/query/service.rs b/packages/rs-drive-abci/src/query/service.rs index 7dbc3f5e18f..218b1f6f69f 100644 --- a/packages/rs-drive-abci/src/query/service.rs +++ b/packages/rs-drive-abci/src/query/service.rs @@ -18,18 +18,21 @@ use dapi_grpc::platform::v0::{ GetContestedResourcesResponse, GetDataContractHistoryRequest, GetDataContractHistoryResponse, GetDataContractRequest, GetDataContractResponse, GetDataContractsRequest, GetDataContractsResponse, GetDocumentsRequest, GetDocumentsResponse, GetEpochsInfoRequest, - GetEpochsInfoResponse, GetIdentitiesContractKeysRequest, GetIdentitiesContractKeysResponse, - GetIdentityBalanceAndRevisionRequest, GetIdentityBalanceAndRevisionResponse, - GetIdentityBalanceRequest, GetIdentityBalanceResponse, GetIdentityByPublicKeyHashRequest, - GetIdentityByPublicKeyHashResponse, GetIdentityContractNonceRequest, - GetIdentityContractNonceResponse, GetIdentityKeysRequest, GetIdentityKeysResponse, - GetIdentityNonceRequest, GetIdentityNonceResponse, GetIdentityRequest, GetIdentityResponse, - GetPathElementsRequest, GetPathElementsResponse, GetPrefundedSpecializedBalanceRequest, - GetPrefundedSpecializedBalanceResponse, GetProofsRequest, GetProofsResponse, - GetProtocolVersionUpgradeStateRequest, GetProtocolVersionUpgradeStateResponse, - GetProtocolVersionUpgradeVoteStatusRequest, GetProtocolVersionUpgradeVoteStatusResponse, - GetStatusRequest, GetStatusResponse, GetTotalCreditsInPlatformRequest, - GetTotalCreditsInPlatformResponse, GetVotePollsByEndDateRequest, GetVotePollsByEndDateResponse, + GetEpochsInfoResponse, GetEvonodesProposedEpochBlocksByIdsRequest, + GetEvonodesProposedEpochBlocksByRangeRequest, GetEvonodesProposedEpochBlocksResponse, + GetIdentitiesBalancesRequest, GetIdentitiesBalancesResponse, GetIdentitiesContractKeysRequest, + GetIdentitiesContractKeysResponse, GetIdentityBalanceAndRevisionRequest, + GetIdentityBalanceAndRevisionResponse, GetIdentityBalanceRequest, GetIdentityBalanceResponse, + GetIdentityByPublicKeyHashRequest, GetIdentityByPublicKeyHashResponse, + GetIdentityContractNonceRequest, GetIdentityContractNonceResponse, GetIdentityKeysRequest, + GetIdentityKeysResponse, GetIdentityNonceRequest, GetIdentityNonceResponse, GetIdentityRequest, + GetIdentityResponse, GetPathElementsRequest, GetPathElementsResponse, + GetPrefundedSpecializedBalanceRequest, GetPrefundedSpecializedBalanceResponse, + GetProofsRequest, GetProofsResponse, GetProtocolVersionUpgradeStateRequest, + GetProtocolVersionUpgradeStateResponse, GetProtocolVersionUpgradeVoteStatusRequest, + GetProtocolVersionUpgradeVoteStatusResponse, GetStatusRequest, GetStatusResponse, + GetTotalCreditsInPlatformRequest, GetTotalCreditsInPlatformResponse, + GetVotePollsByEndDateRequest, GetVotePollsByEndDateResponse, WaitForStateTransitionResultRequest, WaitForStateTransitionResultResponse, }; use dapi_grpc::tonic::{Code, Request, Response, Status}; @@ -546,6 +549,18 @@ impl PlatformService for QueryService { .await } + async fn get_identities_balances( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_identities_balances, + "get_identities_balances", + ) + .await + } + async fn get_status( &self, request: Request, @@ -557,6 +572,30 @@ impl PlatformService for QueryService { ) .await } + + async fn get_evonodes_proposed_epoch_blocks_by_ids( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_proposed_block_counts_by_evonode_ids, + "query_proposed_block_counts_by_evonode_ids", + ) + .await + } + + async fn get_evonodes_proposed_epoch_blocks_by_range( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_proposed_block_counts_by_range, + "query_proposed_block_counts_by_range", + ) + .await + } } fn query_error_into_status(error: QueryError) -> Status { diff --git a/packages/rs-drive-abci/src/query/system/epoch_infos/v0/mod.rs b/packages/rs-drive-abci/src/query/system/epoch_infos/v0/mod.rs index 48f32c88475..8df6f0a6818 100644 --- a/packages/rs-drive-abci/src/query/system/epoch_infos/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/system/epoch_infos/v0/mod.rs @@ -106,7 +106,7 @@ mod tests { #[test] fn test_query_empty_epoch_infos() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetEpochsInfoRequestV0 { start_epoch: None, // 0 @@ -130,7 +130,7 @@ mod tests { #[test] fn test_query_empty_epoch_infos_descending() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetEpochsInfoRequestV0 { start_epoch: None, // 0 diff --git a/packages/rs-drive-abci/src/query/system/path_elements/v0/mod.rs b/packages/rs-drive-abci/src/query/system/path_elements/v0/mod.rs index f3d63cb6e56..0808f3398d8 100644 --- a/packages/rs-drive-abci/src/query/system/path_elements/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/system/path_elements/v0/mod.rs @@ -85,7 +85,7 @@ mod tests { #[test] fn test_query_total_system_credits_from_path_elements_query() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let platform_version = PlatformVersion::latest(); diff --git a/packages/rs-drive-abci/src/query/system/total_credits_in_platform/v0/mod.rs b/packages/rs-drive-abci/src/query/system/total_credits_in_platform/v0/mod.rs index 890ca588282..829950e1f16 100644 --- a/packages/rs-drive-abci/src/query/system/total_credits_in_platform/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/system/total_credits_in_platform/v0/mod.rs @@ -151,7 +151,7 @@ mod tests { current_core_height: CoreBlockHeight, ) -> Credits { let (platform, _state, platform_version) = - setup_platform(Some((1, activation_core_height)), Network::Regtest); + setup_platform(Some((1, activation_core_height)), Network::Regtest, None); platform .drive @@ -218,7 +218,7 @@ mod tests { current_core_height: CoreBlockHeight, ) -> Credits { let (platform, _state, platform_version) = - setup_platform(Some((1, activation_core_height)), Network::Regtest); + setup_platform(Some((1, activation_core_height)), Network::Regtest, None); platform .drive diff --git a/packages/rs-drive-abci/src/query/system/version_upgrade_state/v0/mod.rs b/packages/rs-drive-abci/src/query/system/version_upgrade_state/v0/mod.rs index 44e6f7a6855..4395078b123 100644 --- a/packages/rs-drive-abci/src/query/system/version_upgrade_state/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/system/version_upgrade_state/v0/mod.rs @@ -72,13 +72,14 @@ mod tests { use drive::util::grove_operations::BatchInsertApplyType; use drive::util::object_size_info::PathKeyElementInfo; use integer_encoding::VarInt; + use platform_version::version::INITIAL_PROTOCOL_VERSION; use rand::rngs::StdRng; use rand::{Rng, SeedableRng}; use std::ops::RangeFull; #[test] fn test_query_empty_upgrade_state() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetProtocolVersionUpgradeStateRequestV0 { prove: false }; @@ -97,7 +98,7 @@ mod tests { #[test] fn test_query_upgrade_state() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let mut rand = StdRng::seed_from_u64(10); @@ -189,7 +190,7 @@ mod tests { #[test] fn test_prove_empty_upgrade_state() { let platform_version = PlatformVersion::latest(); - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let request = GetProtocolVersionUpgradeStateRequestV0 { prove: true }; @@ -225,8 +226,9 @@ mod tests { #[test] fn test_prove_upgrade_state() { - let platform_version = PlatformVersion::latest(); - let (platform, state, version) = setup_platform(None, Network::Testnet); + let platform_version = PlatformVersion::first(); + let (platform, state, version) = + setup_platform(None, Network::Testnet, Some(INITIAL_PROTOCOL_VERSION)); let mut rand = StdRng::seed_from_u64(10); diff --git a/packages/rs-drive-abci/src/query/system/version_upgrade_vote_status/v0/mod.rs b/packages/rs-drive-abci/src/query/system/version_upgrade_vote_status/v0/mod.rs index 08b598fb313..66ece674edc 100644 --- a/packages/rs-drive-abci/src/query/system/version_upgrade_vote_status/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/system/version_upgrade_vote_status/v0/mod.rs @@ -109,12 +109,13 @@ mod tests { use drive::util::grove_operations::BatchInsertApplyType; use drive::util::object_size_info::PathKeyElementInfo; use integer_encoding::VarInt; + use platform_version::version::INITIAL_PROTOCOL_VERSION; use rand::rngs::StdRng; use rand::{Rng, SeedableRng}; #[test] fn test_query_empty_upgrade_vote_status() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let mut rand = StdRng::seed_from_u64(10); @@ -140,7 +141,7 @@ mod tests { #[test] fn test_query_upgrade_vote_status() { - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let mut rand = StdRng::seed_from_u64(10); @@ -233,7 +234,7 @@ mod tests { #[test] fn test_prove_empty_upgrade_vote_status() { let platform_version = PlatformVersion::latest(); - let (platform, state, version) = setup_platform(None, Network::Testnet); + let (platform, state, version) = setup_platform(None, Network::Testnet, None); let mut rand = StdRng::seed_from_u64(10); @@ -281,8 +282,9 @@ mod tests { #[test] fn test_prove_upgrade_vote_status() { - let platform_version = PlatformVersion::latest(); - let (platform, state, version) = setup_platform(None, Network::Testnet); + let platform_version = PlatformVersion::first(); + let (platform, state, version) = + setup_platform(None, Network::Testnet, Some(INITIAL_PROTOCOL_VERSION)); let mut rand = StdRng::seed_from_u64(10); diff --git a/packages/rs-drive-abci/src/query/validator_queries/mod.rs b/packages/rs-drive-abci/src/query/validator_queries/mod.rs new file mode 100644 index 00000000000..d4af9a0d52f --- /dev/null +++ b/packages/rs-drive-abci/src/query/validator_queries/mod.rs @@ -0,0 +1,2 @@ +mod proposed_block_counts_by_evonode_ids; +mod proposed_block_counts_by_range; diff --git a/packages/rs-drive-abci/src/query/validator_queries/proposed_block_counts_by_evonode_ids/mod.rs b/packages/rs-drive-abci/src/query/validator_queries/proposed_block_counts_by_evonode_ids/mod.rs new file mode 100644 index 00000000000..08a48bc2e52 --- /dev/null +++ b/packages/rs-drive-abci/src/query/validator_queries/proposed_block_counts_by_evonode_ids/mod.rs @@ -0,0 +1,67 @@ +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_evonodes_proposed_epoch_blocks_by_ids_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_evonodes_proposed_epoch_blocks_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{ + GetEvonodesProposedEpochBlocksByIdsRequest, GetEvonodesProposedEpochBlocksResponse, +}; +use dpp::version::PlatformVersion; + +mod v0; + +impl Platform { + /// Querying of the proposed block counts by evonode ids + pub fn query_proposed_block_counts_by_evonode_ids( + &self, + GetEvonodesProposedEpochBlocksByIdsRequest { version }: GetEvonodesProposedEpochBlocksByIdsRequest, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let Some(version) = version else { + return Ok(QueryValidationResult::new_with_error( + QueryError::DecodingError( + "could not decode evonodes proposed block counts by ids query".to_string(), + ), + )); + }; + + let feature_version_bounds = &platform_version + .drive_abci + .query + .validator_queries + .proposed_block_counts_by_evonode_ids; + + let feature_version = match &version { + RequestVersion::V0(_) => 0, + }; + if !feature_version_bounds.check_version(feature_version) { + return Ok(QueryValidationResult::new_with_error( + QueryError::UnsupportedQueryVersion( + "proposed_block_counts_by_evonode_ids".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_proposed_block_counts_by_evonode_ids_v0( + request_v0, + platform_state, + platform_version, + )?; + + Ok( + result.map(|response_v0| GetEvonodesProposedEpochBlocksResponse { + version: Some(ResponseVersion::V0(response_v0)), + }), + ) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/validator_queries/proposed_block_counts_by_evonode_ids/v0/mod.rs b/packages/rs-drive-abci/src/query/validator_queries/proposed_block_counts_by_evonode_ids/v0/mod.rs new file mode 100644 index 00000000000..28ccfbbe9de --- /dev/null +++ b/packages/rs-drive-abci/src/query/validator_queries/proposed_block_counts_by_evonode_ids/v0/mod.rs @@ -0,0 +1,99 @@ +use dapi_grpc::platform::v0::get_evonodes_proposed_epoch_blocks_by_ids_request::GetEvonodesProposedEpochBlocksByIdsRequestV0; +use dapi_grpc::platform::v0::get_evonodes_proposed_epoch_blocks_response::GetEvonodesProposedEpochBlocksResponseV0; +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_evonodes_proposed_epoch_blocks_response::get_evonodes_proposed_epoch_blocks_response_v0; +use dapi_grpc::platform::v0::get_evonodes_proposed_epoch_blocks_response::get_evonodes_proposed_epoch_blocks_response_v0::{EvonodeProposedBlocks, EvonodesProposedBlocks}; +use dpp::block::epoch::Epoch; +use dpp::check_validation_result_with_data; +use dpp::validation::ValidationResult; +use dpp::version::PlatformVersion; +use drive::query::proposer_block_count_query::ProposerQueryType; +use crate::platform_types::platform_state::v0::PlatformStateV0Methods; + +impl Platform { + pub(super) fn query_proposed_block_counts_by_evonode_ids_v0( + &self, + GetEvonodesProposedEpochBlocksByIdsRequestV0 { epoch, ids, prove }: GetEvonodesProposedEpochBlocksByIdsRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let evonode_ids = check_validation_result_with_data!(ids + .into_iter() + .map(|evonode_id_vec| { + if evonode_id_vec.len() != 32 { + Err(QueryError::InvalidArgument( + "id must be a valid identifier (32 bytes long)".to_string(), + )) + } else { + Ok(evonode_id_vec) + } + }) + .collect::>, QueryError>>()); + + let epoch = if let Some(epoch) = epoch { + if epoch > (u16::MAX - 1) as u32 { + return Ok(QueryValidationResult::new_with_error( + QueryError::InvalidArgument( + "epoch must be within a normal range (less than u16::Max - 1)".to_string(), + ), + )); + } + + let epoch = + check_validation_result_with_data!(Epoch::new(epoch as u16).map_err(|_| { + QueryError::InvalidArgument( + "epoch must be within a normal range (less than u16::Max - 1)".to_string(), + ) + })); + epoch + } else { + // Get current epoch instead + platform_state.last_committed_block_epoch() + }; + + let response = if prove { + let proof = check_validation_result_with_data!(self.drive.prove_epoch_proposers( + &epoch, + ProposerQueryType::ByIds(evonode_ids), + None, + platform_version + )); + + GetEvonodesProposedEpochBlocksResponseV0 { + result: Some( + get_evonodes_proposed_epoch_blocks_response_v0::Result::Proof( + self.response_proof_v0(platform_state, proof), + ), + ), + metadata: Some(self.response_metadata_v0(platform_state)), + } + } else { + let evonodes_proposed_block_counts = self + .drive + .fetch_epoch_proposers( + &epoch, + ProposerQueryType::ByIds(evonode_ids), + None, + platform_version, + )? + .into_iter() + .map(|(pro_tx_hash, count)| EvonodeProposedBlocks { pro_tx_hash, count }) + .collect(); + + let evonode_proposed_blocks = EvonodesProposedBlocks { + evonodes_proposed_block_counts, + }; + + GetEvonodesProposedEpochBlocksResponseV0 { + result: Some(get_evonodes_proposed_epoch_blocks_response_v0::Result::EvonodesProposedBlockCountsInfo(evonode_proposed_blocks)), + metadata: Some(self.response_metadata_v0(platform_state)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} diff --git a/packages/rs-drive-abci/src/query/validator_queries/proposed_block_counts_by_range/mod.rs b/packages/rs-drive-abci/src/query/validator_queries/proposed_block_counts_by_range/mod.rs new file mode 100644 index 00000000000..c56fe5b9214 --- /dev/null +++ b/packages/rs-drive-abci/src/query/validator_queries/proposed_block_counts_by_range/mod.rs @@ -0,0 +1,67 @@ +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_evonodes_proposed_epoch_blocks_by_range_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_evonodes_proposed_epoch_blocks_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{ + GetEvonodesProposedEpochBlocksByRangeRequest, GetEvonodesProposedEpochBlocksResponse, +}; +use dpp::version::PlatformVersion; + +mod v0; + +impl Platform { + /// Querying of the proposed block counts by range + pub fn query_proposed_block_counts_by_range( + &self, + GetEvonodesProposedEpochBlocksByRangeRequest { version }: GetEvonodesProposedEpochBlocksByRangeRequest, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let Some(version) = version else { + return Ok(QueryValidationResult::new_with_error( + QueryError::DecodingError( + "could not decode evonodes proposed block counts by range query".to_string(), + ), + )); + }; + + let feature_version_bounds = &platform_version + .drive_abci + .query + .validator_queries + .proposed_block_counts_by_range; + + let feature_version = match &version { + RequestVersion::V0(_) => 0, + }; + if !feature_version_bounds.check_version(feature_version) { + return Ok(QueryValidationResult::new_with_error( + QueryError::UnsupportedQueryVersion( + "proposed_block_counts_by_range".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_proposed_block_counts_by_range_v0( + request_v0, + platform_state, + platform_version, + )?; + + Ok( + result.map(|response_v0| GetEvonodesProposedEpochBlocksResponse { + version: Some(ResponseVersion::V0(response_v0)), + }), + ) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/validator_queries/proposed_block_counts_by_range/v0/mod.rs b/packages/rs-drive-abci/src/query/validator_queries/proposed_block_counts_by_range/v0/mod.rs new file mode 100644 index 00000000000..9ba56968ec3 --- /dev/null +++ b/packages/rs-drive-abci/src/query/validator_queries/proposed_block_counts_by_range/v0/mod.rs @@ -0,0 +1,135 @@ +use dapi_grpc::platform::v0::get_evonodes_proposed_epoch_blocks_by_range_request::get_evonodes_proposed_epoch_blocks_by_range_request_v0::Start; +use dapi_grpc::platform::v0::get_evonodes_proposed_epoch_blocks_by_range_request::GetEvonodesProposedEpochBlocksByRangeRequestV0; +use dapi_grpc::platform::v0::get_evonodes_proposed_epoch_blocks_response::GetEvonodesProposedEpochBlocksResponseV0; +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_evonodes_proposed_epoch_blocks_response::get_evonodes_proposed_epoch_blocks_response_v0; +use dapi_grpc::platform::v0::get_evonodes_proposed_epoch_blocks_response::get_evonodes_proposed_epoch_blocks_response_v0::{EvonodeProposedBlocks, EvonodesProposedBlocks}; +use dpp::block::epoch::Epoch; +use dpp::check_validation_result_with_data; +use dpp::validation::ValidationResult; +use dpp::version::PlatformVersion; +use drive::query::proposer_block_count_query::ProposerQueryType; +use drive::error::query::QuerySyntaxError; +use crate::platform_types::platform_state::v0::PlatformStateV0Methods; + +impl Platform { + pub(super) fn query_proposed_block_counts_by_range_v0( + &self, + GetEvonodesProposedEpochBlocksByRangeRequestV0 { + epoch, + limit, + prove, + start, + }: GetEvonodesProposedEpochBlocksByRangeRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let config = &self.config.drive; + let limit = limit + .map_or(Some(config.default_query_limit), |limit_value| { + if limit_value == 0 + || limit_value > u16::MAX as u32 + || limit_value as u16 > config.max_query_limit + { + None + } else { + Some(limit_value as u16) + } + }) + .ok_or(drive::error::Error::Query(QuerySyntaxError::InvalidLimit( + format!( + "limit {} greater than max limit {} or was set as 0", + limit.unwrap(), + config.max_query_limit + ), + )))?; + + let formatted_start = match start { + None => None, + Some(Start::StartAfter(after)) => { + let id: [u8; 32] = + check_validation_result_with_data!(after.try_into().map_err(|_| { + QueryError::Query(QuerySyntaxError::InvalidStartsWithClause( + "start after should be a 32 byte identifier", + )) + })); + Some((id, false)) + } + Some(Start::StartAt(after)) => { + let id: [u8; 32] = + check_validation_result_with_data!(after.try_into().map_err(|_| { + QueryError::Query(QuerySyntaxError::InvalidStartsWithClause( + "start after should be a 32 byte identifier", + )) + })); + Some((id, true)) + } + }; + + let epoch = if let Some(epoch) = epoch { + if epoch > (u16::MAX - 1) as u32 { + return Ok(QueryValidationResult::new_with_error( + QueryError::InvalidArgument( + "epoch must be within a normal range (less than u16::Max - 1)".to_string(), + ), + )); + } + + let epoch = + check_validation_result_with_data!(Epoch::new(epoch as u16).map_err(|_| { + QueryError::InvalidArgument( + "epoch must be within a normal range (less than u16::Max - 1)".to_string(), + ) + })); + epoch + } else { + // Get current epoch instead + platform_state.last_committed_block_epoch() + }; + + let response = if prove { + let proof = check_validation_result_with_data!(self.drive.prove_epoch_proposers( + &epoch, + ProposerQueryType::ByRange(Some(limit), formatted_start), + None, + platform_version + )); + + GetEvonodesProposedEpochBlocksResponseV0 { + result: Some( + get_evonodes_proposed_epoch_blocks_response_v0::Result::Proof( + self.response_proof_v0(platform_state, proof), + ), + ), + metadata: Some(self.response_metadata_v0(platform_state)), + } + } else { + let evonodes_proposed_block_counts = self + .drive + .fetch_epoch_proposers( + &epoch, + ProposerQueryType::ByRange(Some(limit), formatted_start), + None, + platform_version, + )? + .into_iter() + .map(|(pro_tx_hash, count)| EvonodeProposedBlocks { pro_tx_hash, count }) + .collect(); + + let evonode_proposed_blocks = EvonodesProposedBlocks { + evonodes_proposed_block_counts, + }; + + GetEvonodesProposedEpochBlocksResponseV0 { + result: Some(get_evonodes_proposed_epoch_blocks_response_v0::Result::EvonodesProposedBlockCountsInfo(evonode_proposed_blocks)), + metadata: Some(self.response_metadata_v0(platform_state)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} diff --git a/packages/rs-drive-abci/src/rpc/core.rs b/packages/rs-drive-abci/src/rpc/core.rs index 46e16a2e0b9..a16f0341dc6 100644 --- a/packages/rs-drive-abci/src/rpc/core.rs +++ b/packages/rs-drive-abci/src/rpc/core.rs @@ -152,9 +152,9 @@ pub const CORE_RPC_INVALID_ADDRESS_OR_KEY: i32 = -5; /// Invalid, missing or duplicate parameter pub const CORE_RPC_INVALID_PARAMETER: i32 = -8; -/// Asset Unlock consenus error "bad-assetunlock-not-active-quorum" +/// Asset Unlock consensus error "bad-assetunlock-not-active-quorum" pub const CORE_RPC_ERROR_ASSET_UNLOCK_NO_ACTIVE_QUORUM: &str = "bad-assetunlock-not-active-quorum"; -/// Asset Unlock consenus error "bad-assetunlock-not-active-quorum" +/// Asset Unlock consensus error "bad-assetunlock-not-active-quorum" pub const CORE_RPC_ERROR_ASSET_UNLOCK_EXPIRED: &str = "bad-assetunlock-too-late"; macro_rules! retry { diff --git a/packages/rs-drive-abci/src/test/fixture/abci.rs b/packages/rs-drive-abci/src/test/fixture/abci.rs index 0d2db3608e5..26a7803a6ec 100644 --- a/packages/rs-drive-abci/src/test/fixture/abci.rs +++ b/packages/rs-drive-abci/src/test/fixture/abci.rs @@ -2,12 +2,15 @@ //! use crate::config::PlatformConfig; +use dpp::version::PlatformVersion; use tenderdash_abci::proto::abci::RequestInitChain; use tenderdash_abci::proto::google::protobuf::Timestamp; use tenderdash_abci::proto::types::{ConsensusParams, VersionParams}; /// Creates static init chain request fixture pub fn static_init_chain_request(config: &PlatformConfig) -> RequestInitChain { + let platform_version = PlatformVersion::get(config.initial_protocol_version) + .expect("expected to get platform version"); RequestInitChain { time: Some(Timestamp { seconds: 0, @@ -17,6 +20,7 @@ pub fn static_init_chain_request(config: &PlatformConfig) -> RequestInitChain { consensus_params: Some(ConsensusParams { version: Some(VersionParams { app_version: config.initial_protocol_version as u64, + consensus_version: platform_version.consensus.tenderdash_consensus_version as i32, }), ..Default::default() }), diff --git a/packages/rs-drive-abci/src/test/helpers/fast_forward_to_block.rs b/packages/rs-drive-abci/src/test/helpers/fast_forward_to_block.rs index 9cbc8bec210..28f9d5152f2 100644 --- a/packages/rs-drive-abci/src/test/helpers/fast_forward_to_block.rs +++ b/packages/rs-drive-abci/src/test/helpers/fast_forward_to_block.rs @@ -105,9 +105,6 @@ pub(crate) fn process_epoch_change( previous_epoch_index: epoch_index.checked_sub(1), is_epoch_change: true, }), - // TODO: It doesn't seem correct to use previous block count of hpmns. - // We currently not using this field in the codebase. We probably should just remove it. - hpmn_count: 100, unsigned_withdrawal_transactions: UnsignedWithdrawalTxs::default(), block_platform_state: platform_state, proposer_results: None, diff --git a/packages/rs-drive-abci/src/test/helpers/setup.rs b/packages/rs-drive-abci/src/test/helpers/setup.rs index a557c2e9152..08d56b2dc56 100644 --- a/packages/rs-drive-abci/src/test/helpers/setup.rs +++ b/packages/rs-drive-abci/src/test/helpers/setup.rs @@ -1,32 +1,3 @@ -// MIT LICENSE -// -// Copyright (c) 2021 Dash Core Group -// -// Permission is hereby granted, free of charge, to any -// person obtaining a copy of this software and associated -// documentation files (the "Software"), to deal in the -// Software without restriction, including without -// limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software -// is furnished to do so, subject to the following -// conditions: -// -// The above copyright notice and this permission notice -// shall be included in all copies or substantial portions -// of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// - //! Platform setup helpers. //! //! This module defines helper functions related to setting up Platform. @@ -45,12 +16,14 @@ use dpp::nft::TradeMode; use dpp::prelude::{CoreBlockHeight, DataContract, TimestampMillis}; use dpp::tests::json_document::json_document_to_contract; use dpp::version::PlatformVersion; +use dpp::version::ProtocolVersion; use drive::util::storage_flags::StorageFlags; use tempfile::TempDir; /// A test platform builder. pub struct TestPlatformBuilder { config: Option, + initial_protocol_version: Option, tempdir: TempDir, } @@ -74,10 +47,36 @@ impl TestPlatformBuilder { self } + /// Add initial protocol version + pub fn with_initial_protocol_version( + mut self, + initial_protocol_version: ProtocolVersion, + ) -> Self { + self.initial_protocol_version = Some(initial_protocol_version); + self + } + + /// Add initial protocol version as latest + pub fn with_latest_protocol_version(mut self) -> Self { + self.initial_protocol_version = Some(PlatformVersion::latest().protocol_version); + self + } + /// Create a new temp platform with a mock core rpc pub fn build_with_mock_rpc(self) -> TempPlatform { - let platform = Platform::::open(self.tempdir.path(), self.config) - .expect("should open Platform successfully"); + let use_initial_protocol_version = + if let Some(initial_protocol_version) = self.initial_protocol_version { + // We should use the latest if nothing is set + Some(initial_protocol_version) + } else { + Some(PlatformVersion::latest().protocol_version) + }; + let platform = Platform::::open( + self.tempdir.path(), + self.config, + use_initial_protocol_version, + ) + .expect("should open Platform successfully"); TempPlatform { platform, @@ -103,6 +102,7 @@ impl Default for TestPlatformBuilder { Self { tempdir, config: None, + initial_protocol_version: None, } } } @@ -192,8 +192,15 @@ impl TempPlatform { /// Sets Platform to genesis state. pub fn set_genesis_state(self) -> Self { + let platform_state = self.platform.state.load(); self.platform - .create_genesis_state(1, Default::default(), None, PlatformVersion::latest()) + .create_genesis_state( + 1, + Default::default(), + None, + PlatformVersion::get(platform_state.current_protocol_version_in_consensus()) + .expect("expected to get platform version"), + ) .expect("should create root tree successfully"); self @@ -205,12 +212,16 @@ impl TempPlatform { genesis_time: TimestampMillis, start_core_block_height: CoreBlockHeight, ) -> Self { + let platform_state = self.platform.state.load(); + let platform_version = + PlatformVersion::get(platform_state.current_protocol_version_in_consensus()) + .expect("expected to get platform version"); self.platform .create_genesis_state( start_core_block_height, genesis_time, None, - PlatformVersion::latest(), + platform_version, ) .expect("should create root tree successfully"); @@ -219,7 +230,7 @@ impl TempPlatform { /// Rebuilds Platform from the tempdir as if it was destroyed and restarted pub fn open_with_tempdir(tempdir: TempDir, config: PlatformConfig) -> Self { - let platform = Platform::::open(tempdir.path(), Some(config)) + let platform = Platform::::open(tempdir.path(), Some(config), None) .expect("should open Platform successfully"); Self { platform, tempdir } diff --git a/packages/rs-drive-abci/tests/strategy_tests/upgrade_fork_tests.rs b/packages/rs-drive-abci/tests/strategy_tests/upgrade_fork_tests.rs index c1f6cd99924..c5065b239f6 100644 --- a/packages/rs-drive-abci/tests/strategy_tests/upgrade_fork_tests.rs +++ b/packages/rs-drive-abci/tests/strategy_tests/upgrade_fork_tests.rs @@ -1,19 +1,19 @@ #[cfg(test)] mod tests { + use crate::execution::{continue_chain_for_strategy, run_chain_for_strategy}; + use crate::strategy::{ + ChainExecutionOutcome, ChainExecutionParameters, CoreHeightIncrease, + MasternodeListChangesStrategy, NetworkStrategy, StrategyRandomness, UpgradingInfo, + }; use dpp::block::block_info::BlockInfo; + use dpp::block::epoch::Epoch; use dpp::block::extended_block_info::v0::ExtendedBlockInfoV0Getters; use dpp::block::extended_epoch_info::v0::ExtendedEpochInfoV0Getters; use dpp::dashcore::hashes::Hash; use dpp::dashcore::{BlockHash, ChainLock}; use dpp::version::PlatformVersion; use drive::config::DriveConfig; - use std::collections::{BTreeMap, HashMap}; - - use crate::execution::{continue_chain_for_strategy, run_chain_for_strategy}; - use crate::strategy::{ - ChainExecutionOutcome, ChainExecutionParameters, CoreHeightIncrease, - MasternodeListChangesStrategy, NetworkStrategy, StrategyRandomness, UpgradingInfo, - }; + use drive::query::proposer_block_count_query::ProposerQueryType; use drive_abci::config::{ ChainLockConfig, ExecutionConfig, InstantLockConfig, PlatformConfig, PlatformTestConfig, ValidatorSetConfig, @@ -27,6 +27,8 @@ mod tests { use platform_version::version::mocks::v3_test::TEST_PROTOCOL_VERSION_3; use platform_version::version::patches::PatchFn; use platform_version::version::v1::PROTOCOL_VERSION_1; + use platform_version::version::INITIAL_PROTOCOL_VERSION; + use std::collections::{BTreeMap, HashMap}; use strategy_tests::frequency::Frequency; use strategy_tests::{IdentityInsertInfo, StartIdentities, Strategy}; @@ -89,6 +91,7 @@ mod tests { }; let mut platform = TestPlatformBuilder::new() .with_config(config.clone()) + .with_initial_protocol_version(INITIAL_PROTOCOL_VERSION) .build_with_mock_rpc(); platform .core_rpc @@ -274,6 +277,39 @@ mod tests { assert_eq!(counter.get(&1).unwrap(), None); //no one has proposed 1 yet assert_eq!(counter.get(&TEST_PROTOCOL_VERSION_2).unwrap(), Some(&147)); } + + let epoch_proposers_2 = platform + .drive + .fetch_epoch_proposers( + &Epoch::new(2).unwrap(), + ProposerQueryType::ByRange(None, None), + None, + platform_version, + ) + .expect("expected to get epoch proposers"); + assert_eq!(epoch_proposers_2.len(), 147); + + let epoch_proposers_1 = platform + .drive + .fetch_epoch_proposers( + &Epoch::new(1).unwrap(), + ProposerQueryType::ByRange(None, None), + None, + platform_version, + ) + .expect("expected to get epoch proposers"); + assert_eq!(epoch_proposers_1.len(), 299); // We had 299 proposers in epoch 1 + + let epoch_proposers_0 = platform + .drive + .fetch_epoch_proposers( + &Epoch::new(0).unwrap(), + ProposerQueryType::ByRange(None, None), + None, + platform_version, + ) + .expect("expected to get epoch proposers"); + assert_eq!(epoch_proposers_0.len(), 447); // We had 447 proposers in epoch 0 }) .expect("Failed to create thread with custom stack size"); @@ -339,6 +375,7 @@ mod tests { }; let mut platform = TestPlatformBuilder::new() .with_config(config.clone()) + .with_initial_protocol_version(INITIAL_PROTOCOL_VERSION) .build_with_mock_rpc(); platform .core_rpc @@ -591,6 +628,7 @@ mod tests { let mut platform = TestPlatformBuilder::new() .with_config(config.clone()) + .with_initial_protocol_version(INITIAL_PROTOCOL_VERSION) .build_with_mock_rpc(); let ChainExecutionOutcome { @@ -759,6 +797,7 @@ mod tests { }; let mut platform = TestPlatformBuilder::new() .with_config(config.clone()) + .with_initial_protocol_version(INITIAL_PROTOCOL_VERSION) .build_with_mock_rpc(); platform .core_rpc @@ -998,6 +1037,7 @@ mod tests { }; let mut platform = TestPlatformBuilder::new() .with_config(config.clone()) + .with_initial_protocol_version(INITIAL_PROTOCOL_VERSION) .build_with_mock_rpc(); platform .core_rpc @@ -1342,6 +1382,7 @@ mod tests { }; let mut platform = TestPlatformBuilder::new() .with_config(config.clone()) + .with_initial_protocol_version(INITIAL_PROTOCOL_VERSION) .build_with_mock_rpc(); platform .core_rpc diff --git a/packages/rs-drive-proof-verifier/Cargo.toml b/packages/rs-drive-proof-verifier/Cargo.toml index 22d4de4bda4..3b3c682aeec 100644 --- a/packages/rs-drive-proof-verifier/Cargo.toml +++ b/packages/rs-drive-proof-verifier/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "drive-proof-verifier" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true diff --git a/packages/rs-drive-proof-verifier/src/from_request.rs b/packages/rs-drive-proof-verifier/src/from_request.rs index ff2a74de36c..4c6c4e6981c 100644 --- a/packages/rs-drive-proof-verifier/src/from_request.rs +++ b/packages/rs-drive-proof-verifier/src/from_request.rs @@ -71,6 +71,12 @@ impl TryFromRequest DriveResultType::Documents => GrpcResultType::Documents, DriveResultType::DocumentsAndVoteTally => GrpcResultType::DocumentsAndVoteTally, DriveResultType::VoteTally => GrpcResultType::VoteTally, + DriveResultType::SingleDocumentByContender(_) => { + return Err(Error::RequestError { + error: "can not perform a single document by contender query remotely" + .to_string(), + }) + } }) } } @@ -146,6 +152,9 @@ impl TryFromRequest for ContestedDocumentV ContestedDocumentVotePollDriveQueryResultType::Documents => GrpcResultType::Documents.into(), ContestedDocumentVotePollDriveQueryResultType::DocumentsAndVoteTally => GrpcResultType::DocumentsAndVoteTally.into(), ContestedDocumentVotePollDriveQueryResultType::VoteTally => GrpcResultType::VoteTally.into(), + ContestedDocumentVotePollDriveQueryResultType::SingleDocumentByContender(_) => return Err(Error::RequestError { + error: "can not perform a single document by contender query remotely".to_string(), + }), }, start_at_identifier_info, allow_include_locked_and_abstaining_vote_tally: self.allow_include_locked_and_abstaining_vote_tally, @@ -200,7 +209,7 @@ impl TryFromRequest } Ok(proto::get_contested_resource_identity_votes_request::GetContestedResourceIdentityVotesRequestV0 { - prove: true, + prove: true, identity_id: self.identity_id.to_vec(), offset: self.offset.map(|x| x as u32), limit: self.limit.map(|x| x as u32), diff --git a/packages/rs-drive-proof-verifier/src/proof.rs b/packages/rs-drive-proof-verifier/src/proof.rs index de46f75a1e8..f3a256e301e 100644 --- a/packages/rs-drive-proof-verifier/src/proof.rs +++ b/packages/rs-drive-proof-verifier/src/proof.rs @@ -8,18 +8,7 @@ use dapi_grpc::platform::v0::get_protocol_version_upgrade_vote_status_request::{ self, GetProtocolVersionUpgradeVoteStatusRequestV0, }; use dapi_grpc::platform::v0::security_level_map::KeyKindRequestType as GrpcKeyKind; -use dapi_grpc::platform::v0::{ - get_contested_resource_identity_votes_request, get_data_contract_history_request, - get_data_contract_request, get_data_contracts_request, get_epochs_info_request, - get_identities_contract_keys_request, get_identity_balance_and_revision_request, - get_identity_balance_request, get_identity_by_public_key_hash_request, - get_identity_contract_nonce_request, get_identity_keys_request, get_identity_nonce_request, - get_identity_request, get_path_elements_request, get_prefunded_specialized_balance_request, - GetContestedResourceVotersForIdentityRequest, GetContestedResourceVotersForIdentityResponse, - GetPathElementsRequest, GetPathElementsResponse, GetProtocolVersionUpgradeStateRequest, - GetProtocolVersionUpgradeStateResponse, GetProtocolVersionUpgradeVoteStatusRequest, - GetProtocolVersionUpgradeVoteStatusResponse, Proof, ResponseMetadata, -}; +use dapi_grpc::platform::v0::{get_contested_resource_identity_votes_request, get_data_contract_history_request, get_data_contract_request, get_data_contracts_request, get_epochs_info_request, get_evonodes_proposed_epoch_blocks_by_ids_request, get_evonodes_proposed_epoch_blocks_by_range_request, get_identities_balances_request, get_identities_contract_keys_request, get_identity_balance_and_revision_request, get_identity_balance_request, get_identity_by_public_key_hash_request, get_identity_contract_nonce_request, get_identity_keys_request, get_identity_nonce_request, get_identity_request, get_path_elements_request, get_prefunded_specialized_balance_request, GetContestedResourceVotersForIdentityRequest, GetContestedResourceVotersForIdentityResponse, GetPathElementsRequest, GetPathElementsResponse, GetProtocolVersionUpgradeStateRequest, GetProtocolVersionUpgradeStateResponse, GetProtocolVersionUpgradeVoteStatusRequest, GetProtocolVersionUpgradeVoteStatusResponse, Proof, ResponseMetadata}; use dapi_grpc::platform::{ v0::{self as platform, key_request_type, KeyRequestType as GrpcKeyType}, VersionedGrpcResponse, @@ -53,6 +42,8 @@ use drive::query::{DriveDocumentQuery, VotePollsByEndDateDriveQuery}; use std::array::TryFromSliceError; use std::collections::BTreeMap; use std::num::TryFromIntError; +use dapi_grpc::platform::v0::get_evonodes_proposed_epoch_blocks_by_range_request::get_evonodes_proposed_epoch_blocks_by_range_request_v0::Start; +use drive::query::proposer_block_count_query::ProposerQueryType; /// Parse and verify the received proof and retrieve the requested object, if any. /// @@ -318,7 +309,7 @@ impl FromProof for Identity { v0.public_key_hash .try_into() .map_err(|_| Error::DriveError { - error: "Ivalid public key hash length".to_string(), + error: "Invalid public key hash length".to_string(), })?; public_key_hash } @@ -663,6 +654,57 @@ impl FromProof for IdentityBalance { } } +impl FromProof for IdentityBalances { + type Request = platform::GetIdentitiesBalancesRequest; + type Response = platform::GetIdentitiesBalancesResponse; + + 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 + IdentityBalances: 'a, + { + let request: Self::Request = request.into(); + let response: Self::Response = response.into(); + // Parse response to read proof and metadata + let proof = response.proof().or(Err(Error::NoProofInResult))?; + + let mtd = response.metadata().or(Err(Error::EmptyResponseMetadata))?; + + let identities_ids = match request.version.ok_or(Error::EmptyVersion)? { + get_identities_balances_request::Version::V0(v0) => v0.ids, + }; + + let identity_ids = identities_ids + .into_iter() + .map(|identity_bytes| { + Identifier::from_bytes(&identity_bytes) + .map(|identifier| identifier.into_buffer()) + .map_err(|e| Error::RequestError { + error: format!("identities must be all 32 bytes {}", e), + }) + }) + .collect::, Error>>()?; + let (root_hash, balances) = Drive::verify_identity_balances_for_identity_ids( + &proof.grovedb_proof, + false, + &identity_ids, + platform_version, + ) + .map_err(|e| Error::DriveError { + error: e.to_string(), + })?; + + verify_tenderdash_proof(proof, mtd, &root_hash, provider)?; + + Ok((Some(balances), mtd.clone(), proof.clone())) + } +} + impl FromProof for IdentityBalanceAndRevision { type Request = platform::GetIdentityBalanceAndRevisionRequest; type Response = platform::GetIdentityBalanceAndRevisionResponse; @@ -1406,6 +1448,7 @@ impl FromProof for Contenders { .collect(); let response = Contenders { + winner: contested_resource_vote_state.winner, contenders, abstain_vote_tally: contested_resource_vote_state.abstaining_vote_tally, lock_vote_tally: contested_resource_vote_state.locked_vote_tally, @@ -1692,6 +1735,118 @@ impl FromProof for TotalCreditsInPla } } +impl FromProof for ProposerBlockCounts { + type Request = platform::GetEvonodesProposedEpochBlocksByIdsRequest; + type Response = platform::GetEvonodesProposedEpochBlocksResponse; + + 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: Sized + 'a, + { + let request: Self::Request = request.into(); + let response: Self::Response = response.into(); + // Parse response to read proof and metadata + let proof = response.proof().or(Err(Error::NoProofInResult))?; + let mtd = response.metadata().or(Err(Error::EmptyResponseMetadata))?; + + let (ids, epoch) = match request.version.ok_or(Error::EmptyVersion)? { + get_evonodes_proposed_epoch_blocks_by_ids_request::Version::V0(v0) => { + (v0.ids, v0.epoch) + } + }; + + let (root_hash, proposer_block_counts) = Drive::verify_epoch_proposers( + &proof.grovedb_proof, + epoch + .map(|epoch_index| epoch_index as u16) + .unwrap_or_else(|| mtd.epoch as u16), + ProposerQueryType::ByIds(ids), + platform_version, + ) + .map_err(|e| Error::DriveError { + error: e.to_string(), + })?; + + verify_tenderdash_proof(proof, mtd, &root_hash, provider)?; + + Ok(( + Some(ProposerBlockCounts(proposer_block_counts)), + mtd.clone(), + proof.clone(), + )) + } +} + +impl FromProof for ProposerBlockCounts { + type Request = platform::GetEvonodesProposedEpochBlocksByRangeRequest; + type Response = platform::GetEvonodesProposedEpochBlocksResponse; + + 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: Sized + 'a, + { + let request: Self::Request = request.into(); + let response: Self::Response = response.into(); + // Parse response to read proof and metadata + let proof = response.proof().or(Err(Error::NoProofInResult))?; + let mtd = response.metadata().or(Err(Error::EmptyResponseMetadata))?; + + let (epoch, limit, start) = match request.version.ok_or(Error::EmptyVersion)? { + get_evonodes_proposed_epoch_blocks_by_range_request::Version::V0(v0) => { + (v0.epoch, v0.limit, v0.start) + } + }; + + let formatted_start = match start { + None => None, + Some(Start::StartAfter(after)) => { + let id: [u8; 32] = after.try_into().map_err(|_| Error::DriveError { + error: "Invalid public key hash length".to_string(), + })?; + Some((id, false)) + } + Some(Start::StartAt(at)) => { + let id: [u8; 32] = at.try_into().map_err(|_| Error::DriveError { + error: "Invalid public key hash length".to_string(), + })?; + Some((id, true)) + } + }; + + let (root_hash, proposer_block_counts) = Drive::verify_epoch_proposers( + &proof.grovedb_proof, + epoch + .map(|epoch_index| epoch_index as u16) + .unwrap_or_else(|| mtd.epoch as u16), + ProposerQueryType::ByRange(limit.map(|l| l as u16), formatted_start), + platform_version, + ) + .map_err(|e| Error::DriveError { + error: e.to_string(), + })?; + + verify_tenderdash_proof(proof, mtd, &root_hash, provider)?; + + Ok(( + Some(ProposerBlockCounts(proposer_block_counts)), + mtd.clone(), + proof.clone(), + )) + } +} + /// Convert u32, if 0 return None, otherwise return Some(u16). /// Errors when value is out of range. fn u32_to_u16_opt(i: u32) -> Result, Error> { diff --git a/packages/rs-drive-proof-verifier/src/types.rs b/packages/rs-drive-proof-verifier/src/types.rs index f417d129791..1a6fe75d884 100644 --- a/packages/rs-drive-proof-verifier/src/types.rs +++ b/packages/rs-drive-proof-verifier/src/types.rs @@ -27,6 +27,8 @@ use dpp::{ use drive::grovedb::Element; use std::collections::{BTreeMap, BTreeSet}; +use dpp::block::block_info::BlockInfo; +use dpp::voting::vote_info_storage::contested_document_vote_poll_winner_info::ContestedDocumentVotePollWinnerInfo; use drive::grovedb::query_result_type::Path; #[cfg(feature = "mocks")] use { @@ -52,6 +54,22 @@ use { /// * `O`: The type of the objects in the map. pub type RetrievedObjects = BTreeMap>; +/// A data structure that holds a set of objects of a generic type `O`, indexed by a key of type `K`. +/// +/// This type is typically returned by functions that operate on multiple objects, such as fetching multiple objects +/// from a server using [`FetchMany`](dash_sdk::platform::FetchMany) or parsing a proof that contains multiple objects +/// using [`FromProof`](crate::FromProof). +/// +/// Each key in the `RetrievedObjects` corresponds to an object of generic type `O`. +/// If a value is found for a given key, the value is `value`. +/// If no value is found for a given key, the value is `0`. +/// +/// # Generic Type Parameters +/// +/// * `K`: The type of the keys in the map. +/// * `I`: The type of the integer in the map. +pub type RetrievedIntegerValue = BTreeMap; + /// History of a data contract. /// /// Contains a map of data contract revisions to data contracts. @@ -73,6 +91,8 @@ pub type DataContracts = RetrievedObjects; platform_serialize(unversioned) )] pub struct Contenders { + /// The winner if the contest is finished + pub winner: Option<(ContestedDocumentVotePollWinnerInfo, BlockInfo)>, /// Contenders indexed by their identity IDs. pub contenders: BTreeMap, /// Tally of abstain votes. @@ -107,6 +127,7 @@ impl FromIterator<(Identifier, Option)> for Con iter: T, ) -> Self { Self { + winner: None, contenders: BTreeMap::from_iter( iter.into_iter().filter_map(|(k, v)| v.map(|v| (k, v))), ), @@ -407,6 +428,9 @@ pub type IdentityPublicKeys = RetrievedObjects; /// Collection of documents. pub type Documents = RetrievedObjects; +/// Collection of balances. +pub type IdentityBalances = RetrievedObjects; + /// Collection of epoch information pub type ExtendedEpochInfos = RetrievedObjects; @@ -467,3 +491,56 @@ impl PlatformVersionedDecode for MasternodeProtocolVote { /// Information about protocol version voted by each node, returned by [ProtocolVersion::fetch_many()]. /// Indexed by [ProTxHash] of nodes. pub type MasternodeProtocolVotes = RetrievedObjects; + +/// Proposer block counts +/// +/// Mapping between proposers and the blocks they might have proposed +#[derive(Debug, Default)] +#[cfg_attr(feature = "mocks", derive(serde::Serialize, serde::Deserialize))] +pub struct ProposerBlockCounts(pub RetrievedIntegerValue); + +impl FromIterator<(ProTxHash, Option)> for ProposerBlockCounts { + fn from_iter)>>( + iter: I, + ) -> Self { + let map = iter + .into_iter() + .map(|(pro_tx_hash, proposer_block_count_by_range)| { + let block_count = proposer_block_count_by_range + .map_or(0, |proposer_block_count| proposer_block_count.0); + let identifier = Identifier::from(pro_tx_hash.to_byte_array()); // Adjust this conversion logic as needed + (identifier, block_count) + }) + .collect::>(); + + ProposerBlockCounts(map) + } +} + +impl FromIterator<(ProTxHash, Option)> for ProposerBlockCounts { + fn from_iter)>>( + iter: I, + ) -> Self { + let map = iter + .into_iter() + .map(|(pro_tx_hash, proposer_block_count_by_range)| { + let block_count = proposer_block_count_by_range + .map_or(0, |proposer_block_count| proposer_block_count.0); + let identifier = Identifier::from(pro_tx_hash.to_byte_array()); // Adjust this conversion logic as needed + (identifier, block_count) + }) + .collect::>(); + + ProposerBlockCounts(map) + } +} + +/// A block count struct +#[derive(Debug)] +#[cfg_attr(feature = "mocks", derive(serde::Serialize, serde::Deserialize))] +pub struct ProposerBlockCountByRange(pub u64); + +/// A block count struct +#[derive(Debug)] +#[cfg_attr(feature = "mocks", derive(serde::Serialize, serde::Deserialize))] +pub struct ProposerBlockCountById(pub u64); diff --git a/packages/rs-drive/Cargo.toml b/packages/rs-drive/Cargo.toml index f60700c9ffa..91416b05c14 100644 --- a/packages/rs-drive/Cargo.toml +++ b/packages/rs-drive/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "drive" description = "Dash drive built on top of GroveDB" -version = "1.2.0" +version = "1.3.0-dev.5" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/rs-drive/src/config.rs b/packages/rs-drive/src/config.rs index 3856eb0b0ac..313be06c3ce 100644 --- a/packages/rs-drive/src/config.rs +++ b/packages/rs-drive/src/config.rs @@ -1,6 +1,7 @@ //! Drive Configuration File //! +use dpp::dashcore::Network; use dpp::fee::epoch::DEFAULT_EPOCHS_PER_ERA; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; @@ -112,6 +113,13 @@ pub struct DriveConfig { serde(default, deserialize_with = "from_str_to_bool") )] pub grovedb_visualizer_enabled: bool, + + /// The network type + #[cfg_attr( + feature = "serde", + serde(skip_deserializing, default = "DriveConfig::default_network") + )] + pub network: Network, } // TODO: some weird envy behavior requries this to exist @@ -197,6 +205,21 @@ impl Default for DriveConfig { grovedb_visualizer_address: default_grovedb_visualizer_address(), #[cfg(feature = "grovedbg")] grovedb_visualizer_enabled: false, + network: Network::Dash, + } + } +} + +impl DriveConfig { + fn default_network() -> Network { + Network::Dash + } + + /// The default testnet configuration + pub fn default_testnet() -> Self { + Self { + network: Network::Testnet, + ..Default::default() } } } diff --git a/packages/rs-drive/src/drive/contract/paths.rs b/packages/rs-drive/src/drive/contract/paths.rs index 2221e398ebe..0baa4d5a226 100644 --- a/packages/rs-drive/src/drive/contract/paths.rs +++ b/packages/rs-drive/src/drive/contract/paths.rs @@ -1,6 +1,7 @@ use crate::drive::RootTree; use dpp::data_contract::accessors::v0::DataContractV0Getters; +use crate::drive::votes::paths::{ACTIVE_POLLS_TREE_KEY, CONTESTED_RESOURCE_TREE_KEY}; use dpp::data_contract::DataContract; /// The various GroveDB paths underneath a contract @@ -11,8 +12,15 @@ pub trait DataContractPaths { fn documents_path(&self) -> [&[u8]; 3]; /// The document type path, this is based on the document type name fn document_type_path<'a>(&'a self, document_type_name: &'a str) -> [&'a [u8]; 4]; + /// The contested document type path, this is based on the document type name + fn contested_document_type_path<'a>(&'a self, document_type_name: &'a str) -> [&'a [u8]; 5]; /// The document primary key path, this is under the document type fn documents_primary_key_path<'a>(&'a self, document_type_name: &'a str) -> [&'a [u8]; 5]; + /// The contested document primary key path, this is under the document type + fn contested_documents_primary_key_path<'a>( + &'a self, + document_type_name: &'a str, + ) -> [&'a [u8]; 6]; /// The underlying storage for documents that keep history fn documents_with_history_primary_key_path<'a>( &'a self, @@ -46,6 +54,16 @@ impl DataContractPaths for DataContract { ] } + fn contested_document_type_path<'a>(&'a self, document_type_name: &'a str) -> [&'a [u8]; 5] { + [ + Into::<&[u8; 1]>::into(RootTree::Votes), // 1 + &[CONTESTED_RESOURCE_TREE_KEY as u8], // 1 + &[ACTIVE_POLLS_TREE_KEY as u8], // 1 + self.id_ref().as_bytes(), // 32 + document_type_name.as_bytes(), + ] + } + fn documents_primary_key_path<'a>(&'a self, document_type_name: &'a str) -> [&'a [u8]; 5] { [ Into::<&[u8; 1]>::into(RootTree::DataContractDocuments), @@ -56,6 +74,20 @@ impl DataContractPaths for DataContract { ] } + fn contested_documents_primary_key_path<'a>( + &'a self, + document_type_name: &'a str, + ) -> [&'a [u8]; 6] { + [ + Into::<&[u8; 1]>::into(RootTree::Votes), // 1 + &[CONTESTED_RESOURCE_TREE_KEY as u8], // 1 + &[ACTIVE_POLLS_TREE_KEY as u8], // 1 + self.id_ref().as_bytes(), // 32 + document_type_name.as_bytes(), + &[0], + ] + } + fn documents_with_history_primary_key_path<'a>( &'a self, document_type_name: &'a str, diff --git a/packages/rs-drive/src/drive/contract/test_helpers.rs b/packages/rs-drive/src/drive/contract/test_helpers.rs index c2bb04fe38f..2fafdb1da16 100644 --- a/packages/rs-drive/src/drive/contract/test_helpers.rs +++ b/packages/rs-drive/src/drive/contract/test_helpers.rs @@ -3,9 +3,6 @@ use crate::util::batch::GroveDbOpBatch; use crate::drive::RootTree; -#[cfg(feature = "data-contract-cbor-conversion")] -use dpp::data_contract::conversion::cbor::DataContractCborConversionMethodsV0; - /// Adds operations to the op batch relevant to initializing the contract's structure. /// Namely it inserts an empty tree at the contract's root path. pub fn add_init_contracts_structure_operations(batch: &mut GroveDbOpBatch) { diff --git a/packages/rs-drive/src/drive/credit_pools/epochs/operations_factory.rs b/packages/rs-drive/src/drive/credit_pools/epochs/operations_factory.rs index 2133e856657..8274656c2b2 100644 --- a/packages/rs-drive/src/drive/credit_pools/epochs/operations_factory.rs +++ b/packages/rs-drive/src/drive/credit_pools/epochs/operations_factory.rs @@ -476,6 +476,7 @@ mod tests { mod add_init_current_operations { use super::*; + use crate::query::proposer_block_count_query::ProposerQueryType; #[test] fn test_values_are_set() { @@ -543,7 +544,12 @@ mod tests { .expect_err("should not get processing fee"); let proposers = drive - .get_epoch_proposers(&epoch, Some(1), Some(&transaction), platform_version) + .fetch_epoch_proposers( + &epoch, + ProposerQueryType::ByRange(Some(1), None), + Some(&transaction), + platform_version, + ) .expect("should get proposers"); assert_eq!(proposers, vec!()); @@ -895,6 +901,7 @@ mod tests { mod delete_proposers { use super::*; + use crate::query::proposer_block_count_query::ProposerQueryType; #[test] fn test_values_are_being_deleted() { @@ -928,7 +935,12 @@ mod tests { .expect("should apply batch"); let mut stored_proposers = drive - .get_epoch_proposers(&epoch, Some(20), Some(&transaction), platform_version) + .fetch_epoch_proposers( + &epoch, + ProposerQueryType::ByRange(Some(20), None), + Some(&transaction), + platform_version, + ) .expect("should get proposers"); let mut awaited_result = pro_tx_hashes @@ -961,7 +973,12 @@ mod tests { .expect("should apply batch"); let stored_proposers = drive - .get_epoch_proposers(&epoch, Some(20), Some(&transaction), platform_version) + .fetch_epoch_proposers( + &epoch, + ProposerQueryType::ByRange(Some(20), None), + Some(&transaction), + platform_version, + ) .expect("should get proposers"); let mut stored_hexes: Vec = stored_proposers diff --git a/packages/rs-drive/src/drive/credit_pools/epochs/proposers/fetch_epoch_proposers/mod.rs b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/fetch_epoch_proposers/mod.rs new file mode 100644 index 00000000000..fd75a4c17cc --- /dev/null +++ b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/fetch_epoch_proposers/mod.rs @@ -0,0 +1,67 @@ +mod v0; + +use grovedb::TransactionArg; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; + +use dpp::block::epoch::Epoch; + +use crate::query::proposer_block_count_query::ProposerQueryType; +use dpp::version::PlatformVersion; + +impl Drive { + /// Retrieves the list of block proposers for a given epoch. + /// + /// This function fetches the proposers for a specified epoch, returning their transaction hashes and + /// the number of blocks they proposed. The query can either be limited by a range or a set of proposer IDs. + /// + /// # Parameters + /// + /// - `epoch_tree`: A reference to an `Epoch` instance representing the epoch for which to retrieve proposers. + /// - `query_type`: The type of query to perform (`ProposerQueryType`), which can either specify a range of + /// proposers or fetch specific proposers by their IDs. + /// - `transaction`: A `TransactionArg` that provides the transaction context for the query execution. + /// - `platform_version`: The version of the platform, represented by a `PlatformVersion` instance, ensuring compatibility + /// between different platform versions. + /// + /// # Returns + /// + /// A `Result` containing: + /// - `Vec<(Vec, u64)>`: A vector of tuples where each tuple contains: + /// - A byte vector (`Vec`) representing the proposer's transaction hash. + /// - A `u64` representing the number of blocks proposed by that proposer. + /// - `Error`: An error if the query fails due to an invalid platform version, transaction issues, or invalid epoch data. + /// + /// # Errors + /// + /// Returns an `Error` if: + /// - The platform version is unknown or unsupported. + /// - There is an issue with retrieving the proposers, such as a database or transaction error. + /// - The provided epoch or query type is invalid. + pub fn fetch_epoch_proposers( + &self, + epoch_tree: &Epoch, + query_type: ProposerQueryType, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, u64)>, Error> { + match platform_version + .drive + .methods + .credit_pools + .epochs + .fetch_epoch_proposers + { + 0 => { + self.fetch_epoch_proposers_v0(epoch_tree, query_type, transaction, platform_version) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_epoch_proposers".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/credit_pools/epochs/proposers/fetch_epoch_proposers/v0/mod.rs b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/fetch_epoch_proposers/v0/mod.rs new file mode 100644 index 00000000000..e86547c225a --- /dev/null +++ b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/fetch_epoch_proposers/v0/mod.rs @@ -0,0 +1,168 @@ +use grovedb::query_result_type::QueryResultType::QueryKeyElementPairResultType; +use grovedb::{Element, TransactionArg}; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::query::proposer_block_count_query::ProposerQueryType; +use dpp::block::epoch::Epoch; +use platform_version::version::PlatformVersion; + +impl Drive { + /// Retrieves the list of block proposers for a given epoch. + /// + /// This function fetches the proposers for a specified epoch, returning their transaction hashes and + /// the number of blocks they proposed. The query can either be limited by a range or a set of proposer IDs. + /// + /// # Parameters + /// + /// - `epoch_tree`: A reference to an `Epoch` instance representing the epoch for which to retrieve proposers. + /// - `query_type`: The type of query to perform (`ProposerQueryType`), which can either specify a range of + /// proposers or fetch specific proposers by their IDs. + /// - `transaction`: A `TransactionArg` that provides the transaction context for the query execution. + /// - `platform_version`: The version of the platform, represented by a `PlatformVersion` instance, ensuring compatibility + /// between different platform versions. + /// + /// # Returns + /// + /// A `Result` containing: + /// - `Vec<(Vec, u64)>`: A vector of tuples where each tuple contains: + /// - A byte vector (`Vec`) representing the proposer's transaction hash. + /// - A `u64` representing the number of blocks proposed by that proposer. + /// - `Error`: An error if the query fails due to an invalid platform version, transaction issues, or invalid epoch data. + /// + /// # Errors + /// + /// Returns an `Error` if: + /// - The platform version is unknown or unsupported. + /// - There is an issue with retrieving the proposers, such as a database or transaction error. + /// - The provided epoch or query type is invalid. + pub(super) fn fetch_epoch_proposers_v0( + &self, + epoch_tree: &Epoch, + query_type: ProposerQueryType, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, u64)>, Error> { + let use_optional = query_type.allows_optional(); + + let path_query = query_type.into_path_query(epoch_tree); + + let proposers = if use_optional { + let key_elements = self.grove_get_raw_path_query_with_optional( + &path_query, + true, + transaction, + &mut vec![], + &platform_version.drive, + )?; + + key_elements + .into_iter() + .map(|(_, pro_tx_hash, element)| { + let block_count = match element { + None => 0, + Some(Element::Item(encoded_block_count, _)) => u64::from_be_bytes( + encoded_block_count.as_slice().try_into().map_err(|_| { + Error::Drive(DriveError::CorruptedSerialization(String::from( + "epochs proposer block count must be u64", + ))) + })?, + ), + _ => { + return Err(Error::Drive(DriveError::UnexpectedElementType( + "epochs proposer block count must be an item", + ))); + } + }; + + Ok((pro_tx_hash, block_count)) + }) + .collect::>() + } else { + let key_elements = self + .grove + .query_raw( + &path_query, + transaction.is_some(), + true, + true, + QueryKeyElementPairResultType, + transaction, + &platform_version.drive.grove_version, + ) + .unwrap() + .map_err(Error::GroveDB)? + .0 + .to_key_elements(); + + key_elements + .into_iter() + .map(|(pro_tx_hash, element)| { + let Element::Item(encoded_block_count, _) = element else { + return Err(Error::Drive(DriveError::UnexpectedElementType( + "epochs proposer block count must be an item", + ))); + }; + + let block_count = u64::from_be_bytes( + encoded_block_count.as_slice().try_into().map_err(|_| { + Error::Drive(DriveError::CorruptedSerialization(String::from( + "epochs proposer block count must be u64", + ))) + })?, + ); + + Ok((pro_tx_hash, block_count)) + }) + .collect::>() + }?; + + Ok(proposers) + } +} + +#[cfg(test)] +mod tests { + use crate::drive::credit_pools::epochs::operations_factory::EpochOperations; + use crate::util::batch::grovedb_op_batch::GroveDbOpBatchV0Methods; + use crate::util::batch::GroveDbOpBatch; + use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; + use dpp::block::epoch::Epoch; + + use crate::query::proposer_block_count_query::ProposerQueryType; + use dpp::version::PlatformVersion; + + #[test] + fn test_value() { + let drive = setup_drive_with_initial_state_structure(); + let platform_version = PlatformVersion::latest(); + let transaction = drive.grove.start_transaction(); + + let pro_tx_hash: [u8; 32] = rand::random(); + let block_count = 42; + + let epoch = Epoch::new(0).unwrap(); + + let mut batch = GroveDbOpBatch::new(); + + batch.push(epoch.init_proposers_tree_operation()); + + batch.push(epoch.update_proposer_block_count_operation(&pro_tx_hash, block_count)); + + drive + .grove_apply_batch(batch, false, Some(&transaction), &platform_version.drive) + .expect("should apply batch"); + + let result = drive + .fetch_epoch_proposers( + &epoch, + ProposerQueryType::ByRange(Some(100), None), + Some(&transaction), + platform_version, + ) + .expect("should get proposers"); + + assert_eq!(result, vec!((pro_tx_hash.to_vec(), block_count))); + } +} diff --git a/packages/rs-drive/src/drive/credit_pools/epochs/proposers/get_epoch_proposers/mod.rs b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/get_epoch_proposers/mod.rs deleted file mode 100644 index 5619f999363..00000000000 --- a/packages/rs-drive/src/drive/credit_pools/epochs/proposers/get_epoch_proposers/mod.rs +++ /dev/null @@ -1,48 +0,0 @@ -mod v0; - -use grovedb::TransactionArg; - -use crate::drive::Drive; -use crate::error::drive::DriveError; -use crate::error::Error; - -use dpp::block::epoch::Epoch; - -use dpp::version::PlatformVersion; - -impl Drive { - /// Returns a list of the Epoch's block proposers - /// - /// # Arguments - /// - /// * `epoch_tree` - An Epoch instance. - /// * `limit` - An Option containing the limit of proposers to be fetched. - /// * `transaction` - A TransactionArg instance. - /// * `platform_version` - A PlatformVersion instance representing the version of the drive. - /// - /// # Returns - /// - /// A Result containing a vector of tuples with proposers' transaction hashes and block counts or an Error. - pub fn get_epoch_proposers( - &self, - epoch_tree: &Epoch, - limit: Option, - transaction: TransactionArg, - platform_version: &PlatformVersion, - ) -> Result, u64)>, Error> { - match platform_version - .drive - .methods - .credit_pools - .epochs - .get_epoch_proposers - { - 0 => self.get_epoch_proposers_v0(epoch_tree, limit, transaction, platform_version), - version => Err(Error::Drive(DriveError::UnknownVersionMismatch { - method: "get_epoch_proposers".to_string(), - known_versions: vec![0], - received: version, - })), - } - } -} diff --git a/packages/rs-drive/src/drive/credit_pools/epochs/proposers/get_epoch_proposers/v0/mod.rs b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/get_epoch_proposers/v0/mod.rs deleted file mode 100644 index f60fc3d5ba5..00000000000 --- a/packages/rs-drive/src/drive/credit_pools/epochs/proposers/get_epoch_proposers/v0/mod.rs +++ /dev/null @@ -1,105 +0,0 @@ -use grovedb::query_result_type::QueryResultType::QueryKeyElementPairResultType; -use grovedb::{Element, PathQuery, Query, SizedQuery, TransactionArg}; - -use crate::drive::credit_pools::epochs::paths::EpochProposers; -use crate::drive::Drive; -use crate::error::drive::DriveError; -use crate::error::Error; -use dpp::block::epoch::Epoch; -use platform_version::version::PlatformVersion; - -impl Drive { - /// Returns a list of the Epoch's block proposers - pub(super) fn get_epoch_proposers_v0( - &self, - epoch_tree: &Epoch, - limit: Option, - transaction: TransactionArg, - platform_version: &PlatformVersion, - ) -> Result, u64)>, Error> { - let path_as_vec = epoch_tree.get_proposers_path_vec(); - - let mut query = Query::new(); - query.insert_all(); - - let path_query = PathQuery::new(path_as_vec, SizedQuery::new(query, limit, None)); - - let key_elements = self - .grove - .query_raw( - &path_query, - transaction.is_some(), - true, - true, - QueryKeyElementPairResultType, - transaction, - &platform_version.drive.grove_version, - ) - .unwrap() - .map_err(Error::GroveDB)? - .0 - .to_key_elements(); - - let proposers = key_elements - .into_iter() - .map(|(pro_tx_hash, element)| { - let Element::Item(encoded_block_count, _) = element else { - return Err(Error::Drive(DriveError::UnexpectedElementType( - "epochs proposer block count must be an item", - ))); - }; - - let block_count = u64::from_be_bytes( - encoded_block_count.as_slice().try_into().map_err(|_| { - Error::Drive(DriveError::CorruptedSerialization(String::from( - "epochs proposer block count must be u64", - ))) - })?, - ); - - Ok((pro_tx_hash, block_count)) - }) - .collect::>()?; - - Ok(proposers) - } -} - -#[cfg(test)] -mod tests { - use crate::drive::credit_pools::epochs::operations_factory::EpochOperations; - use crate::util::batch::grovedb_op_batch::GroveDbOpBatchV0Methods; - use crate::util::batch::GroveDbOpBatch; - use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; - use dpp::block::epoch::Epoch; - - use dpp::version::PlatformVersion; - - #[test] - fn test_value() { - let drive = setup_drive_with_initial_state_structure(); - let platform_version = PlatformVersion::latest(); - let transaction = drive.grove.start_transaction(); - - let pro_tx_hash: [u8; 32] = rand::random(); - let block_count = 42; - - let epoch = Epoch::new(0).unwrap(); - - let mut batch = GroveDbOpBatch::new(); - - batch.push(epoch.init_proposers_tree_operation()); - - batch.push(epoch.update_proposer_block_count_operation(&pro_tx_hash, block_count)); - - drive - .grove_apply_batch(batch, false, Some(&transaction), &platform_version.drive) - .expect("should apply batch"); - - let result = drive - .get_epoch_proposers(&epoch, Some(100), Some(&transaction), platform_version) - .expect("should get proposers"); - - assert_eq!(result, vec!((pro_tx_hash.to_vec(), block_count))); - } -} diff --git a/packages/rs-drive/src/drive/credit_pools/epochs/proposers/mod.rs b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/mod.rs index d7c9b646d90..4153947d101 100644 --- a/packages/rs-drive/src/drive/credit_pools/epochs/proposers/mod.rs +++ b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/mod.rs @@ -2,7 +2,7 @@ //! //! This module implements functions in Drive relevant to block proposers. //! - -mod get_epoch_proposers; +mod fetch_epoch_proposers; mod get_epochs_proposer_block_count; mod is_epochs_proposers_tree_empty; +mod prove_epoch_proposers; diff --git a/packages/rs-drive/src/drive/credit_pools/epochs/proposers/prove_epoch_proposers/mod.rs b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/prove_epoch_proposers/mod.rs new file mode 100644 index 00000000000..05b4e3ca839 --- /dev/null +++ b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/prove_epoch_proposers/mod.rs @@ -0,0 +1,64 @@ +mod v0; + +use grovedb::TransactionArg; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; + +use dpp::block::epoch::Epoch; + +use crate::query::proposer_block_count_query::ProposerQueryType; +use dpp::version::PlatformVersion; + +impl Drive { + /// Generates a GroveDB proof of the block proposers for a given epoch. + /// + /// This function retrieves the list of block proposers for a specific epoch and returns + /// a proof that can be verified externally. The query can be limited by either a range or a set of proposer IDs. + /// + /// # Parameters + /// + /// - `epoch_tree`: A reference to an `Epoch` instance representing the epoch for which to retrieve proposers. + /// - `query_type`: The type of query to perform (`ProposerQueryType`), which can either be a range query with + /// an optional limit and starting point or a query by specific proposer IDs. + /// - `transaction`: A `TransactionArg` representing the transaction context for the query. + /// - `platform_version`: The version of the platform, represented by a `PlatformVersion` instance, to ensure compatibility. + /// + /// # Returns + /// + /// A `Result` containing: + /// - `Vec`: A byte vector representing the GroveDB proof of the proposers for the epoch. + /// - `Error`: If the proof generation fails due to invalid data, unsupported platform version, or other errors. + /// + /// # Errors + /// + /// Returns an `Error` if: + /// - The platform version is unknown or unsupported. + /// - There is an issue generating the GroveDB proof for the epoch proposers. + /// - The epoch or query type is invalid. + pub fn prove_epoch_proposers( + &self, + epoch_tree: &Epoch, + query_type: ProposerQueryType, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .credit_pools + .epochs + .prove_epoch_proposers + { + 0 => { + self.prove_epoch_proposers_v0(epoch_tree, query_type, transaction, platform_version) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_epoch_proposers".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/credit_pools/epochs/proposers/prove_epoch_proposers/v0/mod.rs b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/prove_epoch_proposers/v0/mod.rs new file mode 100644 index 00000000000..396591cea57 --- /dev/null +++ b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/prove_epoch_proposers/v0/mod.rs @@ -0,0 +1,112 @@ +use grovedb::TransactionArg; + +use crate::drive::Drive; +use crate::error::Error; +use crate::query::proposer_block_count_query::ProposerQueryType; +use dpp::block::epoch::Epoch; +use platform_version::version::PlatformVersion; + +impl Drive { + /// Generates a GroveDB proof of the block proposers for a given epoch. + /// + /// This function retrieves the list of block proposers for a specific epoch and returns + /// a proof that can be verified externally. The query can be limited by either a range or a set of proposer IDs. + /// + /// # Parameters + /// + /// - `epoch_tree`: A reference to an `Epoch` instance representing the epoch for which to retrieve proposers. + /// - `query_type`: The type of query to perform (`ProposerQueryType`), which can either be a range query with + /// an optional limit and starting point or a query by specific proposer IDs. + /// - `transaction`: A `TransactionArg` representing the transaction context for the query. + /// - `platform_version`: The version of the platform, represented by a `PlatformVersion` instance, to ensure compatibility. + /// + /// # Returns + /// + /// A `Result` containing: + /// - `Vec`: A byte vector representing the GroveDB proof of the proposers for the epoch. + /// - `Error`: If the proof generation fails due to invalid data, unsupported platform version, or other errors. + /// + /// # Errors + /// + /// Returns an `Error` if: + /// - The platform version is unknown or unsupported. + /// - There is an issue generating the GroveDB proof for the epoch proposers. + /// - The epoch or query type is invalid. + pub(super) fn prove_epoch_proposers_v0( + &self, + epoch_tree: &Epoch, + query_type: ProposerQueryType, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let path_query = query_type.into_path_query(epoch_tree); + + self.grove_get_proved_path_query( + &path_query, + transaction, + &mut vec![], + &platform_version.drive, + ) + } +} + +#[cfg(test)] +mod tests { + use crate::drive::credit_pools::epochs::operations_factory::EpochOperations; + use crate::drive::Drive; + use crate::query::proposer_block_count_query::ProposerQueryType; + use crate::util::batch::grovedb_op_batch::GroveDbOpBatchV0Methods; + use crate::util::batch::GroveDbOpBatch; + use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; + use dpp::block::epoch::Epoch; + use dpp::version::PlatformVersion; + + #[test] + fn test_value() { + let drive = setup_drive_with_initial_state_structure(); + let platform_version = PlatformVersion::latest(); + let transaction = drive.grove.start_transaction(); + + let pro_tx_hash: [u8; 32] = rand::random(); + let block_count = 42; + + let epoch = Epoch::new(0).unwrap(); + + let mut batch = GroveDbOpBatch::new(); + + batch.push(epoch.init_proposers_tree_operation()); + + batch.push(epoch.update_proposer_block_count_operation(&pro_tx_hash, block_count)); + + drive + .grove_apply_batch(batch, false, Some(&transaction), &platform_version.drive) + .expect("should apply batch"); + + drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to be able to commit a transaction"); + + let limit = 100; + + let proof = drive + .prove_epoch_proposers( + &epoch, + ProposerQueryType::ByRange(Some(limit), None), + None, + platform_version, + ) + .expect("should get proposers"); + + let (_, epoch_proposers): (_, Vec<([u8; 32], u64)>) = Drive::verify_epoch_proposers( + &proof, + epoch.index, + ProposerQueryType::ByRange(Some(100), None), + platform_version, + ) + .expect("expected to verify epoch proposers"); + + assert_eq!(epoch_proposers, vec!((pro_tx_hash, block_count))); + } +} 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 be2ec0515d1..00d3f872cd4 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 @@ -214,7 +214,7 @@ impl Drive { )?; if !inserted { return Err(Error::Drive(DriveError::CorruptedContractIndexes( - "reference already exists", + "reference already exists".to_string(), ))); } } diff --git a/packages/rs-drive/src/drive/document/insert/mod.rs b/packages/rs-drive/src/drive/document/insert/mod.rs index e2e2f378900..6b88440bf2c 100644 --- a/packages/rs-drive/src/drive/document/insert/mod.rs +++ b/packages/rs-drive/src/drive/document/insert/mod.rs @@ -35,12 +35,6 @@ mod add_indices_for_top_index_level_for_contract_operations; // This module contains functionality for adding a reference for an index level for contract operations mod add_reference_for_index_level_for_contract_operations; -#[cfg(all( - feature = "fixtures-and-mocks", - feature = "data-contract-cbor-conversion" -))] -use dpp::data_contract::conversion::cbor::DataContractCborConversionMethodsV0; - #[cfg(test)] mod tests { use std::borrow::Cow; diff --git a/packages/rs-drive/src/drive/document/insert_contested/add_contested_document_for_contract_operations/v0/mod.rs b/packages/rs-drive/src/drive/document/insert_contested/add_contested_document_for_contract_operations/v0/mod.rs index 6734a354ed9..d84d70a1a4f 100644 --- a/packages/rs-drive/src/drive/document/insert_contested/add_contested_document_for_contract_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/insert_contested/add_contested_document_for_contract_operations/v0/mod.rs @@ -4,6 +4,7 @@ use crate::error::Error; use crate::fees::op::LowLevelDriveOperation; use crate::util::object_size_info::DocumentAndContractInfo; use dpp::block::block_info::BlockInfo; +use dpp::dashcore::Network; use dpp::version::PlatformVersion; use dpp::voting::vote_info_storage::contested_document_vote_poll_stored_info::ContestedDocumentVotePollStoredInfo; use dpp::voting::vote_polls::VotePoll; @@ -50,12 +51,22 @@ impl Drive { platform_version, )?; - let end_date = block_info.time_ms.saturating_add( - platform_version - .dpp - .voting_versions - .default_vote_poll_time_duration_ms, - ); + let poll_time = match self.config.network { + Network::Dash => { + platform_version + .dpp + .voting_versions + .default_vote_poll_time_duration_mainnet_ms + } + _ => { + platform_version + .dpp + .voting_versions + .default_vote_poll_time_duration_test_network_ms + } + }; + + let end_date = block_info.time_ms.saturating_add(poll_time); let contest_already_existed = self.add_contested_indices_for_contract_operations( &document_and_contract_info, diff --git a/packages/rs-drive/src/drive/document/insert_contested/add_contested_reference_and_vote_subtree_to_document_operations/v0/mod.rs b/packages/rs-drive/src/drive/document/insert_contested/add_contested_reference_and_vote_subtree_to_document_operations/v0/mod.rs index 9caf559b176..3bc068d4f11 100644 --- a/packages/rs-drive/src/drive/document/insert_contested/add_contested_reference_and_vote_subtree_to_document_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/insert_contested/add_contested_reference_and_vote_subtree_to_document_operations/v0/mod.rs @@ -177,7 +177,7 @@ impl Drive { if !inserted { return Err(Error::Drive(DriveError::CorruptedContractIndexes( - "contested votes tree already exists", + "contested votes tree already exists".to_string(), ))); } diff --git a/packages/rs-drive/src/drive/document/insert_contested/add_contested_vote_subtrees_for_non_identities_operations/v0/mod.rs b/packages/rs-drive/src/drive/document/insert_contested/add_contested_vote_subtrees_for_non_identities_operations/v0/mod.rs index 21439d39c01..bb036014bd5 100644 --- a/packages/rs-drive/src/drive/document/insert_contested/add_contested_vote_subtrees_for_non_identities_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/insert_contested/add_contested_vote_subtrees_for_non_identities_operations/v0/mod.rs @@ -92,7 +92,7 @@ impl Drive { // here we are the tree that will contain the voting tree let inserted = self.batch_insert_empty_tree_if_not_exists( - votes_path_key_info, + votes_path_key_info.clone(), true, storage_flags, apply_type, @@ -104,7 +104,7 @@ impl Drive { if !inserted { return Err(Error::Drive(DriveError::CorruptedContractIndexes( - "contested votes tree already exists for a non identity (abstain or lock)", + format!("contested votes tree already exists for a non identity (abstain or lock), trying to insert empty tree at path {}", votes_path_key_info), ))); } diff --git a/packages/rs-drive/src/drive/document/insert_contested/mod.rs b/packages/rs-drive/src/drive/document/insert_contested/mod.rs index 7d38f3c056a..276c9d4aa71 100644 --- a/packages/rs-drive/src/drive/document/insert_contested/mod.rs +++ b/packages/rs-drive/src/drive/document/insert_contested/mod.rs @@ -36,12 +36,6 @@ mod add_contested_indices_for_contract_operations; mod add_contested_reference_and_vote_subtree_to_document_operations; mod add_contested_vote_subtrees_for_non_identities_operations; -#[cfg(all( - feature = "fixtures-and-mocks", - feature = "data-contract-cbor-conversion" -))] -use dpp::data_contract::conversion::cbor::DataContractCborConversionMethodsV0; - #[cfg(test)] mod tests { use std::option::Option::None; diff --git a/packages/rs-drive/src/drive/document/query/mod.rs b/packages/rs-drive/src/drive/document/query/mod.rs index 628071814f2..395cd73a084 100644 --- a/packages/rs-drive/src/drive/document/query/mod.rs +++ b/packages/rs-drive/src/drive/document/query/mod.rs @@ -3,10 +3,14 @@ //! Defines and implements in Drive functions relevant to querying. //! -mod query_contested_documents_vote_state; +/// query of the vote state +pub mod query_contested_documents_vote_state; mod query_documents; mod query_documents_with_flags; +/// query of the contested documents in their storage +pub mod query_contested_documents_storage; + pub use query_documents::*; pub use query_documents_with_flags::*; @@ -32,11 +36,6 @@ use crate::fees::op::LowLevelDriveOperation; use crate::query::DriveDocumentQuery; #[cfg(all(feature = "fixtures-and-mocks", feature = "cbor_query"))] use crate::verify::RootHash; -#[cfg(all( - feature = "fixtures-and-mocks", - feature = "data-contract-cbor-conversion" -))] -use dpp::data_contract::conversion::cbor::DataContractCborConversionMethodsV0; #[cfg(all(feature = "fixtures-and-mocks", feature = "cbor_query"))] use dpp::data_contract::document_type::DocumentTypeRef; #[cfg(all(feature = "fixtures-and-mocks", feature = "cbor_query"))] diff --git a/packages/rs-drive/src/drive/document/query/query_contested_documents_storage/mod.rs b/packages/rs-drive/src/drive/document/query/query_contested_documents_storage/mod.rs new file mode 100644 index 00000000000..4a3844c871a --- /dev/null +++ b/packages/rs-drive/src/drive/document/query/query_contested_documents_storage/mod.rs @@ -0,0 +1,100 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use derive_more::From; +use dpp::block::epoch::Epoch; +use dpp::document::Document; +use dpp::version::{PlatformVersion, PlatformVersionCurrentVersion}; +use grovedb::TransactionArg; + +mod v0; + +use crate::query::drive_contested_document_query::DriveContestedDocumentQuery; +pub use v0::*; + +/// Represents the outcome of a query to retrieve documents. +/// +/// This enum provides versioning for the outcomes of querying documents. +/// As the system evolves, new versions of the outcome structure can be +/// added to this enum without breaking existing implementations. +#[derive(From, Debug)] +pub enum QueryContestedDocumentsOutcome { + /// Version 0 of the `QueryDocumentsOutcome`. + /// + /// This version contains a list of documents retrieved, the number of + /// skipped documents, and the cost associated with the query. + V0(QueryContestedDocumentsOutcomeV0), +} + +impl QueryContestedDocumentsOutcomeV0Methods for QueryContestedDocumentsOutcome { + fn documents(&self) -> &Vec { + match self { + QueryContestedDocumentsOutcome::V0(outcome) => outcome.documents(), + } + } + + fn documents_owned(self) -> Vec { + match self { + QueryContestedDocumentsOutcome::V0(outcome) => outcome.documents_owned(), + } + } + + fn cost(&self) -> u64 { + match self { + QueryContestedDocumentsOutcome::V0(outcome) => outcome.cost(), + } + } +} + +impl Drive { + /// Performs a specified drive query and returns the result, along with any skipped items and the cost. + /// + /// This function is used to execute a given [DriveDocumentQuery]. It has options to operate in a dry-run mode + /// and supports different protocol versions. In case an epoch is specified, it calculates the fee. + /// + /// # Arguments + /// + /// * `query` - The [DriveContestedDocumentQuery] being executed. + /// * `epoch` - An `Option<&Epoch>`. If provided, it will be used to calculate the processing fee. + /// * `dry_run` - If true, the function will not perform any actual operation and return a default `QueryDocumentsOutcome`. + /// * `transaction` - The `TransactionArg` holding the transaction data. + /// * `protocol_version` - An `Option` representing the protocol version. If not provided, the function falls back + /// to current or latest version. + /// + /// # Returns + /// + /// * `Result` - Returns `QueryDocumentsOutcome` on success with the list of documents, + /// number of skipped items, and cost. If the operation fails, it returns an `Error`. + pub fn query_contested_documents( + &self, + query: DriveContestedDocumentQuery, + epoch: Option<&Epoch>, + dry_run: bool, + transaction: TransactionArg, + protocol_version: Option, + ) -> Result { + let platform_version = PlatformVersion::get_version_or_current_or_latest(protocol_version)?; + + match platform_version + .drive + .methods + .document + .query + .query_contested_documents + { + 0 => self.query_contested_documents_v0( + query, + epoch, + dry_run, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "query_contested_documents".to_string(), + known_versions: vec![0], + received: version, + })), + } + .map(|outcome| outcome.into()) + } +} diff --git a/packages/rs-drive/src/drive/document/query/query_contested_documents_storage/v0/mod.rs b/packages/rs-drive/src/drive/document/query/query_contested_documents_storage/v0/mod.rs new file mode 100644 index 00000000000..91a9aa0f906 --- /dev/null +++ b/packages/rs-drive/src/drive/document/query/query_contested_documents_storage/v0/mod.rs @@ -0,0 +1,107 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::query::drive_contested_document_query::DriveContestedDocumentQuery; +use dpp::block::epoch::Epoch; +use dpp::document::serialization_traits::DocumentPlatformConversionMethodsV0; +use dpp::document::Document; +use dpp::version::PlatformVersion; +use dpp::ProtocolError; +use grovedb::TransactionArg; + +/// The outcome of a query +#[derive(Debug, Default)] +pub struct QueryContestedDocumentsOutcomeV0 { + documents: Vec, + cost: u64, +} + +/// Trait defining methods associated with `QueryDocumentsOutcomeV0`. +/// +/// This trait provides a set of methods to interact with and retrieve +/// details from an instance of `QueryDocumentsOutcomeV0`. These methods +/// include retrieving the documents, skipped count, and the associated cost +/// of the query. +pub trait QueryContestedDocumentsOutcomeV0Methods { + /// Returns a reference to the documents found from the query. + fn documents(&self) -> &Vec; + /// Consumes the instance to return the owned documents. + fn documents_owned(self) -> Vec; + /// Returns the processing cost associated with the query. + fn cost(&self) -> u64; +} + +impl QueryContestedDocumentsOutcomeV0Methods for QueryContestedDocumentsOutcomeV0 { + fn documents(&self) -> &Vec { + &self.documents + } + + fn documents_owned(self) -> Vec { + self.documents + } + + fn cost(&self) -> u64 { + self.cost + } +} + +impl Drive { + /// Performs a specified drive query and returns the result, along with any skipped items and the cost. + /// + /// This function is used to execute a given [DriveDocumentQuery]. It has options to operate in a dry-run mode + /// and supports different protocol versions. In case an epoch is specified, it calculates the fee. + /// + /// # Arguments + /// + /// * `query` - The [DriveContestedDocumentQuery] being executed. + /// * `epoch` - An `Option<&Epoch>`. If provided, it will be used to calculate the processing fee. + /// * `dry_run` - If true, the function will not perform any actual operation and return a default `QueryDocumentsOutcome`. + /// * `transaction` - The `TransactionArg` holding the transaction data. + /// * `platform_version` - A reference to the `PlatformVersion` object specifying the version of functions to call. + /// + /// # Returns + /// + /// * `Result` - Returns `QueryDocumentsOutcome` on success with the list of documents, + /// number of skipped items, and cost. If the operation fails, it returns an `Error`. + #[inline(always)] + pub(super) fn query_contested_documents_v0( + &self, + query: DriveContestedDocumentQuery, + epoch: Option<&Epoch>, + dry_run: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + if dry_run { + return Ok(QueryContestedDocumentsOutcomeV0::default()); + } + let mut drive_operations: Vec = vec![]; + let (items, _) = query.execute_raw_results_no_proof_internal( + self, + transaction, + &mut drive_operations, + platform_version, + )?; + let documents = items + .into_iter() + .map(|serialized| { + Document::from_bytes(serialized.as_slice(), query.document_type, platform_version) + }) + .collect::, ProtocolError>>()?; + let cost = if let Some(epoch) = epoch { + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + fee_result.processing_fee + } else { + 0 + }; + + Ok(QueryContestedDocumentsOutcomeV0 { documents, cost }) + } +} diff --git a/packages/rs-drive/src/drive/document/query/query_contested_documents_vote_state/mod.rs b/packages/rs-drive/src/drive/document/query/query_contested_documents_vote_state/mod.rs index aaf7d749361..0af3e4b97c6 100644 --- a/packages/rs-drive/src/drive/document/query/query_contested_documents_vote_state/mod.rs +++ b/packages/rs-drive/src/drive/document/query/query_contested_documents_vote_state/mod.rs @@ -3,7 +3,7 @@ use crate::error::drive::DriveError; use crate::error::Error; use derive_more::From; use dpp::block::epoch::Epoch; -use dpp::version::{PlatformVersion, PlatformVersionCurrentVersion}; +use dpp::version::PlatformVersion; use dpp::voting::contender_structs::ContenderWithSerializedDocument; use grovedb::TransactionArg; @@ -70,20 +70,23 @@ impl Drive { query: ContestedDocumentVotePollDriveQuery, epoch: Option<&Epoch>, transaction: TransactionArg, - protocol_version: Option, + platform_version: &PlatformVersion, ) -> Result { - let platform_version = PlatformVersion::get_version_or_current_or_latest(protocol_version)?; - match platform_version .drive .methods .document .query - .query_documents + .query_contested_documents_vote_state { - 0 => self.query_contested_documents_v0(query, epoch, transaction, platform_version), + 0 => self.query_contested_documents_vote_state_v0( + query, + epoch, + transaction, + platform_version, + ), version => Err(Error::Drive(DriveError::UnknownVersionMismatch { - method: "query_documents".to_string(), + method: "query_contested_documents_vote_state".to_string(), known_versions: vec![0], received: version, })), diff --git a/packages/rs-drive/src/drive/document/query/query_contested_documents_vote_state/v0/mod.rs b/packages/rs-drive/src/drive/document/query/query_contested_documents_vote_state/v0/mod.rs index 105d93da60c..c9a36c4fba5 100644 --- a/packages/rs-drive/src/drive/document/query/query_contested_documents_vote_state/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/query/query_contested_documents_vote_state/v0/mod.rs @@ -64,7 +64,7 @@ impl Drive { /// * `Result` - Returns `QueryDocumentsOutcome` on success with the list of documents, /// number of skipped items, and cost. If the operation fails, it returns an `Error`. #[inline(always)] - pub(super) fn query_contested_documents_v0( + pub(super) fn query_contested_documents_vote_state_v0( &self, query: ContestedDocumentVotePollDriveQuery, epoch: Option<&Epoch>, diff --git a/packages/rs-drive/src/drive/document/update/internal/update_document_for_contract_operations/v0/mod.rs b/packages/rs-drive/src/drive/document/update/internal/update_document_for_contract_operations/v0/mod.rs index 7d33635c1a7..0c92a15651f 100644 --- a/packages/rs-drive/src/drive/document/update/internal/update_document_for_contract_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/update/internal/update_document_for_contract_operations/v0/mod.rs @@ -180,7 +180,7 @@ impl Drive { .map(|&x| Vec::from(x)) .collect(); let top_index_property = index.properties.first().ok_or(Error::Drive( - DriveError::CorruptedContractIndexes("invalid contract indices"), + DriveError::CorruptedContractIndexes("invalid contract indices".to_string()), ))?; index_path.push(Vec::from(top_index_property.name.as_bytes())); @@ -255,7 +255,7 @@ impl Drive { for i in 1..index.properties.len() { let index_property = index.properties.get(i).ok_or(Error::Drive( - DriveError::CorruptedContractIndexes("invalid contract indices"), + DriveError::CorruptedContractIndexes("invalid contract indices".to_string()), ))?; let document_index_field = document @@ -441,7 +441,7 @@ impl Drive { )?; if !inserted { return Err(Error::Drive(DriveError::CorruptedContractIndexes( - "index already exists", + "index already exists".to_string(), ))); } } diff --git a/packages/rs-drive/src/drive/identity/balance/prove.rs b/packages/rs-drive/src/drive/identity/balance/prove.rs index 0f23f06c97a..81542d575a7 100644 --- a/packages/rs-drive/src/drive/identity/balance/prove.rs +++ b/packages/rs-drive/src/drive/identity/balance/prove.rs @@ -38,8 +38,20 @@ impl Drive { transaction: TransactionArg, drive_version: &DriveVersion, ) -> Result, Error> { - let balance_query = - Self::balances_for_identity_ids_query(identity_ids, &drive_version.grove_version)?; + let balance_query = Self::balances_for_identity_ids_query(identity_ids); + self.grove_get_proved_path_query(&balance_query, transaction, &mut vec![], drive_version) + } + + /// Proves multiple Identity balances from the backing store by range + pub fn prove_many_identity_balances_by_range( + &self, + start_at: Option<([u8; 32], bool)>, + ascending: bool, + limit: u16, + transaction: TransactionArg, + drive_version: &DriveVersion, + ) -> Result, Error> { + let balance_query = Self::balances_for_range_query(start_at, ascending, limit); self.grove_get_proved_path_query(&balance_query, transaction, &mut vec![], drive_version) } } diff --git a/packages/rs-drive/src/drive/identity/fetch/mod.rs b/packages/rs-drive/src/drive/identity/fetch/mod.rs index 01ad75add42..78bdd9c90fd 100644 --- a/packages/rs-drive/src/drive/identity/fetch/mod.rs +++ b/packages/rs-drive/src/drive/identity/fetch/mod.rs @@ -29,6 +29,10 @@ use grovedb::TransactionArg; #[cfg(any(feature = "server", feature = "verify"))] use grovedb::{PathQuery, SizedQuery}; +#[cfg(feature = "server")] +use dpp::fee::Credits; + +#[cfg(feature = "server")] use platform_version::version::PlatformVersion; #[cfg(feature = "server")] use std::collections::BTreeMap; @@ -160,52 +164,110 @@ impl Drive { .collect() } - // TODO: We deal with it in an upcoming PR (Sam!!) - // /// Given a vector of identities, fetches the identities with their keys - // /// matching the request from storage. - // pub fn fetch_identities_with_keys( - // &self, - // ids: Vec<[u8; 32]>, - // key_ref_request: KeyRequestType, - // transaction: TransactionArg, - // ) -> Result, Error> { - // let key_request = IdentityKeysRequest { - // identity_id: [], - // key_request: KeyRequestType::AllKeysRequest, - // limit: None, - // offset: None, - // } - // let mut query = Query::new(); - // query.set_subquery_key(IDENTITY_KEY.to_vec()); - // - // let (result_items, _) = self - // .grove - // .query_raw(&path_query, QueryElementResultType, transaction) - // .unwrap() - // .map_err(Error::GroveDB)?; - // - // result_items - // .to_elements() - // .into_iter() - // .map(|element| { - // if let Element::Item(identity_cbor, element_flags) = &element { - // let identity = - // Identity::from_buffer(identity_cbor.as_slice()).map_err(|_| { - // Error::Identity(IdentityError::IdentitySerialization( - // "failed to deserialize an identity", - // )) - // })?; - // - // Ok(( - // identity, - // StorageFlags::from_some_element_flags_ref(element_flags)?, - // )) - // } else { - // Err(Error::Drive(DriveError::CorruptedIdentityNotItem( - // "identity must be an item", - // ))) - // } - // }) - // .collect() - // } + #[cfg(feature = "server")] + /// Given a vector of identities, fetches the identities from storage. + pub fn fetch_optional_identities_balances( + &self, + ids: &Vec<[u8; 32]>, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + let mut query = Query::new(); + for id in ids { + query.insert_item(QueryItem::Key(id.to_vec())); + } + let path_query = PathQuery { + path: vec![vec![RootTree::Balances as u8]], + query: SizedQuery { + query, + limit: None, + offset: None, + }, + }; + let results = self + .grove + .query_raw_keys_optional( + &path_query, + true, + true, + true, + transaction, + &platform_version.drive.grove_version, + ) + .unwrap() + .map_err(Error::GroveDB)?; + + results + .into_iter() + .map(|(_, key, element)| { + let identifier: [u8; 32] = key.try_into().map_err(|_| { + Error::Drive(DriveError::CorruptedSerialization(String::from( + "expected 32 bytes", + ))) + })?; + + let balance = element + .map(|element| { + if let SumItem(balance, _) = &element { + Ok(*balance as u64) + } else { + Err(Error::Drive(DriveError::CorruptedIdentityNotItem( + "identity balance must be a sum item", + ))) + } + }) + .transpose()?; + + Ok((identifier, balance)) + }) + .collect() + } + + #[cfg(feature = "server")] + /// Given a vector of identities, fetches the identities from storage. + pub fn fetch_many_identity_balances_by_range( + &self, + start_at: Option<([u8; 32], bool)>, + ascending: bool, + limit: u16, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result + where + I: FromIterator<([u8; 32], u64)>, + { + let balance_query = Self::balances_for_range_query(start_at, ascending, limit); + let (result_items, _) = self + .grove + .query_raw( + &balance_query, + true, + true, + true, + QueryKeyElementPairResultType, + transaction, + &platform_version.drive.grove_version, + ) + .unwrap() + .map_err(Error::GroveDB)?; + + result_items + .to_key_elements() + .into_iter() + .map(|key_element| { + if let SumItem(balance, _) = &key_element.1 { + let identifier: [u8; 32] = key_element.0.try_into().map_err(|_| { + Error::Drive(DriveError::CorruptedSerialization(String::from( + "expected 32 bytes", + ))) + })?; + Ok((identifier, *balance as u64)) + } else { + Err(Error::Drive(DriveError::CorruptedIdentityNotItem( + "identity balance must be a sum item", + ))) + } + }) + .collect() + } } diff --git a/packages/rs-drive/src/drive/identity/fetch/queries/mod.rs b/packages/rs-drive/src/drive/identity/fetch/queries/mod.rs index aa12b299102..f7832d2274f 100644 --- a/packages/rs-drive/src/drive/identity/fetch/queries/mod.rs +++ b/packages/rs-drive/src/drive/identity/fetch/queries/mod.rs @@ -1,6 +1,7 @@ use crate::drive::balances::balance_path_vec; use crate::drive::identity::key::fetch::IdentityKeysRequest; use crate::drive::{identity_tree_path_vec, unique_key_hashes_tree_path_vec, Drive}; +use std::ops::RangeFull; use crate::error::Error; @@ -13,7 +14,7 @@ use crate::drive::identity::{ use crate::error::query::QuerySyntaxError; use dpp::identity::Purpose; use grovedb::query_result_type::Key; -use grovedb::{PathQuery, Query, SizedQuery}; +use grovedb::{PathQuery, Query, QueryItem, SizedQuery}; use grovedb_version::version::GroveVersion; /// An enumeration representing the types of identity prove requests. @@ -133,15 +134,55 @@ impl Drive { } /// The query getting all balances and revision - pub fn balances_for_identity_ids_query( - identity_ids: &[[u8; 32]], - grove_version: &GroveVersion, - ) -> Result { - let path_queries: Vec = identity_ids - .iter() - .map(Self::identity_balance_query) - .collect::>(); - PathQuery::merge(path_queries.iter().collect(), grove_version).map_err(Error::GroveDB) + pub fn balances_for_identity_ids_query(identity_ids: &[[u8; 32]]) -> PathQuery { + let balance_path = balance_path_vec(); + let mut query = Query::new(); + query.insert_keys(identity_ids.iter().map(|key| key.to_vec()).collect()); + PathQuery { + path: balance_path, + query: SizedQuery { + query, + limit: None, + offset: None, + }, + } + } + + /// The query getting all balances and revision + pub fn balances_for_range_query( + start_at: Option<([u8; 32], bool)>, + ascending: bool, + limit: u16, + ) -> PathQuery { + let balance_path = balance_path_vec(); + let mut query = Query::new_with_direction(ascending); + if ascending { + if let Some((start_at, start_at_included)) = start_at { + if start_at_included { + query.insert_item(QueryItem::RangeFrom(start_at.to_vec()..)) + } else { + query.insert_item(QueryItem::RangeAfter(start_at.to_vec()..)) + } + } else { + query.insert_item(QueryItem::RangeFull(RangeFull)) + } + } else if let Some((start_at, start_at_included)) = start_at { + if start_at_included { + query.insert_item(QueryItem::RangeToInclusive(..=start_at.to_vec())) + } else { + query.insert_item(QueryItem::RangeTo(..start_at.to_vec())) + } + } else { + query.insert_item(QueryItem::RangeFull(RangeFull)) + } + PathQuery { + path: balance_path, + query: SizedQuery { + query, + limit: Some(limit), + offset: None, + }, + } } /// The query getting all keys and balance and revision diff --git a/packages/rs-drive/src/drive/mod.rs b/packages/rs-drive/src/drive/mod.rs index f5abb9f3c9b..fc28c49647a 100644 --- a/packages/rs-drive/src/drive/mod.rs +++ b/packages/rs-drive/src/drive/mod.rs @@ -75,13 +75,13 @@ pub struct Drive { // is at the top of the tree in order to reduce proof size // the most import tree is theDataContract Documents tree -// DataContract_Documents 64 -// / \ -// Identities 32 Balances 96 -// / \ / \ -// Token_Balances 16 Pools 48 WithdrawalTransactions 80 Votes 112 -// / \ / / / \ -// NUPKH->I 8 UPKH->I 24 PreFundedSpecializedBalances 40 SpentAssetLockTransactions 72 Misc 104 Versions 120 +// DataContract_Documents 64 +// / \ +// Identities 32 Balances 96 +// / \ / \ +// Token_Balances 16 Pools 48 WithdrawalTransactions 80 Votes 112 +// / \ / \ / / \ +// NUPKH->I 8 UPKH->I 24 PreFundedSpecializedBalances 40 Masternode Lists 56 (reserved) SpentAssetLockTransactions 72 Misc 104 Versions 120 /// Keys for the root tree. #[cfg(any(feature = "server", feature = "verify"))] @@ -101,6 +101,9 @@ pub enum RootTree { /// PreFundedSpecializedBalances are balances that can fund specific state transitions that match /// predefined criteria PreFundedSpecializedBalances = 40, + // todo: reserved + // MasternodeLists contain the current masternode list as well as the evonode masternode list + // MasternodeLists = 56, /// Spent Asset Lock Transactions SpentAssetLockTransactions = 72, /// Misc @@ -129,6 +132,7 @@ impl fmt::Display for RootTree { } RootTree::Pools => "Pools", RootTree::PreFundedSpecializedBalances => "PreFundedSpecializedBalances", + // RootTree::MasternodeLists => "MasternodeLists", RootTree::SpentAssetLockTransactions => "SpentAssetLockTransactions", RootTree::Misc => "Misc", RootTree::WithdrawalTransactions => "WithdrawalTransactions", @@ -170,6 +174,7 @@ impl TryFrom for RootTree { 24 => Ok(RootTree::UniquePublicKeyHashesToIdentities), 8 => Ok(RootTree::NonUniquePublicKeyKeyHashesToIdentities), 48 => Ok(RootTree::Pools), + // 56 => Ok(RootTree::MasternodeLists), //todo (reserved) 40 => Ok(RootTree::PreFundedSpecializedBalances), 72 => Ok(RootTree::SpentAssetLockTransactions), 104 => Ok(RootTree::Misc), @@ -195,6 +200,7 @@ impl From for &'static [u8; 1] { RootTree::SpentAssetLockTransactions => &[72], RootTree::Pools => &[48], RootTree::PreFundedSpecializedBalances => &[40], + // RootTree::MasternodeLists => &[56], RootTree::Misc => &[104], RootTree::WithdrawalTransactions => &[80], RootTree::Balances => &[96], diff --git a/packages/rs-drive/src/drive/votes/cleanup/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/mod.rs index 55b79c84459..e425c9a6c4e 100644 --- a/packages/rs-drive/src/drive/votes/cleanup/mod.rs +++ b/packages/rs-drive/src/drive/votes/cleanup/mod.rs @@ -2,5 +2,7 @@ mod remove_all_votes_given_by_identities; mod remove_contested_resource_vote_poll_contenders_operations; mod remove_contested_resource_vote_poll_documents_operations; mod remove_contested_resource_vote_poll_end_date_query_operations; +mod remove_contested_resource_vote_poll_info_operations; +mod remove_contested_resource_vote_poll_top_level_index_operations; mod remove_contested_resource_vote_poll_votes_operations; mod remove_specific_votes_given_by_identity; diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_contenders_operations/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_contenders_operations/mod.rs index 21dcf70e236..82fcda8cb05 100644 --- a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_contenders_operations/mod.rs +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_contenders_operations/mod.rs @@ -1,4 +1,5 @@ mod v0; +mod v1; use crate::drive::Drive; use std::collections::BTreeMap; @@ -41,9 +42,15 @@ impl Drive { transaction, platform_version, ), + 1 => self.remove_contested_resource_vote_poll_contenders_operations_v1( + vote_polls, + batch_operations, + transaction, + platform_version, + ), version => Err(Error::Drive(DriveError::UnknownVersionMismatch { method: "remove_contested_resource_vote_poll_contenders_operations".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, })), } diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_contenders_operations/v1/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_contenders_operations/v1/mod.rs new file mode 100644 index 00000000000..7440aaadce6 --- /dev/null +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_contenders_operations/v1/mod.rs @@ -0,0 +1,71 @@ +use crate::drive::votes::paths::{ + VotePollPaths, RESOURCE_ABSTAIN_VOTE_TREE_KEY_U8_32, RESOURCE_LOCK_VOTE_TREE_KEY_U8_32, +}; +use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo; +use crate::drive::votes::ResourceVoteChoiceToKeyTrait; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::BatchDeleteApplyType; +use dpp::identifier::Identifier; +use dpp::identity::TimestampMillis; +use dpp::voting::vote_choices::resource_vote_choice::ResourceVoteChoice; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +impl Drive { + /// We add votes poll references by end date in order to be able to check on every new block if + /// any vote polls should be closed. + pub(in crate::drive::votes) fn remove_contested_resource_vote_poll_contenders_operations_v1( + &self, + vote_polls: &[( + &ContestedDocumentResourceVotePollWithContractInfo, + &TimestampMillis, + &BTreeMap>, + )], + batch_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + for (vote_poll, _, votes) in vote_polls { + let path = vote_poll.contenders_path(platform_version)?; + for (resource_vote_choice, _) in *votes { + self.batch_delete( + path.as_slice().into(), + resource_vote_choice.to_key().as_slice(), + BatchDeleteApplyType::StatefulBatchDelete { + is_known_to_be_subtree_with_sum: Some((false, false)), + }, + transaction, + batch_operations, + &platform_version.drive, + )?; + } + + self.batch_delete( + path.as_slice().into(), + &RESOURCE_ABSTAIN_VOTE_TREE_KEY_U8_32, + BatchDeleteApplyType::StatefulBatchDelete { + is_known_to_be_subtree_with_sum: Some((false, false)), + }, + transaction, + batch_operations, + &platform_version.drive, + )?; + + self.batch_delete( + path.as_slice().into(), + &RESOURCE_LOCK_VOTE_TREE_KEY_U8_32, + BatchDeleteApplyType::StatefulBatchDelete { + is_known_to_be_subtree_with_sum: Some((false, false)), + }, + transaction, + batch_operations, + &platform_version.drive, + )?; + } + + Ok(()) + } +} diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_documents_operations/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_documents_operations/mod.rs index 235010a2362..8fbd57c83ff 100644 --- a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_documents_operations/mod.rs +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_documents_operations/mod.rs @@ -1,4 +1,5 @@ mod v0; +mod v1; use crate::drive::Drive; use std::collections::BTreeMap; @@ -24,6 +25,7 @@ impl Drive { &TimestampMillis, &BTreeMap>, )], + clean_up_testnet_corrupted_reference_issue: bool, batch_operations: &mut Vec, transaction: TransactionArg, platform_version: &PlatformVersion, @@ -41,9 +43,16 @@ impl Drive { transaction, platform_version, ), + 1 => self.remove_contested_resource_vote_poll_documents_operations_v1( + vote_polls, + clean_up_testnet_corrupted_reference_issue, + batch_operations, + transaction, + platform_version, + ), version => Err(Error::Drive(DriveError::UnknownVersionMismatch { method: "remove_contested_resource_vote_poll_documents_operations".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, })), } diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_documents_operations/v0/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_documents_operations/v0/mod.rs index dba3c5369f1..cb25558a382 100644 --- a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_documents_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_documents_operations/v0/mod.rs @@ -17,6 +17,8 @@ use std::ops::RangeFull; impl Drive { /// We add documents poll references by end date in order to be able to check on every new block if /// any vote polls should be closed. + /// !!!!! THIS VERSION CONTAINED A SERIOUS ISSUE !!!!! + /// However, it should never have made it to mainnet. pub(in crate::drive::votes) fn remove_contested_resource_vote_poll_documents_operations_v0( &self, vote_polls: &[( diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_documents_operations/v1/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_documents_operations/v1/mod.rs new file mode 100644 index 00000000000..f6722670348 --- /dev/null +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_documents_operations/v1/mod.rs @@ -0,0 +1,104 @@ +use crate::drive::votes::paths::VotePollPaths; +use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::query::vote_poll_vote_state_query::{ + ContestedDocumentVotePollDriveQueryResultType, ResolvedContestedDocumentVotePollDriveQuery, +}; +use crate::util::grove_operations::BatchDeleteApplyType; +use dpp::document::DocumentV0Getters; +use dpp::identifier::Identifier; +use dpp::identity::TimestampMillis; +use dpp::voting::vote_choices::resource_vote_choice::ResourceVoteChoice; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +impl Drive { + /// We add documents poll references by end date in order to be able to check on every new block if + /// any vote polls should be closed. + pub(in crate::drive::votes) fn remove_contested_resource_vote_poll_documents_operations_v1( + &self, + vote_polls: &[( + &ContestedDocumentResourceVotePollWithContractInfo, + &TimestampMillis, + &BTreeMap>, + )], + clean_up_testnet_corrupted_reference_issue: bool, + batch_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + for (vote_poll, _, vote_choices) in vote_polls { + if !clean_up_testnet_corrupted_reference_issue { + // if we are in clean up we keep all documents + let query = ResolvedContestedDocumentVotePollDriveQuery { + vote_poll: (*vote_poll).into(), + result_type: ContestedDocumentVotePollDriveQueryResultType::Documents, + offset: None, + limit: None, + start_at: None, + allow_include_locked_and_abstaining_vote_tally: false, + }; + + let contested_document_vote_poll_drive_query_execution_result = + query.execute(self, transaction, &mut vec![], platform_version)?; + + let document_type = vote_poll.document_type()?; + let document_keys = contested_document_vote_poll_drive_query_execution_result + .contenders + .into_iter() + .filter_map(|contender| { + let maybe_document_result = + match contender.try_into_contender(document_type, platform_version) { + Ok(mut contender) => contender.take_document(), + Err(e) => return Some(Err(e.into())), + }; + + match maybe_document_result { + Some(document) => Some(Ok(document.id().to_vec())), // Assuming document.id holds the document key + None => None, // Handle the case where no document is found + } + }) + .collect::>, Error>>()?; + + let documents_storage_path = vote_poll.documents_storage_path_vec(); + + for document_key in document_keys { + self.batch_delete( + documents_storage_path.as_slice().into(), + document_key.as_slice(), + BatchDeleteApplyType::StatefulBatchDelete { + is_known_to_be_subtree_with_sum: Some((false, false)), + }, + transaction, + batch_operations, + &platform_version.drive, + )?; + } + } + + // We also need to delete all the references + + for resource_vote_choice in vote_choices.keys() { + if matches!(resource_vote_choice, ResourceVoteChoice::TowardsIdentity(_)) { + let contender_path = + vote_poll.contender_path(resource_vote_choice, platform_version)?; + self.batch_delete( + contender_path.as_slice().into(), + vec![0].as_slice(), + BatchDeleteApplyType::StatefulBatchDelete { + is_known_to_be_subtree_with_sum: Some((false, false)), + }, + transaction, + batch_operations, + &platform_version.drive, + )?; + } + } + } + + Ok(()) + } +} diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_end_date_query_operations/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_end_date_query_operations/mod.rs index 73ef67bc5b5..15fba02e814 100644 --- a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_end_date_query_operations/mod.rs +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_end_date_query_operations/mod.rs @@ -1,4 +1,5 @@ mod v0; +mod v1; use crate::drive::Drive; use std::collections::BTreeMap; @@ -41,6 +42,12 @@ impl Drive { transaction, platform_version, ), + 1 => self.remove_contested_resource_vote_poll_end_date_query_operations_v1( + vote_polls, + batch_operations, + transaction, + platform_version, + ), version => Err(Error::Drive(DriveError::UnknownVersionMismatch { method: "remove_contested_resource_vote_poll_end_date_query_operations".to_string(), known_versions: vec![0], diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_end_date_query_operations/v1/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_end_date_query_operations/v1/mod.rs new file mode 100644 index 00000000000..b47e5feb605 --- /dev/null +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_end_date_query_operations/v1/mod.rs @@ -0,0 +1,116 @@ +use crate::drive::votes::paths::{ + vote_contested_resource_end_date_queries_at_time_tree_path_vec, + vote_end_date_queries_tree_path_vec, +}; +use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::query::VotePollsByEndDateDriveQuery; +use crate::util::common::encode::encode_u64; +use crate::util::grove_operations::BatchDeleteApplyType; +use dpp::identifier::Identifier; +use dpp::identity::TimestampMillis; +use dpp::voting::vote_choices::resource_vote_choice::ResourceVoteChoice; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +impl Drive { + /// We add votes poll references by end date in order to be able to check on every new block if + /// any vote polls should be closed. + pub(in crate::drive::votes) fn remove_contested_resource_vote_poll_end_date_query_operations_v1( + &self, + vote_polls: &[( + &ContestedDocumentResourceVotePollWithContractInfo, + &TimestampMillis, + &BTreeMap>, + )], + batch_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + // This is a GroveDB Tree (Not Sub Tree Merk representation) + // End Date queries + // / \ + // 15/08/2025 5PM 15/08/2025 6PM + // / \ | + // VotePoll Info 1 VotePoll Info 2 VotePoll Info 3 + + let delete_apply_type = BatchDeleteApplyType::StatefulBatchDelete { + is_known_to_be_subtree_with_sum: Some((false, false)), + }; + + let mut by_end_date: BTreeMap> = BTreeMap::new(); + + for (vote_poll, end_date, _) in vote_polls { + let vote_polls_unique_ids = by_end_date.entry(**end_date).or_default(); + + vote_polls_unique_ids.push(vote_poll.unique_id()?); + } + + for (end_date, unique_ids) in by_end_date { + let time_path = + vote_contested_resource_end_date_queries_at_time_tree_path_vec(end_date); + + let count = unique_ids.len(); + + for unique_id in unique_ids { + self.batch_delete( + time_path.as_slice().into(), + unique_id.as_bytes(), + delete_apply_type.clone(), + transaction, + batch_operations, + &platform_version.drive, + )?; + } + + let should_delete_parent_time_tree = if count + < platform_version + .drive_abci + .validation_and_processing + .event_constants + .maximum_vote_polls_to_process as usize + { + true + } else { + // We need to see if we have more to process + let increased_limit = platform_version + .drive_abci + .validation_and_processing + .event_constants + .maximum_vote_polls_to_process + + 1; + let total_count = + VotePollsByEndDateDriveQuery::execute_no_proof_for_specialized_end_time_query_only_check_end_time( + end_date, + increased_limit, + self, + transaction, + &mut vec![], + platform_version, + )?.len(); + + if total_count <= count { + true + } else { + false + } + }; + + if should_delete_parent_time_tree { + self.batch_delete( + vote_end_date_queries_tree_path_vec().as_slice().into(), + encode_u64(end_date).as_slice(), + delete_apply_type.clone(), + transaction, + batch_operations, + &platform_version.drive, + )?; + } + } + + Ok(()) + } +} diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_info_operations/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_info_operations/mod.rs new file mode 100644 index 00000000000..f67d7983093 --- /dev/null +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_info_operations/mod.rs @@ -0,0 +1,50 @@ +mod v0; + +use crate::drive::Drive; +use std::collections::BTreeMap; + +use crate::error::drive::DriveError; +use crate::error::Error; + +use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo; +use crate::fees::op::LowLevelDriveOperation; +use dpp::identifier::Identifier; +use dpp::prelude::TimestampMillis; +use dpp::version::PlatformVersion; +use dpp::voting::vote_choices::resource_vote_choice::ResourceVoteChoice; +use grovedb::TransactionArg; + +impl Drive { + /// We remove the entire vote poll + pub fn remove_contested_resource_info_operations( + &self, + vote_polls: &[( + &ContestedDocumentResourceVotePollWithContractInfo, + &TimestampMillis, + &BTreeMap>, + )], + batch_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version + .drive + .methods + .vote + .cleanup + .remove_contested_resource_info_operations + { + 0 => self.remove_contested_resource_info_operations_v0( + vote_polls, + batch_operations, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "remove_contested_resource_info_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_info_operations/v0/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_info_operations/v0/mod.rs new file mode 100644 index 00000000000..141fd3c766e --- /dev/null +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_info_operations/v0/mod.rs @@ -0,0 +1,42 @@ +use crate::drive::votes::paths::{VotePollPaths, RESOURCE_STORED_INFO_KEY_U8_32}; +use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::BatchDeleteApplyType; +use dpp::identifier::Identifier; +use dpp::identity::TimestampMillis; +use dpp::voting::vote_choices::resource_vote_choice::ResourceVoteChoice; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +impl Drive { + pub(in crate::drive::votes) fn remove_contested_resource_info_operations_v0( + &self, + vote_polls: &[( + &ContestedDocumentResourceVotePollWithContractInfo, + &TimestampMillis, + &BTreeMap>, + )], + batch_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + for (vote_poll, _, _) in vote_polls { + let path = vote_poll.contenders_path(platform_version)?; + self.batch_delete( + path.as_slice().into(), + &RESOURCE_STORED_INFO_KEY_U8_32, + BatchDeleteApplyType::StatefulBatchDelete { + is_known_to_be_subtree_with_sum: Some((false, false)), + }, + transaction, + batch_operations, + &platform_version.drive, + )?; + } + + Ok(()) + } +} diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_top_level_index_operations/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_top_level_index_operations/mod.rs new file mode 100644 index 00000000000..f91c6040646 --- /dev/null +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_top_level_index_operations/mod.rs @@ -0,0 +1,50 @@ +mod v0; + +use crate::drive::Drive; +use std::collections::BTreeMap; + +use crate::error::drive::DriveError; +use crate::error::Error; + +use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo; +use crate::fees::op::LowLevelDriveOperation; +use dpp::identifier::Identifier; +use dpp::prelude::TimestampMillis; +use dpp::version::PlatformVersion; +use dpp::voting::vote_choices::resource_vote_choice::ResourceVoteChoice; +use grovedb::TransactionArg; + +impl Drive { + /// We remove the entire vote poll + pub fn remove_contested_resource_top_level_index_operations( + &self, + vote_polls: &[( + &ContestedDocumentResourceVotePollWithContractInfo, + &TimestampMillis, + &BTreeMap>, + )], + batch_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version + .drive + .methods + .vote + .cleanup + .remove_contested_resource_top_level_index_operations + { + 0 => self.remove_contested_resource_top_level_index_operations_v0( + vote_polls, + batch_operations, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "remove_contested_resource_top_level_index_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_top_level_index_operations/v0/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_top_level_index_operations/v0/mod.rs new file mode 100644 index 00000000000..13d3832592c --- /dev/null +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_top_level_index_operations/v0/mod.rs @@ -0,0 +1,44 @@ +use crate::drive::votes::paths::VotePollPaths; +use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::BatchDeleteApplyType; +use dpp::identifier::Identifier; +use dpp::identity::TimestampMillis; +use dpp::voting::vote_choices::resource_vote_choice::ResourceVoteChoice; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +impl Drive { + pub(in crate::drive::votes) fn remove_contested_resource_top_level_index_operations_v0( + &self, + vote_polls: &[( + &ContestedDocumentResourceVotePollWithContractInfo, + &TimestampMillis, + &BTreeMap>, + )], + batch_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + for (vote_poll, _, _) in vote_polls { + let (path, last_index_path) = vote_poll.last_index_path(platform_version)?; + if let Some(last_index_path) = last_index_path { + self.batch_delete( + path.as_slice().into(), + last_index_path.as_slice(), + BatchDeleteApplyType::StatefulBatchDelete { + is_known_to_be_subtree_with_sum: Some((false, false)), + }, + transaction, + batch_operations, + &platform_version.drive, + )?; + } + } + + Ok(()) + } +} diff --git a/packages/rs-drive/src/drive/votes/insert/vote_poll/add_vote_poll_end_date_query_operations/v0/mod.rs b/packages/rs-drive/src/drive/votes/insert/vote_poll/add_vote_poll_end_date_query_operations/v0/mod.rs index ea2fc698ff1..1c5fb593e9c 100644 --- a/packages/rs-drive/src/drive/votes/insert/vote_poll/add_vote_poll_end_date_query_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/votes/insert/vote_poll/add_vote_poll_end_date_query_operations/v0/mod.rs @@ -92,6 +92,8 @@ impl Drive { let drive_key = DriveKeyInfo::Key(encode_u64(end_date)); + // println!("adding end vote date at end_date {} ({})", end_date, if estimated_costs_only_with_layer_info.is_some() { "costs"} else {"apply"}); + let path_key_info = drive_key.add_path_info::<0>(PathInfo::PathAsVec(end_date_query_path)); let apply_type = if estimated_costs_only_with_layer_info.is_none() { diff --git a/packages/rs-drive/src/drive/votes/paths.rs b/packages/rs-drive/src/drive/votes/paths.rs index 35874e6f60f..08e73e0a7c0 100644 --- a/packages/rs-drive/src/drive/votes/paths.rs +++ b/packages/rs-drive/src/drive/votes/paths.rs @@ -88,6 +88,20 @@ pub trait VotePollPaths { /// The contenders path as a vec fn contenders_path(&self, platform_version: &PlatformVersion) -> Result>, Error>; + /// the last index path as a path vec and a key + fn last_index_path( + &self, + platform_version: &PlatformVersion, + ) -> Result<(Vec>, Option>), Error> { + let mut contenders_path = self.contenders_path(platform_version)?; + if contenders_path.is_empty() { + Ok((vec![], None)) + } else { + let last_index = contenders_path.remove(contenders_path.len() - 1); + Ok((contenders_path, Some(last_index))) + } + } + /// The path that would store the contender information for a single contender fn contender_path( &self, diff --git a/packages/rs-drive/src/error/drive.rs b/packages/rs-drive/src/error/drive.rs index 74bd830129a..922cc5b8e4b 100644 --- a/packages/rs-drive/src/error/drive.rs +++ b/packages/rs-drive/src/error/drive.rs @@ -107,7 +107,7 @@ pub enum DriveError { CorruptedContractPath(&'static str), /// Error #[error("corrupted contract indexes error: {0}")] - CorruptedContractIndexes(&'static str), + CorruptedContractIndexes(String), /// Error #[error("corrupted document path error: {0}")] CorruptedDocumentPath(&'static str), diff --git a/packages/rs-drive/src/query/drive_contested_document_query.rs b/packages/rs-drive/src/query/drive_contested_document_query.rs new file mode 100644 index 00000000000..e83950d6e0d --- /dev/null +++ b/packages/rs-drive/src/query/drive_contested_document_query.rs @@ -0,0 +1,160 @@ +use crate::drive::contract::paths::DataContractPaths; +use crate::drive::Drive; +use crate::error::Error; +#[cfg(feature = "server")] +use crate::fees::op::LowLevelDriveOperation; +#[cfg(feature = "server")] +use crate::query::GroveError; +use crate::query::Query; +use dpp::block::block_info::BlockInfo; +use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; +use dpp::data_contract::document_type::DocumentTypeRef; +use dpp::data_contract::DataContract; +use dpp::prelude::Identifier; +#[cfg(feature = "server")] +use grovedb::TransactionArg; +#[cfg(any(feature = "server", feature = "verify"))] +use grovedb::{PathQuery, SizedQuery}; +use platform_version::version::PlatformVersion; +use std::ops::BitXor; + +#[cfg(any(feature = "server", feature = "verify"))] +/// Internal clauses struct +#[derive(Clone, Debug, PartialEq, Default)] +pub struct PrimaryContestedInternalClauses { + /// Primary key in clause + pub primary_key_in_clause: Option>, + /// Primary key equal clause + pub primary_key_equal_clause: Option, +} + +impl PrimaryContestedInternalClauses { + #[cfg(any(feature = "server", feature = "verify"))] + /// Returns true if the clause is a valid format. + pub fn verify(&self) -> bool { + // There can only be 1 primary key clause + self.primary_key_in_clause + .is_some() + .bitxor(self.primary_key_equal_clause.is_some()) + } +} + +#[cfg(any(feature = "server", feature = "verify"))] +/// Drive query struct +#[derive(Debug, PartialEq, Clone)] +pub struct DriveContestedDocumentQuery<'a> { + ///DataContract + pub contract: &'a DataContract, + /// Document type + pub document_type: DocumentTypeRef<'a>, + /// Internal clauses + pub internal_clauses: PrimaryContestedInternalClauses, +} + +impl<'a> DriveContestedDocumentQuery<'a> { + #[cfg(any(feature = "server", feature = "verify"))] + /// Returns a path query given a document type path and starting document. + pub fn construct_path_query( + &self, + _platform_version: &PlatformVersion, + ) -> Result { + // First we should get the overall document_type_path + let mut path = self + .contract + .contested_document_type_path(self.document_type.name().as_str()) + .into_iter() + .map(|a| a.to_vec()) + .collect::>>(); + + // Add primary key ($id) subtree + path.push(vec![0]); + + if let Some(primary_key_equal_clause) = &self.internal_clauses.primary_key_equal_clause { + let mut query = Query::new(); + query.insert_key(primary_key_equal_clause.to_vec()); + + Ok(PathQuery::new(path, SizedQuery::new(query, Some(1), None))) + } else { + let mut query = Query::new(); + + if let Some(primary_key_in_clause) = &self.internal_clauses.primary_key_in_clause { + query.insert_keys( + primary_key_in_clause + .iter() + .map(|identifier| identifier.to_vec()) + .collect(), + ); + + Ok(PathQuery::new( + path, + SizedQuery::new(query, Some(primary_key_in_clause.len() as u16), None), + )) + } else { + query.insert_all(); + + Ok(PathQuery::new(path, SizedQuery::new(query, None, None))) + } + } + } + + #[cfg(feature = "server")] + /// Executes a query with no proof and returns the items, skipped items, and fee. + pub fn execute_raw_results_no_proof( + &self, + drive: &Drive, + block_info: Option, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(Vec>, u64), Error> { + let mut drive_operations = vec![]; + let (items, _skipped) = self.execute_raw_results_no_proof_internal( + drive, + transaction, + &mut drive_operations, + platform_version, + )?; + let cost = if let Some(block_info) = block_info { + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + fee_result.processing_fee + } else { + 0 + }; + Ok((items, cost)) + } + + #[cfg(feature = "server")] + /// Executes an internal query with no proof and returns the values and skipped items. + pub(crate) fn execute_raw_results_no_proof_internal( + &self, + drive: &Drive, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(Vec>, u16), Error> { + let path_query = self.construct_path_query(platform_version)?; + let query_result = drive.grove_get_path_query_serialized_results( + &path_query, + transaction, + drive_operations, + &platform_version.drive, + ); + match query_result { + Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) + | Err(Error::GroveDB(GroveError::PathNotFound(_))) + | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => Ok((Vec::new(), 0)), + _ => { + let (data, skipped) = query_result?; + { + Ok((data, skipped)) + } + } + } + } +} diff --git a/packages/rs-drive/src/query/mod.rs b/packages/rs-drive/src/query/mod.rs index df9e215ebfb..456b4fc411f 100644 --- a/packages/rs-drive/src/query/mod.rs +++ b/packages/rs-drive/src/query/mod.rs @@ -133,6 +133,13 @@ pub fn contract_lookup_fn_for_contract<'a>( #[cfg(any(feature = "server", feature = "verify"))] /// A query to get the votes given out by an identity pub mod contested_resource_votes_given_by_identity_query; +#[cfg(any(feature = "server", feature = "verify"))] +/// A query to get contested documents before they have been awarded +pub mod drive_contested_document_query; + +#[cfg(any(feature = "server", feature = "verify"))] +/// A query to get the block counts of proposers in an epoch +pub mod proposer_block_count_query; #[cfg(any(feature = "server", feature = "verify"))] /// Internal clauses struct @@ -1544,7 +1551,7 @@ impl<'a> DriveDocumentQuery<'a> { // There is no last_clause which means we are using an index most likely because of an order_by, however we have no // clauses, in this case we should use the first value of the index. let first_index = index.properties.first().ok_or(Error::Drive( - DriveError::CorruptedContractIndexes("index must have properties"), + DriveError::CorruptedContractIndexes("index must have properties".to_string()), ))?; // Index must have properties Self::recursive_insert_on_query( None, @@ -1598,7 +1605,7 @@ impl<'a> DriveDocumentQuery<'a> { .iter() .find(|field| where_clause.field == field.name) .ok_or(Error::Drive(DriveError::CorruptedContractIndexes( - "index must have last_clause field", + "index must have last_clause field".to_string(), )))?; Self::recursive_insert_on_query( Some(&mut query), @@ -1630,7 +1637,7 @@ impl<'a> DriveDocumentQuery<'a> { .iter() .find(|field| subquery_where_clause.field == field.name) .ok_or(Error::Drive(DriveError::CorruptedContractIndexes( - "index must have subquery_clause field", + "index must have subquery_clause field".to_string(), )))?; Self::recursive_insert_on_query( Some(&mut subquery), diff --git a/packages/rs-drive/src/query/proposer_block_count_query.rs b/packages/rs-drive/src/query/proposer_block_count_query.rs new file mode 100644 index 00000000000..7e8da131bb9 --- /dev/null +++ b/packages/rs-drive/src/query/proposer_block_count_query.rs @@ -0,0 +1,82 @@ +use crate::drive::credit_pools::epochs::paths::EpochProposers; +use crate::query::Query; +use dpp::block::epoch::Epoch; +use grovedb::{PathQuery, SizedQuery}; + +/// Represents an optional limit for the number of proposers to retrieve in a query. +/// +/// - `Some(u16)`: Limits the number of proposers returned. +/// - `None`: No limit on the number of proposers. +pub type ProposerQueryLimit = Option; +/// Indicates whether the query should include the starting proposer in the results. +/// +/// - `true`: The starting proposer is included in the results. +/// - `false`: The starting proposer is excluded. +pub type ProposerQueryStartAtIncluded = bool; +/// Represents an optional starting point for a proposer query, consisting of: +/// +/// - A tuple of a 32-byte array representing the start proposer's identifier and +/// a boolean indicating whether to include the starting proposer. +/// +/// - `Some(([u8; 32], bool))`: A specific proposer to start from, with an inclusion flag. +/// - `None`: The query will start from the beginning or a default point. +pub type ProposerQueryStartAt = Option<([u8; 32], ProposerQueryStartAtIncluded)>; + +/// Specifies the type of query to retrieve proposers, with two options: +/// +/// - `ByRange(ProposerQueryLimit, ProposerQueryStartAt)`: Query proposers within a range, +/// with an optional limit and an optional starting point. +/// +/// - `ByIds(Vec>)`: Query specific proposers by their identifiers. +pub enum ProposerQueryType { + /// Queries proposers within a specified range. + /// + /// - `ProposerQueryLimit`: Limits the number of proposers returned. If `None`, there is no limit. + /// - `ProposerQueryStartAt`: Specifies the proposer to start from. If `None`, the query starts at the beginning. + ByRange(ProposerQueryLimit, ProposerQueryStartAt), + + /// Queries specific proposers by their identifiers. + /// + /// - `Vec>`: A vector of proposer IDs (byte arrays) to retrieve. + ByIds(Vec>), +} + +impl ProposerQueryType { + /// Should we get optional elements? + pub fn allows_optional(&self) -> bool { + match self { + ProposerQueryType::ByRange(_, _) => false, + ProposerQueryType::ByIds(_) => true, + } + } + + /// Gets the path query for the proposer query type + pub fn into_path_query(self, epoch: &Epoch) -> PathQuery { + let path_as_vec = epoch.get_proposers_path_vec(); + + let mut query = Query::new(); + + match self { + ProposerQueryType::ByRange(limit, start_at) => { + match start_at { + None => { + query.insert_all(); + } + Some((identity_id, included)) => { + if included { + query.insert_range_from(identity_id.to_vec()..); + } else { + query.insert_range_after(identity_id.to_vec()..); + } + } + } + PathQuery::new(path_as_vec, SizedQuery::new(query, limit, None)) + } + ProposerQueryType::ByIds(ids) => { + let len = ids.len(); + query.insert_keys(ids); + PathQuery::new(path_as_vec, SizedQuery::new(query, Some(len as u16), None)) + } + } + } +} diff --git a/packages/rs-drive/src/query/vote_poll_vote_state_query.rs b/packages/rs-drive/src/query/vote_poll_vote_state_query.rs index 949d112a671..b1fa7413a13 100644 --- a/packages/rs-drive/src/query/vote_poll_vote_state_query.rs +++ b/packages/rs-drive/src/query/vote_poll_vote_state_query.rs @@ -44,6 +44,8 @@ pub enum ContestedDocumentVotePollDriveQueryResultType { VoteTally, /// Both the documents and the vote tally results are returned in the query result. DocumentsAndVoteTally, + /// We are searching for a single document only. + SingleDocumentByContender(Identifier), } impl ContestedDocumentVotePollDriveQueryResultType { @@ -51,6 +53,7 @@ impl ContestedDocumentVotePollDriveQueryResultType { pub fn has_vote_tally(&self) -> bool { match self { ContestedDocumentVotePollDriveQueryResultType::Documents => false, + ContestedDocumentVotePollDriveQueryResultType::SingleDocumentByContender(_) => false, ContestedDocumentVotePollDriveQueryResultType::VoteTally => true, ContestedDocumentVotePollDriveQueryResultType::DocumentsAndVoteTally => true, } @@ -60,6 +63,7 @@ impl ContestedDocumentVotePollDriveQueryResultType { pub fn has_documents(&self) -> bool { match self { ContestedDocumentVotePollDriveQueryResultType::Documents => true, + ContestedDocumentVotePollDriveQueryResultType::SingleDocumentByContender(_) => true, ContestedDocumentVotePollDriveQueryResultType::VoteTally => false, ContestedDocumentVotePollDriveQueryResultType::DocumentsAndVoteTally => true, } @@ -74,6 +78,9 @@ impl TryFrom for ContestedDocumentVotePollDriveQueryResultType { 0 => Ok(ContestedDocumentVotePollDriveQueryResultType::Documents), 1 => Ok(ContestedDocumentVotePollDriveQueryResultType::VoteTally), 2 => Ok(ContestedDocumentVotePollDriveQueryResultType::DocumentsAndVoteTally), + 3 => Err(Error::Query(QuerySyntaxError::Unsupported( + "unsupported to get SingleDocumentByContender query result type".to_string() + ))), n => Err(Error::Query(QuerySyntaxError::Unsupported(format!( "unsupported contested document vote poll drive query result type {}, only 0, 1, 2 and 3 are supported", n @@ -397,62 +404,73 @@ impl<'a> ResolvedContestedDocumentVotePollDriveQuery<'a> { // Stored Info [[0;31],0] Abstain votes [[0;31],1] Lock Votes [[0;31],2] // this is a range on all elements - let limit = - match &self.start_at { - None => { - if allow_include_locked_and_abstaining_vote_tally { - match &self.result_type { - ContestedDocumentVotePollDriveQueryResultType::Documents => { - // Documents don't care about the vote tallies - query.insert_range_after(RESOURCE_LOCK_VOTE_TREE_KEY_U8_32.to_vec()..); - self.limit - } - ContestedDocumentVotePollDriveQueryResultType::VoteTally => { - query.insert_all(); - self.limit.map(|limit| limit.saturating_add(3)) - } - ContestedDocumentVotePollDriveQueryResultType::DocumentsAndVoteTally => { - query.insert_all(); - self.limit.map(|limit| limit.saturating_mul(2).saturating_add(3)) - } - } - } else { - match &self.result_type { - ContestedDocumentVotePollDriveQueryResultType::Documents => { - query.insert_range_after(RESOURCE_LOCK_VOTE_TREE_KEY_U8_32.to_vec()..); - self.limit - } - ContestedDocumentVotePollDriveQueryResultType::VoteTally => { - query.insert_key(RESOURCE_STORED_INFO_KEY_U8_32.to_vec()); - query.insert_range_after(RESOURCE_LOCK_VOTE_TREE_KEY_U8_32.to_vec()..); - self.limit.map(|limit| limit.saturating_add(1)) - } - ContestedDocumentVotePollDriveQueryResultType::DocumentsAndVoteTally => { - query.insert_key(RESOURCE_STORED_INFO_KEY_U8_32.to_vec()); - query.insert_range_after(RESOURCE_LOCK_VOTE_TREE_KEY_U8_32.to_vec()..); - self.limit.map(|limit| limit.saturating_mul(2).saturating_add(1)) + let limit = match &self.start_at { + None => { + if allow_include_locked_and_abstaining_vote_tally { + match &self.result_type { + ContestedDocumentVotePollDriveQueryResultType::Documents => { + // Documents don't care about the vote tallies + query.insert_range_after(RESOURCE_LOCK_VOTE_TREE_KEY_U8_32.to_vec()..); + self.limit + } + ContestedDocumentVotePollDriveQueryResultType::VoteTally => { + query.insert_all(); + self.limit.map(|limit| limit.saturating_add(3)) + } + ContestedDocumentVotePollDriveQueryResultType::DocumentsAndVoteTally => { + query.insert_all(); + self.limit.map(|limit| limit.saturating_mul(2).saturating_add(3)) + } + ContestedDocumentVotePollDriveQueryResultType::SingleDocumentByContender(contender_id) => { + query.insert_key(contender_id.to_vec()); + self.limit + } } - } - } - } - Some((starts_at_key_bytes, start_at_included)) => { - let starts_at_key = starts_at_key_bytes.to_vec(); - match start_at_included { - true => query.insert_range_from(starts_at_key..), - false => query.insert_range_after(starts_at_key..), - } + } else { match &self.result_type { - ContestedDocumentVotePollDriveQueryResultType::Documents - | ContestedDocumentVotePollDriveQueryResultType::VoteTally => self.limit, - ContestedDocumentVotePollDriveQueryResultType::DocumentsAndVoteTally => { - self.limit.map(|limit| limit.saturating_mul(2)) + ContestedDocumentVotePollDriveQueryResultType::Documents => { + query.insert_range_after(RESOURCE_LOCK_VOTE_TREE_KEY_U8_32.to_vec()..); + self.limit + } + ContestedDocumentVotePollDriveQueryResultType::SingleDocumentByContender(contender_id) => { + query.insert_key(contender_id.to_vec()); + self.limit + } + ContestedDocumentVotePollDriveQueryResultType::VoteTally => { + query.insert_key(RESOURCE_STORED_INFO_KEY_U8_32.to_vec()); + query.insert_range_after(RESOURCE_LOCK_VOTE_TREE_KEY_U8_32.to_vec()..); + self.limit.map(|limit| limit.saturating_add(1)) + } + ContestedDocumentVotePollDriveQueryResultType::DocumentsAndVoteTally => { + query.insert_key(RESOURCE_STORED_INFO_KEY_U8_32.to_vec()); + query.insert_range_after(RESOURCE_LOCK_VOTE_TREE_KEY_U8_32.to_vec()..); + self.limit.map(|limit| limit.saturating_mul(2).saturating_add(1)) + } } + } + } + Some((starts_at_key_bytes, start_at_included)) => { + let starts_at_key = starts_at_key_bytes.to_vec(); + match start_at_included { + true => query.insert_range_from(starts_at_key..), + false => query.insert_range_after(starts_at_key..), + } + match &self.result_type { + ContestedDocumentVotePollDriveQueryResultType::Documents + | ContestedDocumentVotePollDriveQueryResultType::SingleDocumentByContender(_) + | ContestedDocumentVotePollDriveQueryResultType::VoteTally => self.limit, + ContestedDocumentVotePollDriveQueryResultType::DocumentsAndVoteTally => { + self.limit.map(|limit| limit.saturating_mul(2)) } } - }; + } + }; let (subquery_path, subquery) = match self.result_type { - ContestedDocumentVotePollDriveQueryResultType::Documents => (Some(vec![vec![0]]), None), + ContestedDocumentVotePollDriveQueryResultType::Documents + | ContestedDocumentVotePollDriveQueryResultType::SingleDocumentByContender(_) => { + (Some(vec![vec![0]]), None) + } ContestedDocumentVotePollDriveQueryResultType::VoteTally => (Some(vec![vec![1]]), None), ContestedDocumentVotePollDriveQueryResultType::DocumentsAndVoteTally => { let mut query = Query::new(); @@ -520,7 +538,9 @@ impl<'a> ResolvedContestedDocumentVotePollDriveQuery<'a> { Err(e) => Err(e), Ok((query_result_elements, skipped)) => { match self.result_type { - ContestedDocumentVotePollDriveQueryResultType::Documents => { + ContestedDocumentVotePollDriveQueryResultType::Documents + | ContestedDocumentVotePollDriveQueryResultType::SingleDocumentByContender(_) => + { // with documents only we don't need to work about lock and abstaining tree let contenders = query_result_elements .to_path_key_elements() diff --git a/packages/rs-drive/src/query/vote_polls_by_end_date_query.rs b/packages/rs-drive/src/query/vote_polls_by_end_date_query.rs index 0fc4a1ca9fd..fb34e8a619d 100644 --- a/packages/rs-drive/src/query/vote_polls_by_end_date_query.rs +++ b/packages/rs-drive/src/query/vote_polls_by_end_date_query.rs @@ -44,7 +44,7 @@ pub struct VotePollsByEndDateDriveQuery { } impl VotePollsByEndDateDriveQuery { - /// Get the path query for an abci query that gets vote polls by the end time + /// Get the path query for an abci query that gets vote polls until an end time pub fn path_query_for_end_time_included(end_time: TimestampMillis, limit: u16) -> PathQuery { let path = vote_end_date_queries_tree_path_vec(); @@ -70,6 +70,32 @@ impl VotePollsByEndDateDriveQuery { } } + /// Get the path query for an abci query that gets vote polls at an the end time + pub fn path_query_for_single_end_time(end_time: TimestampMillis, limit: u16) -> PathQuery { + let path = vote_end_date_queries_tree_path_vec(); + + let mut query = Query::new_with_direction(true); + + let encoded_time = encode_u64(end_time); + + query.insert_key(encoded_time); + + let mut sub_query = Query::new(); + + sub_query.insert_all(); + + query.default_subquery_branch.subquery = Some(sub_query.into()); + + PathQuery { + path, + query: SizedQuery { + query, + limit: Some(limit), + offset: None, + }, + } + } + #[cfg(feature = "server")] /// Executes a special query with no proof to get contested document resource vote polls. /// This is meant for platform abci to get votes that have finished @@ -126,6 +152,48 @@ impl VotePollsByEndDateDriveQuery { } } + #[cfg(feature = "server")] + /// Executes a special query with no proof to get contested document resource vote polls. + /// This is meant for platform abci to get votes that have finished + pub fn execute_no_proof_for_specialized_end_time_query_only_check_end_time( + end_time: TimestampMillis, + limit: u16, + drive: &Drive, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let path_query = Self::path_query_for_single_end_time(end_time, limit); + let query_result = drive.grove_get_path_query( + &path_query, + transaction, + QueryResultType::QueryPathKeyElementTrioResultType, + drive_operations, + &platform_version.drive, + ); + match query_result { + Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) + | Err(Error::GroveDB(GroveError::PathNotFound(_))) + | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => Ok(vec![]), + Err(e) => Err(e), + Ok((query_result_elements, _)) => { + // Process the query result elements and collect VotePolls + let vote_polls = query_result_elements + .to_path_key_elements() + .into_iter() + .map(|(_, _, element)| { + // Extract the bytes from the element + let vote_poll_bytes = element.into_item_bytes().map_err(Error::from)?; + // Deserialize the bytes into a VotePoll + let vote_poll = VotePoll::deserialize_from_bytes(&vote_poll_bytes)?; + Ok(vote_poll) + }) + .collect::, Error>>()?; + Ok(vote_polls) + } + } + } + /// Operations to construct a path query. pub fn construct_path_query(&self) -> PathQuery { let path = vote_end_date_queries_tree_path_vec(); diff --git a/packages/rs-drive/src/util/object_size_info/path_key_info.rs b/packages/rs-drive/src/util/object_size_info/path_key_info.rs index c417ef602d0..b75813547bc 100644 --- a/packages/rs-drive/src/util/object_size_info/path_key_info.rs +++ b/packages/rs-drive/src/util/object_size_info/path_key_info.rs @@ -6,8 +6,10 @@ use crate::util::object_size_info::path_key_info::PathKeyInfo::{ use grovedb::batch::key_info::KeyInfo; use grovedb::batch::key_info::KeyInfo::KnownKey; use grovedb::batch::KeyInfoPath; +use grovedb::operations::proof::util::hex_to_ascii; use grovedb_storage::worst_case_costs::WorstKeyLength; use std::collections::HashSet; +use std::fmt; /// Path key info #[derive(Clone, Debug)] @@ -25,6 +27,79 @@ pub enum PathKeyInfo<'a, const N: usize> { PathKeySize(KeyInfoPath, KeyInfo), } +/// Assume KeyInfoPath and KeyInfo implement Display. +/// If they do not, you need to implement Display for them as well. +impl<'a, const N: usize> fmt::Display for PathKeyInfo<'a, N> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + // Helper function to format KeyInfo + fn format_key_info(key_info: &KeyInfo) -> String { + match key_info { + KeyInfo::KnownKey(vec) => format!("KnownKey(\"{}\")", hex_to_ascii(vec)), + KeyInfo::MaxKeySize { + unique_id, + max_size, + } => { + format!( + "MaxKeySize(unique_id: \"{}\", max_size: {})", + hex_to_ascii(unique_id), + max_size + ) + } + } + } + + // Helper function to format KeyInfoPath + fn format_key_info_path(key_info_path: &KeyInfoPath) -> String { + let formatted_keys: Vec = key_info_path + .0 + .iter() + .map(|key_info| format_key_info(key_info)) + .collect(); + format!("[{}]", formatted_keys.join(", ")) + } + + match self { + PathKeyInfo::PathFixedSizeKey((path, key)) => { + write!(f, "PathFixedSizeKey(path: [")?; + for p in path.iter() { + write!(f, "\"{}\" ", hex_to_ascii(p))?; + } + write!(f, "], key: \"{}\")", hex_to_ascii(key)) + } + PathKeyInfo::PathFixedSizeKeyRef((path, key)) => { + write!(f, "PathFixedSizeKeyRef(path: [")?; + for p in path.iter() { + write!(f, "\"{}\" ", hex_to_ascii(p))?; + } + write!(f, "], key: \"{}\")", hex_to_ascii(key)) + } + PathKeyInfo::PathKey((path, key)) => { + write!(f, "PathKey(path: [")?; + for p in path.iter() { + write!(f, "\"{}\" ", hex_to_ascii(p))?; + } + write!(f, "], key: \"{}\")", hex_to_ascii(key)) + } + PathKeyInfo::PathKeyRef((path, key)) => { + write!(f, "PathKeyRef(path: [")?; + for p in path.iter() { + write!(f, "\"{}\" ", hex_to_ascii(p))?; + } + write!(f, "], key: \"{}\")", hex_to_ascii(key)) + } + PathKeyInfo::PathKeySize(path_info, key_info) => { + let formatted_path_info = format_key_info_path(path_info); + let formatted_key_info = format_key_info(key_info); + write!( + f, + "PathKeySize(path_info: {}, key_info: {})", + formatted_path_info, formatted_key_info + ) + } + } + } +} + impl<'a> TryFrom>> for PathKeyInfo<'a, 0> { type Error = Error; diff --git a/packages/rs-drive/src/verify/contract/verify_contract/v0/mod.rs b/packages/rs-drive/src/verify/contract/verify_contract/v0/mod.rs index 3d47e9504ee..a2976fa5a85 100644 --- a/packages/rs-drive/src/verify/contract/verify_contract/v0/mod.rs +++ b/packages/rs-drive/src/verify/contract/verify_contract/v0/mod.rs @@ -35,7 +35,7 @@ impl Drive { /// - The proof is corrupted. /// - The GroveDb query fails. #[inline(always)] - pub(crate) fn verify_contract_v0( + pub(super) fn verify_contract_v0( proof: &[u8], contract_known_keeps_history: Option, is_proof_subset: bool, diff --git a/packages/rs-drive/src/verify/contract/verify_contract_history/v0/mod.rs b/packages/rs-drive/src/verify/contract/verify_contract_history/v0/mod.rs index 9ce908c3cd5..18fea92ee43 100644 --- a/packages/rs-drive/src/verify/contract/verify_contract_history/v0/mod.rs +++ b/packages/rs-drive/src/verify/contract/verify_contract_history/v0/mod.rs @@ -37,7 +37,7 @@ impl Drive { /// - The GroveDb query fails. /// - The contract serialization fails. #[inline(always)] - pub(crate) fn verify_contract_history_v0( + pub(super) fn verify_contract_history_v0( proof: &[u8], contract_id: [u8; 32], start_at_date: u64, diff --git a/packages/rs-drive/src/verify/document/verify_proof/v0/mod.rs b/packages/rs-drive/src/verify/document/verify_proof/v0/mod.rs index a9e5d2771c4..4de205ccb4a 100644 --- a/packages/rs-drive/src/verify/document/verify_proof/v0/mod.rs +++ b/packages/rs-drive/src/verify/document/verify_proof/v0/mod.rs @@ -30,7 +30,7 @@ impl<'a> DriveDocumentQuery<'a> { /// 1. The proof verification fails. /// 2. There is a deserialization error when parsing the serialized document(s) into `Document` struct(s). #[inline(always)] - pub(crate) fn verify_proof_v0( + pub(super) fn verify_proof_v0( &self, proof: &[u8], platform_version: &PlatformVersion, diff --git a/packages/rs-drive/src/verify/document/verify_proof_keep_serialized/v0/mod.rs b/packages/rs-drive/src/verify/document/verify_proof_keep_serialized/v0/mod.rs index 31bcdc941bf..dc362c7ead9 100644 --- a/packages/rs-drive/src/verify/document/verify_proof_keep_serialized/v0/mod.rs +++ b/packages/rs-drive/src/verify/document/verify_proof_keep_serialized/v0/mod.rs @@ -24,7 +24,7 @@ impl<'a> DriveDocumentQuery<'a> { /// * The path query fails to verify against the given proof. /// * Converting the element into bytes fails. #[inline(always)] - pub(crate) fn verify_proof_keep_serialized_v0( + pub(super) fn verify_proof_keep_serialized_v0( &self, proof: &[u8], platform_version: &PlatformVersion, diff --git a/packages/rs-drive/src/verify/document/verify_start_at_document_in_proof/v0/mod.rs b/packages/rs-drive/src/verify/document/verify_start_at_document_in_proof/v0/mod.rs index 592b04ee9db..1142be78e51 100644 --- a/packages/rs-drive/src/verify/document/verify_start_at_document_in_proof/v0/mod.rs +++ b/packages/rs-drive/src/verify/document/verify_start_at_document_in_proof/v0/mod.rs @@ -30,7 +30,7 @@ impl<'a> DriveDocumentQuery<'a> { /// * If the proof is corrupted (wrong path, wrong key, etc.). /// * If the provided proof has an incorrect number of elements. #[inline(always)] - pub(crate) fn verify_start_at_document_in_proof_v0( + pub(super) fn verify_start_at_document_in_proof_v0( &self, proof: &[u8], is_proof_subset: bool, diff --git a/packages/rs-drive/src/verify/identity/verify_full_identities_by_public_key_hashes/v0/mod.rs b/packages/rs-drive/src/verify/identity/verify_full_identities_by_public_key_hashes/v0/mod.rs index 939b76b5a89..7c1f0545d05 100644 --- a/packages/rs-drive/src/verify/identity/verify_full_identities_by_public_key_hashes/v0/mod.rs +++ b/packages/rs-drive/src/verify/identity/verify_full_identities_by_public_key_hashes/v0/mod.rs @@ -40,7 +40,7 @@ impl Drive { /// - Any of the public key hashes do not correspond to a valid identity ID. /// - Any of the identity IDs do not correspond to a valid full identity. /// - pub(crate) fn verify_full_identities_by_public_key_hashes_v0< + pub(super) fn verify_full_identities_by_public_key_hashes_v0< T: FromIterator<([u8; 20], Option)>, >( proof: &[u8], diff --git a/packages/rs-drive/src/verify/identity/verify_full_identity_by_identity_id/v0/mod.rs b/packages/rs-drive/src/verify/identity/verify_full_identity_by_identity_id/v0/mod.rs index 84e5a768300..e9fefdaaf2f 100644 --- a/packages/rs-drive/src/verify/identity/verify_full_identity_by_identity_id/v0/mod.rs +++ b/packages/rs-drive/src/verify/identity/verify_full_identity_by_identity_id/v0/mod.rs @@ -41,7 +41,7 @@ impl Drive { /// - The balance, revision, or keys information is missing or incorrect. /// #[inline(always)] - pub(crate) fn verify_full_identity_by_identity_id_v0( + pub(super) fn verify_full_identity_by_identity_id_v0( proof: &[u8], is_proof_subset: bool, identity_id: [u8; 32], diff --git a/packages/rs-drive/src/verify/identity/verify_full_identity_by_public_key_hash/v0/mod.rs b/packages/rs-drive/src/verify/identity/verify_full_identity_by_public_key_hash/v0/mod.rs index dd5c1f1ee00..e481343470a 100644 --- a/packages/rs-drive/src/verify/identity/verify_full_identity_by_public_key_hash/v0/mod.rs +++ b/packages/rs-drive/src/verify/identity/verify_full_identity_by_public_key_hash/v0/mod.rs @@ -38,7 +38,7 @@ impl Drive { /// * The identity ID does not correspond to a valid full identity. /// #[inline(always)] - pub(crate) fn verify_full_identity_by_public_key_hash_v0( + pub(super) fn verify_full_identity_by_public_key_hash_v0( proof: &[u8], public_key_hash: [u8; 20], platform_version: &PlatformVersion, diff --git a/packages/rs-drive/src/verify/identity/verify_identities_contract_keys/v0/mod.rs b/packages/rs-drive/src/verify/identity/verify_identities_contract_keys/v0/mod.rs index 1b8cc605eb3..2ea58065062 100644 --- a/packages/rs-drive/src/verify/identity/verify_identities_contract_keys/v0/mod.rs +++ b/packages/rs-drive/src/verify/identity/verify_identities_contract_keys/v0/mod.rs @@ -37,7 +37,7 @@ impl Drive { /// - The keys information is missing or incorrect. /// #[inline(always)] - pub(crate) fn verify_identities_contract_keys_v0( + pub(super) fn verify_identities_contract_keys_v0( proof: &[u8], identity_ids: &[[u8; 32]], contract_id: &[u8; 32], diff --git a/packages/rs-drive/src/verify/identity/verify_identity_balance_and_revision_for_identity_id/v0/mod.rs b/packages/rs-drive/src/verify/identity/verify_identity_balance_and_revision_for_identity_id/v0/mod.rs index 88f7350d900..7a90ff4df78 100644 --- a/packages/rs-drive/src/verify/identity/verify_identity_balance_and_revision_for_identity_id/v0/mod.rs +++ b/packages/rs-drive/src/verify/identity/verify_identity_balance_and_revision_for_identity_id/v0/mod.rs @@ -38,14 +38,14 @@ impl Drive { _verify_subset_of_proof: bool, platform_version: &PlatformVersion, ) -> Result<(RootHash, Option<(u64, u64)>), Error> { - let (root_hash_0, signed_balance) = Self::verify_identity_balance_for_identity_id_v0( + let (root_hash_0, signed_balance) = Self::verify_identity_balance_for_identity_id( proof, identity_id, true, platform_version, )?; - let (root_hash_1, revision) = Self::verify_identity_revision_for_identity_id_v0( + let (root_hash_1, revision) = Self::verify_identity_revision_for_identity_id( proof, identity_id, true, diff --git a/packages/rs-drive/src/verify/identity/verify_identity_balance_for_identity_id/v0/mod.rs b/packages/rs-drive/src/verify/identity/verify_identity_balance_for_identity_id/v0/mod.rs index 91712e7d409..1648d74ba8f 100644 --- a/packages/rs-drive/src/verify/identity/verify_identity_balance_for_identity_id/v0/mod.rs +++ b/packages/rs-drive/src/verify/identity/verify_identity_balance_for_identity_id/v0/mod.rs @@ -38,7 +38,7 @@ impl Drive { /// - The proved key value is not for the correct path or key in balances. /// - More than one balance is found. /// - pub(crate) fn verify_identity_balance_for_identity_id_v0( + pub(super) fn verify_identity_balance_for_identity_id_v0( proof: &[u8], identity_id: [u8; 32], verify_subset_of_proof: bool, diff --git a/packages/rs-drive/src/verify/identity/verify_identity_balances_for_identity_ids/mod.rs b/packages/rs-drive/src/verify/identity/verify_identity_balances_for_identity_ids/mod.rs index 108efea2378..553f64661c6 100644 --- a/packages/rs-drive/src/verify/identity/verify_identity_balances_for_identity_ids/mod.rs +++ b/packages/rs-drive/src/verify/identity/verify_identity_balances_for_identity_ids/mod.rs @@ -38,7 +38,8 @@ impl Drive { /// - Any other error as documented in the specific versioned function. /// pub fn verify_identity_balances_for_identity_ids< - T: FromIterator<([u8; 32], Option)>, + T: FromIterator<(I, Option)>, + I: From<[u8; 32]>, >( proof: &[u8], is_proof_subset: bool, @@ -52,7 +53,7 @@ impl Drive { .identity .verify_identity_balances_for_identity_ids { - 0 => Self::verify_identity_balances_for_identity_ids_v0::( + 0 => Self::verify_identity_balances_for_identity_ids_v0::( proof, is_proof_subset, identity_ids, diff --git a/packages/rs-drive/src/verify/identity/verify_identity_balances_for_identity_ids/v0/mod.rs b/packages/rs-drive/src/verify/identity/verify_identity_balances_for_identity_ids/v0/mod.rs index ac5d2114708..b7742ebbb3c 100644 --- a/packages/rs-drive/src/verify/identity/verify_identity_balances_for_identity_ids/v0/mod.rs +++ b/packages/rs-drive/src/verify/identity/verify_identity_balances_for_identity_ids/v0/mod.rs @@ -39,17 +39,15 @@ impl Drive { /// - The value size of the balance is incorrect. /// pub(crate) fn verify_identity_balances_for_identity_ids_v0< - T: FromIterator<([u8; 32], Option)>, + T: FromIterator<(I, Option)>, + I: From<[u8; 32]>, >( proof: &[u8], is_proof_subset: bool, identity_ids: &[[u8; 32]], platform_version: &PlatformVersion, ) -> Result<(RootHash, T), Error> { - let mut path_query = Self::balances_for_identity_ids_query( - identity_ids, - &platform_version.drive.grove_version, - )?; + let mut path_query = Self::balances_for_identity_ids_query(identity_ids); path_query.query.limit = Some(identity_ids.len() as u16); let (root_hash, proved_key_values) = if is_proof_subset { GroveDb::verify_subset_query_with_absence_proof( @@ -74,7 +72,7 @@ impl Drive { .map_err(|_| Error::Proof(ProofError::IncorrectValueSize("value size")))?; let maybe_element = proved_key_value.2; match maybe_element { - None => Ok((key, None)), + None => Ok((key.into(), None)), Some(element) => { let balance: Credits = element .as_sum_item_value() @@ -85,7 +83,7 @@ impl Drive { "balance was negative", )) })?; - Ok((key, Some(balance))) + Ok((key.into(), Some(balance))) } } }) diff --git a/packages/rs-drive/src/verify/identity/verify_identity_contract_nonce/v0/mod.rs b/packages/rs-drive/src/verify/identity/verify_identity_contract_nonce/v0/mod.rs index 8e8da0eb938..5963c503f91 100644 --- a/packages/rs-drive/src/verify/identity/verify_identity_contract_nonce/v0/mod.rs +++ b/packages/rs-drive/src/verify/identity/verify_identity_contract_nonce/v0/mod.rs @@ -37,7 +37,7 @@ impl Drive { /// - The proof of authentication is not valid. /// - The identity ID does not correspond to a valid identity. /// - pub(crate) fn verify_identity_contract_nonce_v0( + pub(super) fn verify_identity_contract_nonce_v0( proof: &[u8], identity_id: [u8; 32], contract_id: [u8; 32], diff --git a/packages/rs-drive/src/verify/identity/verify_identity_id_by_public_key_hash/v0/mod.rs b/packages/rs-drive/src/verify/identity/verify_identity_id_by_public_key_hash/v0/mod.rs index 1f586154044..ceb8ae05b07 100644 --- a/packages/rs-drive/src/verify/identity/verify_identity_id_by_public_key_hash/v0/mod.rs +++ b/packages/rs-drive/src/verify/identity/verify_identity_id_by_public_key_hash/v0/mod.rs @@ -33,7 +33,7 @@ impl Drive { /// - More than one identity ID is found. /// #[inline(always)] - pub(crate) fn verify_identity_id_by_public_key_hash_v0( + pub(super) fn verify_identity_id_by_public_key_hash_v0( proof: &[u8], is_proof_subset: bool, public_key_hash: [u8; 20], diff --git a/packages/rs-drive/src/verify/identity/verify_identity_keys_by_identity_id/v0/mod.rs b/packages/rs-drive/src/verify/identity/verify_identity_keys_by_identity_id/v0/mod.rs index 1348cea2839..9452a0b19db 100644 --- a/packages/rs-drive/src/verify/identity/verify_identity_keys_by_identity_id/v0/mod.rs +++ b/packages/rs-drive/src/verify/identity/verify_identity_keys_by_identity_id/v0/mod.rs @@ -41,7 +41,7 @@ impl Drive { /// - The keys information is missing or incorrect. /// #[inline(always)] - pub(crate) fn verify_identity_keys_by_identity_id_v0( + pub(super) fn verify_identity_keys_by_identity_id_v0( proof: &[u8], key_request: IdentityKeysRequest, with_revision: bool, diff --git a/packages/rs-drive/src/verify/identity/verify_identity_nonce/v0/mod.rs b/packages/rs-drive/src/verify/identity/verify_identity_nonce/v0/mod.rs index ba512647f4c..bbf91a01405 100644 --- a/packages/rs-drive/src/verify/identity/verify_identity_nonce/v0/mod.rs +++ b/packages/rs-drive/src/verify/identity/verify_identity_nonce/v0/mod.rs @@ -37,7 +37,7 @@ impl Drive { /// - The proof of authentication is not valid. /// - The identity ID does not correspond to a valid identity. /// - pub(crate) fn verify_identity_nonce_v0( + pub(super) fn verify_identity_nonce_v0( proof: &[u8], identity_id: [u8; 32], verify_subset_of_proof: bool, diff --git a/packages/rs-drive/src/verify/identity/verify_identity_revision_for_identity_id/mod.rs b/packages/rs-drive/src/verify/identity/verify_identity_revision_for_identity_id/mod.rs index e084dffc38f..7d619f0dcbc 100644 --- a/packages/rs-drive/src/verify/identity/verify_identity_revision_for_identity_id/mod.rs +++ b/packages/rs-drive/src/verify/identity/verify_identity_revision_for_identity_id/mod.rs @@ -1 +1,59 @@ mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::verify::RootHash; +use platform_version::version::PlatformVersion; + +impl Drive { + /// Verifies the revision of an identity by their identity ID. + /// + /// # Parameters + /// + /// - `proof`: A byte slice representing the proof of authentication from the user. + /// - `identity_id`: A 32-byte array representing the identity ID of the user. + /// - `verify_subset_of_proof`: A boolean indicating whether we are verifying a subset of a larger proof. + /// - `platform_version`: The version of the platform used to verify the identity revision. + /// + /// # Returns + /// + /// If the verification is successful, it returns a `Result` with a tuple of `RootHash` and + /// an `Option`. The `RootHash` represents the root hash of GroveDB, and the + /// `Option` represents the revision of the user's identity if it exists. + /// + /// # Errors + /// + /// Returns an `Error` if: + /// + /// - The proof of authentication is not valid. + /// - The identity ID does not correspond to a valid revision. + /// - The proof contains elements unrelated to the requested revision. + /// + pub fn verify_identity_revision_for_identity_id( + proof: &[u8], + identity_id: [u8; 32], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, Option), Error> { + match platform_version + .drive + .methods + .verify + .identity + .verify_identity_revision_for_identity_id + { + 0 => Self::verify_identity_revision_for_identity_id_v0( + proof, + identity_id, + verify_subset_of_proof, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_identity_revision_for_identity_id".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/identity/verify_identity_revision_for_identity_id/v0/mod.rs b/packages/rs-drive/src/verify/identity/verify_identity_revision_for_identity_id/v0/mod.rs index 42700b4fc0e..47e7f2839fe 100644 --- a/packages/rs-drive/src/verify/identity/verify_identity_revision_for_identity_id/v0/mod.rs +++ b/packages/rs-drive/src/verify/identity/verify_identity_revision_for_identity_id/v0/mod.rs @@ -36,7 +36,8 @@ impl Drive { /// - The proved key value is not for the correct path or key in balances. /// - More than one balance is found. /// - pub fn verify_identity_revision_for_identity_id_v0( + #[inline(always)] + pub(super) fn verify_identity_revision_for_identity_id_v0( proof: &[u8], identity_id: [u8; 32], verify_subset_of_proof: bool, diff --git a/packages/rs-drive/src/verify/single_document/verify_proof/v0/mod.rs b/packages/rs-drive/src/verify/single_document/verify_proof/v0/mod.rs index aa9937819c4..480df57edac 100644 --- a/packages/rs-drive/src/verify/single_document/verify_proof/v0/mod.rs +++ b/packages/rs-drive/src/verify/single_document/verify_proof/v0/mod.rs @@ -32,7 +32,7 @@ impl SingleDocumentDriveQuery { /// - The GroveDb query fails. /// - The document serialization fails. #[inline(always)] - pub(crate) fn verify_proof_v0( + pub(super) fn verify_proof_v0( &self, is_subset: bool, proof: &[u8], diff --git a/packages/rs-drive/src/verify/single_document/verify_proof_keep_serialized/v0/mod.rs b/packages/rs-drive/src/verify/single_document/verify_proof_keep_serialized/v0/mod.rs index 39f16f49cef..59e3d4160ac 100644 --- a/packages/rs-drive/src/verify/single_document/verify_proof_keep_serialized/v0/mod.rs +++ b/packages/rs-drive/src/verify/single_document/verify_proof_keep_serialized/v0/mod.rs @@ -30,7 +30,7 @@ impl SingleDocumentDriveQuery { /// - The GroveDb verification fails. /// - The elements returned are not items, the proof is incorrect. #[inline(always)] - pub(crate) fn verify_proof_keep_serialized_v0( + pub(super) fn verify_proof_keep_serialized_v0( &self, is_subset: bool, proof: &[u8], diff --git a/packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/v0/mod.rs b/packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/v0/mod.rs index 09af028c47d..d424fbe3289 100644 --- a/packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/v0/mod.rs +++ b/packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/v0/mod.rs @@ -45,7 +45,7 @@ use crate::query::{ContractLookupFn, SingleDocumentDriveQuery, SingleDocumentDri impl Drive { #[inline(always)] - pub(crate) fn verify_state_transition_was_executed_with_proof_v0( + pub(super) fn verify_state_transition_was_executed_with_proof_v0( state_transition: &StateTransition, block_info: &BlockInfo, proof: &[u8], diff --git a/packages/rs-drive/src/verify/system/mod.rs b/packages/rs-drive/src/verify/system/mod.rs index e0362df4371..25d09693885 100644 --- a/packages/rs-drive/src/verify/system/mod.rs +++ b/packages/rs-drive/src/verify/system/mod.rs @@ -1,5 +1,6 @@ mod verify_elements; mod verify_epoch_infos; +mod verify_epoch_proposers; mod verify_total_credits_in_system; mod verify_upgrade_state; mod verify_upgrade_vote_status; diff --git a/packages/rs-drive/src/verify/system/verify_elements/v0/mod.rs b/packages/rs-drive/src/verify/system/verify_elements/v0/mod.rs index 70c4b15f7ac..ae9f00b2c3d 100644 --- a/packages/rs-drive/src/verify/system/verify_elements/v0/mod.rs +++ b/packages/rs-drive/src/verify/system/verify_elements/v0/mod.rs @@ -29,7 +29,7 @@ impl Drive { /// - The proof is corrupted. /// - The GroveDb query fails. #[inline(always)] - pub(crate) fn verify_elements_v0( + pub(super) fn verify_elements_v0( proof: &[u8], path: Vec>, keys: Vec>, diff --git a/packages/rs-drive/src/verify/system/verify_epoch_infos/v0/mod.rs b/packages/rs-drive/src/verify/system/verify_epoch_infos/v0/mod.rs index 41185817d2a..d9f77b376e1 100644 --- a/packages/rs-drive/src/verify/system/verify_epoch_infos/v0/mod.rs +++ b/packages/rs-drive/src/verify/system/verify_epoch_infos/v0/mod.rs @@ -41,7 +41,7 @@ impl Drive { /// - The proof is corrupted. /// - The GroveDb query fails. #[inline(always)] - pub(crate) fn verify_epoch_infos_v0( + pub(super) fn verify_epoch_infos_v0( proof: &[u8], current_epoch: EpochIndex, start_epoch: Option, diff --git a/packages/rs-drive/src/verify/system/verify_epoch_proposers/mod.rs b/packages/rs-drive/src/verify/system/verify_epoch_proposers/mod.rs new file mode 100644 index 00000000000..f344a9f982f --- /dev/null +++ b/packages/rs-drive/src/verify/system/verify_epoch_proposers/mod.rs @@ -0,0 +1,62 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::query::proposer_block_count_query::ProposerQueryType; +use crate::verify::RootHash; +use dpp::block::epoch::EpochIndex; +use dpp::version::PlatformVersion; + +mod v0; + +impl Drive { + /// Verifies a proof containing a single epochs proposers. + /// + /// # Parameters + /// + /// - `proof`: A byte slice representing the proof to be verified. + /// - `epoch_index`: The epoch index, can be acquired from metadata. + /// - `limit`: The amount of proposers to get. + /// - `platform_version`: the platform version, + /// + /// # Returns + /// + /// Returns a `Result` with a tuple of `RootHash` and `Vec`. The `Vec` + /// represents verified epoch information if it exists. + /// + /// # Errors + /// + /// Returns an `Error` if: + /// + /// - The proof is corrupted. + /// - The GroveDb query fails. + pub fn verify_epoch_proposers( + proof: &[u8], + epoch_index: EpochIndex, + proposer_query_type: ProposerQueryType, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, I), Error> + where + I: FromIterator<(P, u64)>, + P: TryFrom, Error = E>, + { + match platform_version + .drive + .methods + .verify + .system + .verify_epoch_infos + { + 0 => Drive::verify_epoch_proposers_v0( + proof, + epoch_index, + proposer_query_type, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_epoch_proposers".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/system/verify_epoch_proposers/v0/mod.rs b/packages/rs-drive/src/verify/system/verify_epoch_proposers/v0/mod.rs new file mode 100644 index 00000000000..8d079468360 --- /dev/null +++ b/packages/rs-drive/src/verify/system/verify_epoch_proposers/v0/mod.rs @@ -0,0 +1,90 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::query::proposer_block_count_query::ProposerQueryType; +use crate::verify::RootHash; +use dpp::block::epoch::{Epoch, EpochIndex}; +use grovedb::{Element, GroveDb}; +use platform_version::version::PlatformVersion; + +impl Drive { + /// Verifies the proposers for a given epoch using the provided proof. + /// + /// This function checks if the proposers for the specified epoch are correctly included + /// in the provided proof by querying GroveDB and returns the root hash along with the + /// list of proposers and their corresponding block counts. + /// + /// # Parameters + /// + /// - `proof`: A byte slice representing the Merkle proof used to verify the data. + /// - `epoch_index`: The index of the epoch for which the proposers are being verified. + /// - `limit`: The maximum number of proposers to retrieve. + /// - `platform_version`: The current version of the platform to ensure compatibility during verification. + /// + /// # Returns + /// + /// A `Result` containing a tuple: + /// + /// - `RootHash`: The calculated root hash from the verified proof. + /// - `I`: An iterator over the proposers, each paired with their block count. The type `I` + /// is expected to be constructed using the `FromIterator` trait. + /// + /// # Errors + /// + /// This function returns an error if: + /// + /// - The proof is invalid or corrupted. + /// - The GroveDB query fails. + /// - A proposer’s block count cannot be parsed as a `u64`. + /// - An unexpected element type is encountered during verification. + /// + /// ``` + #[inline(always)] + pub(super) fn verify_epoch_proposers_v0( + proof: &[u8], + epoch_index: EpochIndex, + proposer_query_type: ProposerQueryType, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, I), Error> + where + I: FromIterator<(P, u64)>, + P: TryFrom, Error = E>, + { + let epoch = Epoch::new(epoch_index)?; + + let path_query = proposer_query_type.into_path_query(&epoch); + + let (root_hash, elements) = + GroveDb::verify_query(proof, &path_query, &platform_version.drive.grove_version)?; + + let proposers = elements + .into_iter() + .map(|(_, pro_tx_hash, element)| { + let Some(Element::Item(encoded_block_count, _)) = element else { + return Err(Error::Drive(DriveError::UnexpectedElementType( + "epochs proposer block count must be an item", + ))); + }; + + let block_count = u64::from_be_bytes( + encoded_block_count.as_slice().try_into().map_err(|_| { + Error::Drive(DriveError::CorruptedSerialization(String::from( + "epochs proposer block count must be u64", + ))) + })?, + ); + + Ok(( + pro_tx_hash.try_into().map_err(|_| { + Error::Drive(DriveError::CorruptedSerialization( + "item has an invalid length".to_string(), + )) + })?, + block_count, + )) + }) + .collect::>()?; + + Ok((root_hash, proposers)) + } +} diff --git a/packages/rs-drive/src/verify/system/verify_total_credits_in_system/v0/mod.rs b/packages/rs-drive/src/verify/system/verify_total_credits_in_system/v0/mod.rs index 353a115dc53..953e793d95b 100644 --- a/packages/rs-drive/src/verify/system/verify_total_credits_in_system/v0/mod.rs +++ b/packages/rs-drive/src/verify/system/verify_total_credits_in_system/v0/mod.rs @@ -38,7 +38,7 @@ impl Drive { /// - The proof is corrupted. /// - The GroveDb query fails. #[inline(always)] - pub(crate) fn verify_total_credits_in_system_v0( + pub(super) fn verify_total_credits_in_system_v0( proof: &[u8], core_subsidy_halving_interval: u32, request_activation_core_height: impl Fn() -> Result, diff --git a/packages/rs-drive/src/verify/system/verify_upgrade_state/v0/mod.rs b/packages/rs-drive/src/verify/system/verify_upgrade_state/v0/mod.rs index 17d447a549d..0e2af0cfd7b 100644 --- a/packages/rs-drive/src/verify/system/verify_upgrade_state/v0/mod.rs +++ b/packages/rs-drive/src/verify/system/verify_upgrade_state/v0/mod.rs @@ -31,7 +31,7 @@ impl Drive { /// - The proof is corrupted. /// - The GroveDb query fails. #[inline(always)] - pub(crate) fn verify_upgrade_state_v0( + pub(super) fn verify_upgrade_state_v0( proof: &[u8], platform_version: &PlatformVersion, ) -> Result<(RootHash, IntMap), Error> { diff --git a/packages/rs-drive/src/verify/system/verify_upgrade_vote_status/v0/mod.rs b/packages/rs-drive/src/verify/system/verify_upgrade_vote_status/v0/mod.rs index 8f6a4361999..5a326e24162 100644 --- a/packages/rs-drive/src/verify/system/verify_upgrade_vote_status/v0/mod.rs +++ b/packages/rs-drive/src/verify/system/verify_upgrade_vote_status/v0/mod.rs @@ -32,7 +32,7 @@ impl Drive { /// - The proof is corrupted. /// - The GroveDb query fails. #[inline(always)] - pub(crate) fn verify_upgrade_vote_status_v0( + pub(super) fn verify_upgrade_vote_status_v0( proof: &[u8], start_protx_hash: Option<[u8; 32]>, count: u16, diff --git a/packages/rs-drive/src/verify/voting/verify_contests_proof/v0/mod.rs b/packages/rs-drive/src/verify/voting/verify_contests_proof/v0/mod.rs index 6bdcfde8ab0..35a7fb56158 100644 --- a/packages/rs-drive/src/verify/voting/verify_contests_proof/v0/mod.rs +++ b/packages/rs-drive/src/verify/voting/verify_contests_proof/v0/mod.rs @@ -32,7 +32,7 @@ impl<'a> ResolvedVotePollsByDocumentTypeQuery<'a> { /// 1. The proof verification fails. /// 2. There is a deserialization error when parsing the serialized document(s) into `Document` struct(s). #[inline(always)] - pub(crate) fn verify_contests_proof_v0( + pub(super) fn verify_contests_proof_v0( &self, proof: &[u8], platform_version: &PlatformVersion, diff --git a/packages/rs-drive/src/verify/voting/verify_masternode_vote/v0/mod.rs b/packages/rs-drive/src/verify/voting/verify_masternode_vote/v0/mod.rs index cf00e602c3e..daa9effbcc2 100644 --- a/packages/rs-drive/src/verify/voting/verify_masternode_vote/v0/mod.rs +++ b/packages/rs-drive/src/verify/voting/verify_masternode_vote/v0/mod.rs @@ -44,7 +44,7 @@ impl Drive { /// - The identity ID does not correspond to a valid balance. /// - The proved key value is not for the correct path or key in balances. /// - More than one balance is found. - pub(crate) fn verify_masternode_vote_v0( + pub(super) fn verify_masternode_vote_v0( proof: &[u8], masternode_pro_tx_hash: [u8; 32], vote: &Vote, diff --git a/packages/rs-drive/src/verify/voting/verify_specialized_balance/v0/mod.rs b/packages/rs-drive/src/verify/voting/verify_specialized_balance/v0/mod.rs index 35fb2cdcf51..b28bc3fb4fb 100644 --- a/packages/rs-drive/src/verify/voting/verify_specialized_balance/v0/mod.rs +++ b/packages/rs-drive/src/verify/voting/verify_specialized_balance/v0/mod.rs @@ -37,7 +37,7 @@ impl Drive { /// - The proved key value is not for the correct path or key in balances. /// - More than one balance is found. /// - pub(crate) fn verify_specialized_balance_v0( + pub(super) fn verify_specialized_balance_v0( proof: &[u8], balance_id: [u8; 32], verify_subset_of_proof: bool, diff --git a/packages/rs-drive/src/verify/voting/verify_vote_poll_vote_state_proof/v0/mod.rs b/packages/rs-drive/src/verify/voting/verify_vote_poll_vote_state_proof/v0/mod.rs index 100e7b827a5..6b82deffe84 100644 --- a/packages/rs-drive/src/verify/voting/verify_vote_poll_vote_state_proof/v0/mod.rs +++ b/packages/rs-drive/src/verify/voting/verify_vote_poll_vote_state_proof/v0/mod.rs @@ -45,7 +45,7 @@ impl<'a> ResolvedContestedDocumentVotePollDriveQuery<'a> { /// 1. The proof verification fails. /// 2. There is a deserialization error when parsing the serialized document(s) into `Document` struct(s). #[inline(always)] - pub(crate) fn verify_vote_poll_vote_state_proof_v0( + pub(super) fn verify_vote_poll_vote_state_proof_v0( &self, proof: &[u8], platform_version: &PlatformVersion, @@ -56,7 +56,8 @@ impl<'a> ResolvedContestedDocumentVotePollDriveQuery<'a> { GroveDb::verify_query(proof, &path_query, &platform_version.drive.grove_version)?; match self.result_type { - ContestedDocumentVotePollDriveQueryResultType::Documents => { + ContestedDocumentVotePollDriveQueryResultType::Documents + | ContestedDocumentVotePollDriveQueryResultType::SingleDocumentByContender(_) => { let contenders = proved_key_values .into_iter() .map(|(mut path, _key, document)| { diff --git a/packages/rs-drive/src/verify/voting/verify_vote_poll_votes_proof/v0/mod.rs b/packages/rs-drive/src/verify/voting/verify_vote_poll_votes_proof/v0/mod.rs index f46732d4f3e..091cc146949 100644 --- a/packages/rs-drive/src/verify/voting/verify_vote_poll_votes_proof/v0/mod.rs +++ b/packages/rs-drive/src/verify/voting/verify_vote_poll_votes_proof/v0/mod.rs @@ -31,7 +31,7 @@ impl<'a> ResolvedContestedDocumentVotePollVotesDriveQuery<'a> { /// 1. The proof verification fails. /// 2. There is a deserialization error when parsing the serialized document(s) into `Document` struct(s). #[inline(always)] - pub(crate) fn verify_vote_poll_votes_proof_v0( + pub(super) fn verify_vote_poll_votes_proof_v0( &self, proof: &[u8], platform_version: &PlatformVersion, diff --git a/packages/rs-json-schema-compatibility-validator/Cargo.toml b/packages/rs-json-schema-compatibility-validator/Cargo.toml index 28533ae2d90..1322c43bc0f 100644 --- a/packages/rs-json-schema-compatibility-validator/Cargo.toml +++ b/packages/rs-json-schema-compatibility-validator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "json-schema-compatibility-validator" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true authors = ["Ivan Shumkov "] diff --git a/packages/rs-platform-serialization-derive/Cargo.toml b/packages/rs-platform-serialization-derive/Cargo.toml index 5d77a23fac4..83d58540764 100644 --- a/packages/rs-platform-serialization-derive/Cargo.toml +++ b/packages/rs-platform-serialization-derive/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-serialization-derive" authors = ["Samuel Westrich "] description = "Bincode serialization and deserialization derivations" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-serialization/Cargo.toml b/packages/rs-platform-serialization/Cargo.toml index aa090bd2c1d..3fa97698711 100644 --- a/packages/rs-platform-serialization/Cargo.toml +++ b/packages/rs-platform-serialization/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-serialization" authors = ["Samuel Westrich "] description = "Bincode based serialization and deserialization" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-value-convertible/Cargo.toml b/packages/rs-platform-value-convertible/Cargo.toml index 8f4ef3db784..e1732d45675 100644 --- a/packages/rs-platform-value-convertible/Cargo.toml +++ b/packages/rs-platform-value-convertible/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-value-convertible" authors = ["Samuel Westrich "] description = "Convertion to and from platform values" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-value/Cargo.toml b/packages/rs-platform-value/Cargo.toml index c5a0266c12c..3363413b150 100644 --- a/packages/rs-platform-value/Cargo.toml +++ b/packages/rs-platform-value/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-value" authors = ["Samuel Westrich "] description = "A simple value module" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-version/Cargo.toml b/packages/rs-platform-version/Cargo.toml index f59f96aa15f..f620c7336eb 100644 --- a/packages/rs-platform-version/Cargo.toml +++ b/packages/rs-platform-version/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-version" authors = ["Samuel Westrich "] description = "Versioning library for Platform" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-version/src/version/consensus_versions.rs b/packages/rs-platform-version/src/version/consensus_versions.rs new file mode 100644 index 00000000000..af2177ecded --- /dev/null +++ b/packages/rs-platform-version/src/version/consensus_versions.rs @@ -0,0 +1,6 @@ +use versioned_feature_core::FeatureVersion; + +#[derive(Clone, Debug, Default)] +pub struct ConsensusVersions { + pub tenderdash_consensus_version: FeatureVersion, +} diff --git a/packages/rs-platform-version/src/version/dpp_versions.rs b/packages/rs-platform-version/src/version/dpp_versions.rs index 6a64561f6e1..e168d8aa957 100644 --- a/packages/rs-platform-version/src/version/dpp_versions.rs +++ b/packages/rs-platform-version/src/version/dpp_versions.rs @@ -79,7 +79,9 @@ pub struct DataContractValidationVersions { #[derive(Clone, Debug, Default)] pub struct VotingValidationVersions { /// How long do we allow other contenders to join a contest after the first contender - pub allow_other_contenders_time_ms: u64, + pub allow_other_contenders_time_mainnet_ms: u64, + /// How long do we allow other contenders to join a contest after the first contender in a testing environment + pub allow_other_contenders_time_testing_ms: u64, /// How many votes do we allow from the same masternode? pub votes_allowed_per_masternode: u16, } @@ -235,7 +237,8 @@ pub struct IdentityVersions { #[derive(Clone, Debug, Default)] pub struct VotingVersions { - pub default_vote_poll_time_duration_ms: u64, + pub default_vote_poll_time_duration_mainnet_ms: u64, + pub default_vote_poll_time_duration_test_network_ms: u64, pub contested_document_vote_poll_stored_info_version: FeatureVersion, } diff --git a/packages/rs-platform-version/src/version/drive_abci_versions.rs b/packages/rs-platform-version/src/version/drive_abci_versions.rs index 513d9c3b48c..bf80179c092 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions.rs @@ -16,6 +16,7 @@ pub struct DriveAbciQueryVersions { pub document_query: FeatureVersionBounds, pub prefunded_specialized_balances: DriveAbciQueryPrefundedSpecializedBalancesVersions, pub identity_based_queries: DriveAbciQueryIdentityVersions, + pub validator_queries: DriveAbciQueryValidatorVersions, pub data_contract_based_queries: DriveAbciQueryDataContractVersions, pub voting_based_queries: DriveAbciQueryVotingVersions, pub system: DriveAbciQuerySystemVersions, @@ -34,10 +35,17 @@ pub struct DriveAbciQueryIdentityVersions { pub identity_nonce: FeatureVersionBounds, pub identity_contract_nonce: FeatureVersionBounds, pub balance: FeatureVersionBounds, + pub identities_balances: FeatureVersionBounds, pub balance_and_revision: FeatureVersionBounds, pub identity_by_public_key_hash: FeatureVersionBounds, } +#[derive(Clone, Debug, Default)] +pub struct DriveAbciQueryValidatorVersions { + pub proposed_block_counts_by_evonode_ids: FeatureVersionBounds, + pub proposed_block_counts_by_range: FeatureVersionBounds, +} + #[derive(Clone, Debug, Default)] pub struct DriveAbciQueryVotingVersions { pub vote_polls_by_end_date_query: FeatureVersionBounds, @@ -215,6 +223,7 @@ pub struct DriveAbciEngineMethodVersions { pub check_tx: FeatureVersion, pub run_block_proposal: FeatureVersion, pub finalize_block_proposal: FeatureVersion, + pub consensus_params_update: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_versions.rs b/packages/rs-platform-version/src/version/drive_versions.rs index 020b006aeb4..5e67347b443 100644 --- a/packages/rs-platform-version/src/version/drive_versions.rs +++ b/packages/rs-platform-version/src/version/drive_versions.rs @@ -127,6 +127,7 @@ pub struct DriveVerifyIdentityMethodVersions { pub verify_identity_nonce: FeatureVersion, pub verify_identity_contract_nonce: FeatureVersion, pub verify_identities_contract_keys: FeatureVersion, + pub verify_identity_revision_for_identity_id: FeatureVersion, } #[derive(Clone, Debug, Default)] @@ -144,6 +145,7 @@ pub struct DriveVerifyVoteMethodVersions { #[derive(Clone, Debug, Default)] pub struct DriveVerifySystemMethodVersions { pub verify_epoch_infos: FeatureVersion, + pub verify_epoch_proposers: FeatureVersion, pub verify_elements: FeatureVersion, pub verify_total_credits_in_system: FeatureVersion, pub verify_upgrade_state: FeatureVersion, @@ -319,6 +321,8 @@ pub struct DriveVoteCleanupMethodVersions { pub remove_contested_resource_vote_poll_votes_operations: FeatureVersion, pub remove_contested_resource_vote_poll_documents_operations: FeatureVersion, pub remove_contested_resource_vote_poll_contenders_operations: FeatureVersion, + pub remove_contested_resource_top_level_index_operations: FeatureVersion, + pub remove_contested_resource_info_operations: FeatureVersion, } #[derive(Clone, Debug, Default)] @@ -348,6 +352,8 @@ pub struct DriveDocumentMethodVersions { #[derive(Clone, Debug, Default)] pub struct DriveDocumentQueryMethodVersions { pub query_documents: FeatureVersion, + pub query_contested_documents: FeatureVersion, + pub query_contested_documents_vote_state: FeatureVersion, pub query_documents_with_flags: FeatureVersion, } @@ -497,7 +503,8 @@ pub struct DriveCreditPoolEpochsMethodVersions { pub get_epoch_start_block_core_height: FeatureVersion, pub get_epoch_start_block_height: FeatureVersion, pub get_first_epoch_start_block_info_between_epochs: FeatureVersion, - pub get_epoch_proposers: FeatureVersion, + pub fetch_epoch_proposers: FeatureVersion, + pub prove_epoch_proposers: FeatureVersion, pub get_epochs_proposer_block_count: FeatureVersion, pub add_update_pending_epoch_refunds_operations: FeatureVersion, pub is_epochs_proposers_tree_empty: FeatureVersion, 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 70a407882f9..a23140000bb 100644 --- a/packages/rs-platform-version/src/version/mocks/v2_test.rs +++ b/packages/rs-platform-version/src/version/mocks/v2_test.rs @@ -1,3 +1,4 @@ +use crate::version::consensus_versions::ConsensusVersions; use crate::version::contracts::SystemDataContractVersions; use crate::version::dpp_versions::{ AssetLockVersions, ContractVersions, CostVersions, DPPMethodVersions, DPPValidationVersions, @@ -25,7 +26,7 @@ use crate::version::drive_abci_versions::{ DriveAbciPlatformStateStorageMethodVersions, DriveAbciProtocolUpgradeMethodVersions, DriveAbciQueryDataContractVersions, DriveAbciQueryIdentityVersions, DriveAbciQueryPrefundedSpecializedBalancesVersions, DriveAbciQuerySystemVersions, - DriveAbciQueryVersions, DriveAbciQueryVotingVersions, + DriveAbciQueryValidatorVersions, DriveAbciQueryVersions, DriveAbciQueryVotingVersions, DriveAbciStateTransitionCommonValidationVersions, DriveAbciStateTransitionProcessingMethodVersions, DriveAbciStateTransitionValidationVersion, DriveAbciStateTransitionValidationVersions, DriveAbciStructureVersions, @@ -127,7 +128,8 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { get_epoch_start_block_core_height: 0, get_epoch_start_block_height: 0, get_first_epoch_start_block_info_between_epochs: 0, - get_epoch_proposers: 0, + fetch_epoch_proposers: 0, + prove_epoch_proposers: 0, get_epochs_proposer_block_count: 0, add_update_pending_epoch_refunds_operations: 0, is_epochs_proposers_tree_empty: 0, @@ -167,7 +169,7 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { calculate_total_credits_balance: 0, }, document: DriveDocumentMethodVersions { - query: DriveDocumentQueryMethodVersions { query_documents: 0, query_documents_with_flags: 0 }, + query: DriveDocumentQueryMethodVersions { query_documents: 0, query_contested_documents: 0, query_contested_documents_vote_state: 0, query_documents_with_flags: 0 }, delete: DriveDocumentDeleteMethodVersions { add_estimation_costs_for_remove_document_to_primary_storage: 0, delete_document_for_contract: 0, @@ -242,6 +244,8 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { remove_contested_resource_vote_poll_votes_operations: 0, remove_contested_resource_vote_poll_documents_operations: 0, remove_contested_resource_vote_poll_contenders_operations: 0, + remove_contested_resource_top_level_index_operations: 0, + remove_contested_resource_info_operations: 0, }, setup: DriveVoteSetupMethodVersions { add_initial_vote_tree_main_structure_operations: 0, @@ -315,6 +319,7 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { verify_identity_nonce: 0, verify_identity_contract_nonce: 0, verify_identities_contract_keys: 0, + verify_identity_revision_for_identity_id: 0, }, single_document: DriveVerifySingleDocumentMethodVersions { verify_proof: 0, @@ -322,6 +327,7 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { }, system: DriveVerifySystemMethodVersions { verify_epoch_infos: 0, + verify_epoch_proposers: 0, verify_elements: 0, verify_total_credits_in_system: 0, verify_upgrade_state: 0, @@ -601,6 +607,7 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { check_tx: 0, run_block_proposal: 0, finalize_block_proposal: 0, + consensus_params_update: 0, }, initialization: DriveAbciInitializationMethodVersions { initial_core_height_and_time: 0, @@ -882,6 +889,11 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { max_version: 0, default_current_version: 0, }, + identities_balances: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, balance_and_revision: FeatureVersionBounds { min_version: 0, max_version: 0, @@ -898,6 +910,18 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { default_current_version: 0, }, }, + validator_queries: DriveAbciQueryValidatorVersions { + proposed_block_counts_by_evonode_ids: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + proposed_block_counts_by_range: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, data_contract_based_queries: DriveAbciQueryDataContractVersions { data_contract: FeatureVersionBounds { min_version: 0, @@ -1001,7 +1025,8 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { unique_index_limit: 10, }, voting: VotingValidationVersions { - allow_other_contenders_time_ms: 604_800_000, // 1 week in ms + allow_other_contenders_time_mainnet_ms: 604_800_000, // 1 week in ms + allow_other_contenders_time_testing_ms: 2_700_000, //45 minutes votes_allowed_per_masternode: 5, }, }, @@ -1222,7 +1247,8 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { }, }, voting_versions: VotingVersions { - default_vote_poll_time_duration_ms: 1_209_600_000, //2 weeks + default_vote_poll_time_duration_mainnet_ms: 1_209_600_000, //2 weeks + default_vote_poll_time_duration_test_network_ms: 5_400_000, //90 minutes contested_document_vote_poll_stored_info_version: 0, }, asset_lock_versions: AssetLockVersions { @@ -1248,4 +1274,7 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { max_state_transition_size: 20000, max_transitions_in_documents_batch: 1, }, + consensus: ConsensusVersions { + tenderdash_consensus_version: 0, + }, }; diff --git a/packages/rs-platform-version/src/version/mocks/v3_test.rs b/packages/rs-platform-version/src/version/mocks/v3_test.rs index 1ba30668f0b..919a6add8cc 100644 --- a/packages/rs-platform-version/src/version/mocks/v3_test.rs +++ b/packages/rs-platform-version/src/version/mocks/v3_test.rs @@ -1,3 +1,4 @@ +use crate::version::consensus_versions::ConsensusVersions; use crate::version::contracts::SystemDataContractVersions; use crate::version::dpp_versions::{ AssetLockVersions, ContractVersions, CostVersions, DPPMethodVersions, DPPValidationVersions, @@ -25,7 +26,7 @@ use crate::version::drive_abci_versions::{ DriveAbciPlatformStateStorageMethodVersions, DriveAbciProtocolUpgradeMethodVersions, DriveAbciQueryDataContractVersions, DriveAbciQueryIdentityVersions, DriveAbciQueryPrefundedSpecializedBalancesVersions, DriveAbciQuerySystemVersions, - DriveAbciQueryVersions, DriveAbciQueryVotingVersions, + DriveAbciQueryValidatorVersions, DriveAbciQueryVersions, DriveAbciQueryVotingVersions, DriveAbciStateTransitionCommonValidationVersions, DriveAbciStateTransitionProcessingMethodVersions, DriveAbciStateTransitionValidationVersion, DriveAbciStateTransitionValidationVersions, DriveAbciStructureVersions, @@ -127,7 +128,8 @@ pub const TEST_PLATFORM_V3: PlatformVersion = PlatformVersion { get_epoch_start_block_core_height: 0, get_epoch_start_block_height: 0, get_first_epoch_start_block_info_between_epochs: 0, - get_epoch_proposers: 0, + fetch_epoch_proposers: 0, + prove_epoch_proposers: 0, get_epochs_proposer_block_count: 0, add_update_pending_epoch_refunds_operations: 0, is_epochs_proposers_tree_empty: 0, @@ -196,7 +198,7 @@ pub const TEST_PLATFORM_V3: PlatformVersion = PlatformVersion { }, }, document: DriveDocumentMethodVersions { - query: DriveDocumentQueryMethodVersions { query_documents: 0, query_documents_with_flags: 0 }, + query: DriveDocumentQueryMethodVersions { query_documents: 0, query_contested_documents: 0, query_contested_documents_vote_state: 0, query_documents_with_flags: 0 }, delete: DriveDocumentDeleteMethodVersions { add_estimation_costs_for_remove_document_to_primary_storage: 0, delete_document_for_contract: 0, @@ -271,6 +273,8 @@ pub const TEST_PLATFORM_V3: PlatformVersion = PlatformVersion { remove_contested_resource_vote_poll_votes_operations: 0, remove_contested_resource_vote_poll_documents_operations: 0, remove_contested_resource_vote_poll_contenders_operations: 0, + remove_contested_resource_top_level_index_operations: 0, + remove_contested_resource_info_operations: 0, }, setup: DriveVoteSetupMethodVersions { add_initial_vote_tree_main_structure_operations: 0, @@ -344,6 +348,7 @@ pub const TEST_PLATFORM_V3: PlatformVersion = PlatformVersion { verify_identity_nonce: 0, verify_identity_contract_nonce: 0, verify_identities_contract_keys: 0, + verify_identity_revision_for_identity_id: 0, }, single_document: DriveVerifySingleDocumentMethodVersions { verify_proof: 0, @@ -351,6 +356,7 @@ pub const TEST_PLATFORM_V3: PlatformVersion = PlatformVersion { }, system: DriveVerifySystemMethodVersions { verify_epoch_infos: 0, + verify_epoch_proposers: 0, verify_elements: 0, verify_total_credits_in_system: 0, verify_upgrade_state: 0, @@ -601,6 +607,7 @@ pub const TEST_PLATFORM_V3: PlatformVersion = PlatformVersion { check_tx: 0, run_block_proposal: 0, finalize_block_proposal: 0, + consensus_params_update: 0, }, initialization: DriveAbciInitializationMethodVersions { initial_core_height_and_time: 0, @@ -882,6 +889,11 @@ pub const TEST_PLATFORM_V3: PlatformVersion = PlatformVersion { max_version: 0, default_current_version: 0, }, + identities_balances: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, balance_and_revision: FeatureVersionBounds { min_version: 0, max_version: 0, @@ -898,6 +910,18 @@ pub const TEST_PLATFORM_V3: PlatformVersion = PlatformVersion { default_current_version: 0, }, }, + validator_queries: DriveAbciQueryValidatorVersions { + proposed_block_counts_by_evonode_ids: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + proposed_block_counts_by_range: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, data_contract_based_queries: DriveAbciQueryDataContractVersions { data_contract: FeatureVersionBounds { min_version: 0, @@ -1001,7 +1025,8 @@ pub const TEST_PLATFORM_V3: PlatformVersion = PlatformVersion { unique_index_limit: 10, }, voting: VotingValidationVersions { - allow_other_contenders_time_ms: 604_800_000, // 1 week in ms + allow_other_contenders_time_mainnet_ms: 604_800_000, // 1 week in ms + allow_other_contenders_time_testing_ms: 2_700_000, //45 minutes votes_allowed_per_masternode: 5, }, }, @@ -1222,7 +1247,8 @@ pub const TEST_PLATFORM_V3: PlatformVersion = PlatformVersion { }, }, voting_versions: VotingVersions { - default_vote_poll_time_duration_ms: 1_209_600_000, //2 weeks + default_vote_poll_time_duration_mainnet_ms: 1_209_600_000, //2 weeks + default_vote_poll_time_duration_test_network_ms: 5_400_000, //90 minutes contested_document_vote_poll_stored_info_version: 0, }, asset_lock_versions: AssetLockVersions { @@ -1250,4 +1276,7 @@ pub const TEST_PLATFORM_V3: PlatformVersion = PlatformVersion { max_state_transition_size: 20000, max_transitions_in_documents_batch: 1, }, + consensus: ConsensusVersions { + tenderdash_consensus_version: 0, + }, }; diff --git a/packages/rs-platform-version/src/version/mod.rs b/packages/rs-platform-version/src/version/mod.rs index 6422228b1d0..d7346a7097f 100644 --- a/packages/rs-platform-version/src/version/mod.rs +++ b/packages/rs-platform-version/src/version/mod.rs @@ -1,7 +1,8 @@ mod protocol_version; -use crate::version::v1::PROTOCOL_VERSION_1; +use crate::version::v3::PROTOCOL_VERSION_3; pub use protocol_version::*; +mod consensus_versions; pub mod contracts; pub mod dpp_versions; pub mod drive_abci_versions; @@ -12,8 +13,10 @@ mod limits; pub mod mocks; pub mod patches; pub mod v1; +pub mod v2; +pub mod v3; pub type ProtocolVersion = u32; -pub const LATEST_VERSION: ProtocolVersion = PROTOCOL_VERSION_1; +pub const LATEST_VERSION: ProtocolVersion = PROTOCOL_VERSION_3; pub const INITIAL_PROTOCOL_VERSION: ProtocolVersion = 1; diff --git a/packages/rs-platform-version/src/version/protocol_version.rs b/packages/rs-platform-version/src/version/protocol_version.rs index dcb62784b23..607a267844e 100644 --- a/packages/rs-platform-version/src/version/protocol_version.rs +++ b/packages/rs-platform-version/src/version/protocol_version.rs @@ -14,7 +14,10 @@ use crate::version::v1::PLATFORM_V1; #[cfg(feature = "mock-versions")] use std::sync::OnceLock; +use crate::version::consensus_versions::ConsensusVersions; use crate::version::limits::SystemLimits; +use crate::version::v2::PLATFORM_V2; +use crate::version::v3::PLATFORM_V3; use crate::version::ProtocolVersion; pub use versioned_feature_core::*; @@ -31,13 +34,14 @@ pub struct PlatformVersion { pub dpp: DPPVersion, pub drive: DriveVersion, pub drive_abci: DriveAbciVersion, + pub consensus: ConsensusVersions, pub fee_version: FeeVersion, pub platform_architecture: PlatformArchitectureVersion, pub system_data_contracts: SystemDataContractVersions, pub system_limits: SystemLimits, } -pub const PLATFORM_VERSIONS: &[PlatformVersion] = &[PLATFORM_V1]; +pub const PLATFORM_VERSIONS: &[PlatformVersion] = &[PLATFORM_V1, PLATFORM_V2, PLATFORM_V3]; #[cfg(feature = "mock-versions")] // We use OnceLock to be able to modify the version mocks @@ -45,7 +49,10 @@ pub static PLATFORM_TEST_VERSIONS: OnceLock> = OnceLock::ne #[cfg(feature = "mock-versions")] const DEFAULT_PLATFORM_TEST_VERSIONS: &[PlatformVersion] = &[TEST_PLATFORM_V2, TEST_PLATFORM_V3]; -pub const LATEST_PLATFORM_VERSION: &PlatformVersion = &PLATFORM_V1; +pub const LATEST_PLATFORM_VERSION: &PlatformVersion = &PLATFORM_V3; + +/// For V3 release we want to do an emergency version upgrade +pub const DESIRED_PLATFORM_VERSION: &PlatformVersion = LATEST_PLATFORM_VERSION; impl PlatformVersion { pub fn get<'a>(version: ProtocolVersion) -> Result<&'a Self, PlatformVersionError> { @@ -76,6 +83,26 @@ impl PlatformVersion { } } + pub fn get_optional<'a>(version: ProtocolVersion) -> Option<&'a Self> { + if version > 0 { + #[cfg(feature = "mock-versions")] + { + if version >> TEST_PROTOCOL_VERSION_SHIFT_BYTES > 0 { + let test_version = version - (1 << TEST_PROTOCOL_VERSION_SHIFT_BYTES); + + // Init default set of test versions + let versions = PLATFORM_TEST_VERSIONS + .get_or_init(|| vec![TEST_PLATFORM_V2, TEST_PLATFORM_V3]); + + return versions.get(test_version as usize - 2); + } + } + PLATFORM_VERSIONS.get(version as usize - 1) + } else { + None + } + } + pub fn get_version_or_latest<'a>( version: Option, ) -> Result<&'a Self, PlatformVersionError> { diff --git a/packages/rs-platform-version/src/version/v1.rs b/packages/rs-platform-version/src/version/v1.rs index a682703d1e7..325336c52fa 100644 --- a/packages/rs-platform-version/src/version/v1.rs +++ b/packages/rs-platform-version/src/version/v1.rs @@ -1,3 +1,4 @@ +use crate::version::consensus_versions::ConsensusVersions; use crate::version::contracts::SystemDataContractVersions; use crate::version::dpp_versions::{ AssetLockVersions, ContractVersions, CostVersions, DPPMethodVersions, DPPValidationVersions, @@ -25,7 +26,7 @@ use crate::version::drive_abci_versions::{ DriveAbciPlatformStateStorageMethodVersions, DriveAbciProtocolUpgradeMethodVersions, DriveAbciQueryDataContractVersions, DriveAbciQueryIdentityVersions, DriveAbciQueryPrefundedSpecializedBalancesVersions, DriveAbciQuerySystemVersions, - DriveAbciQueryVersions, DriveAbciQueryVotingVersions, + DriveAbciQueryValidatorVersions, DriveAbciQueryVersions, DriveAbciQueryVotingVersions, DriveAbciStateTransitionCommonValidationVersions, DriveAbciStateTransitionProcessingMethodVersions, DriveAbciStateTransitionValidationVersion, DriveAbciStateTransitionValidationVersions, DriveAbciStructureVersions, @@ -126,7 +127,8 @@ pub const PLATFORM_V1: PlatformVersion = PlatformVersion { get_epoch_start_block_core_height: 0, get_epoch_start_block_height: 0, get_first_epoch_start_block_info_between_epochs: 0, - get_epoch_proposers: 0, + fetch_epoch_proposers: 0, + prove_epoch_proposers: 0, get_epochs_proposer_block_count: 0, add_update_pending_epoch_refunds_operations: 0, is_epochs_proposers_tree_empty: 0, @@ -166,7 +168,7 @@ pub const PLATFORM_V1: PlatformVersion = PlatformVersion { calculate_total_credits_balance: 0, }, document: DriveDocumentMethodVersions { - query: DriveDocumentQueryMethodVersions { query_documents: 0, query_documents_with_flags: 0 }, + query: DriveDocumentQueryMethodVersions { query_documents: 0, query_contested_documents: 0, query_contested_documents_vote_state: 0, query_documents_with_flags: 0 }, delete: DriveDocumentDeleteMethodVersions { add_estimation_costs_for_remove_document_to_primary_storage: 0, delete_document_for_contract: 0, @@ -241,6 +243,8 @@ pub const PLATFORM_V1: PlatformVersion = PlatformVersion { remove_contested_resource_vote_poll_votes_operations: 0, remove_contested_resource_vote_poll_documents_operations: 0, remove_contested_resource_vote_poll_contenders_operations: 0, + remove_contested_resource_top_level_index_operations: 0, + remove_contested_resource_info_operations: 0, }, setup: DriveVoteSetupMethodVersions { add_initial_vote_tree_main_structure_operations: 0, @@ -314,6 +318,7 @@ pub const PLATFORM_V1: PlatformVersion = PlatformVersion { verify_identity_nonce: 0, verify_identity_contract_nonce: 0, verify_identities_contract_keys: 0, + verify_identity_revision_for_identity_id: 0, }, single_document: DriveVerifySingleDocumentMethodVersions { verify_proof: 0, @@ -321,6 +326,7 @@ pub const PLATFORM_V1: PlatformVersion = PlatformVersion { }, system: DriveVerifySystemMethodVersions { verify_epoch_infos: 0, + verify_epoch_proposers: 0, verify_elements: 0, verify_total_credits_in_system: 0, verify_upgrade_state: 0, @@ -600,6 +606,7 @@ pub const PLATFORM_V1: PlatformVersion = PlatformVersion { check_tx: 0, run_block_proposal: 0, finalize_block_proposal: 0, + consensus_params_update: 0, }, initialization: DriveAbciInitializationMethodVersions { initial_core_height_and_time: 0, @@ -886,6 +893,11 @@ pub const PLATFORM_V1: PlatformVersion = PlatformVersion { max_version: 0, default_current_version: 0, }, + identities_balances: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, balance_and_revision: FeatureVersionBounds { min_version: 0, max_version: 0, @@ -897,6 +909,18 @@ pub const PLATFORM_V1: PlatformVersion = PlatformVersion { default_current_version: 0, }, }, + validator_queries: DriveAbciQueryValidatorVersions { + proposed_block_counts_by_evonode_ids: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + proposed_block_counts_by_range: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, data_contract_based_queries: DriveAbciQueryDataContractVersions { data_contract: FeatureVersionBounds { min_version: 0, @@ -1000,7 +1024,8 @@ pub const PLATFORM_V1: PlatformVersion = PlatformVersion { unique_index_limit: 10, }, voting: VotingValidationVersions { - allow_other_contenders_time_ms: 604_800_000, // 1 week in ms + allow_other_contenders_time_mainnet_ms: 604_800_000, // 1 week in ms + allow_other_contenders_time_testing_ms: 604_800_000, // 1 week in ms for v1 (changes in v2) votes_allowed_per_masternode: 5, }, }, @@ -1221,7 +1246,8 @@ pub const PLATFORM_V1: PlatformVersion = PlatformVersion { }, }, voting_versions: VotingVersions { - default_vote_poll_time_duration_ms: 1_209_600_000, //2 weeks + default_vote_poll_time_duration_mainnet_ms: 1_209_600_000, //2 weeks + default_vote_poll_time_duration_test_network_ms: 1_209_600_000, //2 weeks contested_document_vote_poll_stored_info_version: 0, }, asset_lock_versions: AssetLockVersions { @@ -1249,4 +1275,7 @@ pub const PLATFORM_V1: PlatformVersion = PlatformVersion { max_state_transition_size: 20480, //20 KiB max_transitions_in_documents_batch: 1, }, + consensus: ConsensusVersions { + tenderdash_consensus_version: 0, + }, }; diff --git a/packages/rs-platform-version/src/version/v2.rs b/packages/rs-platform-version/src/version/v2.rs new file mode 100644 index 00000000000..5ed8d2d3e30 --- /dev/null +++ b/packages/rs-platform-version/src/version/v2.rs @@ -0,0 +1,1281 @@ +use crate::version::consensus_versions::ConsensusVersions; +use crate::version::contracts::SystemDataContractVersions; +use crate::version::dpp_versions::{ + AssetLockVersions, ContractVersions, CostVersions, DPPMethodVersions, DPPValidationVersions, + DPPVersion, DataContractMethodVersions, DataContractValidationVersions, + DocumentFeatureVersionBounds, DocumentMethodVersions, DocumentTransitionVersions, + DocumentTypeClassMethodVersions, DocumentTypeIndexVersions, DocumentTypeMethodVersions, + DocumentTypeSchemaVersions, DocumentTypeValidationVersions, DocumentTypeVersions, + DocumentVersions, DocumentsBatchTransitionValidationVersions, DocumentsBatchTransitionVersions, + IdentityKeyTypeMethodVersions, IdentityTransitionAssetLockVersions, IdentityTransitionVersions, + IdentityVersions, JsonSchemaValidatorVersions, PublicKeyInCreationMethodVersions, + RecursiveSchemaValidatorVersions, StateTransitionConversionVersions, + StateTransitionMethodVersions, StateTransitionSerializationVersions, StateTransitionVersions, + VotingValidationVersions, VotingVersions, +}; +use crate::version::drive_abci_versions::{ + DriveAbciAssetLockValidationVersions, DriveAbciBlockEndMethodVersions, + DriveAbciBlockFeeProcessingMethodVersions, DriveAbciBlockStartMethodVersions, + DriveAbciCoreBasedUpdatesMethodVersions, DriveAbciCoreChainLockMethodVersionsAndConstants, + DriveAbciCoreInstantSendLockMethodVersions, + DriveAbciDocumentsStateTransitionValidationVersions, DriveAbciEngineMethodVersions, + DriveAbciEpochMethodVersions, DriveAbciFeePoolInwardsDistributionMethodVersions, + DriveAbciFeePoolOutwardsDistributionMethodVersions, + DriveAbciIdentityCreditWithdrawalMethodVersions, DriveAbciInitializationMethodVersions, + DriveAbciMasternodeIdentitiesUpdatesMethodVersions, DriveAbciMethodVersions, + DriveAbciPlatformStateStorageMethodVersions, DriveAbciProtocolUpgradeMethodVersions, + DriveAbciQueryDataContractVersions, DriveAbciQueryIdentityVersions, + DriveAbciQueryPrefundedSpecializedBalancesVersions, DriveAbciQuerySystemVersions, + DriveAbciQueryValidatorVersions, DriveAbciQueryVersions, DriveAbciQueryVotingVersions, + DriveAbciStateTransitionCommonValidationVersions, + DriveAbciStateTransitionProcessingMethodVersions, DriveAbciStateTransitionValidationVersion, + DriveAbciStateTransitionValidationVersions, DriveAbciStructureVersions, + DriveAbciValidationConstants, DriveAbciValidationDataTriggerAndBindingVersions, + DriveAbciValidationDataTriggerVersions, DriveAbciValidationVersions, DriveAbciVersion, + DriveAbciVotingMethodVersions, PenaltyAmounts, +}; +use crate::version::drive_versions::{ + DriveAssetLockMethodVersions, DriveBalancesMethodVersions, DriveBatchOperationsMethodVersion, + DriveContractApplyMethodVersions, DriveContractCostsMethodVersions, + DriveContractGetMethodVersions, DriveContractInsertMethodVersions, DriveContractMethodVersions, + DriveContractProveMethodVersions, DriveContractUpdateMethodVersions, + DriveCreditPoolEpochsMethodVersions, DriveCreditPoolMethodVersions, + DriveCreditPoolPendingEpochRefundsMethodVersions, + DriveCreditPoolStorageFeeDistributionPoolMethodVersions, + DriveCreditPoolUnpaidEpochMethodVersions, DriveDataContractOperationMethodVersions, + DriveDocumentDeleteMethodVersions, DriveDocumentEstimationCostsMethodVersions, + DriveDocumentIndexUniquenessMethodVersions, DriveDocumentInsertContestedMethodVersions, + DriveDocumentInsertMethodVersions, DriveDocumentMethodVersions, + DriveDocumentQueryMethodVersions, DriveDocumentUpdateMethodVersions, + DriveEstimatedCostsMethodVersions, DriveFeesMethodVersions, DriveFetchMethodVersions, + DriveGroveApplyMethodVersions, DriveGroveBasicMethodVersions, DriveGroveBatchMethodVersions, + DriveGroveCostMethodVersions, DriveGroveMethodVersions, + DriveIdentityContractInfoMethodVersions, DriveIdentityCostEstimationMethodVersions, + DriveIdentityFetchAttributesMethodVersions, DriveIdentityFetchFullIdentityMethodVersions, + DriveIdentityFetchMethodVersions, DriveIdentityFetchPartialIdentityMethodVersions, + DriveIdentityFetchPublicKeyHashesMethodVersions, DriveIdentityInsertMethodVersions, + DriveIdentityKeyHashesToIdentityInsertMethodVersions, DriveIdentityKeysFetchMethodVersions, + DriveIdentityKeysInsertMethodVersions, DriveIdentityKeysMethodVersions, + DriveIdentityKeysProveMethodVersions, DriveIdentityMethodVersions, + DriveIdentityProveMethodVersions, DriveIdentityUpdateMethodVersions, + DriveIdentityWithdrawalDocumentMethodVersions, DriveIdentityWithdrawalMethodVersions, + DriveIdentityWithdrawalTransactionIndexMethodVersions, + DriveIdentityWithdrawalTransactionMethodVersions, + DriveIdentityWithdrawalTransactionQueueMethodVersions, DriveInitializationMethodVersions, + DriveMethodVersions, DriveOperationsMethodVersion, DrivePlatformStateMethodVersions, + DrivePlatformSystemMethodVersions, DrivePrefundedSpecializedMethodVersions, + DriveProtocolUpgradeVersions, DriveProveMethodVersions, + DriveStateTransitionActionConvertToHighLevelOperationsMethodVersions, + DriveStateTransitionMethodVersions, DriveStateTransitionOperationMethodVersions, + DriveStructureVersion, DriveSystemEstimationCostsMethodVersions, + DriveVerifyContractMethodVersions, DriveVerifyDocumentMethodVersions, + DriveVerifyIdentityMethodVersions, DriveVerifyMethodVersions, + DriveVerifySingleDocumentMethodVersions, DriveVerifyStateTransitionMethodVersions, + DriveVerifySystemMethodVersions, DriveVerifyVoteMethodVersions, DriveVersion, + DriveVoteCleanupMethodVersions, DriveVoteContestedResourceInsertMethodVersions, + DriveVoteFetchMethodVersions, DriveVoteInsertMethodVersions, DriveVoteMethodVersions, + DriveVoteSetupMethodVersions, DriveVoteStorageFormMethodVersions, +}; +use crate::version::fee::v1::FEE_VERSION1; +use crate::version::limits::SystemLimits; +use crate::version::protocol_version::{FeatureVersionBounds, PlatformVersion}; +use crate::version::{PlatformArchitectureVersion, ProtocolVersion}; +use grovedb_version::version::v1::GROVE_V1; + +pub const PROTOCOL_VERSION_2: ProtocolVersion = 2; + +pub const PLATFORM_V2: PlatformVersion = PlatformVersion { + protocol_version: 2, + proofs: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + drive: DriveVersion { + structure: DriveStructureVersion { + document_indexes: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_indexes: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + pools: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + methods: DriveMethodVersions { + initialization: DriveInitializationMethodVersions { + create_initial_state_structure: 0, + }, + credit_pools: DriveCreditPoolMethodVersions { + epochs: DriveCreditPoolEpochsMethodVersions { + get_epochs_infos: 0, + get_epochs_protocol_versions: 0, + prove_epochs_infos: 0, + get_epoch_fee_multiplier: 0, + get_epoch_processing_credits_for_distribution: 0, + get_epoch_storage_credits_for_distribution: 0, + get_epoch_total_credits_for_distribution: 0, + get_storage_credits_for_distribution_for_epochs_in_range: 0, + get_epoch_start_time: 0, + get_epoch_start_block_core_height: 0, + get_epoch_start_block_height: 0, + get_first_epoch_start_block_info_between_epochs: 0, + fetch_epoch_proposers: 0, + prove_epoch_proposers: 0, + get_epochs_proposer_block_count: 0, + add_update_pending_epoch_refunds_operations: 0, + is_epochs_proposers_tree_empty: 0, + }, + pending_epoch_refunds: DriveCreditPoolPendingEpochRefundsMethodVersions { + add_delete_pending_epoch_refunds_except_specified: 0, + fetch_and_add_pending_epoch_refunds_to_collection: 0, + fetch_pending_epoch_refunds: 0, + add_update_pending_epoch_refunds_operations: 0, + }, + storage_fee_distribution_pool: + DriveCreditPoolStorageFeeDistributionPoolMethodVersions { + get_storage_fees_from_distribution_pool: 0, + }, + unpaid_epoch: DriveCreditPoolUnpaidEpochMethodVersions { + get_unpaid_epoch_index: 0, + }, + }, + protocol_upgrade: DriveProtocolUpgradeVersions { + clear_version_information: 0, + fetch_versions_with_counter: 0, + fetch_proved_versions_with_counter: 0, + fetch_validator_version_votes: 0, + fetch_proved_validator_version_votes: 0, + remove_validators_proposed_app_versions: 0, + update_validator_proposed_app_version: 0, + }, + prove: DriveProveMethodVersions { + prove_elements: 0, + prove_multiple_state_transition_results: 0, + }, + balances: DriveBalancesMethodVersions { + add_to_system_credits: 0, + add_to_system_credits_operations: 0, + remove_from_system_credits: 0, + remove_from_system_credits_operations: 0, + calculate_total_credits_balance: 0, + }, + document: DriveDocumentMethodVersions { + query: DriveDocumentQueryMethodVersions { query_documents: 0, query_contested_documents: 0, query_contested_documents_vote_state: 0, query_documents_with_flags: 0 }, + delete: DriveDocumentDeleteMethodVersions { + add_estimation_costs_for_remove_document_to_primary_storage: 0, + delete_document_for_contract: 0, + delete_document_for_contract_id: 0, + delete_document_for_contract_apply_and_add_to_operations: 0, + remove_document_from_primary_storage: 0, + remove_reference_for_index_level_for_contract_operations: 0, + remove_indices_for_index_level_for_contract_operations: 0, + remove_indices_for_top_index_level_for_contract_operations: 0, + delete_document_for_contract_id_with_named_type_operations: 0, + delete_document_for_contract_with_named_type_operations: 0, + delete_document_for_contract_operations: 0, + }, + insert: DriveDocumentInsertMethodVersions { + add_document: 0, + add_document_for_contract: 0, + add_document_for_contract_apply_and_add_to_operations: 0, + add_document_for_contract_operations: 0, + add_document_to_primary_storage: 0, + add_indices_for_index_level_for_contract_operations: 0, + add_indices_for_top_index_level_for_contract_operations: 0, + add_reference_for_index_level_for_contract_operations: 0, + }, + insert_contested: DriveDocumentInsertContestedMethodVersions { + add_contested_document: 0, + add_contested_document_for_contract: 0, + add_contested_document_for_contract_apply_and_add_to_operations: 0, + add_contested_document_for_contract_operations: 0, + add_contested_document_to_primary_storage: 0, + add_contested_indices_for_contract_operations: 0, + add_contested_reference_and_vote_subtree_to_document_operations: 0, + add_contested_vote_subtree_for_non_identities_operations: 0, + }, + update: DriveDocumentUpdateMethodVersions { + add_update_multiple_documents_operations: 0, + update_document_for_contract: 0, + update_document_for_contract_apply_and_add_to_operations: 0, + update_document_for_contract_id: 0, + update_document_for_contract_operations: 0, + update_document_with_serialization_for_contract: 0, + update_serialized_document_for_contract: 0, + }, + estimation_costs: DriveDocumentEstimationCostsMethodVersions { + add_estimation_costs_for_add_document_to_primary_storage: 0, + add_estimation_costs_for_add_contested_document_to_primary_storage: 0, + stateless_delete_of_non_tree_for_costs: 0, + }, + index_uniqueness: DriveDocumentIndexUniquenessMethodVersions { + validate_document_uniqueness: 0, + validate_document_create_transition_action_uniqueness: 0, + validate_document_replace_transition_action_uniqueness: 0, + validate_document_transfer_transition_action_uniqueness: 0, + validate_document_purchase_transition_action_uniqueness: 0, + validate_document_update_price_transition_action_uniqueness: 0, + validate_uniqueness_of_data: 0, + }, + }, + vote: DriveVoteMethodVersions { + insert: DriveVoteInsertMethodVersions { + register_identity_vote: 0, + }, + contested_resource_insert: DriveVoteContestedResourceInsertMethodVersions { + register_contested_resource_identity_vote: 0, + insert_stored_info_for_contested_resource_vote_poll: 0, + register_identity_vote: 0, + add_vote_poll_end_date_query_operations: 0, + }, + cleanup: DriveVoteCleanupMethodVersions { + remove_specific_vote_references_given_by_identity: 0, + remove_specific_votes_given_by_identity: 0, + remove_contested_resource_vote_poll_end_date_query_operations: 1, + remove_contested_resource_vote_poll_votes_operations: 0, + remove_contested_resource_vote_poll_documents_operations: 1, + remove_contested_resource_vote_poll_contenders_operations: 1, + remove_contested_resource_top_level_index_operations: 0, + remove_contested_resource_info_operations: 0, + }, + setup: DriveVoteSetupMethodVersions { + add_initial_vote_tree_main_structure_operations: 0, + }, + storage_form: DriveVoteStorageFormMethodVersions { + resolve_with_contract: 0, + }, + fetch: DriveVoteFetchMethodVersions { + fetch_identities_voting_for_contenders: 0, + fetch_contested_document_vote_poll_stored_info: 0, + fetch_identity_contested_resource_vote: 0, + }, + }, + contract: DriveContractMethodVersions { + prove: DriveContractProveMethodVersions { + prove_contract: 0, + prove_contract_history: 0, + prove_contracts: 0, + }, + apply: DriveContractApplyMethodVersions { + apply_contract: 0, + apply_contract_with_serialization: 0, + }, + insert: DriveContractInsertMethodVersions { + add_contract_to_storage: 0, + insert_contract: 0, + }, + update: DriveContractUpdateMethodVersions { update_contract: 0 }, + costs: DriveContractCostsMethodVersions { + add_estimation_costs_for_contract_insertion: 0, + }, + get: DriveContractGetMethodVersions { + fetch_contract: 0, + fetch_contract_with_history: 0, + get_cached_contract_with_fetch_info: 0, + get_contract_with_fetch_info: 0, + get_contracts_with_fetch_info: 0, + }, + }, + fees: DriveFeesMethodVersions { calculate_fee: 0 }, + estimated_costs: DriveEstimatedCostsMethodVersions { + add_estimation_costs_for_levels_up_to_contract: 0, + add_estimation_costs_for_levels_up_to_contract_document_type_excluded: 0, + add_estimation_costs_for_contested_document_tree_levels_up_to_contract: 0, + add_estimation_costs_for_contested_document_tree_levels_up_to_contract_document_type_excluded: 0, + }, + asset_lock: DriveAssetLockMethodVersions { + add_asset_lock_outpoint: 0, + add_estimation_costs_for_adding_asset_lock: 0, + fetch_asset_lock_outpoint_info: 0, + }, + verify: DriveVerifyMethodVersions { + contract: DriveVerifyContractMethodVersions { + verify_contract: 0, + verify_contract_history: 0, + }, + document: DriveVerifyDocumentMethodVersions { + verify_proof: 0, + verify_proof_keep_serialized: 0, + verify_start_at_document_in_proof: 0, + }, + identity: DriveVerifyIdentityMethodVersions { + verify_full_identities_by_public_key_hashes: 0, + verify_full_identity_by_identity_id: 0, + verify_full_identity_by_public_key_hash: 0, + verify_identity_balance_for_identity_id: 0, + verify_identity_balances_for_identity_ids: 0, + verify_identity_id_by_public_key_hash: 0, + verify_identity_ids_by_public_key_hashes: 0, + verify_identity_keys_by_identity_id: 0, + verify_identity_nonce: 0, + verify_identity_contract_nonce: 0, + verify_identities_contract_keys: 0, + verify_identity_revision_for_identity_id: 0, + }, + single_document: DriveVerifySingleDocumentMethodVersions { + verify_proof: 0, + verify_proof_keep_serialized: 0, + }, + system: DriveVerifySystemMethodVersions { + verify_epoch_infos: 0, + verify_epoch_proposers: 0, + verify_elements: 0, + verify_total_credits_in_system: 0, + verify_upgrade_state: 0, + verify_upgrade_vote_status: 0, + }, + voting: DriveVerifyVoteMethodVersions { + verify_masternode_vote: 0, + verify_start_at_contender_in_proof: 0, + verify_vote_poll_votes_proof: 0, + verify_identity_votes_given_proof: 0, + verify_vote_poll_vote_state_proof: 0, + verify_contests_proof: 0, + verify_vote_polls_by_end_date_proof: 0, + verify_specialized_balance: 0, + }, + state_transition: DriveVerifyStateTransitionMethodVersions { + verify_state_transition_was_executed_with_proof: 0, + }, + }, + identity: DriveIdentityMethodVersions { + fetch: DriveIdentityFetchMethodVersions { + public_key_hashes: DriveIdentityFetchPublicKeyHashesMethodVersions { + fetch_full_identities_by_unique_public_key_hashes: 0, + fetch_full_identity_by_unique_public_key_hash: 0, + fetch_identity_id_by_unique_public_key_hash: 0, + fetch_identity_ids_by_non_unique_public_key_hash: 0, + fetch_identity_ids_by_unique_public_key_hashes: 0, + fetch_serialized_full_identity_by_unique_public_key_hash: 0, + has_any_of_unique_public_key_hashes: 0, + has_non_unique_public_key_hash: 0, + has_non_unique_public_key_hash_already_for_identity: 0, + has_unique_public_key_hash: 0, + }, + attributes: DriveIdentityFetchAttributesMethodVersions { + revision: 0, + nonce: 0, + identity_contract_nonce: 0, + balance: 0, + balance_include_debt: 0, + negative_balance: 0, + }, + partial_identity: DriveIdentityFetchPartialIdentityMethodVersions { + fetch_identity_revision_with_keys: 0, + fetch_identity_balance_with_keys: 0, + fetch_identity_balance_with_keys_and_revision: 0, + fetch_identity_with_balance: 0, + fetch_identity_keys: 0, + }, + full_identity: DriveIdentityFetchFullIdentityMethodVersions { + fetch_full_identity: Some(0), + fetch_full_identities: Some(0), + }, + }, + prove: DriveIdentityProveMethodVersions { + full_identity: 0, + full_identities: 0, + identity_nonce: 0, + identity_contract_nonce: 0, + identities_contract_keys: 0, + prove_full_identities_by_unique_public_key_hashes: 0, + prove_full_identity_by_unique_public_key_hash: 0, + prove_identity_id_by_unique_public_key_hash: 0, + prove_identity_ids_by_unique_public_key_hashes: 0, + }, + keys: DriveIdentityKeysMethodVersions { + fetch: DriveIdentityKeysFetchMethodVersions { + fetch_all_current_identity_keys: 0, + fetch_all_identity_keys: 0, + fetch_identities_all_keys: 0, + fetch_identity_keys: 0, + fetch_identities_contract_keys: 0, + }, + prove: DriveIdentityKeysProveMethodVersions { + prove_identities_all_keys: 0, + prove_identity_keys: 0, + }, + insert: DriveIdentityKeysInsertMethodVersions { + create_key_tree_with_keys: 0, + create_new_identity_key_query_trees: 0, + insert_key_searchable_references: 0, + insert_key_to_storage: 0, + insert_new_non_unique_key: 0, + insert_new_unique_key: 0, + replace_key_in_storage: 0, + }, + insert_key_hash_identity_reference: + DriveIdentityKeyHashesToIdentityInsertMethodVersions { + add_estimation_costs_for_insert_non_unique_public_key_hash_reference: 0, + add_estimation_costs_for_insert_unique_public_key_hash_reference: 0, + insert_non_unique_public_key_hash_reference_to_identity: 0, + insert_reference_to_non_unique_key: 0, + insert_reference_to_unique_key: 0, + insert_unique_public_key_hash_reference_to_identity: 0, + }, + }, + update: DriveIdentityUpdateMethodVersions { + update_identity_revision: 0, + merge_identity_nonce: 0, + update_identity_negative_credit_operation: 0, + initialize_identity_revision: 0, + disable_identity_keys: 0, + re_enable_identity_keys: 0, + add_new_non_unique_keys_to_identity: 0, + add_new_unique_keys_to_identity: 0, + add_new_keys_to_identity: 0, + insert_identity_balance: 0, + initialize_negative_identity_balance: 0, + add_to_identity_balance: 0, + add_to_previous_balance: 0, + apply_balance_change_from_fee_to_identity: 0, + remove_from_identity_balance: 0, + refresh_identity_key_reference_operations: 0, + }, + insert: DriveIdentityInsertMethodVersions { + add_new_identity: 0, + }, + contract_info: DriveIdentityContractInfoMethodVersions { + add_potential_contract_info_for_contract_bounded_key: 0, + refresh_potential_contract_info_key_references: 0, + merge_identity_contract_nonce: 0, + }, + cost_estimation: DriveIdentityCostEstimationMethodVersions { + for_authentication_keys_security_level_in_key_reference_tree: 0, + for_balances: 0, + for_contract_info: 0, + for_contract_info_group: 0, + for_contract_info_group_keys: 0, + for_contract_info_group_key_purpose: 0, + for_keys_for_identity_id: 0, + for_negative_credit: 0, + for_purpose_in_key_reference_tree: 0, + for_root_key_reference_tree: 0, + for_update_revision: 0, + }, + withdrawals: DriveIdentityWithdrawalMethodVersions { + document: DriveIdentityWithdrawalDocumentMethodVersions { + fetch_oldest_withdrawal_documents_by_status: 0, + find_up_to_100_withdrawal_documents_by_status_and_transaction_indices: 0, + }, + transaction: DriveIdentityWithdrawalTransactionMethodVersions { + index: DriveIdentityWithdrawalTransactionIndexMethodVersions { + fetch_next_withdrawal_transaction_index: 0, + add_update_next_withdrawal_transaction_index_operation: 0, + }, + queue: DriveIdentityWithdrawalTransactionQueueMethodVersions { + add_enqueue_untied_withdrawal_transaction_operations: 0, + dequeue_untied_withdrawal_transactions: 0, + }, + }, + }, + }, + platform_system: DrivePlatformSystemMethodVersions { + estimation_costs: DriveSystemEstimationCostsMethodVersions { + for_total_system_credits_update: 0, + }, + }, + operations: DriveOperationsMethodVersion { + rollback_transaction: 0, + drop_cache: 0, + commit_transaction: 0, + apply_partial_batch_low_level_drive_operations: 0, + apply_partial_batch_grovedb_operations: 0, + apply_batch_low_level_drive_operations: 0, + apply_batch_grovedb_operations: 0, + }, + state_transitions: DriveStateTransitionMethodVersions { + operations: DriveStateTransitionOperationMethodVersions { + finalization_tasks: 0, + contracts: DriveDataContractOperationMethodVersions { + finalization_tasks: 0, + }, + }, + convert_to_high_level_operations: + DriveStateTransitionActionConvertToHighLevelOperationsMethodVersions { + data_contract_create_transition: 0, + data_contract_update_transition: 0, + document_create_transition: 0, + document_delete_transition: 0, + document_purchase_transition: 0, + document_replace_transition: 0, + document_transfer_transition: 0, + document_update_price_transition: 0, + documents_batch_transition: 0, + identity_create_transition: 0, + identity_credit_transfer_transition: 0, + identity_credit_withdrawal_transition: 0, + identity_top_up_transition: 0, + identity_update_transition: 0, + masternode_vote_transition: 0, + bump_identity_data_contract_nonce: 0, + bump_identity_nonce: 0, + partially_use_asset_lock: 0, + }, + }, + batch_operations: DriveBatchOperationsMethodVersion { + convert_drive_operations_to_grove_operations: 0, + apply_drive_operations: 0, + }, + platform_state: DrivePlatformStateMethodVersions { + fetch_platform_state_bytes: 0, + store_platform_state_bytes: 0, + }, + fetch: DriveFetchMethodVersions { fetch_elements: 0 }, + prefunded_specialized_balances: DrivePrefundedSpecializedMethodVersions { + fetch_single: 0, + prove_single: 0, + add_prefunded_specialized_balance: 0, + add_prefunded_specialized_balance_operations: 0, + deduct_from_prefunded_specialized_balance: 0, + deduct_from_prefunded_specialized_balance_operations: 0, + estimated_cost_for_prefunded_specialized_balance_update: 0, + }, + }, + grove_methods: DriveGroveMethodVersions { + basic: DriveGroveBasicMethodVersions { + grove_insert: 0, + grove_insert_empty_tree: 0, + grove_insert_empty_sum_tree: 0, + grove_insert_if_not_exists: 0, + grove_clear: 0, + grove_delete: 0, + grove_get_raw: 0, + grove_get_raw_optional: 0, + grove_get_raw_value_u64_from_encoded_var_vec: 0, + grove_get: 0, + grove_get_path_query_serialized_results: 0, + grove_get_path_query_serialized_or_sum_results: 0, + grove_get_path_query: 0, + grove_get_path_query_with_optional: 0, + grove_get_raw_path_query_with_optional: 0, + grove_get_raw_path_query: 0, + grove_get_proved_path_query: 0, + grove_get_proved_path_query_with_conditional: 0, + grove_get_sum_tree_total_value: 0, + grove_has_raw: 0, + }, + batch: DriveGroveBatchMethodVersions { + batch_insert_empty_tree: 0, + batch_insert_empty_tree_if_not_exists: 0, + batch_insert_empty_tree_if_not_exists_check_existing_operations: 0, + batch_insert: 0, + batch_insert_if_not_exists: 0, + batch_insert_if_changed_value: 0, + batch_replace: 0, + batch_delete: 0, + batch_remove_raw: 0, + batch_delete_up_tree_while_empty: 0, + batch_refresh_reference: 0, + }, + apply: DriveGroveApplyMethodVersions { + grove_apply_operation: 0, + grove_apply_batch: 0, + grove_apply_partial_batch: 0, + }, + costs: DriveGroveCostMethodVersions { + grove_batch_operations_costs: 0, + }, + }, + grove_version: GROVE_V1, + }, + platform_architecture: PlatformArchitectureVersion { + data_contract_factory_structure_version: 0, + document_factory_structure_version: 0, + }, + drive_abci: DriveAbciVersion { + structs: DriveAbciStructureVersions { + platform_state_structure: 0, + platform_state_for_saving_structure: 0, + state_transition_execution_context: 0, + commit: 0, + masternode: 0, + signature_verification_quorum_set: 0, + }, + methods: DriveAbciMethodVersions { + engine: DriveAbciEngineMethodVersions { + init_chain: 0, + check_tx: 0, + run_block_proposal: 0, + finalize_block_proposal: 0, + consensus_params_update: 0, + }, + initialization: DriveAbciInitializationMethodVersions { + initial_core_height_and_time: 0, + create_genesis_state: 0, + }, + core_based_updates: DriveAbciCoreBasedUpdatesMethodVersions { + update_core_info: 0, + update_masternode_list: 0, + update_quorum_info: 0, + masternode_updates: DriveAbciMasternodeIdentitiesUpdatesMethodVersions { + get_voter_identity_key: 0, + get_operator_identity_keys: 0, + get_owner_identity_withdrawal_key: 0, + get_voter_identifier_from_masternode_list_item: 0, + get_operator_identifier_from_masternode_list_item: 0, + create_operator_identity: 0, + create_owner_identity: 0, + create_voter_identity: 0, + disable_identity_keys: 0, + update_masternode_identities: 0, + update_operator_identity: 0, + update_owner_withdrawal_address: 0, + update_voter_identity: 0, + }, + }, + protocol_upgrade: DriveAbciProtocolUpgradeMethodVersions { + check_for_desired_protocol_upgrade: 0, + upgrade_protocol_version_on_epoch_change: 0, + protocol_version_upgrade_percentage_needed: 75, + }, + block_fee_processing: DriveAbciBlockFeeProcessingMethodVersions { + add_process_epoch_change_operations: 0, + process_block_fees: 0, + }, + core_chain_lock: DriveAbciCoreChainLockMethodVersionsAndConstants { + choose_quorum: 0, + verify_chain_lock: 0, + verify_chain_lock_locally: 0, + verify_chain_lock_through_core: 0, + make_sure_core_is_synced_to_chain_lock: 0, + recent_block_count_amount: 2, + }, + core_instant_send_lock: DriveAbciCoreInstantSendLockMethodVersions { + verify_recent_signature_locally: 0, + }, + fee_pool_inwards_distribution: DriveAbciFeePoolInwardsDistributionMethodVersions { + add_distribute_block_fees_into_pools_operations: 0, + add_distribute_storage_fee_to_epochs_operations: 0, + }, + fee_pool_outwards_distribution: DriveAbciFeePoolOutwardsDistributionMethodVersions { + add_distribute_fees_from_oldest_unpaid_epoch_pool_to_proposers_operations: 0, + add_epoch_pool_to_proposers_payout_operations: 0, + find_oldest_epoch_needing_payment: 0, + fetch_reward_shares_list_for_masternode: 0, + }, + withdrawals: DriveAbciIdentityCreditWithdrawalMethodVersions { + build_untied_withdrawal_transactions_from_documents: 0, + dequeue_and_build_unsigned_withdrawal_transactions: 0, + fetch_transactions_block_inclusion_status: 0, + pool_withdrawals_into_transactions_queue: 0, + update_broadcasted_withdrawal_statuses: 0, + append_signatures_and_broadcast_withdrawal_transactions: 0, + }, + voting: DriveAbciVotingMethodVersions { + keep_record_of_finished_contested_resource_vote_poll: 0, + clean_up_after_vote_poll_end: 0, + clean_up_after_contested_resources_vote_poll_end: 0, + check_for_ended_vote_polls: 0, + tally_votes_for_contested_document_resource_vote_poll: 0, + award_document_to_winner: 0, + delay_vote_poll: 0, + run_dao_platform_events: 0, + remove_votes_for_removed_masternodes: 0, + }, + state_transition_processing: DriveAbciStateTransitionProcessingMethodVersions { + execute_event: 0, + process_raw_state_transitions: 0, + decode_raw_state_transitions: 0, + validate_fees_of_event: 0, + }, + epoch: DriveAbciEpochMethodVersions { + gather_epoch_info: 0, + get_genesis_time: 0, + }, + block_start: DriveAbciBlockStartMethodVersions { + clear_drive_block_cache: 0, + }, + block_end: DriveAbciBlockEndMethodVersions { + update_state_cache: 0, + update_drive_cache: 0, + validator_set_update: 0, + }, + platform_state_storage: DriveAbciPlatformStateStorageMethodVersions { + fetch_platform_state: 0, + store_platform_state: 0, + }, + }, + validation_and_processing: DriveAbciValidationVersions { + state_transitions: DriveAbciStateTransitionValidationVersions { + common_validation_methods: DriveAbciStateTransitionCommonValidationVersions { + asset_locks: DriveAbciAssetLockValidationVersions { + fetch_asset_lock_transaction_output_sync: 0, + verify_asset_lock_is_not_spent_and_has_enough_balance: 0, + }, + validate_identity_public_key_contract_bounds: 0, + validate_identity_public_key_ids_dont_exist_in_state: 0, + validate_identity_public_key_ids_exist_in_state: 0, + validate_state_transition_identity_signed: 0, + validate_unique_identity_public_key_hashes_in_state: 0, + validate_master_key_uniqueness: 0, + validate_simple_pre_check_balance: 0, + }, + max_asset_lock_usage_attempts: 16, + identity_create_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: Some(0), + identity_signatures: Some(0), + advanced_minimum_balance_pre_check: None, + nonce: None, + state: 0, + transform_into_action: 0, + }, + identity_update_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: Some(0), + identity_signatures: Some(0), + advanced_minimum_balance_pre_check: None, + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + identity_top_up_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: None, + nonce: None, + state: 0, + transform_into_action: 0, + }, + identity_credit_withdrawal_state_transition: + DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: Some(0), + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + identity_credit_transfer_state_transition: + DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: Some(0), + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + masternode_vote_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: None, + advanced_structure: Some(0), + identity_signatures: None, + advanced_minimum_balance_pre_check: Some(0), + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + contract_create_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: None, + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + contract_update_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: None, + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: None, + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + documents_batch_state_transition: + DriveAbciDocumentsStateTransitionValidationVersions { + balance_pre_check: 0, + basic_structure: 0, + advanced_structure: 0, + state: 0, + revision: 0, + transform_into_action: 0, + data_triggers: DriveAbciValidationDataTriggerAndBindingVersions { + bindings: 0, + triggers: DriveAbciValidationDataTriggerVersions { + create_contact_request_data_trigger: 0, + create_domain_data_trigger: 0, + create_identity_data_trigger: 0, + create_feature_flag_data_trigger: 0, + create_masternode_reward_shares_data_trigger: 0, + delete_withdrawal_data_trigger: 0, + reject_data_trigger: 0, + }, + }, + is_allowed: 0, + document_create_transition_structure_validation: 0, + document_delete_transition_structure_validation: 0, + document_replace_transition_structure_validation: 0, + document_transfer_transition_structure_validation: 0, + document_purchase_transition_structure_validation: 0, + document_update_price_transition_structure_validation: 0, + document_create_transition_state_validation: 1, + document_delete_transition_state_validation: 0, + document_replace_transition_state_validation: 0, + document_transfer_transition_state_validation: 0, + document_purchase_transition_state_validation: 0, + document_update_price_transition_state_validation: 0, + }, + }, + process_state_transition: 0, + state_transition_to_execution_event_for_check_tx: 0, + penalties: PenaltyAmounts { + identity_id_not_correct: 50000000, + unique_key_already_present: 10000000, + validation_of_added_keys_structure_failure: 10000000, + validation_of_added_keys_proof_of_possession_failure: 50000000, + }, + event_constants: DriveAbciValidationConstants { + maximum_vote_polls_to_process: 2, + maximum_contenders_to_consider: 100, + }, + }, + query: DriveAbciQueryVersions { + max_returned_elements: 100, + response_metadata: 0, + proofs_query: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_query: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + prefunded_specialized_balances: DriveAbciQueryPrefundedSpecializedBalancesVersions { + balance: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + identity_based_queries: DriveAbciQueryIdentityVersions { + identity: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + keys: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identities_contract_keys: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_nonce: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_contract_nonce: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + balance: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identities_balances: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + balance_and_revision: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_by_public_key_hash: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + validator_queries: DriveAbciQueryValidatorVersions { + proposed_block_counts_by_evonode_ids: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + proposed_block_counts_by_range: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + data_contract_based_queries: DriveAbciQueryDataContractVersions { + data_contract: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + data_contract_history: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + data_contracts: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + voting_based_queries: DriveAbciQueryVotingVersions { + vote_polls_by_end_date_query: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contested_resource_vote_state: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contested_resource_voters_for_identity: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contested_resource_identity_vote_status: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contested_resources: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + system: DriveAbciQuerySystemVersions { + version_upgrade_state: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + version_upgrade_vote_status: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + epoch_infos: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + partial_status: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + path_elements: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + total_credits_in_platform: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + }, + }, + dpp: DPPVersion { + costs: CostVersions { + signature_verify: 0, + }, + validation: DPPValidationVersions { + json_schema_validator: JsonSchemaValidatorVersions { + new: 0, + validate: 0, + compile: 0, + compile_and_validate: 0, + }, + data_contract: DataContractValidationVersions { + validate: 0, + validate_config_update: 0, + validate_index_definitions: 0, + validate_index_naming_duplicates: 0, + validate_not_defined_properties: 0, + validate_property_definition: 0, + }, + document_type: DocumentTypeValidationVersions { + validate_update: 0, + contested_index_limit: 1, + unique_index_limit: 10, + }, + voting: VotingValidationVersions { + allow_other_contenders_time_mainnet_ms: 604_800_000, // 1 week in ms + allow_other_contenders_time_testing_ms: 2_700_000, //45 minutes + votes_allowed_per_masternode: 5, + }, + }, + state_transition_serialization_versions: StateTransitionSerializationVersions { + identity_public_key_in_creation: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_create_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_update_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_top_up_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_credit_withdrawal_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_credit_transfer_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + masternode_vote_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contract_create_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contract_update_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + documents_batch_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_base_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_create_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + document_replace_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + document_delete_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + document_transfer_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + document_update_price_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + document_purchase_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + }, + state_transition_conversion_versions: StateTransitionConversionVersions { + identity_to_identity_create_transition: 0, + identity_to_identity_top_up_transition: 0, + identity_to_identity_withdrawal_transition: 0, + identity_to_identity_create_transition_with_signer: 0, + }, + state_transition_method_versions: StateTransitionMethodVersions { + public_key_in_creation_methods: PublicKeyInCreationMethodVersions { + from_public_key_signed_with_private_key: 0, + from_public_key_signed_external: 0, + hash: 0, + duplicated_key_ids_witness: 0, + duplicated_keys_witness: 0, + validate_identity_public_keys_structure: 0, + }, + }, + state_transitions: StateTransitionVersions { + documents: DocumentTransitionVersions { + documents_batch_transition: DocumentsBatchTransitionVersions { + validation: DocumentsBatchTransitionValidationVersions { + find_duplicates_by_id: 0, + validate_base_structure: 0, + }, + }, + }, + identities: IdentityTransitionVersions { + max_public_keys_in_creation: 6, + asset_locks: IdentityTransitionAssetLockVersions { + required_asset_lock_duff_balance_for_processing_start_for_identity_create: + 200000, + required_asset_lock_duff_balance_for_processing_start_for_identity_top_up: + 50000, + validate_asset_lock_transaction_structure: 0, + validate_instant_asset_lock_proof_structure: 0, + }, + }, + }, + contract_versions: ContractVersions { + max_serialized_size: 65000, + contract_serialization_version: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contract_structure_version: 0, + created_data_contract_structure: 0, + config: 0, + methods: DataContractMethodVersions { + validate_document: 0, + validate_update: 0, + schema: 0, + }, + document_type_versions: DocumentTypeVersions { + index_versions: DocumentTypeIndexVersions { + index_levels_from_indices: 0, + }, + class_method_versions: DocumentTypeClassMethodVersions { + try_from_schema: 0, + create_document_types_from_document_schemas: 0, + }, + structure_version: 0, + schema: DocumentTypeSchemaVersions { + enrich_with_base_schema: 0, + find_identifier_and_binary_paths: 0, + validate_max_depth: 0, + max_depth: 256, + recursive_schema_validator_versions: RecursiveSchemaValidatorVersions { + traversal_validator: 0, + }, + validate_schema_compatibility: 0, + }, + methods: DocumentTypeMethodVersions { + create_document_from_data: 0, + create_document_with_prevalidated_properties: 0, + prefunded_voting_balance_for_document: 0, + contested_vote_poll_for_document: 0, + estimated_size: 0, + index_for_types: 0, + max_size: 0, + serialize_value_for_key: 0, + deserialize_value_for_key: 0, + }, + }, + }, + document_versions: DocumentVersions { + document_structure_version: 0, + document_serialization_version: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_cbor_serialization_version: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + extended_document_structure_version: 0, + extended_document_serialization_version: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_method_versions: DocumentMethodVersions { + is_equal_ignoring_timestamps: 0, + hash: 0, + get_raw_for_contract: 0, + get_raw_for_document_type: 0, + }, + }, + identity_versions: IdentityVersions { + identity_structure_version: 0, + identity_key_structure_version: 0, + identity_key_type_method_versions: IdentityKeyTypeMethodVersions { + random_public_key_data: 0, + random_public_and_private_key_data: 0, + }, + }, + voting_versions: VotingVersions { + default_vote_poll_time_duration_mainnet_ms: 1_209_600_000, //2 weeks + default_vote_poll_time_duration_test_network_ms: 1_209_600_000, //2 weeks + contested_document_vote_poll_stored_info_version: 0, + }, + asset_lock_versions: AssetLockVersions { + reduced_asset_lock_value: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + methods: DPPMethodVersions { + epoch_core_reward_credits_for_distribution: 0, + }, + }, + system_data_contracts: SystemDataContractVersions { + withdrawals: 1, + dpns: 1, + dashpay: 1, + masternode_reward_shares: 1, + feature_flags: 1, + }, + fee_version: FEE_VERSION1, + system_limits: SystemLimits { + estimated_contract_max_serialized_size: 16384, + max_field_value_size: 5120, //5 KiB + max_state_transition_size: 20480, //20 KiB + max_transitions_in_documents_batch: 1, + }, + consensus: ConsensusVersions { + tenderdash_consensus_version: 0, + }, +}; diff --git a/packages/rs-platform-version/src/version/v3.rs b/packages/rs-platform-version/src/version/v3.rs new file mode 100644 index 00000000000..cb608a3b3c9 --- /dev/null +++ b/packages/rs-platform-version/src/version/v3.rs @@ -0,0 +1,1288 @@ +use crate::version::consensus_versions::ConsensusVersions; +use crate::version::contracts::SystemDataContractVersions; +use crate::version::dpp_versions::{ + AssetLockVersions, ContractVersions, CostVersions, DPPMethodVersions, DPPValidationVersions, + DPPVersion, DataContractMethodVersions, DataContractValidationVersions, + DocumentFeatureVersionBounds, DocumentMethodVersions, DocumentTransitionVersions, + DocumentTypeClassMethodVersions, DocumentTypeIndexVersions, DocumentTypeMethodVersions, + DocumentTypeSchemaVersions, DocumentTypeValidationVersions, DocumentTypeVersions, + DocumentVersions, DocumentsBatchTransitionValidationVersions, DocumentsBatchTransitionVersions, + IdentityKeyTypeMethodVersions, IdentityTransitionAssetLockVersions, IdentityTransitionVersions, + IdentityVersions, JsonSchemaValidatorVersions, PublicKeyInCreationMethodVersions, + RecursiveSchemaValidatorVersions, StateTransitionConversionVersions, + StateTransitionMethodVersions, StateTransitionSerializationVersions, StateTransitionVersions, + VotingValidationVersions, VotingVersions, +}; +use crate::version::drive_abci_versions::{ + DriveAbciAssetLockValidationVersions, DriveAbciBlockEndMethodVersions, + DriveAbciBlockFeeProcessingMethodVersions, DriveAbciBlockStartMethodVersions, + DriveAbciCoreBasedUpdatesMethodVersions, DriveAbciCoreChainLockMethodVersionsAndConstants, + DriveAbciCoreInstantSendLockMethodVersions, + DriveAbciDocumentsStateTransitionValidationVersions, DriveAbciEngineMethodVersions, + DriveAbciEpochMethodVersions, DriveAbciFeePoolInwardsDistributionMethodVersions, + DriveAbciFeePoolOutwardsDistributionMethodVersions, + DriveAbciIdentityCreditWithdrawalMethodVersions, DriveAbciInitializationMethodVersions, + DriveAbciMasternodeIdentitiesUpdatesMethodVersions, DriveAbciMethodVersions, + DriveAbciPlatformStateStorageMethodVersions, DriveAbciProtocolUpgradeMethodVersions, + DriveAbciQueryDataContractVersions, DriveAbciQueryIdentityVersions, + DriveAbciQueryPrefundedSpecializedBalancesVersions, DriveAbciQuerySystemVersions, + DriveAbciQueryValidatorVersions, DriveAbciQueryVersions, DriveAbciQueryVotingVersions, + DriveAbciStateTransitionCommonValidationVersions, + DriveAbciStateTransitionProcessingMethodVersions, DriveAbciStateTransitionValidationVersion, + DriveAbciStateTransitionValidationVersions, DriveAbciStructureVersions, + DriveAbciValidationConstants, DriveAbciValidationDataTriggerAndBindingVersions, + DriveAbciValidationDataTriggerVersions, DriveAbciValidationVersions, DriveAbciVersion, + DriveAbciVotingMethodVersions, PenaltyAmounts, +}; +use crate::version::drive_versions::{ + DriveAssetLockMethodVersions, DriveBalancesMethodVersions, DriveBatchOperationsMethodVersion, + DriveContractApplyMethodVersions, DriveContractCostsMethodVersions, + DriveContractGetMethodVersions, DriveContractInsertMethodVersions, DriveContractMethodVersions, + DriveContractProveMethodVersions, DriveContractUpdateMethodVersions, + DriveCreditPoolEpochsMethodVersions, DriveCreditPoolMethodVersions, + DriveCreditPoolPendingEpochRefundsMethodVersions, + DriveCreditPoolStorageFeeDistributionPoolMethodVersions, + DriveCreditPoolUnpaidEpochMethodVersions, DriveDataContractOperationMethodVersions, + DriveDocumentDeleteMethodVersions, DriveDocumentEstimationCostsMethodVersions, + DriveDocumentIndexUniquenessMethodVersions, DriveDocumentInsertContestedMethodVersions, + DriveDocumentInsertMethodVersions, DriveDocumentMethodVersions, + DriveDocumentQueryMethodVersions, DriveDocumentUpdateMethodVersions, + DriveEstimatedCostsMethodVersions, DriveFeesMethodVersions, DriveFetchMethodVersions, + DriveGroveApplyMethodVersions, DriveGroveBasicMethodVersions, DriveGroveBatchMethodVersions, + DriveGroveCostMethodVersions, DriveGroveMethodVersions, + DriveIdentityContractInfoMethodVersions, DriveIdentityCostEstimationMethodVersions, + DriveIdentityFetchAttributesMethodVersions, DriveIdentityFetchFullIdentityMethodVersions, + DriveIdentityFetchMethodVersions, DriveIdentityFetchPartialIdentityMethodVersions, + DriveIdentityFetchPublicKeyHashesMethodVersions, DriveIdentityInsertMethodVersions, + DriveIdentityKeyHashesToIdentityInsertMethodVersions, DriveIdentityKeysFetchMethodVersions, + DriveIdentityKeysInsertMethodVersions, DriveIdentityKeysMethodVersions, + DriveIdentityKeysProveMethodVersions, DriveIdentityMethodVersions, + DriveIdentityProveMethodVersions, DriveIdentityUpdateMethodVersions, + DriveIdentityWithdrawalDocumentMethodVersions, DriveIdentityWithdrawalMethodVersions, + DriveIdentityWithdrawalTransactionIndexMethodVersions, + DriveIdentityWithdrawalTransactionMethodVersions, + DriveIdentityWithdrawalTransactionQueueMethodVersions, DriveInitializationMethodVersions, + DriveMethodVersions, DriveOperationsMethodVersion, DrivePlatformStateMethodVersions, + DrivePlatformSystemMethodVersions, DrivePrefundedSpecializedMethodVersions, + DriveProtocolUpgradeVersions, DriveProveMethodVersions, + DriveStateTransitionActionConvertToHighLevelOperationsMethodVersions, + DriveStateTransitionMethodVersions, DriveStateTransitionOperationMethodVersions, + DriveStructureVersion, DriveSystemEstimationCostsMethodVersions, + DriveVerifyContractMethodVersions, DriveVerifyDocumentMethodVersions, + DriveVerifyIdentityMethodVersions, DriveVerifyMethodVersions, + DriveVerifySingleDocumentMethodVersions, DriveVerifyStateTransitionMethodVersions, + DriveVerifySystemMethodVersions, DriveVerifyVoteMethodVersions, DriveVersion, + DriveVoteCleanupMethodVersions, DriveVoteContestedResourceInsertMethodVersions, + DriveVoteFetchMethodVersions, DriveVoteInsertMethodVersions, DriveVoteMethodVersions, + DriveVoteSetupMethodVersions, DriveVoteStorageFormMethodVersions, +}; +use crate::version::fee::v1::FEE_VERSION1; +use crate::version::limits::SystemLimits; +use crate::version::protocol_version::{FeatureVersionBounds, PlatformVersion}; +use crate::version::{PlatformArchitectureVersion, ProtocolVersion}; +use grovedb_version::version::v1::GROVE_V1; + +pub const PROTOCOL_VERSION_3: ProtocolVersion = 3; + +/// This version introduces tenderdash_consensus_version as 1. +/// We did this because of the issues in distribution for Evonodes. +/// We are setting the requirement to 51% voting for this upgrade for it to take effect. +/// This was done directly in ABCI. +/// If we get between 51 and 67% we will have a chain stall +/// However the chain will come back up as soon as enough have upgraded. + +pub const PLATFORM_V3: PlatformVersion = PlatformVersion { + protocol_version: 3, + proofs: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + drive: DriveVersion { + structure: DriveStructureVersion { + document_indexes: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_indexes: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + pools: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + methods: DriveMethodVersions { + initialization: DriveInitializationMethodVersions { + create_initial_state_structure: 0, + }, + credit_pools: DriveCreditPoolMethodVersions { + epochs: DriveCreditPoolEpochsMethodVersions { + get_epochs_infos: 0, + get_epochs_protocol_versions: 0, + prove_epochs_infos: 0, + get_epoch_fee_multiplier: 0, + get_epoch_processing_credits_for_distribution: 0, + get_epoch_storage_credits_for_distribution: 0, + get_epoch_total_credits_for_distribution: 0, + get_storage_credits_for_distribution_for_epochs_in_range: 0, + get_epoch_start_time: 0, + get_epoch_start_block_core_height: 0, + get_epoch_start_block_height: 0, + get_first_epoch_start_block_info_between_epochs: 0, + fetch_epoch_proposers: 0, + prove_epoch_proposers: 0, + get_epochs_proposer_block_count: 0, + add_update_pending_epoch_refunds_operations: 0, + is_epochs_proposers_tree_empty: 0, + }, + pending_epoch_refunds: DriveCreditPoolPendingEpochRefundsMethodVersions { + add_delete_pending_epoch_refunds_except_specified: 0, + fetch_and_add_pending_epoch_refunds_to_collection: 0, + fetch_pending_epoch_refunds: 0, + add_update_pending_epoch_refunds_operations: 0, + }, + storage_fee_distribution_pool: + DriveCreditPoolStorageFeeDistributionPoolMethodVersions { + get_storage_fees_from_distribution_pool: 0, + }, + unpaid_epoch: DriveCreditPoolUnpaidEpochMethodVersions { + get_unpaid_epoch_index: 0, + }, + }, + protocol_upgrade: DriveProtocolUpgradeVersions { + clear_version_information: 0, + fetch_versions_with_counter: 0, + fetch_proved_versions_with_counter: 0, + fetch_validator_version_votes: 0, + fetch_proved_validator_version_votes: 0, + remove_validators_proposed_app_versions: 0, + update_validator_proposed_app_version: 0, + }, + prove: DriveProveMethodVersions { + prove_elements: 0, + prove_multiple_state_transition_results: 0, + }, + balances: DriveBalancesMethodVersions { + add_to_system_credits: 0, + add_to_system_credits_operations: 0, + remove_from_system_credits: 0, + remove_from_system_credits_operations: 0, + calculate_total_credits_balance: 0, + }, + document: DriveDocumentMethodVersions { + query: DriveDocumentQueryMethodVersions { query_documents: 0, query_contested_documents: 0, query_contested_documents_vote_state: 0, query_documents_with_flags: 0 }, + delete: DriveDocumentDeleteMethodVersions { + add_estimation_costs_for_remove_document_to_primary_storage: 0, + delete_document_for_contract: 0, + delete_document_for_contract_id: 0, + delete_document_for_contract_apply_and_add_to_operations: 0, + remove_document_from_primary_storage: 0, + remove_reference_for_index_level_for_contract_operations: 0, + remove_indices_for_index_level_for_contract_operations: 0, + remove_indices_for_top_index_level_for_contract_operations: 0, + delete_document_for_contract_id_with_named_type_operations: 0, + delete_document_for_contract_with_named_type_operations: 0, + delete_document_for_contract_operations: 0, + }, + insert: DriveDocumentInsertMethodVersions { + add_document: 0, + add_document_for_contract: 0, + add_document_for_contract_apply_and_add_to_operations: 0, + add_document_for_contract_operations: 0, + add_document_to_primary_storage: 0, + add_indices_for_index_level_for_contract_operations: 0, + add_indices_for_top_index_level_for_contract_operations: 0, + add_reference_for_index_level_for_contract_operations: 0, + }, + insert_contested: DriveDocumentInsertContestedMethodVersions { + add_contested_document: 0, + add_contested_document_for_contract: 0, + add_contested_document_for_contract_apply_and_add_to_operations: 0, + add_contested_document_for_contract_operations: 0, + add_contested_document_to_primary_storage: 0, + add_contested_indices_for_contract_operations: 0, + add_contested_reference_and_vote_subtree_to_document_operations: 0, + add_contested_vote_subtree_for_non_identities_operations: 0, + }, + update: DriveDocumentUpdateMethodVersions { + add_update_multiple_documents_operations: 0, + update_document_for_contract: 0, + update_document_for_contract_apply_and_add_to_operations: 0, + update_document_for_contract_id: 0, + update_document_for_contract_operations: 0, + update_document_with_serialization_for_contract: 0, + update_serialized_document_for_contract: 0, + }, + estimation_costs: DriveDocumentEstimationCostsMethodVersions { + add_estimation_costs_for_add_document_to_primary_storage: 0, + add_estimation_costs_for_add_contested_document_to_primary_storage: 0, + stateless_delete_of_non_tree_for_costs: 0, + }, + index_uniqueness: DriveDocumentIndexUniquenessMethodVersions { + validate_document_uniqueness: 0, + validate_document_create_transition_action_uniqueness: 0, + validate_document_replace_transition_action_uniqueness: 0, + validate_document_transfer_transition_action_uniqueness: 0, + validate_document_purchase_transition_action_uniqueness: 0, + validate_document_update_price_transition_action_uniqueness: 0, + validate_uniqueness_of_data: 0, + }, + }, + vote: DriveVoteMethodVersions { + insert: DriveVoteInsertMethodVersions { + register_identity_vote: 0, + }, + contested_resource_insert: DriveVoteContestedResourceInsertMethodVersions { + register_contested_resource_identity_vote: 0, + insert_stored_info_for_contested_resource_vote_poll: 0, + register_identity_vote: 0, + add_vote_poll_end_date_query_operations: 0, + }, + cleanup: DriveVoteCleanupMethodVersions { + remove_specific_vote_references_given_by_identity: 0, + remove_specific_votes_given_by_identity: 0, + remove_contested_resource_vote_poll_end_date_query_operations: 1, + remove_contested_resource_vote_poll_votes_operations: 0, + remove_contested_resource_vote_poll_documents_operations: 1, + remove_contested_resource_vote_poll_contenders_operations: 1, + remove_contested_resource_top_level_index_operations: 0, + remove_contested_resource_info_operations: 0, + }, + setup: DriveVoteSetupMethodVersions { + add_initial_vote_tree_main_structure_operations: 0, + }, + storage_form: DriveVoteStorageFormMethodVersions { + resolve_with_contract: 0, + }, + fetch: DriveVoteFetchMethodVersions { + fetch_identities_voting_for_contenders: 0, + fetch_contested_document_vote_poll_stored_info: 0, + fetch_identity_contested_resource_vote: 0, + }, + }, + contract: DriveContractMethodVersions { + prove: DriveContractProveMethodVersions { + prove_contract: 0, + prove_contract_history: 0, + prove_contracts: 0, + }, + apply: DriveContractApplyMethodVersions { + apply_contract: 0, + apply_contract_with_serialization: 0, + }, + insert: DriveContractInsertMethodVersions { + add_contract_to_storage: 0, + insert_contract: 0, + }, + update: DriveContractUpdateMethodVersions { update_contract: 0 }, + costs: DriveContractCostsMethodVersions { + add_estimation_costs_for_contract_insertion: 0, + }, + get: DriveContractGetMethodVersions { + fetch_contract: 0, + fetch_contract_with_history: 0, + get_cached_contract_with_fetch_info: 0, + get_contract_with_fetch_info: 0, + get_contracts_with_fetch_info: 0, + }, + }, + fees: DriveFeesMethodVersions { calculate_fee: 0 }, + estimated_costs: DriveEstimatedCostsMethodVersions { + add_estimation_costs_for_levels_up_to_contract: 0, + add_estimation_costs_for_levels_up_to_contract_document_type_excluded: 0, + add_estimation_costs_for_contested_document_tree_levels_up_to_contract: 0, + add_estimation_costs_for_contested_document_tree_levels_up_to_contract_document_type_excluded: 0, + }, + asset_lock: DriveAssetLockMethodVersions { + add_asset_lock_outpoint: 0, + add_estimation_costs_for_adding_asset_lock: 0, + fetch_asset_lock_outpoint_info: 0, + }, + verify: DriveVerifyMethodVersions { + contract: DriveVerifyContractMethodVersions { + verify_contract: 0, + verify_contract_history: 0, + }, + document: DriveVerifyDocumentMethodVersions { + verify_proof: 0, + verify_proof_keep_serialized: 0, + verify_start_at_document_in_proof: 0, + }, + identity: DriveVerifyIdentityMethodVersions { + verify_full_identities_by_public_key_hashes: 0, + verify_full_identity_by_identity_id: 0, + verify_full_identity_by_public_key_hash: 0, + verify_identity_balance_for_identity_id: 0, + verify_identity_balances_for_identity_ids: 0, + verify_identity_id_by_public_key_hash: 0, + verify_identity_ids_by_public_key_hashes: 0, + verify_identity_keys_by_identity_id: 0, + verify_identity_nonce: 0, + verify_identity_contract_nonce: 0, + verify_identities_contract_keys: 0, + verify_identity_revision_for_identity_id: 0, + }, + single_document: DriveVerifySingleDocumentMethodVersions { + verify_proof: 0, + verify_proof_keep_serialized: 0, + }, + system: DriveVerifySystemMethodVersions { + verify_epoch_infos: 0, + verify_epoch_proposers: 0, + verify_elements: 0, + verify_total_credits_in_system: 0, + verify_upgrade_state: 0, + verify_upgrade_vote_status: 0, + }, + voting: DriveVerifyVoteMethodVersions { + verify_masternode_vote: 0, + verify_start_at_contender_in_proof: 0, + verify_vote_poll_votes_proof: 0, + verify_identity_votes_given_proof: 0, + verify_vote_poll_vote_state_proof: 0, + verify_contests_proof: 0, + verify_vote_polls_by_end_date_proof: 0, + verify_specialized_balance: 0, + }, + state_transition: DriveVerifyStateTransitionMethodVersions { + verify_state_transition_was_executed_with_proof: 0, + }, + }, + identity: DriveIdentityMethodVersions { + fetch: DriveIdentityFetchMethodVersions { + public_key_hashes: DriveIdentityFetchPublicKeyHashesMethodVersions { + fetch_full_identities_by_unique_public_key_hashes: 0, + fetch_full_identity_by_unique_public_key_hash: 0, + fetch_identity_id_by_unique_public_key_hash: 0, + fetch_identity_ids_by_non_unique_public_key_hash: 0, + fetch_identity_ids_by_unique_public_key_hashes: 0, + fetch_serialized_full_identity_by_unique_public_key_hash: 0, + has_any_of_unique_public_key_hashes: 0, + has_non_unique_public_key_hash: 0, + has_non_unique_public_key_hash_already_for_identity: 0, + has_unique_public_key_hash: 0, + }, + attributes: DriveIdentityFetchAttributesMethodVersions { + revision: 0, + nonce: 0, + identity_contract_nonce: 0, + balance: 0, + balance_include_debt: 0, + negative_balance: 0, + }, + partial_identity: DriveIdentityFetchPartialIdentityMethodVersions { + fetch_identity_revision_with_keys: 0, + fetch_identity_balance_with_keys: 0, + fetch_identity_balance_with_keys_and_revision: 0, + fetch_identity_with_balance: 0, + fetch_identity_keys: 0, + }, + full_identity: DriveIdentityFetchFullIdentityMethodVersions { + fetch_full_identity: Some(0), + fetch_full_identities: Some(0), + }, + }, + prove: DriveIdentityProveMethodVersions { + full_identity: 0, + full_identities: 0, + identity_nonce: 0, + identity_contract_nonce: 0, + identities_contract_keys: 0, + prove_full_identities_by_unique_public_key_hashes: 0, + prove_full_identity_by_unique_public_key_hash: 0, + prove_identity_id_by_unique_public_key_hash: 0, + prove_identity_ids_by_unique_public_key_hashes: 0, + }, + keys: DriveIdentityKeysMethodVersions { + fetch: DriveIdentityKeysFetchMethodVersions { + fetch_all_current_identity_keys: 0, + fetch_all_identity_keys: 0, + fetch_identities_all_keys: 0, + fetch_identity_keys: 0, + fetch_identities_contract_keys: 0, + }, + prove: DriveIdentityKeysProveMethodVersions { + prove_identities_all_keys: 0, + prove_identity_keys: 0, + }, + insert: DriveIdentityKeysInsertMethodVersions { + create_key_tree_with_keys: 0, + create_new_identity_key_query_trees: 0, + insert_key_searchable_references: 0, + insert_key_to_storage: 0, + insert_new_non_unique_key: 0, + insert_new_unique_key: 0, + replace_key_in_storage: 0, + }, + insert_key_hash_identity_reference: + DriveIdentityKeyHashesToIdentityInsertMethodVersions { + add_estimation_costs_for_insert_non_unique_public_key_hash_reference: 0, + add_estimation_costs_for_insert_unique_public_key_hash_reference: 0, + insert_non_unique_public_key_hash_reference_to_identity: 0, + insert_reference_to_non_unique_key: 0, + insert_reference_to_unique_key: 0, + insert_unique_public_key_hash_reference_to_identity: 0, + }, + }, + update: DriveIdentityUpdateMethodVersions { + update_identity_revision: 0, + merge_identity_nonce: 0, + update_identity_negative_credit_operation: 0, + initialize_identity_revision: 0, + disable_identity_keys: 0, + re_enable_identity_keys: 0, + add_new_non_unique_keys_to_identity: 0, + add_new_unique_keys_to_identity: 0, + add_new_keys_to_identity: 0, + insert_identity_balance: 0, + initialize_negative_identity_balance: 0, + add_to_identity_balance: 0, + add_to_previous_balance: 0, + apply_balance_change_from_fee_to_identity: 0, + remove_from_identity_balance: 0, + refresh_identity_key_reference_operations: 0, + }, + insert: DriveIdentityInsertMethodVersions { + add_new_identity: 0, + }, + contract_info: DriveIdentityContractInfoMethodVersions { + add_potential_contract_info_for_contract_bounded_key: 0, + refresh_potential_contract_info_key_references: 0, + merge_identity_contract_nonce: 0, + }, + cost_estimation: DriveIdentityCostEstimationMethodVersions { + for_authentication_keys_security_level_in_key_reference_tree: 0, + for_balances: 0, + for_contract_info: 0, + for_contract_info_group: 0, + for_contract_info_group_keys: 0, + for_contract_info_group_key_purpose: 0, + for_keys_for_identity_id: 0, + for_negative_credit: 0, + for_purpose_in_key_reference_tree: 0, + for_root_key_reference_tree: 0, + for_update_revision: 0, + }, + withdrawals: DriveIdentityWithdrawalMethodVersions { + document: DriveIdentityWithdrawalDocumentMethodVersions { + fetch_oldest_withdrawal_documents_by_status: 0, + find_up_to_100_withdrawal_documents_by_status_and_transaction_indices: 0, + }, + transaction: DriveIdentityWithdrawalTransactionMethodVersions { + index: DriveIdentityWithdrawalTransactionIndexMethodVersions { + fetch_next_withdrawal_transaction_index: 0, + add_update_next_withdrawal_transaction_index_operation: 0, + }, + queue: DriveIdentityWithdrawalTransactionQueueMethodVersions { + add_enqueue_untied_withdrawal_transaction_operations: 0, + dequeue_untied_withdrawal_transactions: 0, + }, + }, + }, + }, + platform_system: DrivePlatformSystemMethodVersions { + estimation_costs: DriveSystemEstimationCostsMethodVersions { + for_total_system_credits_update: 0, + }, + }, + operations: DriveOperationsMethodVersion { + rollback_transaction: 0, + drop_cache: 0, + commit_transaction: 0, + apply_partial_batch_low_level_drive_operations: 0, + apply_partial_batch_grovedb_operations: 0, + apply_batch_low_level_drive_operations: 0, + apply_batch_grovedb_operations: 0, + }, + state_transitions: DriveStateTransitionMethodVersions { + operations: DriveStateTransitionOperationMethodVersions { + finalization_tasks: 0, + contracts: DriveDataContractOperationMethodVersions { + finalization_tasks: 0, + }, + }, + convert_to_high_level_operations: + DriveStateTransitionActionConvertToHighLevelOperationsMethodVersions { + data_contract_create_transition: 0, + data_contract_update_transition: 0, + document_create_transition: 0, + document_delete_transition: 0, + document_purchase_transition: 0, + document_replace_transition: 0, + document_transfer_transition: 0, + document_update_price_transition: 0, + documents_batch_transition: 0, + identity_create_transition: 0, + identity_credit_transfer_transition: 0, + identity_credit_withdrawal_transition: 0, + identity_top_up_transition: 0, + identity_update_transition: 0, + masternode_vote_transition: 0, + bump_identity_data_contract_nonce: 0, + bump_identity_nonce: 0, + partially_use_asset_lock: 0, + }, + }, + batch_operations: DriveBatchOperationsMethodVersion { + convert_drive_operations_to_grove_operations: 0, + apply_drive_operations: 0, + }, + platform_state: DrivePlatformStateMethodVersions { + fetch_platform_state_bytes: 0, + store_platform_state_bytes: 0, + }, + fetch: DriveFetchMethodVersions { fetch_elements: 0 }, + prefunded_specialized_balances: DrivePrefundedSpecializedMethodVersions { + fetch_single: 0, + prove_single: 0, + add_prefunded_specialized_balance: 0, + add_prefunded_specialized_balance_operations: 0, + deduct_from_prefunded_specialized_balance: 0, + deduct_from_prefunded_specialized_balance_operations: 0, + estimated_cost_for_prefunded_specialized_balance_update: 0, + }, + }, + grove_methods: DriveGroveMethodVersions { + basic: DriveGroveBasicMethodVersions { + grove_insert: 0, + grove_insert_empty_tree: 0, + grove_insert_empty_sum_tree: 0, + grove_insert_if_not_exists: 0, + grove_clear: 0, + grove_delete: 0, + grove_get_raw: 0, + grove_get_raw_optional: 0, + grove_get_raw_value_u64_from_encoded_var_vec: 0, + grove_get: 0, + grove_get_path_query_serialized_results: 0, + grove_get_path_query_serialized_or_sum_results: 0, + grove_get_path_query: 0, + grove_get_path_query_with_optional: 0, + grove_get_raw_path_query_with_optional: 0, + grove_get_raw_path_query: 0, + grove_get_proved_path_query: 0, + grove_get_proved_path_query_with_conditional: 0, + grove_get_sum_tree_total_value: 0, + grove_has_raw: 0, + }, + batch: DriveGroveBatchMethodVersions { + batch_insert_empty_tree: 0, + batch_insert_empty_tree_if_not_exists: 0, + batch_insert_empty_tree_if_not_exists_check_existing_operations: 0, + batch_insert: 0, + batch_insert_if_not_exists: 0, + batch_insert_if_changed_value: 0, + batch_replace: 0, + batch_delete: 0, + batch_remove_raw: 0, + batch_delete_up_tree_while_empty: 0, + batch_refresh_reference: 0, + }, + apply: DriveGroveApplyMethodVersions { + grove_apply_operation: 0, + grove_apply_batch: 0, + grove_apply_partial_batch: 0, + }, + costs: DriveGroveCostMethodVersions { + grove_batch_operations_costs: 0, + }, + }, + grove_version: GROVE_V1, + }, + platform_architecture: PlatformArchitectureVersion { + data_contract_factory_structure_version: 0, + document_factory_structure_version: 0, + }, + drive_abci: DriveAbciVersion { + structs: DriveAbciStructureVersions { + platform_state_structure: 0, + platform_state_for_saving_structure: 0, + state_transition_execution_context: 0, + commit: 0, + masternode: 0, + signature_verification_quorum_set: 0, + }, + methods: DriveAbciMethodVersions { + engine: DriveAbciEngineMethodVersions { + init_chain: 0, + check_tx: 0, + run_block_proposal: 0, + finalize_block_proposal: 0, + consensus_params_update: 0, + }, + initialization: DriveAbciInitializationMethodVersions { + initial_core_height_and_time: 0, + create_genesis_state: 0, + }, + core_based_updates: DriveAbciCoreBasedUpdatesMethodVersions { + update_core_info: 0, + update_masternode_list: 0, + update_quorum_info: 0, + masternode_updates: DriveAbciMasternodeIdentitiesUpdatesMethodVersions { + get_voter_identity_key: 0, + get_operator_identity_keys: 0, + get_owner_identity_withdrawal_key: 0, + get_voter_identifier_from_masternode_list_item: 0, + get_operator_identifier_from_masternode_list_item: 0, + create_operator_identity: 0, + create_owner_identity: 0, + create_voter_identity: 0, + disable_identity_keys: 0, + update_masternode_identities: 0, + update_operator_identity: 0, + update_owner_withdrawal_address: 0, + update_voter_identity: 0, + }, + }, + protocol_upgrade: DriveAbciProtocolUpgradeMethodVersions { + check_for_desired_protocol_upgrade: 1, + upgrade_protocol_version_on_epoch_change: 0, + protocol_version_upgrade_percentage_needed: 67, + }, + block_fee_processing: DriveAbciBlockFeeProcessingMethodVersions { + add_process_epoch_change_operations: 0, + process_block_fees: 0, + }, + core_chain_lock: DriveAbciCoreChainLockMethodVersionsAndConstants { + choose_quorum: 0, + verify_chain_lock: 0, + verify_chain_lock_locally: 0, + verify_chain_lock_through_core: 0, + make_sure_core_is_synced_to_chain_lock: 0, + recent_block_count_amount: 2, + }, + core_instant_send_lock: DriveAbciCoreInstantSendLockMethodVersions { + verify_recent_signature_locally: 0, + }, + fee_pool_inwards_distribution: DriveAbciFeePoolInwardsDistributionMethodVersions { + add_distribute_block_fees_into_pools_operations: 0, + add_distribute_storage_fee_to_epochs_operations: 0, + }, + fee_pool_outwards_distribution: DriveAbciFeePoolOutwardsDistributionMethodVersions { + add_distribute_fees_from_oldest_unpaid_epoch_pool_to_proposers_operations: 0, + add_epoch_pool_to_proposers_payout_operations: 0, + find_oldest_epoch_needing_payment: 0, + fetch_reward_shares_list_for_masternode: 0, + }, + withdrawals: DriveAbciIdentityCreditWithdrawalMethodVersions { + build_untied_withdrawal_transactions_from_documents: 0, + dequeue_and_build_unsigned_withdrawal_transactions: 0, + fetch_transactions_block_inclusion_status: 0, + pool_withdrawals_into_transactions_queue: 0, + update_broadcasted_withdrawal_statuses: 0, + append_signatures_and_broadcast_withdrawal_transactions: 0, + }, + voting: DriveAbciVotingMethodVersions { + keep_record_of_finished_contested_resource_vote_poll: 0, + clean_up_after_vote_poll_end: 0, + clean_up_after_contested_resources_vote_poll_end: 0, + check_for_ended_vote_polls: 0, + tally_votes_for_contested_document_resource_vote_poll: 0, + award_document_to_winner: 0, + delay_vote_poll: 0, + run_dao_platform_events: 0, + remove_votes_for_removed_masternodes: 0, + }, + state_transition_processing: DriveAbciStateTransitionProcessingMethodVersions { + execute_event: 0, + process_raw_state_transitions: 0, + decode_raw_state_transitions: 0, + validate_fees_of_event: 0, + }, + epoch: DriveAbciEpochMethodVersions { + gather_epoch_info: 0, + get_genesis_time: 0, + }, + block_start: DriveAbciBlockStartMethodVersions { + clear_drive_block_cache: 0, + }, + block_end: DriveAbciBlockEndMethodVersions { + update_state_cache: 0, + update_drive_cache: 0, + validator_set_update: 0, + }, + platform_state_storage: DriveAbciPlatformStateStorageMethodVersions { + fetch_platform_state: 0, + store_platform_state: 0, + }, + }, + validation_and_processing: DriveAbciValidationVersions { + state_transitions: DriveAbciStateTransitionValidationVersions { + common_validation_methods: DriveAbciStateTransitionCommonValidationVersions { + asset_locks: DriveAbciAssetLockValidationVersions { + fetch_asset_lock_transaction_output_sync: 0, + verify_asset_lock_is_not_spent_and_has_enough_balance: 0, + }, + validate_identity_public_key_contract_bounds: 0, + validate_identity_public_key_ids_dont_exist_in_state: 0, + validate_identity_public_key_ids_exist_in_state: 0, + validate_state_transition_identity_signed: 0, + validate_unique_identity_public_key_hashes_in_state: 0, + validate_master_key_uniqueness: 0, + validate_simple_pre_check_balance: 0, + }, + max_asset_lock_usage_attempts: 16, + identity_create_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: Some(0), + identity_signatures: Some(0), + advanced_minimum_balance_pre_check: None, + nonce: None, + state: 0, + transform_into_action: 0, + }, + identity_update_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: Some(0), + identity_signatures: Some(0), + advanced_minimum_balance_pre_check: None, + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + identity_top_up_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: None, + nonce: None, + state: 0, + transform_into_action: 0, + }, + identity_credit_withdrawal_state_transition: + DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: Some(0), + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + identity_credit_transfer_state_transition: + DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: Some(0), + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + masternode_vote_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: None, + advanced_structure: Some(0), + identity_signatures: None, + advanced_minimum_balance_pre_check: Some(0), + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + contract_create_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: None, + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + contract_update_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: None, + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: None, + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + documents_batch_state_transition: + DriveAbciDocumentsStateTransitionValidationVersions { + balance_pre_check: 0, + basic_structure: 0, + advanced_structure: 0, + state: 0, + revision: 0, + transform_into_action: 0, + data_triggers: DriveAbciValidationDataTriggerAndBindingVersions { + bindings: 0, + triggers: DriveAbciValidationDataTriggerVersions { + create_contact_request_data_trigger: 0, + create_domain_data_trigger: 0, + create_identity_data_trigger: 0, + create_feature_flag_data_trigger: 0, + create_masternode_reward_shares_data_trigger: 0, + delete_withdrawal_data_trigger: 0, + reject_data_trigger: 0, + }, + }, + is_allowed: 0, + document_create_transition_structure_validation: 0, + document_delete_transition_structure_validation: 0, + document_replace_transition_structure_validation: 0, + document_transfer_transition_structure_validation: 0, + document_purchase_transition_structure_validation: 0, + document_update_price_transition_structure_validation: 0, + document_create_transition_state_validation: 1, + document_delete_transition_state_validation: 0, + document_replace_transition_state_validation: 0, + document_transfer_transition_state_validation: 0, + document_purchase_transition_state_validation: 0, + document_update_price_transition_state_validation: 0, + }, + }, + process_state_transition: 0, + state_transition_to_execution_event_for_check_tx: 0, + penalties: PenaltyAmounts { + identity_id_not_correct: 50000000, + unique_key_already_present: 10000000, + validation_of_added_keys_structure_failure: 10000000, + validation_of_added_keys_proof_of_possession_failure: 50000000, + }, + event_constants: DriveAbciValidationConstants { + maximum_vote_polls_to_process: 2, + maximum_contenders_to_consider: 100, + }, + }, + query: DriveAbciQueryVersions { + max_returned_elements: 100, + response_metadata: 0, + proofs_query: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_query: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + prefunded_specialized_balances: DriveAbciQueryPrefundedSpecializedBalancesVersions { + balance: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + identity_based_queries: DriveAbciQueryIdentityVersions { + identity: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + keys: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identities_contract_keys: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_nonce: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_contract_nonce: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + balance: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identities_balances: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + balance_and_revision: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_by_public_key_hash: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + validator_queries: DriveAbciQueryValidatorVersions { + proposed_block_counts_by_evonode_ids: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + proposed_block_counts_by_range: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + data_contract_based_queries: DriveAbciQueryDataContractVersions { + data_contract: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + data_contract_history: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + data_contracts: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + voting_based_queries: DriveAbciQueryVotingVersions { + vote_polls_by_end_date_query: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contested_resource_vote_state: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contested_resource_voters_for_identity: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contested_resource_identity_vote_status: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contested_resources: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + system: DriveAbciQuerySystemVersions { + version_upgrade_state: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + version_upgrade_vote_status: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + epoch_infos: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + partial_status: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + path_elements: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + total_credits_in_platform: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + }, + }, + dpp: DPPVersion { + costs: CostVersions { + signature_verify: 0, + }, + validation: DPPValidationVersions { + json_schema_validator: JsonSchemaValidatorVersions { + new: 0, + validate: 0, + compile: 0, + compile_and_validate: 0, + }, + data_contract: DataContractValidationVersions { + validate: 0, + validate_config_update: 0, + validate_index_definitions: 0, + validate_index_naming_duplicates: 0, + validate_not_defined_properties: 0, + validate_property_definition: 0, + }, + document_type: DocumentTypeValidationVersions { + validate_update: 0, + contested_index_limit: 1, + unique_index_limit: 10, + }, + voting: VotingValidationVersions { + allow_other_contenders_time_mainnet_ms: 604_800_000, // 1 week in ms + allow_other_contenders_time_testing_ms: 2_700_000, //45 minutes + votes_allowed_per_masternode: 5, + }, + }, + state_transition_serialization_versions: StateTransitionSerializationVersions { + identity_public_key_in_creation: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_create_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_update_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_top_up_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_credit_withdrawal_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_credit_transfer_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + masternode_vote_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contract_create_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contract_update_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + documents_batch_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_base_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_create_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + document_replace_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + document_delete_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + document_transfer_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + document_update_price_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + document_purchase_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + }, + state_transition_conversion_versions: StateTransitionConversionVersions { + identity_to_identity_create_transition: 0, + identity_to_identity_top_up_transition: 0, + identity_to_identity_withdrawal_transition: 0, + identity_to_identity_create_transition_with_signer: 0, + }, + state_transition_method_versions: StateTransitionMethodVersions { + public_key_in_creation_methods: PublicKeyInCreationMethodVersions { + from_public_key_signed_with_private_key: 0, + from_public_key_signed_external: 0, + hash: 0, + duplicated_key_ids_witness: 0, + duplicated_keys_witness: 0, + validate_identity_public_keys_structure: 0, + }, + }, + state_transitions: StateTransitionVersions { + documents: DocumentTransitionVersions { + documents_batch_transition: DocumentsBatchTransitionVersions { + validation: DocumentsBatchTransitionValidationVersions { + find_duplicates_by_id: 0, + validate_base_structure: 0, + }, + }, + }, + identities: IdentityTransitionVersions { + max_public_keys_in_creation: 6, + asset_locks: IdentityTransitionAssetLockVersions { + required_asset_lock_duff_balance_for_processing_start_for_identity_create: + 200000, + required_asset_lock_duff_balance_for_processing_start_for_identity_top_up: + 50000, + validate_asset_lock_transaction_structure: 0, + validate_instant_asset_lock_proof_structure: 0, + }, + }, + }, + contract_versions: ContractVersions { + max_serialized_size: 65000, + contract_serialization_version: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contract_structure_version: 0, + created_data_contract_structure: 0, + config: 0, + methods: DataContractMethodVersions { + validate_document: 0, + validate_update: 0, + schema: 0, + }, + document_type_versions: DocumentTypeVersions { + index_versions: DocumentTypeIndexVersions { + index_levels_from_indices: 0, + }, + class_method_versions: DocumentTypeClassMethodVersions { + try_from_schema: 0, + create_document_types_from_document_schemas: 0, + }, + structure_version: 0, + schema: DocumentTypeSchemaVersions { + enrich_with_base_schema: 0, + find_identifier_and_binary_paths: 0, + validate_max_depth: 0, + max_depth: 256, + recursive_schema_validator_versions: RecursiveSchemaValidatorVersions { + traversal_validator: 0, + }, + validate_schema_compatibility: 0, + }, + methods: DocumentTypeMethodVersions { + create_document_from_data: 0, + create_document_with_prevalidated_properties: 0, + prefunded_voting_balance_for_document: 0, + contested_vote_poll_for_document: 0, + estimated_size: 0, + index_for_types: 0, + max_size: 0, + serialize_value_for_key: 0, + deserialize_value_for_key: 0, + }, + }, + }, + document_versions: DocumentVersions { + document_structure_version: 0, + document_serialization_version: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_cbor_serialization_version: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + extended_document_structure_version: 0, + extended_document_serialization_version: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_method_versions: DocumentMethodVersions { + is_equal_ignoring_timestamps: 0, + hash: 0, + get_raw_for_contract: 0, + get_raw_for_document_type: 0, + }, + }, + identity_versions: IdentityVersions { + identity_structure_version: 0, + identity_key_structure_version: 0, + identity_key_type_method_versions: IdentityKeyTypeMethodVersions { + random_public_key_data: 0, + random_public_and_private_key_data: 0, + }, + }, + voting_versions: VotingVersions { + default_vote_poll_time_duration_mainnet_ms: 1_209_600_000, //2 weeks + default_vote_poll_time_duration_test_network_ms: 5_400_000, //90 minutes + contested_document_vote_poll_stored_info_version: 0, + }, + asset_lock_versions: AssetLockVersions { + reduced_asset_lock_value: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + methods: DPPMethodVersions { + epoch_core_reward_credits_for_distribution: 0, + }, + }, + system_data_contracts: SystemDataContractVersions { + withdrawals: 1, + dpns: 1, + dashpay: 1, + masternode_reward_shares: 1, + feature_flags: 1, + }, + fee_version: FEE_VERSION1, + system_limits: SystemLimits { + estimated_contract_max_serialized_size: 16384, + max_field_value_size: 5120, //5 KiB + max_state_transition_size: 20480, //20 KiB + max_transitions_in_documents_batch: 1, + }, + consensus: ConsensusVersions { + tenderdash_consensus_version: 1, + }, +}; diff --git a/packages/rs-platform-versioning/Cargo.toml b/packages/rs-platform-versioning/Cargo.toml index 277009f17c8..553447bc5e5 100644 --- a/packages/rs-platform-versioning/Cargo.toml +++ b/packages/rs-platform-versioning/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-versioning" authors = ["Samuel Westrich "] description = "Version derivation" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-sdk/Cargo.toml b/packages/rs-sdk/Cargo.toml index ed4fdacd1a7..3a77a233c96 100644 --- a/packages/rs-sdk/Cargo.toml +++ b/packages/rs-sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dash-sdk" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" [dependencies] diff --git a/packages/rs-sdk/src/core/transaction.rs b/packages/rs-sdk/src/core/transaction.rs index a7046a2fdb6..39dd85e562c 100644 --- a/packages/rs-sdk/src/core/transaction.rs +++ b/packages/rs-sdk/src/core/transaction.rs @@ -1,12 +1,11 @@ +use crate::platform::fetch_current_no_parameters::FetchCurrent; +use crate::platform::types::epoch::Epoch; use crate::{Error, Sdk}; use bip37_bloom_filter::{BloomFilter, BloomFilterData}; use dapi_grpc::core::v0::{ transactions_with_proofs_request, transactions_with_proofs_response, GetTransactionRequest, GetTransactionResponse, TransactionsWithProofsRequest, TransactionsWithProofsResponse, }; -use dapi_grpc::platform::v0::{ - get_epochs_info_request, get_epochs_info_response, GetEpochsInfoRequest, GetEpochsInfoResponse, -}; use dpp::dashcore::consensus::Decodable; use dpp::dashcore::{Address, InstantLock, MerkleBlock, OutPoint, Transaction, Txid}; use dpp::identity::state_transition::asset_lock_proof::chain::ChainAssetLockProof; @@ -201,30 +200,8 @@ impl Sdk { // Wait until platform chain is on the block's chain locked height loop { - let request = GetEpochsInfoRequest { - version: Some(get_epochs_info_request::Version::V0( - get_epochs_info_request::GetEpochsInfoRequestV0 { - start_epoch: Some(0), - count: 1, - ..Default::default() - }, - )), - }; - - let GetEpochsInfoResponse { - version: - Some(get_epochs_info_response::Version::V0( - get_epochs_info_response::GetEpochsInfoResponseV0 { - metadata: Some(metadata), - .. - }, - )), - } = self.execute(request, RequestSettings::default()).await? - else { - return Err(Error::DapiClientError(String::from( - "missing V0 `metadata` field", - ))); - }; + let (_epoch, metadata) = + Epoch::fetch_current_with_metadata(self).await?; if metadata.core_chain_locked_height >= core_chain_locked_height { break; diff --git a/packages/rs-sdk/src/mock/requests.rs b/packages/rs-sdk/src/mock/requests.rs index 6cb4dde30de..879fe88bb45 100644 --- a/packages/rs-sdk/src/mock/requests.rs +++ b/packages/rs-sdk/src/mock/requests.rs @@ -16,8 +16,8 @@ use dpp::{ }; use drive_proof_verifier::types::{ Contenders, ContestedResources, ElementFetchRequestItem, IdentityBalanceAndRevision, - MasternodeProtocolVote, PrefundedSpecializedBalance, TotalCreditsInPlatform, - VotePollsGroupedByTimestamp, Voters, + MasternodeProtocolVote, PrefundedSpecializedBalance, ProposerBlockCounts, + RetrievedIntegerValue, TotalCreditsInPlatform, VotePollsGroupedByTimestamp, Voters, }; use std::collections::BTreeMap; @@ -210,6 +210,20 @@ impl MockResponse for ProTxHash { } } +impl MockResponse for ProposerBlockCounts { + fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec { + self.0.mock_serialize(sdk) + } + + fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self + where + Self: Sized, + { + let data = RetrievedIntegerValue::::mock_deserialize(sdk, buf); + ProposerBlockCounts(data) + } +} + impl_mock_response!(Identity); impl_mock_response!(IdentityPublicKey); impl_mock_response!(Identifier); diff --git a/packages/rs-sdk/src/platform/fetch_many.rs b/packages/rs-sdk/src/platform/fetch_many.rs index b2891412c7b..feba82fd655 100644 --- a/packages/rs-sdk/src/platform/fetch_many.rs +++ b/packages/rs-sdk/src/platform/fetch_many.rs @@ -4,6 +4,7 @@ //! //! ## Traits //! - `[FetchMany]`: An async trait that fetches multiple items of a specific type from Platform. +use super::LimitQuery; use crate::{ error::Error, mock::MockResponse, @@ -13,9 +14,10 @@ use crate::{ use dapi_grpc::platform::v0::{ GetContestedResourceIdentityVotesRequest, GetContestedResourceVoteStateRequest, GetContestedResourceVotersForIdentityRequest, GetContestedResourcesRequest, - GetDataContractsRequest, GetDocumentsResponse, GetEpochsInfoRequest, GetIdentityKeysRequest, - GetProtocolVersionUpgradeStateRequest, GetProtocolVersionUpgradeVoteStatusRequest, - GetVotePollsByEndDateRequest, + GetDataContractsRequest, GetDocumentsResponse, GetEpochsInfoRequest, + GetEvonodesProposedEpochBlocksByIdsRequest, GetEvonodesProposedEpochBlocksByRangeRequest, + GetIdentitiesBalancesRequest, GetIdentityKeysRequest, GetProtocolVersionUpgradeStateRequest, + GetProtocolVersionUpgradeVoteStatusRequest, GetVotePollsByEndDateRequest, }; use dashcore_rpc::dashcore::ProTxHash; use dpp::data_contract::DataContract; @@ -30,15 +32,14 @@ use dpp::{ use dpp::{document::Document, voting::contender_structs::ContenderWithSerializedDocument}; use drive_proof_verifier::types::{ Contenders, ContestedResource, ContestedResources, DataContracts, ExtendedEpochInfos, - IdentityPublicKeys, MasternodeProtocolVote, MasternodeProtocolVotes, ProtocolVersionUpgrades, - ResourceVotesByIdentity, VotePollsGroupedByTimestamp, Voter, Voters, + IdentityBalances, IdentityPublicKeys, MasternodeProtocolVote, MasternodeProtocolVotes, + ProposerBlockCountById, ProposerBlockCountByRange, ProposerBlockCounts, + ProtocolVersionUpgrades, ResourceVotesByIdentity, VotePollsGroupedByTimestamp, Voter, Voters, }; use drive_proof_verifier::{types::Documents, FromProof}; use rs_dapi_client::{transport::TransportRequest, DapiRequest, RequestSettings}; use std::collections::BTreeMap; -use super::LimitQuery; - /// Fetch multiple objects from Platform. /// /// To fetch multiple objects from Platform, you need to define some query (criteria that fetched objects must match) @@ -264,9 +265,9 @@ impl FetchMany for IdentityPublicKey { /// /// * [EpochQuery](super::types::epoch::EpochQuery) - query that specifies epoch matching criteria /// * [EpochIndex](dpp::block::epoch::EpochIndex) - epoch index of first object to find; will return up to -/// [DEFAULT_EPOCH_QUERY_LIMIT](super::query::DEFAULT_EPOCH_QUERY_LIMIT) objects starting from this index +/// [DEFAULT_EPOCH_QUERY_LIMIT](super::query::DEFAULT_EPOCH_QUERY_LIMIT) objects starting from this index /// * [`LimitQuery`](super::LimitQuery), [`LimitQuery`](super::LimitQuery) - limit query -/// that allows to specify maximum number of objects to fetch; see also [FetchMany::fetch_many_with_limit()]. +/// that allows to specify maximum number of objects to fetch; see also [FetchMany::fetch_many_with_limit()]. impl FetchMany for ExtendedEpochInfo { type Request = GetEpochsInfoRequest; } @@ -283,12 +284,12 @@ impl FetchMany for ExtendedEpochInfo { /// ## Example /// /// ```rust -/// use dash_sdk::{Sdk, platform::FetchMany}; -/// use drive_proof_verifier::types::ProtocolVersionVoteCount; +/// use dash_sdk::{Sdk, platform::FetchMany, Error}; +/// use drive_proof_verifier::types::{ProtocolVersionUpgrades, ProtocolVersionVoteCount}; /// /// # tokio_test::block_on(async { /// let sdk = Sdk::new_mock(); -/// let result = ProtocolVersionVoteCount::fetch_many(&sdk, ()).await; +/// let result: Result = ProtocolVersionVoteCount::fetch_many(&sdk, ()).await; /// # }); /// ``` impl FetchMany for ProtocolVersionVoteCount { @@ -304,15 +305,46 @@ impl FetchMany for ProtocolVersionVote /// ## Supported query types /// /// * [ProTxHash](dashcore_rpc::dashcore::ProTxHash) - proTxHash of first object to find; will return up to -/// [DEFAULT_NODES_VOTING_LIMIT](super::query::DEFAULT_NODES_VOTING_LIMIT) objects +/// [DEFAULT_NODES_VOTING_LIMIT](super::query::DEFAULT_NODES_VOTING_LIMIT) objects /// * [`Option`](dashcore_rpc::dashcore::ProTxHash) - proTxHash that can be and [Option]; if it is `None`, -/// the query will return all objects +/// the query will return all objects /// * [`LimitQuery`](super::LimitQuery) - limit query that allows to specify maximum number of objects -/// to fetch; see also [FetchMany::fetch_many_with_limit()]. +/// to fetch; see also [FetchMany::fetch_many_with_limit()]. impl FetchMany for MasternodeProtocolVote { type Request = GetProtocolVersionUpgradeVoteStatusRequest; } +/// Fetch information about the proposed block count by proposers for a given epoch. +/// +/// Returns list of [ProposerBlockCounts](drive_proof_verifier::types::ProposerBlockCounts) +/// indexed by [ProTxHash](dashcore_rpc::dashcore::ProTxHash). Each item in this list represents +/// node protxhash and the amount of blocks that were proposed. +/// +/// ## Supported query types +/// +/// * [ProTxHash](dashcore_rpc::dashcore::ProTxHash) - proTxHash of first object to find; will return up to +/// [DEFAULT_NODES_VOTING_LIMIT](super::query::DEFAULT_NODES_VOTING_LIMIT) objects +/// * [`Option`](dashcore_rpc::dashcore::ProTxHash) - proTxHash that can be and [Option]; if it is `None`, +/// the query will return all objects +/// * [`LimitQuery`](super::LimitQuery) - limit query that allows to specify maximum number of objects +/// to fetch; see also [FetchMany::fetch_many_with_limit()]. +impl FetchMany for ProposerBlockCountByRange { + type Request = GetEvonodesProposedEpochBlocksByRangeRequest; +} + +/// Fetch information about the proposed block count by proposers for a given epoch. +/// +/// Returns list of [ProposerBlockCounts](drive_proof_verifier::types::ProposerBlockCounts) +/// indexed by [ProTxHash](dashcore_rpc::dashcore::ProTxHash). Each item in this list represents +/// node pro_tx_hash and the amount of blocks that were proposed. +/// +/// ## Supported query types +/// +/// * [ProTxHash](dashcore_rpc::dashcore::ProTxHash) - proTxHash of an evonode to find; will return one evonode block count +impl FetchMany for ProposerBlockCountById { + type Request = GetEvonodesProposedEpochBlocksByIdsRequest; +} + /// Fetch multiple data contracts. /// /// Returns [DataContracts](drive_proof_verifier::types::DataContracts) indexed by [Identifier](dpp::prelude::Identifier). @@ -373,3 +405,13 @@ impl FetchMany for ResourceVote { impl FetchMany for VotePoll { type Request = GetVotePollsByEndDateRequest; } + +// +/// Fetch multiple identity balances. +/// +/// ## Supported query types +/// +/// * [Vec](dpp::prelude::Identifier) - list of identifiers of identities whose balance we want to fetch +impl FetchMany for drive_proof_verifier::types::IdentityBalance { + type Request = GetIdentitiesBalancesRequest; +} diff --git a/packages/rs-sdk/src/platform/query.rs b/packages/rs-sdk/src/platform/query.rs index 6e7de72013e..e55f0e3e6a2 100644 --- a/packages/rs-sdk/src/platform/query.rs +++ b/packages/rs-sdk/src/platform/query.rs @@ -1,20 +1,23 @@ //! Query trait representing criteria for fetching data from Platform. //! //! [Query] trait is used to specify individual objects as well as search criteria for fetching multiple objects from Platform. +use super::types::epoch::EpochQuery; use crate::{error::Error, platform::document_query::DocumentQuery}; use dapi_grpc::mock::Mockable; use dapi_grpc::platform::v0::get_contested_resource_identity_votes_request::GetContestedResourceIdentityVotesRequestV0; use dapi_grpc::platform::v0::get_contested_resource_voters_for_identity_request::GetContestedResourceVotersForIdentityRequestV0; use dapi_grpc::platform::v0::get_contested_resources_request::GetContestedResourcesRequestV0; +use dapi_grpc::platform::v0::get_evonodes_proposed_epoch_blocks_by_range_request::GetEvonodesProposedEpochBlocksByRangeRequestV0; use dapi_grpc::platform::v0::get_path_elements_request::GetPathElementsRequestV0; use dapi_grpc::platform::v0::get_total_credits_in_platform_request::GetTotalCreditsInPlatformRequestV0; use dapi_grpc::platform::v0::{ self as proto, get_identity_keys_request, get_identity_keys_request::GetIdentityKeysRequestV0, get_path_elements_request, get_total_credits_in_platform_request, AllKeys, GetContestedResourceVoteStateRequest, GetContestedResourceVotersForIdentityRequest, - GetContestedResourcesRequest, GetEpochsInfoRequest, GetIdentityKeysRequest, - GetPathElementsRequest, GetProtocolVersionUpgradeStateRequest, - GetProtocolVersionUpgradeVoteStatusRequest, GetTotalCreditsInPlatformRequest, KeyRequestType, + GetContestedResourcesRequest, GetEpochsInfoRequest, + GetEvonodesProposedEpochBlocksByRangeRequest, GetIdentityKeysRequest, GetPathElementsRequest, + GetProtocolVersionUpgradeStateRequest, GetProtocolVersionUpgradeVoteStatusRequest, + GetTotalCreditsInPlatformRequest, KeyRequestType, }; use dapi_grpc::platform::v0::{ GetContestedResourceIdentityVotesRequest, GetPrefundedSpecializedBalanceRequest, @@ -33,11 +36,11 @@ use drive_proof_verifier::types::{KeysInPath, NoParamQuery}; use rs_dapi_client::transport::TransportRequest; use std::fmt::Debug; -use super::types::epoch::EpochQuery; /// Default limit of epoch records returned by Platform. pub const DEFAULT_EPOCH_QUERY_LIMIT: u32 = 100; /// Default limit of epoch records returned by Platform. pub const DEFAULT_NODES_VOTING_LIMIT: u32 = 100; + /// Trait implemented by objects that can be used as queries. /// /// [Query] trait is used to specify criteria for fetching data from Platform. @@ -46,11 +49,10 @@ pub const DEFAULT_NODES_VOTING_LIMIT: u32 = 100; /// Some examples of queries include: /// /// 1. [`Identifier`](crate::platform::Identifier) - fetches an object by its identifier; implemented for -/// [Identity](dpp::prelude::Identity), [DataContract](dpp::prelude::DataContract) and [Document](dpp::document::Document). -/// 2. [`DocumentQuery`] - fetches [Document](dpp::document::Document) based on search -/// conditions; see -/// [query syntax documentation](https://docs.dash.org/projects/platform/en/stable/docs/reference/query-syntax.html) -/// for more details. +/// [Identity](dpp::prelude::Identity), [DataContract](dpp::prelude::DataContract) and [Document](dpp::document::Document). +/// 2. [`DocumentQuery`] - fetches [Document](dpp::document::Document) based on search conditions; see +/// [query syntax documentation](https://docs.dash.org/projects/platform/en/stable/docs/reference/query-syntax.html) +/// for more details. /// /// ## Example /// @@ -436,6 +438,39 @@ impl Query } } +impl Query + for LimitQuery +{ + fn query(self, prove: bool) -> Result { + use proto::get_evonodes_proposed_epoch_blocks_by_range_request::{ + get_evonodes_proposed_epoch_blocks_by_range_request_v0::Start, Version, + }; + let query = match self.query.query(prove)?.version { + Some(Version::V0(v0)) => GetEvonodesProposedEpochBlocksByRangeRequestV0 { + start: self.start_info.map(|v| { + if v.start_included { + Start::StartAt(v.start_key) + } else { + Start::StartAfter(v.start_key) + } + }), + ..v0 + } + .into(), + None => { + return Err(Error::Protocol( + PlatformVersionError::UnknownVersionError( + "version not present in request".into(), + ) + .into(), + )) + } + }; + + Ok(query) + } +} + impl Query for ContestedResourceVotesGivenByIdentityQuery { @@ -583,3 +618,30 @@ impl Query for NoParamQuery { Ok(request) } } + +impl Query for LimitQuery> { + fn query(self, prove: bool) -> Result { + if !prove { + unimplemented!("queries without proofs are not supported yet"); + } + + Ok(GetEvonodesProposedEpochBlocksByRangeRequest { + version: Some(proto::get_evonodes_proposed_epoch_blocks_by_range_request::Version::V0( + GetEvonodesProposedEpochBlocksByRangeRequestV0 { + epoch: self.query.map(|v| v as u32), + start: self.start_info.map(|v| { + use proto::get_evonodes_proposed_epoch_blocks_by_range_request::get_evonodes_proposed_epoch_blocks_by_range_request_v0::Start; + if v.start_included { + Start::StartAt(v.start_key) + } else { + Start::StartAfter(v.start_key) + } + }), + limit: self.limit, + + prove, + }, + )), + }) + } +} diff --git a/packages/rs-sdk/src/platform/types.rs b/packages/rs-sdk/src/platform/types.rs index 13e49fafed2..97a12c40b56 100644 --- a/packages/rs-sdk/src/platform/types.rs +++ b/packages/rs-sdk/src/platform/types.rs @@ -1,5 +1,6 @@ //! Type-specific implementation for various dpp object types to make queries more convenient and intuitive. pub mod epoch; pub mod identity; +pub mod proposed_blocks; mod total_credits_in_platform; pub mod version_votes; diff --git a/packages/rs-sdk/src/platform/types/epoch.rs b/packages/rs-sdk/src/platform/types/epoch.rs index 7026f2e5516..f6b86b77eeb 100644 --- a/packages/rs-sdk/src/platform/types/epoch.rs +++ b/packages/rs-sdk/src/platform/types/epoch.rs @@ -9,6 +9,9 @@ use crate::{ Error, Sdk, }; +/// Epoch type used in the SDK. +pub type Epoch = ExtendedEpochInfo; + #[async_trait] impl FetchCurrent for ExtendedEpochInfo { async fn fetch_current(sdk: &Sdk) -> Result { diff --git a/packages/rs-sdk/src/platform/types/identity.rs b/packages/rs-sdk/src/platform/types/identity.rs index 01599307c1a..632e3bd5e40 100644 --- a/packages/rs-sdk/src/platform/types/identity.rs +++ b/packages/rs-sdk/src/platform/types/identity.rs @@ -5,6 +5,8 @@ use crate::{ platform::{proto, Query}, Error, }; + +use dapi_grpc::platform::v0::get_identities_balances_request::GetIdentitiesBalancesRequestV0; use dapi_grpc::platform::v0::get_identity_balance_and_revision_request::GetIdentityBalanceAndRevisionRequestV0; use dapi_grpc::platform::v0::get_identity_balance_request::GetIdentityBalanceRequestV0; use dapi_grpc::platform::v0::get_identity_by_public_key_hash_request::GetIdentityByPublicKeyHashRequestV0; @@ -12,11 +14,12 @@ use dapi_grpc::platform::v0::get_identity_contract_nonce_request::GetIdentityCon use dapi_grpc::platform::v0::get_identity_nonce_request::GetIdentityNonceRequestV0; use dapi_grpc::platform::v0::get_identity_request::GetIdentityRequestV0; use dapi_grpc::platform::v0::{ - get_identity_balance_and_revision_request, get_identity_balance_request, - get_identity_by_public_key_hash_request, get_identity_contract_nonce_request, - get_identity_nonce_request, get_identity_request, GetIdentityBalanceAndRevisionRequest, - GetIdentityBalanceRequest, GetIdentityByPublicKeyHashRequest, GetIdentityContractNonceRequest, - GetIdentityNonceRequest, GetIdentityRequest, ResponseMetadata, + get_identities_balances_request, get_identity_balance_and_revision_request, + get_identity_balance_request, get_identity_by_public_key_hash_request, + get_identity_contract_nonce_request, get_identity_nonce_request, get_identity_request, + GetIdentitiesBalancesRequest, GetIdentityBalanceAndRevisionRequest, GetIdentityBalanceRequest, + GetIdentityByPublicKeyHashRequest, GetIdentityContractNonceRequest, GetIdentityNonceRequest, + GetIdentityRequest, ResponseMetadata, }; use dpp::prelude::Identity; @@ -39,7 +42,7 @@ impl Query for dpp::prelude::Identifier { Ok(IdentityRequest::GetIdentity(GetIdentityRequest { version: Some(get_identity_request::Version::V0(GetIdentityRequestV0 { id, - prove: true, + prove, })), })) } @@ -144,3 +147,20 @@ impl Query for dpp::prelude::Identifier { Ok(request) } } + +impl Query for Vec { + fn query(self, prove: bool) -> Result { + if !prove { + unimplemented!("queries without proofs are not supported yet"); + } + let ids = self.into_iter().map(|a| a.to_vec()).collect(); + + let request: GetIdentitiesBalancesRequest = GetIdentitiesBalancesRequest { + version: Some(get_identities_balances_request::Version::V0( + GetIdentitiesBalancesRequestV0 { ids, prove }, + )), + }; + + Ok(request) + } +} diff --git a/packages/rs-sdk/src/platform/types/proposed_blocks.rs b/packages/rs-sdk/src/platform/types/proposed_blocks.rs new file mode 100644 index 00000000000..16afa42101e --- /dev/null +++ b/packages/rs-sdk/src/platform/types/proposed_blocks.rs @@ -0,0 +1,73 @@ +//! Helpers for managing platform proposed block counts per epoch + +use crate::platform::{FetchMany, LimitQuery, QueryStartInfo}; +use crate::{Error, Sdk}; +use async_trait::async_trait; +use dashcore_rpc::dashcore::ProTxHash; +use dpp::block::epoch::EpochIndex; +use drive_proof_verifier::types::{ProposerBlockCountByRange, ProposerBlockCounts}; +// Trait needed here to implement functions on foreign type. + +/// A helper trait for fetching block proposal counts for specific proposers. +/// +/// This trait defines an asynchronous method to retrieve block counts for proposers within a specified range. +/// It allows fetching a set of proposers and their corresponding block counts, either by setting a limit +/// or starting from a specific proposer hash. +/// +/// # Type Parameters +/// +/// * `K`: The type of the keys in the map, which must implement the `Ord` trait. +#[async_trait] +pub trait ProposedBlockCountEx { + /// Fetches the proposed block counts for proposers within a given range. + /// + /// This asynchronous method retrieves the number of blocks proposed by various proposers, + /// starting from an optional proposer transaction hash (`ProTxHash`) and returning a limited + /// number of results if specified. If a proposer transaction hash is provided, the query will + /// start at that hash. The optional boolean flag determines whether to include the proposer + /// identified by the `ProTxHash` in the results. + /// + /// ## Parameters + /// + /// * `sdk`: A reference to the `Sdk` instance, which handles the platform interaction. + /// * `limit`: An optional `u16` representing the maximum number of proposer block counts to retrieve. + /// * `start_pro_tx_hash`: An optional tuple where the first element is a `ProTxHash` to start + /// from, and the second element is a boolean indicating whether to include the starting proposer + /// in the results. + /// + /// ## Returns + /// + /// A `Result` containing `ProposerBlockCounts`, which is a mapping between proposers and the number of blocks they proposed, + /// or an `Error` if the operation fails. + /// + /// ## See also + /// + /// - [`ProposerBlockCounts`](crate::ProposerBlockCounts): The data structure holding the result of this operation. + + async fn fetch_proposed_blocks_by_range( + sdk: &Sdk, + epoch: Option, + limit: Option, + start_pro_tx_hash: Option, + ) -> Result; +} + +#[async_trait] +impl ProposedBlockCountEx for ProposerBlockCounts { + async fn fetch_proposed_blocks_by_range( + sdk: &Sdk, + epoch: Option, + limit: Option, + start_pro_tx_hash: Option, + ) -> Result { + ProposerBlockCountByRange::fetch_many( + sdk, + LimitQuery { + query: epoch, + limit, + start_info: start_pro_tx_hash, + }, + ) + .await + } +} diff --git a/packages/rs-sdk/tests/fetch/contested_resource_vote_state.rs b/packages/rs-sdk/tests/fetch/contested_resource_vote_state.rs index 59d8770d955..69b66e0e486 100644 --- a/packages/rs-sdk/tests/fetch/contested_resource_vote_state.rs +++ b/packages/rs-sdk/tests/fetch/contested_resource_vote_state.rs @@ -277,8 +277,8 @@ type MutFn = fn(&mut ContestedDocumentVotePollDriveQuery); #[test_case(|q| q.limit = Some(0), Err("limit 0 out of bounds of [1, 100]"); "limit 0")] #[test_case(|q| q.limit = Some(std::u16::MAX), Err("limit 65535 out of bounds of [1, 100]"); "limit std::u16::MAX")] -#[test_case(|q| q.start_at = Some(([0x11; 32], true)), Ok("Contenders { contenders: {Identifier("); "start_at does not exist should return next contenders")] -#[test_case(|q| q.start_at = Some(([0xff; 32], true)), Ok("Contenders { contenders: {}, abstain_vote_tally: None, lock_vote_tally: None }"); "start_at 0xff;32 should return zero contenders")] +#[test_case(|q| q.start_at = Some(([0x11; 32], true)), Ok("Contenders { winner: None, contenders: {Identifier("); "start_at does not exist should return next contenders")] +#[test_case(|q| q.start_at = Some(([0xff; 32], true)), Ok("Contenders { winner: None, contenders: {}, abstain_vote_tally: None, lock_vote_tally: None }"); "start_at 0xff;32 should return zero contenders")] #[test_case(|q| q.vote_poll.document_type_name = "nx doctype".to_string(), Err(r#"code: InvalidArgument, message: "document type nx doctype not found"#); "non existing document type returns InvalidArgument")] #[test_case(|q| q.vote_poll.index_name = "nx index".to_string(), Err(r#"code: InvalidArgument, message: "index with name nx index is not the contested index"#); "non existing index returns InvalidArgument")] #[test_case(|q| q.vote_poll.index_name = "dashIdentityId".to_string(), Err(r#"code: InvalidArgument, message: "index with name dashIdentityId is not the contested index"#); "existing non-contested index returns InvalidArgument")] diff --git a/packages/rs-sdk/tests/fetch/protocol_version_vote_count.rs b/packages/rs-sdk/tests/fetch/protocol_version_vote_count.rs index 2c31ca7c2f4..b1c9fb4be5c 100644 --- a/packages/rs-sdk/tests/fetch/protocol_version_vote_count.rs +++ b/packages/rs-sdk/tests/fetch/protocol_version_vote_count.rs @@ -1,6 +1,7 @@ use super::{common::setup_logs, config::Config}; use dash_sdk::platform::FetchMany; use dpp::version::ProtocolVersionVoteCount; +use drive_proof_verifier::types::ProtocolVersionUpgrades; /// Given some existing identity ID, when I fetch the identity keys, I get some of them indexed by key ID. #[tokio::test(flavor = "multi_thread", worker_threads = 1)] @@ -10,7 +11,7 @@ async fn test_protocol_version_vote_count() { let cfg = Config::new(); let sdk = cfg.setup_api("test_protocol_version_vote_count").await; - let votings = ProtocolVersionVoteCount::fetch_many(&sdk, ()) + let votings: ProtocolVersionUpgrades = ProtocolVersionVoteCount::fetch_many(&sdk, ()) .await .expect("fetch protocol version votes"); diff --git a/packages/simple-signer/Cargo.toml b/packages/simple-signer/Cargo.toml index 1dfaa156915..07210531d1b 100644 --- a/packages/simple-signer/Cargo.toml +++ b/packages/simple-signer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-signer" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true diff --git a/packages/strategy-tests/Cargo.toml b/packages/strategy-tests/Cargo.toml index 8bf350fda30..b4384441147 100644 --- a/packages/strategy-tests/Cargo.toml +++ b/packages/strategy-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "strategy-tests" -version = "1.2.0" +version = "1.3.0-dev.5" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/wallet-lib/README.md b/packages/wallet-lib/README.md index 765e2baddbf..a02c90c35e4 100644 --- a/packages/wallet-lib/README.md +++ b/packages/wallet-lib/README.md @@ -7,6 +7,11 @@ A pure and extensible JavaScript Wallet Library for Dash +**Warning: This library should only be used in production when connected to trusted nodes. Although +it provides easy access to wallet functionality without requiring a full node, it does not verify +synchronized blockchain data (e.g., the masternode list, InstantSend transactions, ChainLocks) or +check transactions against block headers.** + ## Table of Contents - [Install](#install) - [Usage](#usage) diff --git a/packages/wallet-lib/package.json b/packages/wallet-lib/package.json index 849633cf253..d3705ac77d8 100644 --- a/packages/wallet-lib/package.json +++ b/packages/wallet-lib/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wallet-lib", - "version": "8.2.0", + "version": "8.3.0-dev.5", "description": "Light wallet library for Dash", "main": "src/index.js", "unpkg": "dist/wallet-lib.min.js", diff --git a/packages/wasm-dpp/Cargo.toml b/packages/wasm-dpp/Cargo.toml index 9a7a71206d1..5fef6e5114c 100644 --- a/packages/wasm-dpp/Cargo.toml +++ b/packages/wasm-dpp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-dpp" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true authors = ["Anton Suprunchuk "] diff --git a/packages/wasm-dpp/package.json b/packages/wasm-dpp/package.json index d4a1cd27d6a..2dc2d63ecfd 100644 --- a/packages/wasm-dpp/package.json +++ b/packages/wasm-dpp/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wasm-dpp", - "version": "1.2.0", + "version": "1.3.0-dev.5", "description": "The JavaScript implementation of the Dash Platform Protocol", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/wasm-dpp/src/errors/consensus/consensus_error.rs b/packages/wasm-dpp/src/errors/consensus/consensus_error.rs index 6b26ec12c88..0d4019fc7c7 100644 --- a/packages/wasm-dpp/src/errors/consensus/consensus_error.rs +++ b/packages/wasm-dpp/src/errors/consensus/consensus_error.rs @@ -67,6 +67,7 @@ use dpp::consensus::basic::identity::{DataContractBoundsNotPresentError, Disabli use dpp::consensus::basic::overflow_error::OverflowError; use dpp::consensus::state::data_contract::document_type_update_error::DocumentTypeUpdateError; use dpp::consensus::state::document::document_contest_currently_locked_error::DocumentContestCurrentlyLockedError; +use dpp::consensus::state::document::document_contest_document_with_same_id_already_present_error::DocumentContestDocumentWithSameIdAlreadyPresentError; use dpp::consensus::state::document::document_contest_identity_already_contestant::DocumentContestIdentityAlreadyContestantError; use dpp::consensus::state::document::document_contest_not_joinable_error::DocumentContestNotJoinableError; use dpp::consensus::state::document::document_incorrect_purchase_price_error::DocumentIncorrectPurchasePriceError; @@ -292,6 +293,9 @@ pub fn from_state_error(state_error: &StateError) -> JsValue { StateError::MasternodeIncorrectVoterIdentityIdError(e) => { generic_consensus_error!(MasternodeIncorrectVoterIdentityIdError, e).into() } + StateError::DocumentContestDocumentWithSameIdAlreadyPresentError(e) => { + generic_consensus_error!(DocumentContestDocumentWithSameIdAlreadyPresentError, e).into() + } } } diff --git a/packages/withdrawals-contract/Cargo.toml b/packages/withdrawals-contract/Cargo.toml index fef63810eca..214050324da 100644 --- a/packages/withdrawals-contract/Cargo.toml +++ b/packages/withdrawals-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "withdrawals-contract" description = "Witdrawals data contract schema and tools" -version = "1.2.0" +version = "1.3.0-dev.5" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/withdrawals-contract/package.json b/packages/withdrawals-contract/package.json index ba75585db5d..f4f03afa875 100644 --- a/packages/withdrawals-contract/package.json +++ b/packages/withdrawals-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/withdrawals-contract", - "version": "1.2.0", + "version": "1.3.0-dev.5", "description": "Data Contract to manipulate and track withdrawals", "scripts": { "build": "", diff --git a/scripts/change_base_branch.sh b/scripts/change_base_branch.sh new file mode 100755 index 00000000000..3e8dfaf916c --- /dev/null +++ b/scripts/change_base_branch.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +set -e -o pipefail + +# Function to display help +show_help() { + echo "Usage: $0 OLD_BASE NEW_BASE" + echo "" + echo "Change the base branch for all open PRs from OLD_BASE to NEW_BASE." + echo "" + echo "Arguments:" + echo " OLD_BASE The current base branch to change from." + echo " NEW_BASE The new base branch to change to." + echo "" + echo "Options:" + echo " -h Display this help message." +} + +# Parse command-line options +while getopts "h" opt; do + case $opt in + h) show_help + exit 0 ;; + \?) echo "Invalid option: -$OPTARG" >&2 + show_help + exit 1 ;; + esac +done + +# Shift the parsed options away to handle positional arguments +shift $((OPTIND -1)) + +# Check if the correct number of arguments are provided +if [ "$#" -ne 2 ]; then + echo "Error: OLD_BASE and NEW_BASE are required." + show_help + exit 1 +fi + +# Assign positional arguments to variables +old_base_branch="$1" +new_base_branch="$2" + +# List PRs and change base branch +prs=$(gh pr list --base "$old_base_branch" --json number --jq '.[].number') + +if [ -z "$prs" ]; then + echo "No PRs found with base branch '$old_base_branch'." + exit 0 +fi + +for pr in $prs; do + echo "Updating PR #$pr from base '$old_base_branch' to '$new_base_branch'..." + gh pr edit "$pr" --base "$new_base_branch" +done + +echo "Base branch update complete." diff --git a/scripts/check_network_version.sh b/scripts/check_network_version.sh index 400501329c8..1b833c5b06a 100755 --- a/scripts/check_network_version.sh +++ b/scripts/check_network_version.sh @@ -7,30 +7,26 @@ MASTERNODES="" ALL="" function help() { - if [[ -z "$1" ]]; then - - echo This script connects to all masternodes and tries to detect their version. - echo "" - echo "Usage: $0 [-p | --port ] [-h | --help] [-m | --masternodes ] [-j | --json ] [-w | --mnowatch] [-c | --csv ]" - echo "Options:" - echo " -p, --port Port to connect to (default: $PORT)" - echo " -h, --help Show this help" - echo " -m, --masternodes File with IP addresses of masternodes to check" - echo " -j, --json File with masternodes.json in format generated by mnowatch" - echo " -w, --mnowatch Use mnowatch.org to get masternodes" - echo " -c, --csv Save results to CSV file; default: $CSV" - echo "" - echo "Note: --masternodes, --json, and --mnowatch are mutually exclusive and the latest one takes precedence." - exit 1 - fi + + echo This script connects to all masternodes and tries to detect their version. + echo "" + echo "Usage: $0 [-p | --port ] [-h | --help] [-m | --masternodes ] [-j | --json ] [-w | --mnowatch] [-c | --csv ]" + echo "Options:" + echo " -p, --port Port to connect to (default: $PORT)" + echo " -h, --help Show this help" + echo " -m, --masternodes File with IP addresses of masternodes to check" + echo " -j, --json File with masternodes.json in format generated by mnowatch" + echo " -w, --mnowatch Use mnowatch.org to get masternodes" + echo " -c, --csv Save results to CSV file; default: $CSV" + echo "" + echo "Note: --masternodes, --json, and --mnowatch are mutually exclusive and the latest one takes precedence." + exit 1 } REPO="$(realpath "$(dirname "$0")/..")" function load_masternodes_json() { - # curl https://mnowatch.org/json/?method=emn_details - # TODO: use curl above - jq 'map(select(.platformHTTPPortStatus != "CLOSED"))|map(select(.active_YNU!="N"))|map(select(.status!="P"))' "$1" | + jq 'map(select(.status!="P"))' "$1" | jq -r .[].ip | sort | uniq @@ -38,6 +34,7 @@ function load_masternodes_json() { function grpc_core { docker run \ + --rm \ -v "${REPO}:/repo" \ fullstorydev/grpcurl:latest \ -import-path "/repo/packages/dapi-grpc/protos/core/v0" \ @@ -49,12 +46,15 @@ function grpc_core { function grpc_platform { docker run \ + --rm \ -v "${REPO}:/repo" \ fullstorydev/grpcurl:latest \ -import-path "/repo/packages/dapi-grpc/protos/platform/v0" \ -proto platform.proto \ -max-time 30 \ + -connect-timeout 5 \ -keepalive-time 1 \ + -insecure \ "$@" } @@ -71,28 +71,14 @@ function grpc_platform { function detect_platform() { NODE="$1" - err="$(grpc_platform -insecure "$NODE:${PORT}" org.dash.platform.dapi.v0.Platform/getTotalCreditsInPlatform 2>&1)" - + json="$(grpc_platform "$NODE:${PORT}" org.dash.platform.dapi.v0.Platform/getStatus 2>&1)" echo "============ $NODE ============" >>/tmp/detect_platform.log - echo "$err" >>/tmp/detect_platform.log + echo "$json" >>/tmp/detect_platform.log - case "$err" in - *"decoding error: could not decode"*) - echo 1.1 - ;; - *"upstream connect error or disconnect/reset before headers"*) - echo "upstream connect error" - ;; - *"connect: connection refused"*) - echo "connection refused" - ;; - *"Code: Unimplemented"*) - echo "unimplemented" - ;; - *) - echo "ERROR" - ;; - esac + drive_version="$(echo "$json" | jq -r .v0.version.software.drive 2>/dev/null)" + td_version="$(echo "$json" | jq -r .v0.version.software.tenderdash 2>/dev/null)" + + echo "${drive_version:-unknown}/${td_version:-unknown}" } # Check if core is available by calling getBlockchainStatus @@ -123,6 +109,14 @@ function detect_core() { fi } +function run_nmap() { + nmap -n -Pn -p "443,9999,26656,80" -oG - $MASTERNODES +} + +if [[ $# -eq 0 ]]; then + help +fi + # Parse arguments while [[ "$1" == -* ]]; do case "$1" in @@ -152,6 +146,10 @@ while [[ "$1" == -* ]]; do CSV="$2" shift 2 ;; + -h | --help) + help + shift 1 + ;; *) echo "Unknown option: $1" exit 1 @@ -182,16 +180,21 @@ if [[ -z "$MASTERNODES" ]]; then fi # CSV header -echo "'no','masternode','platform','core'" >"$CSV" +echo "'no','masternode','platform','core','tenderdash','ports'" >"$CSV" + +NMAP_RESULTS=$(run_nmap) i=1 for MN in $MASTERNODES; do echo "Checking status of evo node $MN ($i/$COUNT)" PLATFORM="$(detect_platform "$MN")" + PORTS=$(echo "$NMAP_RESULTS" | grep "$MN.*Ports") # CORE="$(detect_core "$MN")" + grep -v 26656/open <<<"$PORTS" >/dev/null + TENDERDASH=$? # Format result as CSV - echo "$i,'$MN','$PLATFORM','$CORE'" >>"$CSV" + echo "$i,'$MN','$PLATFORM','$CORE','$TENDERDASH','$PORTS'" >>"$CSV" i=$((i + 1)) done diff --git a/yarn.lock b/yarn.lock index c5eb2f48571..f5f5c44e2ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4839,21 +4839,23 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:^1.19.0": - version: 1.19.0 - resolution: "body-parser@npm:1.19.0" +"body-parser@npm:^1.20.3": + version: 1.20.3 + resolution: "body-parser@npm:1.20.3" dependencies: - bytes: "npm:3.1.0" - content-type: "npm:~1.0.4" + bytes: "npm:3.1.2" + content-type: "npm:~1.0.5" debug: "npm:2.6.9" - depd: "npm:~1.1.2" - http-errors: "npm:1.7.2" + depd: "npm:2.0.0" + destroy: "npm:1.2.0" + http-errors: "npm:2.0.0" iconv-lite: "npm:0.4.24" - on-finished: "npm:~2.3.0" - qs: "npm:6.7.0" - raw-body: "npm:2.4.0" - type-is: "npm:~1.6.17" - checksum: 6ed5f3f42f3038301673d90ea1616f7670e78795018904cf581d361523bfa24a7b6d998015d9cdd02668cd70e85d8b3b4b40023e4128e8aec1ddaf6ed1693dc1 + on-finished: "npm:2.4.1" + qs: "npm:6.13.0" + raw-body: "npm:2.5.2" + type-is: "npm:~1.6.18" + unpipe: "npm:1.0.0" + checksum: 8723e3d7a672eb50854327453bed85ac48d045f4958e81e7d470c56bf111f835b97e5b73ae9f6393d0011cc9e252771f46fd281bbabc57d33d3986edf1e6aeca languageName: node linkType: hard @@ -5124,10 +5126,10 @@ __metadata: languageName: node linkType: hard -"bytes@npm:3.1.0": - version: 3.1.0 - resolution: "bytes@npm:3.1.0" - checksum: 7c3b21c5d9d44ed455460d5d36a31abc6fa2ce3807964ba60a4b03fd44454c8cf07bb0585af83bfde1c5cc2ea4bbe5897bc3d18cd15e0acf25a3615a35aba2df +"bytes@npm:3.1.2": + version: 3.1.2 + resolution: "bytes@npm:3.1.2" + checksum: a10abf2ba70c784471d6b4f58778c0beeb2b5d405148e66affa91f23a9f13d07603d0a0354667310ae1d6dc141474ffd44e2a074be0f6e2254edb8fc21445388 languageName: node linkType: hard @@ -5940,13 +5942,20 @@ __metadata: languageName: node linkType: hard -"content-type@npm:^1.0.4, content-type@npm:~1.0.4": +"content-type@npm:^1.0.4": version: 1.0.4 resolution: "content-type@npm:1.0.4" checksum: 5ea85c5293475c0cdf2f84e2c71f0519ced565840fb8cbda35997cb67cc45b879d5b9dbd37760c4041ca7415a3687f8a5f2f87b556b2aaefa49c0f3436a346d4 languageName: node linkType: hard +"content-type@npm:~1.0.5": + version: 1.0.5 + resolution: "content-type@npm:1.0.5" + checksum: 585847d98dc7fb8035c02ae2cb76c7a9bd7b25f84c447e5ed55c45c2175e83617c8813871b4ee22f368126af6b2b167df655829007b21aa10302873ea9c62662 + languageName: node + linkType: hard + "conventional-changelog-angular@npm:^5.0.12": version: 5.0.13 resolution: "conventional-changelog-angular@npm:5.0.13" @@ -6691,20 +6700,13 @@ __metadata: languageName: node linkType: hard -"depd@npm:^2.0.0": +"depd@npm:2.0.0, depd@npm:^2.0.0": version: 2.0.0 resolution: "depd@npm:2.0.0" checksum: c0c8ff36079ce5ada64f46cc9d6fd47ebcf38241105b6e0c98f412e8ad91f084bcf906ff644cc3a4bd876ca27a62accb8b0fff72ea6ed1a414b89d8506f4a5ca languageName: node linkType: hard -"depd@npm:~1.1.2": - version: 1.1.2 - resolution: "depd@npm:1.1.2" - checksum: 2ed6966fc14463a9e85451db330ab8ba041efed0b9a1a472dbfc6fbf2f82bab66491915f996b25d8517dddc36c8c74e24c30879b34877f3c4410733444a51d1d - languageName: node - linkType: hard - "deprecation@npm:^2.0.0, deprecation@npm:^2.3.1": version: 2.3.1 resolution: "deprecation@npm:2.3.1" @@ -6722,6 +6724,13 @@ __metadata: languageName: node linkType: hard +"destroy@npm:1.2.0": + version: 1.2.0 + resolution: "destroy@npm:1.2.0" + checksum: 0acb300b7478a08b92d810ab229d5afe0d2f4399272045ab22affa0d99dbaf12637659411530a6fcd597a9bdac718fc94373a61a95b4651bbc7b83684a565e38 + languageName: node + linkType: hard + "dezalgo@npm:^1.0.0": version: 1.0.3 resolution: "dezalgo@npm:1.0.3" @@ -8820,16 +8829,16 @@ __metadata: languageName: node linkType: hard -"http-errors@npm:1.7.2": - version: 1.7.2 - resolution: "http-errors@npm:1.7.2" +"http-errors@npm:2.0.0": + version: 2.0.0 + resolution: "http-errors@npm:2.0.0" dependencies: - depd: "npm:~1.1.2" - inherits: "npm:2.0.3" - setprototypeof: "npm:1.1.1" - statuses: "npm:>= 1.5.0 < 2" - toidentifier: "npm:1.0.0" - checksum: cf8da344b181599d19a2bfedcbe7c946945a907f2825a0c89e119ce9f9c9a421a49898afe3291485b40ffbbd587b62326f9becc7aa053036eff2559d9436defb + depd: "npm:2.0.0" + inherits: "npm:2.0.4" + setprototypeof: "npm:1.2.0" + statuses: "npm:2.0.1" + toidentifier: "npm:1.0.1" + checksum: 0e7f76ee8ff8a33e58a3281a469815b893c41357378f408be8f6d4aa7d1efafb0da064625518e7078381b6a92325949b119dc38fcb30bdbc4e3a35f78c44c439 languageName: node linkType: hard @@ -9080,20 +9089,13 @@ __metadata: languageName: node linkType: hard -"inherits@npm:2, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.1, inherits@npm:~2.0.3, inherits@npm:~2.0.4": +"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.1, inherits@npm:~2.0.3, inherits@npm:~2.0.4": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: cd45e923bee15186c07fa4c89db0aace24824c482fb887b528304694b2aa6ff8a898da8657046a5dcf3e46cd6db6c61629551f9215f208d7c3f157cf9b290521 languageName: node linkType: hard -"inherits@npm:2.0.3": - version: 2.0.3 - resolution: "inherits@npm:2.0.3" - checksum: 8771303d66c51be433b564427c16011a8e3fbc3449f1f11ea50efb30a4369495f1d0e89f0fc12bdec0bd7e49102ced5d137e031d39ea09821cb3c717fcf21e69 - languageName: node - linkType: hard - "inherits@npm:=2.0.1": version: 2.0.1 resolution: "inherits@npm:2.0.1" @@ -12032,6 +12034,15 @@ __metadata: languageName: node linkType: hard +"on-finished@npm:2.4.1": + version: 2.4.1 + resolution: "on-finished@npm:2.4.1" + dependencies: + ee-first: "npm:1.1.1" + checksum: 8e81472c5028125c8c39044ac4ab8ba51a7cdc19a9fbd4710f5d524a74c6d8c9ded4dd0eed83f28d3d33ac1d7a6a439ba948ccb765ac6ce87f30450a26bfe2ea + languageName: node + linkType: hard + "on-finished@npm:~2.3.0": version: 2.3.0 resolution: "on-finished@npm:2.3.0" @@ -12586,12 +12597,12 @@ __metadata: languageName: node linkType: hard -"path-to-regexp@npm:^1.7.0": - version: 1.8.0 - resolution: "path-to-regexp@npm:1.8.0" +"path-to-regexp@npm:^1.9.0": + version: 1.9.0 + resolution: "path-to-regexp@npm:1.9.0" dependencies: isarray: "npm:0.0.1" - checksum: 45a01690f72919163cf89714e31a285937b14ad54c53734c826363fcf7beba9d9d0f2de802b4986b1264374562d6a3398a2e5289753a764e3a256494f1e52add + checksum: 67f0f4823f7aab356523d93a83f9f8222bdd119fa0b27a8f8b587e8e6c9825294bb4ccd16ae619def111ff3fe5d15ff8f658cdd3b0d58b9c882de6fd15bc1b76 languageName: node linkType: hard @@ -13101,15 +13112,15 @@ __metadata: languageName: node linkType: hard -"raw-body@npm:2.4.0": - version: 2.4.0 - resolution: "raw-body@npm:2.4.0" +"raw-body@npm:2.5.2": + version: 2.5.2 + resolution: "raw-body@npm:2.5.2" dependencies: - bytes: "npm:3.1.0" - http-errors: "npm:1.7.2" + bytes: "npm:3.1.2" + http-errors: "npm:2.0.0" iconv-lite: "npm:0.4.24" unpipe: "npm:1.0.0" - checksum: aa2c506055f32448211a4933c728b6a3d715101975328071ad4aad210a19e5cadd7666d1acc139ed59c7519e5a044a1a19285d4b4bb542d93de6187acf4a5ebf + checksum: 863b5171e140546a4d99f349b720abac4410338e23df5e409cfcc3752538c9caf947ce382c89129ba976f71894bd38b5806c774edac35ebf168d02aa1ac11a95 languageName: node linkType: hard @@ -13854,10 +13865,10 @@ __metadata: languageName: node linkType: hard -"setprototypeof@npm:1.1.1": - version: 1.1.1 - resolution: "setprototypeof@npm:1.1.1" - checksum: b8fcf5b4b8325ea638712ed6e62f8e0ffac69eef1390305a5331046992424e484d4d6603a18d84d4c08c3def50b9195d9e707b747aed5eec15ee66a2a6508318 +"setprototypeof@npm:1.2.0": + version: 1.2.0 + resolution: "setprototypeof@npm:1.2.0" + checksum: fde1630422502fbbc19e6844346778f99d449986b2f9cdcceb8326730d2f3d9964dbcb03c02aaadaefffecd0f2c063315ebea8b3ad895914bf1afc1747fc172e languageName: node linkType: hard @@ -14420,7 +14431,14 @@ __metadata: languageName: node linkType: hard -"statuses@npm:>= 1.5.0 < 2, statuses@npm:~1.5.0": +"statuses@npm:2.0.1": + version: 2.0.1 + resolution: "statuses@npm:2.0.1" + checksum: 18c7623fdb8f646fb213ca4051be4df7efb3484d4ab662937ca6fbef7ced9b9e12842709872eb3020cc3504b93bde88935c9f6417489627a7786f24f8031cbcb + languageName: node + linkType: hard + +"statuses@npm:~1.5.0": version: 1.5.0 resolution: "statuses@npm:1.5.0" checksum: c469b9519de16a4bb19600205cffb39ee471a5f17b82589757ca7bd40a8d92ebb6ed9f98b5a540c5d302ccbc78f15dc03cc0280dd6e00df1335568a5d5758a5c @@ -15024,10 +15042,10 @@ __metadata: languageName: node linkType: hard -"toidentifier@npm:1.0.0": - version: 1.0.0 - resolution: "toidentifier@npm:1.0.0" - checksum: 199e6bfca1531d49b3506cff02353d53ec987c9ee10ee272ca6484ed97f1fc10fb77c6c009079ca16d5c5be4a10378178c3cacdb41ce9ec954c3297c74c6053e +"toidentifier@npm:1.0.1": + version: 1.0.1 + resolution: "toidentifier@npm:1.0.1" + checksum: 952c29e2a85d7123239b5cfdd889a0dde47ab0497f0913d70588f19c53f7e0b5327c95f4651e413c74b785147f9637b17410ac8c846d5d4a20a5a33eb6dc3a45 languageName: node linkType: hard @@ -15360,7 +15378,7 @@ __metadata: languageName: node linkType: hard -"type-is@npm:~1.6.17": +"type-is@npm:~1.6.18": version: 1.6.18 resolution: "type-is@npm:1.6.18" dependencies: